/**
 * MRS Fashion — Public Product Page (Phase 9.0 Premium Marketplace)
 * Presentation only. Markup + JS hooks unchanged.
 */

.fai-pp {
    padding: 0 0 90px;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.fai-pp-main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

@media (min-width: 1024px) {
    .fai-pp-main-layout {
        grid-template-columns: minmax(0, 58%) minmax(0, 42%);
        gap: 44px;
        max-width: var(--fai-maxw);
        margin: 0 auto;
        padding: 26px 20px 0;
        align-items: start;
    }
}

/* ============================================================
   MEDIA COLUMN
   ============================================================ */
.fai-pp-media {
    position: relative;
}

@media (min-width: 1024px) {
    .fai-pp-media {
        position: sticky;
        top: 78px;
    }
}

.fai-pp-stage {
    position: relative;
    overflow: hidden;
    background: #f4f2ef;
}

@media (min-width: 1024px) {
    .fai-pp-stage {
        border-radius: 16px;
        border: 1px solid var(--fai-line);
    }
}

.fai-pp-stage.is-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 5;
}

.fai-pp-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fai-pp-track::-webkit-scrollbar { display: none; }

.fai-pp-slide {
    position: relative;
    flex: 0 0 100%;
    margin: 0;
    scroll-snap-align: center;
    background: #f4f2ef;
}

.fai-pp-slide img {
    width: 100%;
    height: auto;
    display: block;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    cursor: zoom-in;
}

.fai-pp-role {
    position: absolute;
    left: 12px;
    bottom: 12px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 6px 11px;
    border-radius: 999px;
    color: #14110f;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(18, 18, 18, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Nav arrows */
.fai-pp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(18, 18, 18, 0.08);
    color: var(--fai-ink);
    font-size: 1.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease, background 0.25s ease;
    z-index: 3;
    box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.4);
}

.fai-pp-media:hover .fai-pp-nav { opacity: 1; }
.fai-pp-nav:hover { background: #fff; }
.fai-pp-nav.is-prev { left: 14px; }
.fai-pp-nav.is-next { right: 14px; }

@media (max-width: 1023px) {
    .fai-pp-nav { display: none; }
}

.fai-pp-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 2;
}

.fai-pp-dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.55);
    transition: 0.25s ease;
}

.fai-pp-dot.is-on { background: #fff; transform: scale(1.5); }

@media (min-width: 1024px) {
    .fai-pp-dots { display: none; }
}

/* Thumbnails */
.fai-pp-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 20px 4px;
    scrollbar-width: none;
}

.fai-pp-thumbs::-webkit-scrollbar { display: none; }

@media (min-width: 1024px) {
    .fai-pp-thumbs { padding: 10px 0 0; }
}

.fai-pp-thumb {
    flex: 0 0 auto;
    width: 62px;
    height: 78px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--fai-line);
    opacity: 0.68;
    padding: 0;
    transition: 0.25s ease;
    background: #f4f2ef;
}

.fai-pp-thumb.is-on {
    border-color: var(--fai-ink);
    opacity: 1;
}

.fai-pp-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ============================================================
   SUMMARY COLUMN
   ============================================================ */
.fai-pp-summary {
    padding: 20px 20px 0;
}

@media (min-width: 1024px) {
    .fai-pp-summary { padding: 4px 0 0; }
}

.fai-pp-brand {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--fai-gold);
    margin: 0 0 8px;
}

.fai-pp-title {
    font-family: var(--fai-font-display);
    font-size: clamp(1.4rem, 3vw, 2.05rem);
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -0.02em;
    margin: 0 0 14px;
    color: var(--fai-ink);
}

/* Price block */
.fai-pp-price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 0 16px;
    border-top: 1px solid var(--fai-line);
    border-bottom: 1px solid var(--fai-line);
    margin-bottom: 18px;
}

.fai-pp-now {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fai-pp-was {
    font-size: 0.95rem;
    color: var(--fai-ink-soft);
    text-decoration: line-through;
}

.fai-pp-off {
    font-size: 0.78rem;
    font-weight: 800;
    color: #1a7f4b;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Coupon */
.fai-pp-coupon-wrapper { margin-bottom: 18px; }

.fai-pp-coupon-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(197, 160, 89, 0.14), rgba(175, 107, 117, 0.1));
    border: 1px dashed rgba(197, 160, 89, 0.6);
    cursor: pointer;
    transition: 0.25s ease;
}

.fai-pp-coupon-chip:hover { border-style: solid; transform: translateY(-1px); }

.fai-pp-coupon-label {
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    color: var(--fai-ink-soft);
    text-transform: uppercase;
}

.fai-pp-coupon-code {
    font-size: 1.02rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.fai-pp-coupon-copy-hint {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--fai-ink);
    border-bottom: 1px solid currentColor;
}

