/* Product pages (CMS-driven flooring listings + detail). Uses the site tokens from styles.css. */

/* Page title block (header overlays the top of the page, so clear it) */
.listing-hero {
    background: var(--navy);
    color: var(--white);
    padding: 3.5rem 0 4rem;
    text-align: center
}
.listing-hero h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.1;
    color: var(--white)
}
.listing-hero .hero-eyebrow { justify-content: center; margin-bottom: 1rem }
.listing-lead {
    max-width: 40rem;
    margin: 1.25rem auto 0;
    color: rgba(255,255,255,.8);
    line-height: 1.7
}
.listing-lead a { text-decoration: underline }

.product-section { padding: var(--s-5) 0 var(--s-7); background: var(--white) }
.product-more { background: var(--paper); padding-top: var(--s-5); padding-bottom: var(--s-6) }

/* Category filter chips */
.category-filter {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem .75rem;
    margin: 0 0 var(--s-5);
    padding: 0
}
.category-filter a {
    display: inline-block;
    padding: .5rem 1.125rem;
    border: 1px solid var(--grey-rule);
    font-size: .75rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink);
    transition: border-color .3s var(--ease), background .3s var(--ease), color .3s var(--ease)
}
.category-filter a:hover,
.category-filter a[aria-current="page"] { border-color: var(--gold); background: var(--gold); color: var(--white) }

/* Square product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s-4) var(--s-3)
}
.product-card { display: block; color: inherit }
.product-card-media {
    display: block;
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--paper)
}
.product-card-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s var(--ease)
}
.product-card:hover .product-card-media img { transform: scale(1.04) }
.product-card-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    background: var(--paper)
}
.product-card-media .product-card-empty img,
.product-gallery-main .product-card-empty img,
.product-card:hover .product-card-media .product-card-empty img {
    position: static;
    inset: auto;
    width: 2.25rem;
    height: auto;
    object-fit: contain;
    transform: none;
    transition: none;
    opacity: .9
}
.product-card-empty span {
    font-size: .6875rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--grey-light)
}
.product-gallery-main .product-card-empty.is-large img { width: 3.5rem }
.product-card-empty.is-large span { font-size: .75rem }
.product-card-body { display: grid; gap: .25rem; padding-top: var(--s-2) }
.product-brand {
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold)
}
.product-range { font-size: .8125rem; color: var(--grey) }
.product-name {
    font-family: var(--font-display);
    font-size: 1.5rem;
    line-height: 1.2;
    color: var(--navy);
    transition: color .3s var(--ease)
}
.product-card:hover .product-name { color: var(--gold) }
.product-colour {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .25rem;
    font-size: .8125rem;
    color: var(--grey)
}
.product-colour i {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.15);
    flex-shrink: 0
}
.product-empty { text-align: center; color: var(--grey); padding: var(--s-5) 0 }
.product-empty a { text-decoration: underline }

/* Product detail */
.product-detail { padding: var(--s-5) 0 var(--s-6); background: var(--white) }
.product-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-6);
    align-items: start
}
.product-gallery { position: sticky; top: 5.5rem }
.product-gallery-main { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--paper) }
.product-gallery-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.product-thumbs {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: .5rem;
    margin: .75rem 0 0;
    padding: 0
}
.product-thumbs button {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 0;
    border: 1px solid transparent;
    background: var(--paper);
    cursor: pointer;
    opacity: .7;
    transition: opacity .3s var(--ease), border-color .3s var(--ease)
}
.product-thumbs button:hover,
.product-thumbs button.is-active { opacity: 1; border-color: var(--gold) }
.product-thumbs img { display: block; width: 100%; height: 100%; object-fit: cover }

