/* ═══════════════════════════════════════════════
   Product Details — Mobile-First Luxury RTL
   ═══════════════════════════════════════════════ */

/* ─────────────────────────────────
   BACK BUTTON
   ───────────────────────────────── */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.75rem 1rem;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    transition: var(--transition-fast);
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

.back-btn:active {
    color: var(--color-accent);
}

/* ─────────────────────────────────
   PRODUCT LAYOUT
   ───────────────────────────────── */
.product-layout {
    display: flex;
    flex-direction: column;
}

/* ═════════════════════════════════════════════
   PRODUCT GALLERY (.pg)
   ═════════════════════════════════════════════ */
.pg {
    position: relative;
    width: 100%;
    opacity: 0;
    animation: pgFadeIn 0.6s var(--ease) 0.1s forwards;
}

@keyframes pgFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

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

/* ── Stage ── */
.pg__stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #F5F3EF, #EBE7E0);
    overflow: hidden;
    cursor: pointer;
}

.pg__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s var(--ease);
}

.pg__img.is-fading {
    opacity: 0;
}

/* Skeleton shimmer while loading */
.pg__stage::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 25%, rgba(255, 255, 255, 0.4) 50%, transparent 75%);
    background-size: 300% 100%;
    animation: pgShimmer 1.5s infinite;
    z-index: 0;
    pointer-events: none;
}

.pg__stage.is-loaded::before {
    display: none;
}

@keyframes pgShimmer {
    from {
        background-position: 200% 0;
    }

    to {
        background-position: -100% 0;
    }
}

/* ── Zoom button ── */
.pg__zoom {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    opacity: 0.7;
}

.pg__zoom svg {
    width: 16px;
    height: 16px;
}

.pg__zoom:active {
    transform: scale(0.9);
}

/* ── Counter badge ── */
.pg__counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-family);
    padding: 4px 10px;
    border-radius: 50px;
    z-index: 4;
    direction: ltr;
}

/* ── Nav buttons ── */
.pg__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
    opacity: 0;
}

.pg:hover .pg__nav,
.pg__nav:focus-visible {
    opacity: 1;
}

.pg__nav svg {
    width: 16px;
    height: 16px;
}

.pg__prev {
    right: 10px;
}

.pg__next {
    left: 10px;
}

.pg__nav:active {
    transform: translateY(-50%) scale(0.9);
}

/* ── Dots (mobile) ── */
.pg__dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 5;
}

.pg__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.pg__dot.is-active {
    background: var(--color-accent);
    width: 20px;
    border-radius: 4px;
}

/* ── Thumbnails ── */
.pg__thumbs {
    display: flex;
    gap: 8px;
    padding: 10px;
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.pg__thumbs::-webkit-scrollbar {
    display: none;
}

.pg__thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 2px solid transparent;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    background: var(--color-border-light);
    transition: var(--transition-fast);
}

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

.pg__thumb.is-active {
    border-color: var(--color-accent);
}

/* ── Empty placeholder ── */
.pg__empty {
    aspect-ratio: 1 / 1;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F5F3EF, #EBE7E0);
    color: var(--color-text-muted);
    gap: 10px;
    border-radius: 0;
}

.pg__empty svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.pg__empty span {
    font-size: 0.85rem;
    opacity: 0.5;
}

/* ── Lightbox ── */
.pg__lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.pg__lightbox.is-open {
    opacity: 1;
    visibility: visible;
}

.pg__lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.pg__lb-close svg {
    width: 20px;
    height: 20px;
}

.pg__lb-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: transform 0.3s var(--ease);
}

.pg__lightbox.is-open .pg__lb-img {
    transform: scale(1);
}

/* ─────────────────────────────────
   DETAILS
   ───────────────────────────────── */
.details {
    padding: 1.25rem 1rem 6rem;
}

.details__inner {
    max-width: 600px;
}

.details__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1.4;
    margin-bottom: 0.75rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

.details__title.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.details__weight {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-accent-dark);
    background: rgba(201, 168, 76, 0.08);
    border: 1px solid rgba(201, 168, 76, 0.15);
    padding: 6px 14px;
    border-radius: 50px;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease) 0.1s, transform 0.5s var(--ease) 0.1s;
}

.details__weight.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.details__weight svg {
    width: 16px;
    height: 16px;
}

.details__desc {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.9;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease) 0.15s, transform 0.5s var(--ease) 0.15s;
}

.details__desc.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─────────────────────────────────
   FEATURES
   ───────────────────────────────── */
.features {
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s var(--ease) 0.2s, transform 0.5s var(--ease) 0.2s;
}

.features.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.features__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border-light);
}

.features__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.features__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border-light);
}

.features__name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.features__value {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text);
}

/* ─────────────────────────────────
   DESKTOP CTA — Hidden on mobile
   ───────────────────────────────── */
.details__cta-desktop {
    display: none;
}

/* ─────────────────────────────────
   MOBILE STICKY BAR
   ───────────────────────────────── */
.sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--color-border-light);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.06);
}

.sticky-bar__wa {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #25D366;
    color: #fff;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    transition: var(--transition-fast);
    min-height: 48px;
}

