/* ============================================================
   PRODUCT PAGE — product.css
   Single product: woocommerce/single-product.php
   Shortcode components: cs-float, cs-spec-row
   Design tokens: var(--cs-*) from layout.css / style.css
   ============================================================ */


/* ── PAGE WRAPPER ─────────────────────────────────────────── */
.pp-page {
    background: var(--cs-bg-0, #080A0E);
    min-height: 100vh;
}


/* ── BREADCRUMB ─────────────────────────────────────────── */
.pp-breadcrumb {
    padding-top: calc(var(--header-h, 80px) + 20px);
    padding-bottom: 0;
}

.pp-breadcrumb__list {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pp-breadcrumb__link {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: var(--cs-txt3, #4A4E5A);
    text-decoration: none;
    transition: color .2s;
}

.pp-breadcrumb__link:hover { color: var(--cs-red, #F5222D); }

.pp-breadcrumb__sep {
    font-size: 12px;
    color: var(--cs-txt3, #4A4E5A);
    opacity: .4;
}

.pp-breadcrumb__current {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    color: var(--cs-txt2, #8B8F9A);
    max-width: 36ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ── HERO LAYOUT ────────────────────────────────────────── */
.pp-hero {
    padding-top: clamp(28px, 3.5vw, 44px);
    padding-bottom: clamp(60px, 8vw, 96px);
}

.pp-hero__inner {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: clamp(36px, 5vw, 80px);
    align-items: start;
}


/* ── VISUAL STAGE (left column) ─────────────────────────── */
.pp-visual {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: calc(var(--header-h, 80px) + 24px);
}

.pp-visual__stage {
    position: relative;
    background: url('/wp-content/themes/woodmart-child/img/pattern-red.png') center / cover no-repeat,
                var(--cs-bg-card, #0D1018);
    border: 1px solid var(--pc-c, rgba(255,255,255,0.07));
    box-shadow: 0 2px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(340px, 42vw, 560px);
    overflow: hidden;
}


/* Rarity glow — inherits --pc-glow from rarity class (pc-ancient etc.) */
.pp-visual__glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 65% 60% at 50% 35%,
        var(--pc-glow, rgba(245,34,45,0.12)) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

/* Product image — floating animation */
.pp-visual__img {
    position: relative;
    z-index: 5;
    max-width: 84%;
    max-height: clamp(220px, 34vw, 440px);
    object-fit: contain;
    filter:
        drop-shadow(0 10px 44px rgba(0,0,0,0.65))
        drop-shadow(0 0 64px var(--pc-glow, rgba(245,34,45,0.18)));
    animation: ppFloat 5s ease-in-out infinite;
    user-select: none;
    pointer-events: none;
}

@keyframes ppFloat {
    0%, 100% { transform: translateY(0) rotate(-3.5deg); }
    50%       { transform: translateY(-14px) rotate(-2deg); }
}

/* Sale badge on image — matches .prod-sale-badge from shop.css */
.pp-sale-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(245,34,45,0.12);
    border: 1px solid rgba(245,34,45,0.38);
    color: var(--cs-red, #F5222D);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    padding: 3px 7px;
    line-height: 1;
}

/* Wishlist shortcut on image */
.pp-visual__wish {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.pp-visual__wish:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.pp-visual__wish.active {
    background: rgba(245,34,45,0.18);
    border-color: rgba(245,34,45,0.45);
    color: var(--cs-red, #F5222D);
}

.pp-visual__wish.active svg { fill: currentColor; }

/* Float shortcode zone */
.pp-float-zone {
    background: var(--cs-bg-card, #0D1018);
    border: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    padding: 16px 18px;
}


/* ── PURCHASE PANEL (right column) ──────────────────────── */
.pp-panel {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Category + stock row */
.pp-panel__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.pp-panel__cat {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--pc-accent, var(--cs-red, #F5222D));
    text-decoration: none;
    transition: opacity .2s;
}

.pp-panel__cat:hover { opacity: .7; }

.pp-panel__stock {
    font-family: 'Manrope', sans-serif;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pp-panel__stock--in  { color: #4ADE80; }
.pp-panel__stock--out { color: var(--cs-txt3, #4A4E5A); }

.pp-panel__stock-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ADE80;
    animation: ppPulse 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes ppPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0.5); }
    50%       { box-shadow: 0 0 0 4px rgba(74,222,128,0); }
}

/* Product title */
.pp-panel__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(40px, 5.5vw, 72px);
    font-weight: 800;
    line-height: 0.92;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--cs-txt, #F0F2F8);
    margin-bottom: 24px;
}


/* ── PRICE BLOCK ─────────────────────────────────────────── */
.pp-price-block {
    margin-bottom: 24px;
}

.pp-price-block__row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.pp-price-block__old {
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    color: rgba(255,255,255,0.30);
    text-decoration: line-through;
    line-height: 1;
}

.pp-price-block__badge {
    padding: 3px 8px;
    background: rgba(245,34,45,0.14);
    border: 1px solid rgba(245,34,45,0.35);
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--cs-red, #F5222D);
    line-height: 1.2;
}

.pp-price-block__current {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(44px, 5vw, 60px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--cs-txt, #F0F2F8);
}


/* ── CTA ACTIONS ─────────────────────────────────────────── */
.pp-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.pp-actions__buy {
    width: 100%;
    justify-content: center;
    padding: 16px 28px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    letter-spacing: .14em;
}

.pp-actions__wish {
    width: 100%;
    justify-content: center;
    padding: 14px 28px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    letter-spacing: .12em;
}

.pp-actions__wish.active {
    border-color: rgba(245,34,45,0.40);
    color: var(--cs-red, #F5222D);
    background: rgba(245,34,45,0.06);
}

.pp-actions__wish.active svg { fill: currentColor; }

/* WooCommerce fallback add-to-cart (non-simple or OOS) */
.pp-wc-cart {
    margin-bottom: 0;
}

.pp-wc-cart .woocommerce-variation-add-to-cart,
.pp-wc-cart form.cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pp-wc-cart .quantity { display: none; }

.pp-wc-cart .single_add_to_cart_button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 28px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--cs-red, #F5222D), var(--cs-orange, #FF6B00));
    border: none;
    clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
    cursor: pointer;
    transition: box-shadow .3s, transform .15s;
}

.pp-wc-cart .single_add_to_cart_button:hover {
    box-shadow: 0 8px 40px rgba(245,34,45,0.5);
    transform: translateY(-2px);
}


/* ── TRUST ROW ───────────────────────────────────────────── */
.pp-trust {
    display: flex;
    border: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    background: var(--cs-bg-card, #0D1018);
    margin-bottom: 28px;
}

.pp-trust__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 14px 8px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--cs-txt3, #4A4E5A);
    border-right: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    text-align: center;
}

.pp-trust__item:last-child { border-right: none; }

.pp-trust__item svg {
    color: var(--cs-red, #F5222D);
    flex-shrink: 0;
}


/* ── SPECIFICATIONS BLOCK ────────────────────────────────── */
.pp-specs {
    background: var(--cs-bg-card, #0D1018);
    border: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    position: relative;
}

/* Red top accent line */
.pp-specs::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--cs-red, #F5222D), var(--cs-orange, #FF6B00));
}

.pp-specs__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--cs-txt3, #4A4E5A);
    margin: 0;
    padding: 14px 18px 12px;
    border-bottom: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
}

.pp-specs__body {
    padding: 4px 0;
}

.pp-specs__empty {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: var(--cs-txt3, #4A4E5A);
    padding: 16px 18px;
    margin: 0;
}


/* ── STICKY BUY BAR ─────────────────────────────────────── */
.pp-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 300;
    background: rgba(8,10,14,0.97);
    border-top: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.32,0,.67,0);
    box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}

.pp-sticky.is-visible {
    transform: translateY(0);
    transition: transform .35s cubic-bezier(.33,1,.68,1);
}

.pp-sticky__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-block: 12px;
}

.pp-sticky__left {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.pp-sticky__img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(245,34,45,0.25));
    flex-shrink: 0;
}

.pp-sticky__info { min-width: 0; }

.pp-sticky__name {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--cs-txt, #F0F2F8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: .02em;
}

.pp-sticky__prices {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 3px;
}

.pp-sticky__old {
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.30);
    text-decoration: line-through;
}

.pp-sticky__price {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--cs-txt, #F0F2F8);
    line-height: 1;
}

.pp-sticky__cta {
    flex-shrink: 0;
    padding: 14px 32px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    letter-spacing: .14em;
    white-space: nowrap;
}


/* ============================================================
   SHORTCODE COMPONENTS
   [cs_float_bar value="0.234"]
   [cs_spec label="Exterior" value="Field-Tested"]
   ============================================================ */

/* ── cs-float: Float value bar ────────────────────────────── */
.cs-float {
    font-family: 'Manrope', sans-serif;
}

.cs-float__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.cs-float__label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .10em;
    text-transform: uppercase;
    color: var(--cs-txt3, #4A4E5A);
}

.cs-float__val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--cs-txt, #F0F2F8);
}

.cs-float__bar {
    position: relative;
    height: 8px;
    margin-bottom: 8px;
}

.cs-float__zones {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
    gap: 2px;
    border-radius: 2px;
}

.cs-float__zone { flex: 1; height: 100%; }

.cs-float__zone--fn { background: linear-gradient(90deg, #00d46a, #6ecf3c); }
.cs-float__zone--mw { background: linear-gradient(90deg, #6ecf3c, #c8d43c); }
.cs-float__zone--ft { background: linear-gradient(90deg, #c8d43c, #e08c20); }
.cs-float__zone--ww { background: linear-gradient(90deg, #e08c20, #e05520); }
.cs-float__zone--bs { background: linear-gradient(90deg, #e05520, #d32727); }

.cs-float__marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

.cs-float__marker-pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
    box-shadow: 0 0 8px rgba(255,255,255,0.65), 0 2px 6px rgba(0,0,0,0.55);
}

.cs-float__legend {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255,255,255,0.20);
    margin-bottom: 8px;
}

.cs-float__cond {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--cs-txt2, #8B8F9A);
    text-align: right;
}


/* ── cs-spec-row: single specification row ─────────────────── */
.cs-spec-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 18px;
    border-bottom: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
}

.cs-spec-row:last-child { border-bottom: none; }

.cs-spec-row__label {
    font-family: 'Manrope', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: var(--cs-txt3, #4A4E5A);
    flex-shrink: 0;
}

.cs-spec-row__value {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--cs-txt, #F0F2F8);
    text-align: right;
    margin: 0;
}


/* ── YOU MAY ALSO LIKE (related products) ────────────────────
   Cards reuse the shop / front-page .prod-card system styled in
   shop.css (rarity glow, hex, hover). Only the section chrome and
   responsive grid live here. */
.pp-related {
    padding: clamp(48px, 7vw, 88px) 0 clamp(56px, 8vw, 100px);
    position: relative;
}

/* subtle top divider so it reads as a new block under the hero */
.pp-related::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: min(92%, 1180px);
    height: 1px;
    background: linear-gradient(90deg,
        transparent,
        var(--cs-bdr, rgba(255,255,255,0.10)) 20%,
        var(--cs-bdr, rgba(255,255,255,0.10)) 80%,
        transparent);
}

.pp-related__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: clamp(22px, 3vw, 34px);
}

.pp-related__title {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: clamp(26px, 3.5vw, 40px);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .02em;
    line-height: 1;
    color: var(--cs-txt, #F0F2F8);
    margin: 0;
}

.pp-related__title em {
    font-style: normal;
    color: var(--cs-red, #F5222D);
    text-shadow: 0 0 18px rgba(245,34,45,0.45);
}

.pp-related__all {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Desktop: 6 in a row on wide screens */
.pp-related__grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: clamp(12px, 1.4vw, 20px);
}

/* Desktop (narrower): 3 in a row */
@media (max-width: 1280px) {
    .pp-related__grid { grid-template-columns: repeat(3, 1fr); }
}

/* Sale price (regular struck-through + accent sale price) inside cards */
.pp-related .prod-price {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.pp-related .prod-price__old {
    font-size: .62em;
    font-weight: 600;
    color: var(--cs-txt3, rgba(255,255,255,0.32));
    text-decoration: line-through;
}

.pp-related .prod-price__new {
    color: var(--cs-red, #F5222D);
}


/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .pp-hero__inner {
        grid-template-columns: 1fr 420px;
        gap: 40px;
    }
}

@media (max-width: 960px) {
    .pp-hero__inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .pp-visual {
        position: static;
    }

    .pp-visual__stage {
        min-height: clamp(280px, 55vw, 420px);
    }

    .pp-panel__title {
        font-size: clamp(38px, 9vw, 60px);
    }

    .pp-actions__buy,
    .pp-actions__wish {
        padding: 15px 24px;
    }

    /* Tablet: 3 cards per row */
    .pp-related__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .pp-panel__title {
        font-size: clamp(34px, 10vw, 52px);
    }

    /* Mobile: 2 cards per row + stacked section head */
    .pp-related__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pp-related__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .pp-price-block__current {
        font-size: clamp(38px, 10vw, 52px);
    }

    .pp-sticky__name { display: none; }

    .pp-trust {
        flex-wrap: wrap;
    }

    .pp-trust__item {
        flex: 1 0 calc(50% - 1px);
        border-bottom: 1px solid var(--cs-bdr, rgba(255,255,255,0.07));
    }

    .pp-trust__item:nth-child(2n) { border-right: none; }
    .pp-trust__item:nth-last-child(-n+1) { border-bottom: none; }
}