.product-eyebrow {
    font-size: .75rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gold)
}
.product-eyebrow span { margin: 0 .25rem; color: var(--grey-light) }
.product-info h1 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    color: var(--navy);
    margin: .5rem 0
}
.product-sku { font-size: .8125rem; color: var(--grey-light); margin-bottom: var(--s-2) }
.product-colour-lg { font-size: .9375rem; margin: 0 0 var(--s-3) }
.product-colour-lg i { width: 22px; height: 22px }
.product-description { margin: var(--s-3) 0; color: var(--grey); line-height: 1.8 }
.product-description p + p { margin-top: 1rem }
.product-h2 {
    font-family: var(--font-body);
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--navy);
    margin: var(--s-4) 0 var(--s-2);
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--grey-rule)
}
.product-h2-lg { font-family: var(--font-display); font-size: 2rem; font-weight: 400; letter-spacing: 0; text-transform: none; border: 0; margin: 0 0 var(--s-4); text-align: center }
.product-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0 }
.product-chips li { padding: .375rem .875rem; border: 1px solid var(--grey-rule); font-size: .8125rem; color: var(--ink); background: var(--paper) }
.product-attrs { margin: 0 }
.product-attrs > div {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 1rem;
    padding: .625rem 0;
    border-bottom: 1px solid var(--grey-rule);
    font-size: .875rem
}
.product-attrs dt { color: var(--grey) }
.product-attrs dd { margin: 0; color: var(--ink) }
.product-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: var(--s-4) }

@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) }
    .product-detail-grid { gap: var(--s-4) }
}
@media (max-width: 800px) {
    .listing-hero { padding: 2.5rem 0 3rem }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3) var(--s-2) }
    .product-detail-grid { grid-template-columns: 1fr }
    .product-gallery { position: static }
    .product-name { font-size: 1.25rem }
}

