:root {
        --djy-primary: #0091ff;
        --djy-primary-light: #fed7aa;
        --djy-success: #10b981;
        --djy-danger: #ef4444;
        --djy-gray-50: #f9fafb;
        --djy-gray-100: #f3f4f6;
        --djy-gray-200: #e5e7eb;
        --djy-gray-300: #d1d5db;
        --djy-gray-400: #9ca3af;
        --djy-gray-500: #6b7280;
        --djy-gray-600: #4b5563;
        --djy-gray-700: #374151;
        --djy-gray-800: #1f2937;
        --djy-gray-900: #111827;
    }

    .djy-product-page {
        max-width: 1600px;
        margin: 0 auto;
        padding: 1.5rem;
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }

    .djy-breadcrumbs {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 1rem 0;
        font-size: 0.875rem;
        color: #6b7280;
        flex-wrap: wrap;
    }

    .djy-breadcrumbs a {
        color: #6b7280;
        text-decoration: none;
        transition: color 0.2s;
    }

    .djy-product-page {
        padding-top: 130px;
    }

    .djy-mobile-cart-bar {
        display: none;
    }

    .djy-breadcrumbs a:hover {
        color: var(--djy-primary);
    }

    .djy-breadcrumbs span.truncate {
        max-width: 300px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .djy-main-grid {
        display: flex;
        min-width: 0;
        gap: 2rem;
    }

    @media (max-width: 1024px) {
        .djy-main-grid {
            flex-direction: column;
            gap: 1.5rem;
        }
    }

    .djy-product-card {
        flex: 1;
        min-width: 0;
    }

    .djy-product-grid {
        display: flex;

        gap: 2.5rem;
        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #f3f4f6;
        padding: 1.5rem;
    }

    @media (max-width: 768px) {
        .djy-product-grid {
            flex-direction: column;
            gap: 1.5rem;
            padding: 1rem;
        }
    }

    /* ============================================================
       Mobile / Tablet responsive overrides
       ============================================================ */

    /* Hidden by default on desktop */
    .djy-mobile-inline-actions {
        display: none;
    }

    .djy-price-row {
        margin-top: 1rem;
        display: flex;
        flex-direction: column;
    }

    @media (max-width: 768px) {
        .djy-product-page {
            padding: 0.75rem;
        }

        /* Breadcrumbs */
        .djy-breadcrumbs {
            font-size: 0.75rem;
            padding: 0.5rem 0;
        }

        .djy-breadcrumbs span.truncate {
            max-width: 160px;
        }

        /* Gallery */
        .djy-gallery {
            max-width: 100%;
            gap: 0.75rem;
        }

        #djy-splide-thumbs {
            height: 64px !important;
            overflow: hidden;
        }

        #djy-splide-thumbs .splide {
            height: 100% !important;
            overflow: hidden;
        }

        .djy-thumbnails {
            height: 64px;
            overflow: hidden;
        }

        #djy-splide-thumbs .splide__track,
        #djy-splide-thumbs .splide__list {
            height: 100% !important;
        }

        #djy-splide-thumbs .splide__slide {
            height: 100% !important;
            width: 60px !important;
        }

        .djy-thumb-btn {
            width: 3.25rem;
            height: 3.25rem;
        }

        .djy-gallery-actions {
            top: 0.5rem;
            right: 0.5rem;
            gap: 0.375rem;
        }

        .djy-gallery-btn {
            width: 2.25rem;
            height: 2.25rem;
        }

        /* Product info */
        .djy-product-info h1 {
            font-size: 1.125rem;
        }

        .djy-product-short-desc {
            font-size: 0.8125rem;
            line-height: 1.5;
            margin-bottom: 0.625rem;
        }

        .djy-meta-list {
            gap: 0.5rem 1rem;
        }

        /* Price / Qty rows: drop fixed 8rem label width and stack */
        .djy-qty-section {
            flex-wrap: wrap;
            gap: 0.5rem;
        }

        .djy-price-label {
            width: 100%;
            margin-bottom: 0.25rem;
        }

        .djy-qty-section {
            margin: 1rem 0;
        }

        .djy-stock-info {
            margin-left: 0;
            flex-basis: 100%;
            padding-top: 0.25rem;
        }

        /* Associate (variants) section: label above, grid wraps */
        .djy-associate-section {
            flex-direction: column;
            align-items: flex-start;
            gap: 0.5rem;
        }

        .djy-associate-label {
            width: auto;
        }

        .djy-associate-grid {
            gap: 0.5rem;
        }

        /* Details section + cards padding */
        .djy-details-section {
            padding: 1rem;
            margin-top: 1.25rem;
        }

        /* Tabs: allow horizontal scroll if they overflow */
        .djy-tabs-nav {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            flex-wrap: nowrap;
        }

        .djy-tabs-nav::-webkit-scrollbar {
            display: none;
        }

        .djy-tab-btn {
            padding: 0.75rem 1rem;
            font-size: 0.875rem;
            flex-shrink: 0;
            white-space: nowrap;
        }

        /* Specs table: from 3 columns to 1 column */
        .djy-specs-table tbody {
            flex-direction: column;
        }

        .djy-specs-table tr {
            width: 100%;
            margin-right: 0;
        }

        /* Sidebar: hidden on mobile (replaced by bottom bar) */
        .djy-sidebar {
            display: none;
        }

        /* Show bottom cart bar on mobile */
        .djy-mobile-cart-bar {
            display: flex;
        }

        /* Prevent bottom bar from covering content */
        .djy-main-grid {
            padding-bottom: 5rem;
        }

        /* Similar products section */
        .djy-similar-section {
            padding: 1rem;
            margin-top: 1.25rem;
        }

        /* Shipping info grid */
        .djy-shipping-info {
            grid-template-columns: 1fr;
        }

        /* Mobile bottom-fixed cart bar */
        .djy-mobile-cart-bar {

            display: none;
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            background: #fff;
            border-top: 1px solid #e5e7eb;
            padding: 0.625rem 0.75rem;

            padding-bottom: calc(0.625rem + env(safe-area-inset-bottom, 0px));
            z-index: 100;
            box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.08);
            gap: 0.75rem;
            align-items: center;
        }

        .djy-mobile-cart-summary {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
            flex-shrink: 0;
        }

        .djy-mobile-cart-price {
            display: flex;
            align-items: baseline;
            gap: 0.375rem;
        }

        .djy-mobile-cart-label {
            font-size: 0.6875rem;
            color: #9ca3af;
        }

        .djy-mobile-cart-total {
            font-size: 1.125rem;
            font-weight: 700;
            color: #111827;
        }

        .djy-mobile-cart-stock {
            font-size: 0.6875rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }

        .djy-mobile-stock-num {
            font-weight: 700;
            color: #10b981;
        }

        .djy-mobile-stock-num.djy-stock-low {
            color: #0091ff;
        }

        .djy-mobile-cart-actions {
            flex: 1;
            display: flex;
            gap: 0.5rem;
        }

        .djy-mobile-cart-actions .djy-btn {
            flex: 1;
            height: 2.625rem;
            font-size: 0.8125rem;
        }

        /* Mobile inline action buttons (inside product info) */
        .djy-mobile-inline-actions {
            display: flex;
            gap: 0.75rem;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px dashed #e5e7eb;
        }

        .djy-mobile-inline-actions .djy-btn {
            flex: 1;
            height: 2.75rem;
            font-size: 0.875rem;
        }

        .djy-mobile-inline-actions .djy-btn svg {
            flex-shrink: 0;
        }
    }

    @media (max-width: 480px) {
        .djy-product-page {
            padding: 0.5rem;
            padding-top: 85px;
        }

        .djy-product-grid {
            padding: 0.75rem;
        }

        .djy-meta-list {
            font-size: 0.6875rem;
        }

        .djy-price-main {
            font-size: 1.25rem;
        }

        .djy-summary-total-price {
            font-size: 1.5rem;
        }

        .djy-btn {
            height: 2.5rem;
        }
    }

    .djy-gallery {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 450px;
        overflow: visible;
    }

    /* Carousel */
    .djy-carousel {
        position: relative;
        border-radius: 0.5rem;
        overflow: hidden;
        background: #f9fafb;
        border: 1px solid #f3f4f6;
    }

    #djy-splide-main,
    #djy-splide-main .splide__track,
    #djy-splide-main .splide__list {
        width: 100% !important;
        max-width: 100% !important;
    }

    #djy-splide-main .splide__slide {
        display: block !important;
    }

    #djy-splide-main .splide__slide img {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
        object-fit: cover;
        display: block;
    }

    #djy-splide-thumbs {
        width: 100%;
    }

    #djy-splide-thumbs .splide__list {
        display: flex !important;
        gap: 0.5rem;
    }

    #djy-splide-thumbs .splide__slide {
        flex-shrink: 0;
        display: block !important;
    }

    .djy-thumbnails {
        display: block;
        width: 100%;
    }

    .djy-thumbnails .splide {
        overflow: visible;
    }

    .djy-thumb-btn {
        flex-shrink: 0;
        flex-grow: 0;
        width: 4rem;
        height: 4rem;
        border-radius: 0.375rem;
        overflow: hidden;
        border: 2px solid transparent;
        opacity: 0.6;
        cursor: pointer;
        transition: all 0.2s;
        background: none;
        padding: 0;
        display: block;
    }

    .djy-thumb-btn:hover,
    .djy-thumb-btn.active {
        border-color: var(--djy-primary);
        opacity: 1;
    }

    .djy-thumb-btn img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .djy-gallery-actions {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        z-index: 3;
    }

    .djy-description img {
        width: 100%;
        height: 100%;
    }

    .djy-gallery-btn {
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.9);
        border: none;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: #374151;
        transition: all 0.2s;
        backdrop-filter: blur(4px);
    }

    .djy-gallery-btn:hover {
        color: var(--djy-primary);
        background: #fff;
    }

    .djy-gallery-btn.active {
        color: var(--djy-danger);
    }

    .djy-gallery-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .djy-product-info h1 {
        font-size: 1.375rem;
        font-weight: 700;
        line-height: 1.3;
        color: #111827;
        margin-top: 0 !important;
    }

    .djy-product-short-desc {
        margin-top: 0.5rem;
        margin-bottom: 0.75rem;
        color: #4b5563;
        font-size: 0.875rem;
        line-height: 1.55;
        font-weight: 400;
    }

    .djy-product-short-desc p {
        margin: 0 0 0.5rem 0;
    }

    .djy-product-short-desc p:last-child {
        margin-bottom: 0;
    }

    .djy-product-short-desc a {
        color: var(--djy-primary);
        text-decoration: none;
    }

    .djy-product-short-desc a:hover {
        text-decoration: underline;
    }

    .djy-meta-list {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem 1.5rem;
        font-size: 0.75rem;
    }

    .djy-meta-item {
        display: flex;
        align-items: center;
        gap: 0.25rem;
    }

    .djy-meta-label {
        color: #9ca3af;
    }

    .djy-meta-value {
        color: #374151;
        font-weight: 500;
    }

    .djy-meta-value.highlight {
        color: var(--djy-primary);
        font-weight: 700;
        text-transform: uppercase;
    }

    .djy-price-box {



        margin-bottom: 1.5rem;
    }



    .djy-price-row+.djy-price-row {
        border-top: 1px dashed #e5e7eb;
    }

    .djy-price-main {
        font-size: 42px;
        font-weight: 700;
        color: #1852cf;
        letter-spacing: -0.02em;
        line-height: 1;
        margin-bottom: 10px;
    }

    .discount-pill {
        background-color: #ffe4e6;
        color: #e11d48;
        font-size: 16px;
        font-weight: 700;
        padding: 5px 14px;
        border-radius: 9999px;
        letter-spacing: 0.02em;
    }

    .discount-pill_small {
        display: inline-block;
        background-color: #ffe4e6;
        color: #e11d48;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 9999px;
        margin-left: 0.375rem;
        vertical-align: middle;
    }

    .djy-price-original {
        font-size: 0.875rem;
        color: #9ca3af;
        text-decoration: line-through;
        margin-left: 0.5rem;
    }

    .djy-qty-section {
        display: flex;
        align-items: center;
        flex-shrink: 0;
        margin: 1.5rem 0;
    }

    .djy-qty-control {
        display: flex;
        align-items: center;
        height: 2.5rem;
    }

    .djy-qty-btn {
        width: 2.5rem;
        height: 100%;
        border: 1px solid #e5e7eb;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
    }

    .djy-qty-btn:first-child {
        border-radius: 0.375rem 0 0 0.375rem;
    }

    .djy-qty-btn:last-child {
        border-radius: 0 0.375rem 0.375rem 0;
    }

    .djy-qty-btn:hover {
        background: #f9fafb;
    }

    .djy-qty-display {
        width: 4rem;
        height: 100%;
        border-top: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        color: #1f2937;
    }

    .djy-qty-unit {
        margin-left: 0.75rem;
        font-size: 0.875rem;
        color: #9ca3af;
    }

    .djy-stock-info {
        margin-left: 1rem;
        font-size: 0.875rem;
    }

    .djy-stock-info strong {
        font-weight: 700;
        color: #1f2937;
    }

    .djy-stock-low {
        color: var(--djy-danger);
    }

    .djy-restock-link {
        display: block;
        font-size: 0.6875rem;
        color: var(--djy-primary);
        font-weight: 700;
        text-decoration: underline;
    }

    .djy-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        width: 300px;
        flex-shrink: 0;
    }

    .djy-summary-card {
        position: sticky;
        top: 80px;
    }

    .djy-summary-card-list {
        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #f3f4f6;
        padding: 1.5rem;
    }

    .djy-summary-section {
        padding-bottom: 1rem;
        border-bottom: 1px dashed #f3f4f6;
        margin-bottom: 1rem;
    }

    .djy-summary-row {
        display: flex;
        justify-content: space-between;
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .djy-summary-row .label {
        color: #9ca3af;
        font-weight: 500;
    }

    .djy-summary-row .value {
        color: #111827;
        font-weight: 700;
    }

    .djy-summary-total-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .djy-summary-total-label {
        font-size: 0.875rem;
        color: #9ca3af;
        font-weight: 500;
    }

    .djy-summary-total-value {
        text-align: right;
    }

    .djy-summary-total-price {
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--djy-primary);
        line-height: 1;
    }

    .djy-summary-total-unit {
        font-size: 0.6875rem;
        color: #9ca3af;
        margin-top: 0.25rem;
    }

    .djy-action-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .djy-btn {
        height: 2.75rem;
        border-radius: 9999px;
        font-size: 0.875rem;
        font-weight: 700;
        cursor: pointer;
        transition: all 0.2s;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
    }

    .djy-btn:active {
        transform: scale(0.95);
    }

    .djy-btn-primary {
        background: #111827;
        color: #fff;
    }

    .djy-btn-primary:hover {
        background: #000;
    }

    .djy-btn-cart {
        border: 1px solid #d1d5db;
        background: #fff;
        color: #374151;
    }

    .djy-btn-cart:hover {
        background: #f9fafb;
        border-color: #111827;
    }

    /* ---------- Video slide ---------- */
    .djy-video-slide {
        position: relative;
        background: #000;
        display: flex !important;
        align-items: center;
        justify-content: center;
    }

    .djy-product-video {
        width: 100%;
        height: 100%;
        max-height: 480px;
        object-fit: contain;
        display: block;
    }

    .djy-video-mute {
        position: absolute;
        right: 12px;
        bottom: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: none;
        background: rgba(0, 0, 0, 0.55);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        backdrop-filter: blur(6px);
        transition: background 0.2s ease;
        z-index: 5;
    }

    .djy-video-mute:hover {
        background: rgba(0, 0, 0, 0.75);
    }

    .djy-video-badge {
        position: absolute;
        top: 12px;
        left: 12px;
        background: rgba(0, 0, 0, 0.6);
        color: #ffffff;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.08em;
        padding: 4px 8px;
        border-radius: 4px;
        backdrop-filter: blur(6px);
        pointer-events: none;
    }

    /* ---------- Video thumbnail ---------- */
    .djy-thumb-btn--video {
        background: #111827;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .djy-thumb-btn--video .djy-thumb-play {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .djy-thumb-btn--video.active {
        outline: none;
    }

    .djy-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

    /* Product Details Section */
    .djy-details-section {
        margin-top: 2rem;
        padding-top: 2rem;
        border-top: 1px solid #f3f4f6;

        background: #fff;
        border-radius: 0.75rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        border: 1px solid #f3f4f6;
        padding: 1.5rem;
    }

    /* Tabs Navigation */
    .djy-tabs-nav {
        display: flex;
        gap: 0;
        border-bottom: 2px solid #e5e7eb;
        margin-bottom: 1.5rem;
    }

    .djy-tab-btn {
        padding: 0.875rem 1.5rem;
        background: transparent;
        border: none;
        font-size: 0.9375rem;
        font-weight: 500;
        color: #6b7280;
        cursor: pointer;
        position: relative;
        transition: color 0.2s, background 0.2s;
        border-radius: 0.5rem 0.5rem 0 0;
    }

    .djy-tab-btn:hover {
        color: #374151;
        background: #f9fafb;
    }

    .djy-tab-btn.active {
        color: #2563eb;
        font-weight: 600;
    }

    .djy-tab-btn.active::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 2px;
        background: #2563eb;
    }

    /* Tab Content */
    .djy-tab-content {
        display: none;
        animation: fadeIn 0.3s ease;
    }

    .djy-tab-content.active {
        display: block;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Description Tab - Product Specifications */
    .djy-specs-table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 0;
        max-width: 100%;
        table-layout: fixed;
    }

    .djy-specs-title {
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        margin-bottom: 0.75rem;
    }

    .djy-specs-table td {
        padding: 0;
        vertical-align: top;
        font-size: 0.9375rem;
        border: 0;
        line-height: 1.5;
    }

    .djy-specs-label {
        color: #6b7280;
        font-weight: 500;
        white-space: nowrap;
    }

    .djy-specs-value {
        color: #111827;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Key Features Section */
    .djy-features-section {
        margin: 16px 0;
    }

    h3 {
        margin: 0;
    }

    .djy-features-list {
        margin-left: 20px;

        padding: 0;
    }

    .djy-feature-item {
        margin-bottom: 12px;
    }

    .djy-feature-item svg {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        color: #10b981;
    }

    .djy-feature-text {
        color: #374151;
        font-size: 0.9375rem;
        line-height: 1.5;
    }

    /* Description Content */
    .djy-desc-content {
        margin-top: 2rem;
    }

    .djy-description {
        line-height: 1.7;
        color: #4b5563;
        font-size: 0.9375rem;
    }

    .djy-description ul,
    .djy-description ol {
        margin: 1rem 0;
        padding-left: 1.5rem;
    }

    .djy-description li {
        margin-bottom: 0.5rem;
    }

    /* ============================================
       Scraped product description layout
       (rendered by djy_clean_description() in PHP)
       ============================================ */
    .djy-description {
        font-size: 14px;
        color: #333;
        line-height: 1.7;
    }

    .djy-description .djy-row {
        width: 100%;
        margin-top: 24px;
    }

    .djy-description .djy-row:first-child {
        margin-top: 0;
    }

    /* A 型：三栏图文卡片 */
    .djy-description .djy-row--cards {
        display: flex;
        gap: 24px;
    }

    .djy-description .djy-card {
        flex: 1;
        min-width: 0;
    }

    .djy-description .djy-card>div:first-child {
        position: relative;
        width: 100%;
        padding-top: 100%;
        overflow: hidden;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .djy-description .djy-card>div:first-child img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: auto;
    }

    .djy-description .djy-card>div:nth-child(2) {
        margin-top: 12px;
        font-size: 16px;
        font-weight: 700;
        line-height: 24px;
        color: #333;
    }

    .djy-description .djy-card>div:nth-child(3) {
        margin-top: 12px;
        line-height: 18px;
        white-space: pre-line;
    }

    /* B 型：图33% + 文 flex:1 */
    .djy-description .djy-row--media {
        display: flex;
        align-items: flex-start;
        gap: 24px;
    }

    .djy-description .djy-media__img {
        flex: 0 0 33%;
        max-width: 33%;
    }

    .djy-description .djy-media__img>div {
        position: relative;
        width: 100%;
        padding-top: 100%;
        overflow: hidden;
        border-radius: 8px;
        background: #f5f5f5;
    }

    .djy-description .djy-media__img img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        margin: auto;
    }

    .djy-description .djy-media__body {
        flex: 1;
        min-width: 0;
    }

    .djy-description .djy-media__body>div {
        margin-top: 12px;
        line-height: 18px;
        white-space: pre-line;
    }

    .djy-description .djy-media__body>div:first-child {
        font-size: 16px;
        font-weight: 700;
        line-height: 24px;
        color: #333;
    }

    /* C 型：抓的规格表 */
    .djy-description table {
        width: 100%;
        margin-top: 12px;
        border: 1px solid #E5E5E5;
        border-collapse: collapse;
    }

    .djy-description table td {
        padding: 12px 16px;
        border-bottom: 1px solid #E5E5E5;
        line-height: 18px;
        vertical-align: top;
        white-space: pre-wrap;
        font-size: 14px;
    }

    .djy-description table td:nth-child(1) {
        width: 40%;
        background: #F7F8FA;
        border-right: 1px solid #E5E5E5;
        line-height: 24px;
    }

    .djy-description table tr:last-child td {
        border-bottom: 0;
    }

    /* 抓的 HTML 里没有 h3，用第一个 div 当标题 */
    .djy-description .djy-row--spec>div:first-child {
        font-size: 16px;
        font-weight: 700;
        line-height: 24px;
        color: #333;
        margin-bottom: 0;
    }

    /* 响应式 */
    @media (max-width: 768px) {
        .djy-description .djy-row--cards {
            flex-direction: column;
            gap: 16px;
        }

        .djy-description .djy-row--media {
            flex-direction: column;
        }

        .djy-description .djy-media__img {
            flex-basis: 100%;
            max-width: 100%;
        }

        .djy-description table td:nth-child(1) {
            width: 35%;
        }
    }

    /* Specifications Tab */
    .djy-details-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .djy-detail-item {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
        padding: 0.75rem;
        background: #f9fafb;
        border-radius: 0.5rem;
    }

    .djy-detail-label {
        font-size: 0.75rem;
        color: #9ca3af;
        text-transform: uppercase;
        letter-spacing: 0.025em;
    }

    .djy-detail-value {
        font-size: 0.875rem;
        color: #111827;
        font-weight: 500;
    }

    /* Shipping & Returns Tab */
    .djy-shipping-info {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .djy-info-item {
        display: flex;
        gap: 1rem;
        padding: 1.25rem;
        background: #f9fafb;
        border-radius: 0.75rem;
        border: 1px solid #e5e7eb;
    }

    .djy-info-icon {
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fff;
        border-radius: 0.5rem;
        color: #2563eb;
    }

    .djy-info-content h4 {
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        margin: 0 0 0.5rem 0;
    }

    .djy-info-content p {
        margin: 0;
        color: #4b5563;
        font-size: 0.875rem;
        line-height: 1.5;
    }

    .djy-info-note {
        font-size: 0.8125rem !important;
        color: #9ca3af !important;
        margin-top: 0.375rem !important;
    }

    .dashed-line {
        background-image: -webkit-gradient(linear, left top, right top, color-stop(50%, #e5e5e5), color-stop(0%, rgba(255, 255, 255, 0)));
        background-image: linear-gradient(to right, #e5e5e5 50%, rgba(255, 255, 255, 0) 0%);
        background-position: bottom;
        background-size: 10px 1px;
        background-repeat: repeat-x;
        width: 100%;
        height: 1px;
        margin-top: 4px;
    }

    /* Similar Products Section */
    .djy-similar-section {
        margin-top: 2rem;
        padding: 1.5rem;
        background: #fafafa;
        border-radius: 0.75rem;
    }

    .djy-similar-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 1rem;
    }

    .djy-similar-title {
        font-size: 1rem;
        font-weight: 600;
        color: #111827;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .djy-similar-title::before {
        content: "";
        width: 4px;
        height: 16px;
        background: #0091ff;
        border-radius: 2px;
    }

    .djy-similar-count {
        font-size: 0.875rem;
        color: #9ca3af;
    }

    .djy-similar-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .djy-similar-card {
        background: #fff;
        border-radius: 0.5rem;
        overflow: hidden;
        border: 1px solid #e5e7eb;
        transition: all 0.2s;
        text-decoration: none;
    }

    .djy-similar-card:hover {
        border-color: #0091ff;
        box-shadow: 0 4px 12px rgba(0, 145, 255, 0.1);
        transform: translateY(-2px);
    }

    .djy-similar-img {
        aspect-ratio: 1;
        overflow: hidden;
        position: relative;
    }

    .djy-similar-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s;
    }

    .djy-similar-card:hover .djy-similar-img img {
        transform: scale(1.05);
    }

    .djy-similar-tag {
        position: absolute;
        top: 0.5rem;
        left: 0.5rem;
        padding: 0.25rem 0.5rem;
        background: #0091ff;
        color: #fff;
        font-size: 0.625rem;
        font-weight: 600;
        border-radius: 0.25rem;
        text-transform: uppercase;
    }

    .djy-similar-info {
        padding: 0.75rem;
    }

    .djy-similar-name {
        font-size: 0.8125rem;
        color: #374151;
        line-height: 1.4;
        margin-bottom: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        min-height: 2.25rem;
    }

    .djy-similar-rating {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        margin-bottom: 0.5rem;
    }

    .djy-similar-stars {
        display: flex;
        gap: 1px;
    }

    .djy-similar-star {
        color: #fbbf24;
        font-size: 0.75rem;
    }

    .djy-similar-bottom {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 0.5rem;
    }

    .djy-similar-stock {
        font-size: 0.6875rem;
        color: #10b981;
        font-weight: 500;
    }

    .djy-similar-stock.low {
        color: #0091ff;
    }

    .djy-similar-star.empty {
        color: #e5e7eb;
    }

    .djy-similar-reviews {
        font-size: 0.6875rem;
        color: #9ca3af;
    }

    .djy-similar-price {
        font-size: 1rem;
        font-weight: 700;
        color: #111827;
    }

    .djy-similar-price .currency {
        font-size: 0.75rem;
    }

    @media (max-width: 768px) {
        .djy-similar-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }
    }

    @media (max-width: 480px) {
        .djy-similar-grid {
            grid-template-columns: 1fr;
        }
    }

    /* Associate Products Section */
    .djy-associate-section {
        margin: 1.5rem 0;
        display: flex;
    }

    .djy-associate-label {
        width: 8rem;
        font-size: 0.875rem;
        color: #6b7280;
        font-weight: 500;
        white-space: nowrap;
    }

    .djy-associate-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        flex: 1;
    }

    .djy-variant-btn {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.25rem;
        border-radius: 0.375rem;
        border: 2px solid #f3f4f6;
        background: #fff;
        cursor: pointer;
        transition: all 0.2s;
        text-decoration: none;
    }

    .djy-specs-section {
        margin-top: 16px;
    }

    .djy-variant-btn:hover {
        border-color: #d1d5db;
    }

    .djy-variant-btn.active {
        border-color: #0091ff;
    }

    .djy-variant-btn.outofstock {
        cursor: default;
    }

    .djy-variant-btn.outofstock .djy-variant-img img {
        opacity: 0.4;
    }

    .djy-variant-btn.outofstock .djy-variant-text {
        color: #9ca3af;
    }

    .djy-variant-img {
        width: 2rem;
        height: 2rem;
        border-radius: 0.25rem;
        background: #f9fafb;
        border: 1px solid #f3f4f6;
        overflow: visible;
        flex-shrink: 0;
        position: relative;
    }

    .djy-variant-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .djy-variant-btn.active::after {
        content: "";
        position: absolute;
        right: -1px;
        top: -1px;
        width: 20px;
        height: 20px;
        background: #0091ff;
        border-radius: 0 0.375rem 0 0;
        clip-path: polygon(0 0, 100% 0, 100% 100%);
        z-index: 1;
    }

    .djy-variant-btn.active::before {
        content: "✓";
        position: absolute;
        right: 2px;
        top: 2px;
        color: #fff;
        font-size: 9px;
        line-height: 1;
        z-index: 2;
        font-weight: bold;
    }

    #djy-splide-thumbs .splide__track--nav>.splide__list>.splide__slide,
    #djy-splide-thumbs .splide__track--nav>.splide__list>.splide__slide.is-active {
        border: 0 !important;
    }

    .djy-variant-text {
        font-size: 0.75rem;
        font-weight: 500;
        color: #374151;
        padding-right: 0.5rem;
    }

    .djy-variant-btn.active .djy-variant-text {
        color: #c2410c;
    }

    .djy-specs-table tbody {
        display: flex;
        flex-wrap: wrap;
    }


    .djy-specs-table tr {
        width: calc(33.33% - 15px);
        margin-right: 15px;
        margin-bottom: 12px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -ms-flex-wrap: nowrap;
        flex-wrap: nowrap;
        box-sizing: border-box;
    }

    /* ============================================================
       Trust Badge Cards (Warranty + Returns)
       ============================================================ */
    .trust-badges {
        display: flex;
        flex-direction: column;
        gap: 0.625rem;
        margin-top: 1rem;
    }

    .trust-badge-card {
        position: relative;
        display: flex;
        align-items: center;
        gap: 0.875rem;
        padding: 0.75rem 0.875rem;
        background: #f9fafb;
        border: 1px solid #f3f4f6;
        border-radius: 0.625rem;
        cursor: pointer;
        transition: background 0.2s ease, border-color 0.2s ease,
            box-shadow 0.2s ease, transform 0.2s ease;
        outline: none;
    }

    .trust-badge-card:hover,
    .trust-badge-card:focus,
    .trust-badge-card:focus-within {
        border-color: #0091ff;
        background: #fff;
        box-shadow: 0 6px 18px rgba(0, 145, 255, 0.10);
        transform: translateY(-1px);
    }

    .trust-icon-box {
        flex-shrink: 0;
        width: 3rem;
        height: 3rem;
        border-radius: 0.625rem;
        background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
        color: #0091ff;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease;
    }

    .trust-badge-card:hover .trust-icon-box,
    .trust-badge-card:focus .trust-icon-box {
        transform: scale(1.05);
    }

    .trust-content {
        flex: 1;
        min-width: 0;
    }

    .trust-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        margin-bottom: 0.125rem;
        font-size: 0.8375rem;
        font-weight: 700;
        color: #111827;
        line-height: 1.3;
    }

    .trust-desc {
        font-size: 0.75rem;
        color: #6b7280;
        line-height: 1.45;
    }

    /* Popover (appears on hover / focus) */
    .trust-popover {
        position: absolute;
        bottom: calc(100% + 0.5rem);
        left: 0;
        width: 360px;
        max-height: 360px;
        overflow-y: auto;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 0.875rem;
        box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
        padding: 1rem 1.125rem;
        opacity: 0;
        visibility: hidden;
        transform: translateY(6px) scale(0.98);
        transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s;
        z-index: 60;
        scrollbar-width: thin;
        scrollbar-color: #d1d5db transparent;
    }

    .trust-popover::-webkit-scrollbar {
        width: 6px;
    }

    .trust-popover::-webkit-scrollbar-thumb {
        background: #d1d5db;
        border-radius: 3px;
    }

    .trust-popover::-webkit-scrollbar-track {
        background: transparent;
    }

    /* Popover arrow */
    .trust-popover::after {
        content: "";
        position: absolute;
        top: 100%;
        left: 1.5rem;
        width: 12px;
        height: 12px;
        background: #fff;
        border-right: 1px solid #e5e7eb;
        border-bottom: 1px solid #e5e7eb;
        transform: translateY(-50%) rotate(45deg);
    }

    .trust-badge-card:hover .trust-popover,
    .trust-badge-card:focus .trust-popover,
    .trust-badge-card:focus-within .trust-popover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
    }

    .popover-header {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #f3f4f6;
        color: #0091ff;
        font-weight: 700;
        font-size: 0.9375rem;
    }

    .popover-header svg {
        flex-shrink: 0;
    }

    .popover-quick-summary {
        font-size: 0.8125rem;
        color: #374151;
        line-height: 1.55;
        padding: 0.625rem 0.75rem;
        background: #f9fafb;
        border-radius: 0.5rem;
        border-left: 3px solid #0091ff;
        margin-bottom: 0.875rem;
    }

    .popover-lang-section {
        margin-bottom: 0.875rem;
    }

    .popover-lang-section:last-of-type {
        margin-bottom: 0;
    }

    .popover-section-title {
        display: flex;
        align-items: center;
        gap: 0.375rem;
        font-size: 0.6875rem;
        font-weight: 700;
        color: #6b7280;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 0.5rem;
    }

    .popover-section-title .popover-lang-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 1.5rem;
        height: 1.125rem;
        padding: 0 0.375rem;
        background: #e0f2fe;
        color: #0091ff;
        border-radius: 0.25rem;
        font-size: 0.625rem;
        font-weight: 700;
        letter-spacing: 0.04em;
    }

    .popover-section-content {
        font-size: 0.8125rem;
        line-height: 1.6;
        color: #4b5563;
    }

    .popover-section-content p {
        margin: 0 0 0.5rem 0;
    }

    .popover-section-content p:last-child {
        margin-bottom: 0;
    }

    .popover-section-content strong {
        color: #111827;
        font-weight: 700;
    }

    .popover-section-content ol,
    .popover-section-content ul {
        margin: 0.5rem 0;
        padding-left: 1.25rem;
    }

    .popover-section-content li {
        margin-bottom: 0.375rem;
    }

    .popover-section-subtitle {
        font-size: 0.8125rem;
        font-weight: 700;
        color: #111827;
        margin-top: 0.625rem;
        margin-bottom: 0.25rem;
    }

    .popover-section-subtitle:first-child {
        margin-top: 0;
    }

    .popover-footer-link {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.625rem 0 0 0;
        margin-top: 0.5rem;
        border-top: 1px solid #f3f4f6;
        color: #0091ff;
        font-size: 0.8125rem;
        font-weight: 600;
        text-decoration: none;
        transition: color 0.2s ease;
    }

    .popover-footer-link:hover {
        color: #0066cc;
    }

    /* Hide popovers when their parent column collapses (mobile bottom bar / etc.) */
    @media (max-width: 768px) {
        .trust-badge-card {
            padding: 0.625rem 0.75rem;
            gap: 0.625rem;
        }

        .trust-icon-box {
            width: 2.5rem;
            height: 2.5rem;
        }

        .trust-icon-box svg {
            width: 22px;
            height: 22px;
        }

        .trust-popover {
            width: 280px;
            max-height: 360px;
            left: auto;
            right: -0.5rem;
            font-size: 0.8125rem;
        }

        .trust-popover::after {
            left: auto;
            right: 1rem;
        }

        .trust-desc {
            font-size: 0.6875rem;
        }
    }
