@charset "utf-8";
/*
    Zivamode — product detail page
    Swiper gallery + thumbnails + medium-zoom (styles injected by the lib).
*/

.product-page {
    padding: var(--space-lg) 0 var(--space-2xl);
    background-color: var(--color-cream);
}

.product-layout {
    display: grid;
    /* minmax(0, …) keeps the `fr` tracks from being widened by the
       gallery's aspect-ratio box (otherwise the grid blows the layout up
       to Chrome's maximum layout size). */
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: var(--space-xl);
    align-items: start;
}

.product-layout > * {
    min-width: 0;
}

/* --------------------------------------------------------- gallery */
.product-gallery {
    position: sticky;
    top: 96px;
    min-width: 0;
}

.gallery-main {
    position: relative;
    overflow: hidden;
    background-color: var(--color-ivory);
    border: 1px solid var(--color-taupe-light);
}

.gallery-main .swiper-slide {
    display: block;
    height: auto;
}

.gallery-slide__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background-color: var(--color-ivory);
}

/* Absolutely positioned so the image contributes nothing to intrinsic
   sizing — a percentage height inside an aspect-ratio box otherwise
   creates a sizing cycle. */
.gallery-slide__inner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
}

/* Per-picture title + explanation set in the admin */
.gallery-caption {
    margin-top: 0.9rem;
    padding: 0.8rem 1.1rem;
    background-color: var(--color-warm-white);
    border: 1px solid var(--color-taupe-light);
    border-inline-start: 3px solid var(--color-gold);
}

.gallery-caption[hidden] {
    display: none;
}

.gallery-caption__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    line-height: 1.3;
    color: var(--color-charcoal);
}

.gallery-caption__title:empty {
    display: none;
}

.gallery-caption__text {
    font-size: 0.95rem;
    color: var(--color-charcoal-soft);
    margin-top: 0.15rem;
}

.gallery-caption__text:empty {
    display: none;
}

/* Navigation arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 12;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background-color: rgba(254, 252, 249, 0.9);
    color: #1c1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.gallery-nav::before {
    content: '';
    width: 11px;
    height: 11px;
    border-top: 1.6px solid currentColor;
    border-right: 1.6px solid currentColor;
}

.gallery-nav--prev {
    left: 14px;
}

.gallery-nav--prev::before {
    transform: rotate(-135deg);
    margin-left: 3px;
}

.gallery-nav--next {
    right: 14px;
}

.gallery-nav--next::before {
    transform: rotate(45deg);
    margin-right: 3px;
}

.gallery-nav:hover {
    background-color: var(--color-gold);
    color: #fff;
}

/* Zoom button */
.gallery-zoom-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 12;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background-color: rgba(254, 252, 249, 0.9);
    color: #1c1c1c;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Thumbnails */
.gallery-thumbs {
    margin-top: 0.85rem;
}

.gallery-thumbs .swiper-slide {
    width: 86px;
    height: 100px;
    cursor: pointer;
    opacity: 0.5;
    border: 1px solid transparent;
    overflow: hidden;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}

.gallery-thumbs .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs .swiper-slide-thumb-active,
.gallery-thumbs .swiper-slide:hover {
    opacity: 1;
    border-color: var(--color-gold);
}

.gallery-hint {
    margin-top: 0.85rem;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-taupe);
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.gallery-hint::before {
    content: '';
    width: 14px;
    height: 14px;
    border: 1.4px solid currentColor;
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px transparent;
}

.gallery-empty {
    aspect-ratio: 4 / 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-ivory), var(--color-warm-white));
    font-family: var(--font-display);
    font-size: 2rem;
    color: var(--color-taupe);
    border: 1px solid var(--color-taupe-light);
}

/* medium-zoom must cover the whole UI (header, FAB, mobile nav) */
.medium-zoom-overlay,
.medium-zoom-image--opened {
    z-index: 2500 !important;
}

/* The library moves the <img> into <body>, which drops the tile's own
   .gallery-slide__inner img rule — without this the photo is stretched to
   fill the 4/5 tile box instead of keeping its real proportions. */
.medium-zoom-image--opened {
    object-fit: contain;
}

/* Cursor-following magnifier inside the lightbox (desktop only, see gallery.js) */
.gallery-loupe {
    position: fixed;
    z-index: 2600;
    width: 150px;
    height: 150px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.75);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.6), inset 0 0 0 4px rgba(8, 8, 8, 0.5);
    background-color: #0a0a0a;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.18s ease;
}

.gallery-loupe.is-active {
    opacity: 1;
}

@media (max-width: 860px), (hover: none) {
    .gallery-loupe {
        display: none;
    }
}

/* ---------------------------------------------------- touch photo viewer
   Built by gallery.js on coarse-pointer devices, where it replaces
   medium-zoom entirely. Everything on top of it is literal ink: the
   backdrop is always dark, whatever the theme token says. */
.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 2600;
    background-color: rgba(8, 8, 8, 0.96);
    opacity: 0;
    visibility: hidden;
    touch-action: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

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

