/******************************************************************************
 *
 * Nexus Product UI Fixes v11.1
 *
 * Scope:
 * - Product identity typography aligned with the approved concept
 * - Desktop product thumbnails moved beside the main image
 * - RTL: thumbnails on the right
 * - LTR: thumbnails on the left
 *
 ******************************************************************************/

/* ==========================================================================
   Product Identity — Approved Concept Scale
   ========================================================================== */

.nx-arrival-identity .nx-product-identity-card {
    padding: 24px;
}

.nx-arrival-identity .nx-product-brand-line {
    gap: 8px;
}

.nx-arrival-identity .nx-product-brand-line .nx-chip {
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.4;
}

.nx-arrival-identity .nx-product-title {
    margin-block-start: 16px;
    font-size: 25px;
    line-height: 1.65;
    font-weight: 800;
    letter-spacing: -0.015em;
    text-wrap: balance;
}

.nx-arrival-identity .nx-product-summary {
    margin-block-start: 12px;
    font-size: 14px;
    line-height: 2;
    -webkit-line-clamp: 4;
}

.nx-arrival-identity .nx-product-highlight-grid {
    margin-block-start: 20px;
    gap: 10px;
}

.nx-arrival-identity .nx-product-highlight-item {
    min-height: 64px;
    padding: 10px 12px;
}

.nx-arrival-identity .nx-product-highlight-label {
    font-size: 11px;
}

.nx-arrival-identity .nx-product-highlight-value {
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================================================
   Product Gallery — Desktop Vertical Thumbnail Rail
   ========================================================================== */

@media (min-width: 769px) {
    .nx-product-gallery-shell {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 68px;
        grid-template-areas:
            "media thumbs"
            "note note";
        align-items: start;
        gap: 12px;
        direction: ltr;
    }

    html[dir="ltr"] .nx-product-gallery-shell {
        grid-template-columns: 68px minmax(0, 1fr);
        grid-template-areas:
            "thumbs media"
            "note note";
    }

    .nx-product-gallery-shell .nx-arrival-media {
        grid-area: media;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 0;
        min-height: 350px;
        padding: 34px 4px 8px;
        overflow: hidden;
        direction: rtl;
    }

    html[dir="ltr"] .nx-product-gallery-shell .nx-arrival-media {
        direction: ltr;
    }

    .nx-product-gallery-shell .nx-product-media-badge {
        position: absolute;
        inset-block-start: 12px;
        inset-inline-end: 12px;
        z-index: 2;
    }

    .nx-product-gallery-shell .nx-arrival-thumbs {
        grid-area: thumbs;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        width: 68px;
        margin: 0;
        padding: 0 2px;
        max-height: 350px;
        overflow-x: hidden;
        overflow-y: auto;
        direction: rtl;
        scrollbar-width: thin;
    }

    .nx-product-gallery-shell .nx-arrival-thumb {
        width: 64px;
        height: 64px;
        min-width: 64px;
        min-height: 64px;
        flex: 0 0 64px;
        margin: 0;
        padding: 4px;
    }

    .nx-product-gallery-shell .nx-arrival-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .nx-product-gallery-shell .nx-product-main-image {
        display: block;
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: 390px;
        margin-inline: -8%;
        object-fit: contain;
        object-position: center;
        transform: scale(1.08);
        transform-origin: center;
    }

    .nx-product-gallery-shell .nx-product-gallery-note {
        grid-area: note;
        direction: rtl;
    }

    html[dir="ltr"] .nx-product-gallery-shell .nx-product-gallery-note {
        direction: ltr;
    }
}

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 768px) {
    .nx-arrival-identity .nx-product-title {
        font-size: 22px;
        line-height: 1.65;
    }

    .nx-arrival-identity .nx-product-summary {
        font-size: 13px;
    }

    .nx-product-gallery-shell .nx-arrival-thumbs {
        display: flex;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .nx-product-gallery-shell .nx-arrival-thumb {
        flex: 0 0 64px;
        width: 64px;
        height: 64px;
    }

    .nx-product-gallery-shell .nx-arrival-media {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 310px;
        overflow: hidden;
    }

    .nx-product-gallery-shell .nx-product-main-image {
        width: 108%;
        max-width: none;
        max-height: 330px;
        margin-inline: -4%;
        object-fit: contain;
        object-position: center;
    }

}