/* ============================================================
   WHERE TO BUY — marketplace buy box
   ============================================================ */
.fai-pp-buy {
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 24px;
}

.fai-pp-buy-title {
    font-family: var(--fai-font-display);
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 14px;
}

.fai-pp-offers {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fai-pp-offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 12px;
}

.fai-pp-offer.is-primary {
    box-shadow: inset 0 0 0 1px var(--fai-gold);
}

.fai-pp-offer-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.fai-pp-store {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fai-ink-soft);
}

.fai-pp-offer-price-val {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.fai-pp-cta {
    flex: 0 0 auto;
    min-height: 46px;
    min-width: 130px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.fai-pp-disclosure {
    font-size: 0.72rem;
    color: var(--fai-ink-soft);
    line-height: 1.65;
    margin: 14px 0 0;
}

/* ============================================================
   LOWER PANELS
   ============================================================ */
.fai-pp-lower {
    padding-top: 12px;
}

@media (min-width: 1024px) {
    .fai-pp-lower { padding-top: 40px; }
}

.fai-pp-panel {
    padding: 22px;
    border-radius: 16px;
    margin-bottom: 26px;
}

.fai-pp-panel h2 {
    font-family: var(--fai-font-display);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 16px;
}

.fai-pp-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 28px;
    margin: 0;
}

.fai-pp-specs > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--fai-line);
}

.fai-pp-specs dt {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--fai-ink-soft);
}

.fai-pp-specs dd {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: right;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.fai-pp-lightbox {
    position: fixed;
    inset: 0;
    z-index: 3000;
    background: rgba(10, 9, 8, 0.94);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.fai-pp-lightbox[hidden] { display: none; }

.fai-pp-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
}

.fai-pp-lightbox img {
    max-width: 100%;
    max-height: 88vh;
    width: auto;
    border-radius: 10px;
}

/* ============================================================
   MOBILE
   ============================================================ */
@media (max-width: 767px) {
    .fai-pp { padding-bottom: 70px; }
    .fai-pp-now { font-size: 1.55rem; }
    .fai-pp-specs { grid-template-columns: 1fr; }
    .fai-pp-buy, .fai-pp-panel { border-radius: 14px; }
    .fai-pp-lower { padding-left: 0; padding-right: 0; }
    .fai-pp-offer { flex-wrap: wrap; }
    .fai-pp-cta { flex: 1 1 100%; }
}

/* ============================================================
   PHASE 5 — PREMIUM PRODUCT PAGE (presentation only)
   ============================================================ */

/* Breadcrumb */
.fai-pp-crumbs {
    border-bottom: 1px solid var(--fai-line);
    background: #fffdfa;
}
.fai-pp-crumbs-inner {
    max-width: var(--fai-maxw);
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.78rem;
    color: var(--fai-ink-soft);
}
.fai-pp-crumbs a { color: var(--fai-ink-soft); text-decoration: none; }
.fai-pp-crumbs a:hover { color: var(--fai-ink); text-decoration: underline; }
.fai-pp-crumb-current { color: var(--fai-ink); font-weight: 600; }
.fai-pp-crumb-sep { opacity: 0.5; }

/* Gallery: vertical rail + large stage */
.fai-pp-gallery-wrap { display: block; }

@media (min-width: 1024px) {
    .fai-pp-gallery-wrap {
        display: grid;
        grid-template-columns: 78px minmax(0, 1fr);
        gap: 14px;
        align-items: start;
    }
    .fai-pp-rail {
        display: flex;
        flex-direction: column;
        gap: 10px;
        overflow: visible;
        padding: 0;
    }
    .fai-pp-thumbs { display: none; }
}

.fai-pp-rail {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 20px 4px;
    scrollbar-width: none;
}
.fai-pp-rail::-webkit-scrollbar { display: none; }

.fai-pp-rail .fai-pp-thumb {
    position: relative;
    flex: 0 0 auto;
    width: 68px;
    height: 85px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--fai-line);
    background: #f7f4ef;
    opacity: 0.85;
    padding: 0;
    cursor: pointer;
    transition: 0.25s ease;
}
.fai-pp-rail .fai-pp-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 5;
}
.fai-pp-rail .fai-pp-thumb.is-on {
    border: 2px solid var(--fai-wine, #7b1f34);
    opacity: 1;
}
.fai-pp-rail .fai-pp-thumb:focus-visible {
    outline: 2px solid var(--fai-ink);
    outline-offset: 2px;
}
.fai-pp-thumb-more {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 17, 15, 0.55);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 800;
}