/* Looping slides can extend outside their track without widening the page. */
.djy-product-page { overflow-x: clip; }

/* Reserve the gallery before Splide or media has loaded. */
.djy-gallery { min-width: 0; }
#djy-splide-main { visibility: visible; aspect-ratio: 1 / 1; overflow: hidden; background: #f8fafc; }
#djy-splide-main .splide__track { height: 100%; }
#djy-splide-main .splide__list { display: flex; height: 100%; margin: 0; padding: 0; list-style: none; }
#djy-splide-main .splide__slide { position: relative; flex-shrink: 0; width: 100%; height: 100%; overflow: hidden; }
#djy-splide-main:not(.is-initialized) .splide__slide:not(:first-child) { display: none !important; }
#djy-splide-main .splide__slide > img,
#djy-splide-main .splide__slide > video { display: block; width: 100%; height: 100%; aspect-ratio: 1; object-fit: contain; }
#djy-splide-thumbs { visibility: visible; overflow: hidden; }
#djy-splide-thumbs .splide__slide { box-sizing: border-box; flex-shrink: 0; }
#djy-splide-thumbs:not(.is-initialized) .splide__slide { width: 72px; height: 72px; }
#djy-splide-thumbs:not(.is-initialized) .splide__track { max-height: 72px; }
#djy-splide-thumbs .splide__slide.is-active .djy-thumb-btn { border-color: #0091ff; box-shadow: inset 0 0 0 1px #0091ff; }
.djy-media-loader { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 10px; background: rgb(248 250 252 / 45%); color: #475569; font-size: 12px; pointer-events: none; z-index: 2; }
.is-media-loading > .djy-media-loader, .djy-media-loader.is-error { display: flex; }
.djy-media-spinner { width: 28px; height: 28px; border: 3px solid #dbeafe; border-top-color: #0091ff; border-radius: 50%; animation: djy-media-spin .8s linear infinite; }
@keyframes djy-media-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .djy-media-spinner { animation: none; } }
.djy-thumb-btn--video { position: relative; overflow: hidden; }
.djy-thumb-btn--video > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.djy-thumb-btn--video .djy-thumb-play { position: relative; z-index: 1; border-radius: 50%; background: rgb(0 0 0 / 45%); color: #fff; padding: 4px; }

/* One sizing model for Splide slides and their buttons; all rings stay inside. */
#djy-splide-thumbs .splide__list { gap: 0 !important; }
#djy-splide-thumbs .splide__slide { padding: 0; }
#djy-splide-thumbs .splide__slide > .djy-thumb-btn {
    box-sizing: border-box; position: relative; width: 100%; height: 100%;
    min-width: 0; min-height: 0; max-width: none; padding: 0; margin: 0;
    border: 0; outline: none; border-radius: 6px; opacity: 1; overflow: hidden;
    background: #f1f5f9; box-shadow: none;
}
#djy-splide-thumbs .splide__slide > .djy-thumb-btn::after {
    content: ''; position: absolute; inset: 0; border: 2px solid transparent;
    border-radius: inherit; pointer-events: none; z-index: 3; box-sizing: border-box;
}
#djy-splide-thumbs .splide__slide.is-active > .djy-thumb-btn,
#djy-splide-thumbs .splide__slide > .djy-thumb-btn.active { border: 0; outline: none; box-shadow: none; }
#djy-splide-thumbs .splide__slide.is-active > .djy-thumb-btn::after,
#djy-splide-thumbs .splide__slide > .djy-thumb-btn.active::after,
#djy-splide-thumbs .splide__slide > .djy-thumb-btn:focus-visible::after { border-color: #0091ff; }
#djy-splide-thumbs .splide__slide > .djy-thumb-btn:hover::after { border-color: #7cc5ff; }
#djy-splide-thumbs .djy-thumb-btn > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#djy-splide-main .djy-video-slide { background: #f1f5f9; }
#djy-splide-main .djy-product-video { max-height: none; }
@media (max-width:768px) {
    #djy-splide-thumbs .splide__slide { width: 56px !important; height: 56px !important; }
}