.sticky-bar__wa svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sticky-bar__wa:active {
    transform: scale(0.97);
}

.sticky-bar__copy {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

.sticky-bar__copy svg {
    width: 20px;
    height: 20px;
}

.sticky-bar__copy:active {
    background: var(--color-border-light);
}

/* ─────────────────────────────────
   CTA BUTTONS (Desktop)
   ───────────────────────────────── */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    min-height: 50px;
}

.cta-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.cta-btn--wa {
    background: #25D366;
    color: #fff;
    flex: 1;
}

.cta-btn--copy {
    background: var(--color-surface);
    color: var(--color-text-secondary);
    border: 1.5px solid var(--color-border);
}

/* ─────────────────────────────────
   TOAST
   ───────────────────────────────── */
.toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--color-primary);
    color: #fff;
    padding: 10px 24px;
    border-radius: 50px;
    font-family: var(--font-family);
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: var(--shadow-lg);
}

.toast.is-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}


/* ═══════════════════════════════════
   SMALL TABLETS (481px+)
   ═══════════════════════════════════ */
@media (min-width: 481px) {
    .pg__stage {
        aspect-ratio: 4 / 3;
    }

    .pg__empty {
        aspect-ratio: 4 / 3;
    }

    .pg__thumb {
        width: 60px;
        height: 60px;
    }

    .details {
        padding: 1.5rem 1.5rem 6rem;
    }

    .details__title {
        font-size: 1.65rem;
    }

    .features__grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* ═══════════════════════════════════
   TABLETS (769px+)
   ═══════════════════════════════════ */
@media (min-width: 769px) {
    .back-btn {
        padding: 1rem 2rem;
    }

    .back-btn:hover {
        color: var(--color-accent);
    }

    .product-layout {
        flex-direction: row;
        max-width: 1280px;
        margin: 0 auto;
        padding: 0 2rem 3rem;
        gap: 2.5rem;
    }

    /* Gallery side */
    .pg {
        flex: 0 0 50%;
        max-width: 50%;
        border-radius: var(--radius-lg);
        overflow: hidden;
        position: sticky;
        top: calc(var(--topbar-height) + 1rem);
        align-self: flex-start;
    }

    .pg__stage {
        aspect-ratio: 1 / 1;
        max-height: 520px;
    }

    .pg__empty {
        aspect-ratio: 1 / 1;
        max-height: 520px;
    }

    .pg__nav {
        opacity: 0.6;
        width: 40px;
        height: 40px;
    }

    .pg__nav:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.95);
    }

    .pg__zoom:hover {
        opacity: 1;
        background: rgba(255, 255, 255, 0.95);
    }

    .pg__thumb {
        width: 64px;
        height: 64px;
    }

    .pg__thumb:hover {
        border-color: var(--color-accent-light);
    }

    /* Hide dots on desktop, nav buttons always visible */
    .pg__dots {
        display: none;
    }

    .pg__nav {
        opacity: 0.5;
    }

    .pg:hover .pg__nav {
        opacity: 1;
    }

    /* Lightbox close hover */
    .pg__lb-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    /* Details side */
    .details {
        flex: 1;
        padding: 0 0 2rem;
    }

    .details__title {
        font-size: 1.85rem;
    }

    .details__desc {
        font-size: 1rem;
    }

    /* Show desktop CTA, hide mobile sticky */
    .details__cta-desktop {
        display: flex;
        gap: 10px;
        margin-top: 1.5rem;
        opacity: 0;
        transform: translateY(12px);
        transition: opacity 0.5s var(--ease) 0.25s, transform 0.5s var(--ease) 0.25s;
    }

    .details__cta-desktop.is-visible {
        opacity: 1;
        transform: translateY(0);
    }

    .sticky-bar {
        display: none;
    }

    .toast {
        bottom: 40px;
    }

    /* Hover effects */
    .cta-btn--wa:hover {
        background: #1DA851;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(37, 211, 102, 0.3);
    }

    .cta-btn--copy:hover {
        border-color: var(--color-accent);
        color: var(--color-accent-dark);
    }
}


/* ═══════════════════════════════════
   DESKTOP (1025px+)
   ═══════════════════════════════════ */
@media (min-width: 1025px) {
    .product-layout {
        padding: 0 2rem 4rem;
        gap: 3rem;
    }

    .pg {
        flex: 0 0 55%;
        max-width: 55%;
    }

    .pg__thumb {
        width: 68px;
        height: 68px;
    }

    .details__title {
        font-size: 2rem;
    }

    .features__grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    .details__cta-desktop {
        gap: 12px;
    }
}


/* ═══════════════════════════════════
   REDUCED MOTION
   ═══════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .pg {
        animation: none;
        opacity: 1;
    }

    .pg__img {
        transition: none;
    }

    .pg__stage::before {
        animation: none;
        display: none;
    }

    .pg__lightbox {
        transition: none;
    }

    .details__title,
    .details__weight,
    .details__desc,
    .features,
    .details__cta-desktop {
        opacity: 1;
        transform: none;
        transition: none;
    }
}