.photo-viewer__stage {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    touch-action: none;
}

/* max-width + max-height together make the element box exactly the
   contain-fit picture, which is what the pan clamp measures at scale 1. */
.photo-viewer__img {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    -webkit-user-select: none;
    user-select: none;
    /* otherwise a long press offers "Save Image" mid-pan */
    -webkit-touch-callout: none;
}

.photo-viewer__img.is-animating {
    transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.photo-viewer__close {
    position: absolute;
    top: max(0.9rem, env(safe-area-inset-top));
    inset-inline-end: max(0.9rem, env(safe-area-inset-right));
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-radius: 50%;
    background-color: rgba(28, 28, 28, 0.55);
    color: rgba(255, 251, 245, 0.96);
    font-size: 1.5rem;
    line-height: 1;
    z-index: 1;
}

.photo-viewer__count {
    position: absolute;
    top: max(1.15rem, env(safe-area-inset-top));
    /* physical left, not inset-inline-start: centring is not a direction that
       flips, and the -50% translate would push it off-axis in RTL. */
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    color: rgba(255, 251, 245, 0.7);
}

.photo-viewer__hint {
    position: absolute;
    bottom: max(1.1rem, env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 251, 245, 0.55);
    transition: opacity 0.25s ease;
}

.photo-viewer.is-inspected .photo-viewer__hint {
    opacity: 0;
}

body.viewer-open {
    overflow: hidden;
    overscroll-behavior: none;
}

@media (prefers-reduced-motion: reduce) {
    .photo-viewer,
    .photo-viewer__img.is-animating {
        transition: none;
    }
}

/* ---------------------------------------------------------- info */
.product-info__category {
    margin-bottom: 0.35rem;
}

.product-info__category a {
    transition: color 0.3s ease;
}

.product-info__category a:hover {
    color: var(--color-gold);
}

.product-info__title {
    font-size: clamp(2.2rem, 4vw, 3.3rem);
    margin-bottom: 0.75rem;
}

.product-info__size {
    display: inline-block;
    border: 1px solid var(--color-taupe-light);
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-taupe);
    margin-bottom: 1.1rem;
}

.product-info__size strong {
    color: var(--color-charcoal);
    font-weight: 500;
}

.product-info__short {
    font-size: 1.12rem;
    max-width: 54ch;
    margin-bottom: 1.25rem;
}

.product-info__price {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 400;
    color: var(--color-gold-dark);
    margin-bottom: var(--space-md);
}

.product-info__price--muted {
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-taupe);
}

.product-info__price--old {
    font-size: 1.4rem;
    color: var(--color-taupe);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
    margin-inline-end: 0.6rem;
}

.product-info__price--sale {
    color: var(--color-gold-dark);
}

.product-info__sale-badge {
    display: inline-block;
    vertical-align: middle;
    background-color: #a83226;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    margin-inline-start: 0.6rem;
}

.product-info__description {
    border-top: 1px solid var(--color-taupe-light);
    padding-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.product-info__subtitle {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--color-taupe);
    margin-bottom: 0.75rem;
}

.product-info__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: var(--space-md);
}

.product-info__actions .btn-primary {
    flex: 1 1 220px;
    max-width: 340px;
    justify-content: center;
    gap: 0.6rem;
}

.btn-primary.btn-whatsapp {
    background-color: #25d366;
    color: #ffffff;
}

.btn-primary.btn-whatsapp:hover {
    background-color: #1ebe5b;
    color: #ffffff;
}

.btn-primary.btn-telegram {
    background-color: #229ed9;
    color: #ffffff;
}

.btn-primary.btn-telegram:hover {
    background-color: #1b8cb8;
    color: #ffffff;
}

.btn-primary.btn-instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    color: #ffffff;
}

.btn-primary.btn-instagram:hover {
    filter: brightness(1.07);
    color: #ffffff;
}

.product-info__meta {
    list-style: none;
    border-top: 1px solid var(--color-taupe-light);
}

.product-info__meta li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--color-taupe-light);
}

.product-info__meta span {
    font-size: 0.78rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-taupe);
}

.product-info__meta strong {
    font-weight: 500;
    text-align: end;
}

.product-info__meta a {
    transition: color 0.3s ease;
}

.product-info__meta a:hover {
    color: var(--color-gold);
}

/* ------------------------------------------------------ responsive */
@media (max-width: 980px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .product-gallery {
        position: static;
    }
}

@media (max-width: 576px) {
    .gallery-nav {
        width: 38px;
        height: 38px;
    }

    .gallery-thumbs .swiper-slide {
        width: 66px;
        height: 78px;
    }

    .product-info__price {
        font-size: 2rem;
    }
}

/* ---------------------------------------------------------- RTL */
[dir='rtl'] .gallery-nav--prev {
    left: auto;
    right: 14px;
}

[dir='rtl'] .gallery-nav--next {
    right: auto;
    left: 14px;
}

[dir='rtl'] .gallery-zoom-btn {
    right: auto;
    left: 14px;
}