.fai-pp-stage {
    background: #fdfbf7;
    border-radius: 16px;
    border: 1px solid var(--fai-line);
    box-shadow: 0 18px 40px -30px rgba(20, 17, 15, 0.45);
}
.fai-pp-slide { background: #fdfbf7; }
.fai-pp-slide img {
    aspect-ratio: 4 / 5;
    object-fit: contain;
    opacity: 1;
    filter: none;
    backdrop-filter: none;
}
.fai-pp-stage::before, .fai-pp-stage::after { content: none; }

/* Category chips */
.fai-pp-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 16px;
}
.fai-pp-cat-chip {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--fai-line);
    color: var(--fai-ink-soft);
    text-decoration: none;
}
.fai-pp-cat-chip:hover { border-color: var(--fai-ink); color: var(--fai-ink); }

/* Primary buy CTA */
.fai-pp-buy-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    border-radius: 999px;
    background: var(--fai-wine, #7b1f34);
    color: #fff;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: 0.25s ease;
    box-shadow: 0 14px 30px -18px rgba(123, 31, 52, 0.8);
}
.fai-pp-buy-main:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fai-pp-buy-main:focus-visible { outline: 2px solid var(--fai-ink); outline-offset: 3px; }
.fai-pp-buy-icon { flex: 0 0 auto; }

.fai-pp-buy { background: #fdfbf7; border: 1px solid var(--fai-line); }
.fai-pp-offer { background: #fff; border: 1px solid var(--fai-line); }
.fai-pp-cta { background: var(--fai-ink); }

/* Inline highlights panel */
.fai-pp-panel.is-inline {
    background: #fdfbf7;
    border: 1px solid var(--fai-line);
    padding: 18px;
    margin-top: 22px;
}
.fai-pp-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 9px;
}
.fai-pp-highlights li {
    position: relative;
    padding-left: 18px;
    font-size: 0.9rem;
    line-height: 1.6;
}
.fai-pp-highlights li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--fai-gold);
}

/* Trust strip */
.fai-pp-trust {
    list-style: none;
    margin: 34px auto 0;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    border-top: 1px solid var(--fai-line);
    border-bottom: 1px solid var(--fai-line);
}
.fai-pp-trust li { display: flex; flex-direction: column; gap: 4px; }
.fai-pp-trust strong {
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.fai-pp-trust span { font-size: 0.8rem; color: var(--fai-ink-soft); line-height: 1.5; }

/* Related sections */
.fai-pp-related { margin: 0 0 44px; }
.fai-pp-related-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
}
.fai-pp-related-title {
    font-family: var(--fai-font-display);
    font-size: clamp(1.05rem, 2vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    margin: 0;
}
.fai-pp-view-all {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--fai-ink);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
}
.fai-pp-related-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
}
@media (max-width: 1023px) {
    .fai-pp-related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
}
@media (max-width: 640px) {
    .fai-pp-related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

/* Instagram CTA + QR explainer */
.fai-pp-insta, .fai-pp-howqr {
    padding: 30px 24px;
    border-radius: 16px;
    border: 1px solid var(--fai-line);
    background: #fdfbf7;
    text-align: center;
    margin: 0 0 30px;
}
.fai-pp-insta h2, .fai-pp-howqr h2 {
    font-family: var(--fai-font-display);
    font-size: 1.25rem;
    margin: 0 0 8px;
}
.fai-pp-insta p { color: var(--fai-ink-soft); margin: 0 0 16px; }
.fai-pp-insta-btn {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 26px;
    border-radius: 999px;
    background: var(--fai-wine, #7b1f34);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
}
.fai-pp-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 14px;
    counter-reset: fai-step;
}
.fai-pp-steps li {
    counter-increment: fai-step;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--fai-ink-soft);
}
.fai-pp-steps li::before {
    content: counter(fai-step);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(197, 160, 89, 0.2);
    color: var(--fai-ink);
    font-size: 0.7rem;
    font-weight: 800;
}

/* Mobile sticky buy */
.fai-pp-sticky { display: none; }
@media (max-width: 767px) {
    .fai-pp-sticky {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 900;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        background: rgba(255, 255, 255, 0.97);
        border-top: 1px solid var(--fai-line);
        box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, 0.5);
    }
    .fai-pp-sticky-price { display: flex; flex-direction: column; line-height: 1.15; }
    .fai-pp-sticky-price strong { font-size: 1.05rem; font-weight: 800; }
    .fai-pp-sticky-price span {
        font-size: 0.75rem;
        color: var(--fai-ink-soft);
        text-decoration: line-through;
    }
    .fai-pp-sticky-btn {
        flex: 1 1 auto;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 999px;
        background: var(--fai-wine, #7b1f34);
        color: #fff;
        font-size: 0.76rem;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        text-decoration: none;
    }
    .fai-pp { padding-bottom: 86px; }
    .fai-pp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1023px) and (min-width: 768px) {
    .fai-pp-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