/* ---------- Enquiry modal ---------- */
body.modal-open { overflow: hidden }
.enquiry-modal {
    width: min(620px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    margin: auto;
    padding: 0;
    border: 0;
    background: var(--white);
    color: var(--ink);
    box-shadow: 0 30px 80px -20px rgba(0,33,71,.45);
    overflow: auto;
    transition: width .35s var(--ease)
}
.enquiry-modal::backdrop { background: rgba(0,33,71,.6) }
.enquiry-modal[open] { animation: enquiryPop .25s var(--ease) }
@keyframes enquiryPop { from { opacity: 0; transform: translateY(12px) scale(.98) } }
.enquiry-modal.is-compact { width: min(440px, calc(100vw - 2rem)) }
.enquiry-panel { position: relative; padding: var(--s-4) var(--s-4) var(--s-4) }
.enquiry-close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--grey);
    cursor: pointer;
    background: none;
    border: 0
}
.enquiry-close:hover { color: var(--navy) }
.enquiry-panel h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.875rem;
    line-height: 1.15;
    color: var(--navy);
    margin: 0 2rem .75rem 0
}
.enquiry-intro { color: var(--grey); line-height: 1.7; margin: 0 0 var(--s-3); font-size: .9375rem }
.enquiry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--s-2) }
.enquiry-field { display: grid; gap: .375rem; margin-bottom: var(--s-2); align-content: start }
.enquiry-field label { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--navy) }
.enquiry-field input,
.enquiry-field select,
.enquiry-field textarea {
    width: 100%;
    padding: .75rem .875rem;
    border: 1px solid var(--grey-rule);
    border-radius: 0;
    background: var(--white);
    font: inherit;
    font-size: .9375rem;
    color: var(--ink);
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease)
}
.enquiry-field textarea { resize: vertical; min-height: 6rem }
.enquiry-field select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.75rem;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%23002147' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1.125rem center
}
.enquiry-field input:focus,
.enquiry-field select:focus,
.enquiry-field textarea:focus { outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(152,134,99,.2) }
.enquiry-field .has-error { border-color: #b3261e }
.enquiry-error { color: #b3261e; font-size: .8125rem; line-height: 1.4; min-height: 0 }
.enquiry-error:empty { display: none }
.enquiry-check { margin-bottom: var(--s-2) }
.enquiry-check label { display: flex; gap: .75rem; align-items: flex-start; font-size: .875rem; line-height: 1.5; color: var(--grey); cursor: pointer }
.enquiry-check input { margin-top: .25rem; width: 1rem; height: 1rem; accent-color: var(--navy); flex-shrink: 0 }
.enquiry-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden }
.enquiry-submit { width: 100%; margin-top: var(--s-2); justify-content: center }
.enquiry-submit:disabled { opacity: .6; cursor: wait }
.enquiry-error-form { margin: var(--s-1) 0 0; text-align: center }
.enquiry-thanks { text-align: center; padding: var(--s-2) 0 }
.enquiry-thanks p { color: var(--grey); line-height: 1.7; margin: 0 0 var(--s-3) }
.enquiry-thanks h2 { margin-right: 0 }

@media (max-width: 560px) {
    .enquiry-panel { padding: var(--s-4) var(--s-3) var(--s-3) }
    .enquiry-grid { grid-template-columns: 1fr }
    .enquiry-panel h2 { font-size: 1.5rem }
}

/* ---------- Showroom banner (product page) ---------- */
.showroom-banner {
    position: relative;
    overflow: hidden;
    background: var(--navy);
    color: var(--white);
    padding: var(--s-7) 0
}
.showroom-banner-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: .35
}
.showroom-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,33,71,.96) 0%, rgba(0,33,71,.82) 55%, rgba(0,33,71,.55) 100%)
}
.showroom-banner-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--s-6)
}
.showroom-banner-copy { max-width: 38rem }
.showroom-banner-copy h2 {
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.12;
    color: var(--white);
    margin: .75rem 0 1.25rem
}
.showroom-banner-copy p { color: rgba(255,255,255,.85); line-height: 1.75 }
.showroom-banner-copy .hero-eyebrow { margin: 0 }
.showroom-banner-copy .showroom-banner-hours { margin-top: 1rem; font-size: .8125rem; line-height: 1.5; letter-spacing: .02em; color: rgba(255,255,255,.7) }
.showroom-banner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: var(--s-4) }
.showroom-banner-link {
    font-size: .8125rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--white);
    border-bottom: 1px solid var(--gold);
    padding-bottom: .25rem;
    transition: color .3s var(--ease)
}
.showroom-banner-link:hover { color: var(--gold) }
.showroom-banner-badge {
    display: grid;
    place-content: center;
    gap: .25rem;
    width: 11rem;
    height: 11rem;
    border: 1px solid var(--gold);
    box-shadow: inset 0 0 0 .5rem rgba(0,33,71,.55), inset 0 0 0 calc(.5rem + 1px) rgba(152,134,99,.55);
    text-align: center;
    background: rgba(0,33,71,.5)
}
.showroom-banner-badge span {
    font-size: .6875rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    color: var(--gold)
}
.showroom-banner-badge strong {
    font-family: var(--font-display);
    font-size: 1.625rem;
    font-weight: 400;
    line-height: 1.1;
    color: var(--white)
}
.showroom-banner-badge small { font-size: .75rem; color: rgba(255,255,255,.75) }

@media (max-width: 800px) {
    .showroom-banner { padding: var(--s-6) 0 }
    .showroom-banner::before { background: rgba(0,33,71,.88) }
    .showroom-banner-inner { grid-template-columns: 1fr; gap: var(--s-4) }
    .showroom-banner-badge { width: 9rem; height: 9rem; justify-self: start; order: -1 }
    .showroom-banner-badge strong { font-size: 1.25rem }
}

/* ---------- Admin preview bar ---------- */
.preview-bar {
    position: relative;
    z-index: 101;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .5rem 1.5rem;
    padding: .75rem var(--gutter);
    background: #fef3c7;
    color: #78350f;
    font-size: .875rem;
    text-align: center
}
.preview-bar a { text-decoration: underline; font-weight: 500 }

/* ---------- Dimensions strip (Width / Thickness / Length) ---------- */
.product-dims {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2) var(--s-3);
    margin: var(--s-3) 0 0;
    padding: var(--s-3) 0;
    border-top: 1px solid var(--grey-rule);
    border-bottom: 1px solid var(--grey-rule)
}
.product-dims li { display: flex; align-items: center; gap: .5rem; font-size: 1rem; font-weight: 300; white-space: nowrap; color: var(--ink) }
.product-dims .dim-icon { width: 1.375rem; height: 1.375rem; color: var(--navy); flex-shrink: 0 }
