/* ============================================================
   Floory, shop.css · Colours / Shop page
   Premium colour-discovery: hero, filters, swatch cards, quick-view
   /colour-detail modal, compare, favourites trays. Brand: black type,
   warm off-white, restrained orange. Maps to a WooCommerce archive +
   single-product later.
   ============================================================ */

/* ---- Force a solid header on the light Shop page (no dark hero) ---- */
body.page-shop .site-header { background: rgba(255,255,255,0.94); backdrop-filter: saturate(180%) blur(12px); color: var(--black); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
body.page-shop .site-header .brand__logo--dark { opacity: 1; }
body.page-shop .site-header .brand__logo--light { opacity: 0; }
body.page-shop .site-header .site-nav a { color: var(--black); }
body.page-shop .site-header .link-cta { color: var(--black); }
body.page-shop .site-nav a[aria-current="page"] { color: var(--orange); }
body.shop-modal-open { overflow: hidden; }

/* ---- Hero ---- */
.shophero { background: linear-gradient(180deg, var(--white) 0%, var(--cream) 100%); padding: calc(var(--ann-h) + var(--header-h) + var(--sp-5)) 0 0; }
.shophero__inner { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.shophero__title { font-size: clamp(2rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.shophero__sub { max-width: 60ch; margin: var(--sp-3) auto 0; color: var(--ink-700); line-height: 1.6; }
.shophero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: var(--sp-4); }
.shophero__strip { display: flex; gap: 4px; margin-top: var(--sp-5); height: clamp(56px, 9vw, 96px); padding: 0 var(--gutter); }
.shophero__strip span { flex: 1; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(21,17,15,0.05); }

/* ---- Trust strip ---- */
.shoptrust { background: var(--cream); border-top: 1px solid var(--cream-deep); border-bottom: 1px solid var(--cream-deep); }
.shoptrust__list { max-width: var(--maxw); margin: 0 auto; padding: var(--sp-3) var(--gutter); display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem 1.4rem; }
.shoptrust__list li { position: relative; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.01em; color: var(--black); }
.shoptrust__list li:not(:last-child)::after { content: "·"; position: absolute; right: -0.85rem; color: var(--orange); }

/* ---- Grid section ---- */
.shopgrid { max-width: var(--maxw); margin: 0 auto; padding: var(--sp-6) var(--gutter); }
.shopgrid__head { max-width: 60ch; }
.shopgrid__empty { margin-top: var(--sp-4); color: var(--ink-500); }

/* Filters */
.shopfilter { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-3) var(--sp-5); margin: var(--sp-4) 0 var(--sp-5); padding-bottom: var(--sp-3); border-bottom: 1px solid var(--cream-deep); }
.shopfilter__group { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.shopfilter__label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-500); flex: none; }
.shopfilter__pills { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.shoppill { padding: 0.45rem 0.85rem; min-height: 40px; border-radius: var(--radius-pill); background: var(--white); border: 1.5px solid var(--cream-deep); color: var(--black); font-family: inherit; font-size: 0.86rem; font-weight: 600; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast), color var(--t-fast); }
.shoppill:hover { border-color: #e0b9a4; }
.shoppill.is-active { background: var(--orange); border-color: var(--orange); color: #fff; }
.shopfilter__count { margin-left: auto; font-size: 0.85rem; color: var(--ink-500); }

/* Cards */
.shopcards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-4); }
.ccard { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: transform var(--t-fast), box-shadow var(--t-fast); }
.ccard[hidden] { display: none; }
.ccard:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.ccard__media { position: relative; }
.ccard__swatch { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; border: 0; cursor: pointer; padding: 0; }
.ccard__overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.4rem; padding: var(--sp-3); background: linear-gradient(0deg, rgba(20,14,10,0.5), transparent 55%); opacity: 0; transition: opacity var(--t-fast); }
.ccard__overlay-t { color: #fff; font-size: 0.82rem; font-weight: 600; }
.ccard__overlay-cta { align-self: flex-start; background: var(--white); color: var(--black); font-size: 0.8rem; font-weight: 700; padding: 0.4rem 0.8rem; border-radius: var(--radius-pill); }
.ccard__swatch:hover .ccard__overlay, .ccard__swatch:focus-visible .ccard__overlay { opacity: 1; }
.ccard__fav { position: absolute; top: 0.6rem; right: 0.6rem; width: 38px; height: 38px; border-radius: 50%; display: grid; place-content: center; background: rgba(255,255,255,0.9); border: 1px solid var(--cream-deep); color: var(--ink-700); cursor: pointer; transition: color var(--t-fast), background var(--t-fast); }
.ccard__fav:hover { color: var(--orange); }
.ccard__fav.is-saved { color: #fff; background: var(--orange); border-color: var(--orange); }
.ccard__fav.is-saved svg path { fill: #fff; }
.ccard__body { padding: var(--sp-3); display: flex; flex-direction: column; gap: 0.3rem; flex: 1; }
.ccard__row { display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem; }
.ccard__name { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.01em; }
.ccard__tone { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-500); white-space: nowrap; }
.ccard__note { font-size: 0.82rem; color: var(--ink-700); line-height: 1.4; }
.ccard__best { font-size: 0.78rem; color: var(--ink-500); }
.ccard__cta { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.5rem; }
.ccard__cta .btn { width: 100%; }
.ccard__cmp { display: inline-flex; align-items: center; gap: 0.45rem; margin-top: 0.5rem; font-size: 0.8rem; font-weight: 600; color: var(--ink-700); cursor: pointer; }
.ccard__cmp input { width: 17px; height: 17px; accent-color: var(--orange); }

/* Premium tonal placeholder (room/closeup until real images) */
.ph { position: relative; display: block; width: 100%; height: 100%; }
.ph__label { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: rgba(20,14,10,0.42); padding: 0.25rem 0.55rem; border-radius: var(--radius-pill); white-space: nowrap; }

/* ---- Need help choosing ---- */
.shophelp { background: var(--cream); padding: var(--sp-6) 0; }
.shophelp__head { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); text-align: center; }
.shophelp__head .section-lead { margin-inline: auto; }
.shophelp__cards { max-width: var(--maxw); margin: var(--sp-5) auto 0; padding: 0 var(--gutter); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.helpcard { display: flex; flex-direction: column; align-items: flex-start; gap: 0.4rem; text-align: left; background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius-lg); padding: var(--sp-3); cursor: pointer; font-family: inherit; transition: transform var(--t-fast), box-shadow var(--t-fast); }
.helpcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.helpcard__sw { width: 100%; height: 56px; border-radius: var(--radius); }
.helpcard__title { font-size: 1rem; font-weight: 700; }
.helpcard__desc { font-size: 0.82rem; color: var(--ink-700); line-height: 1.4; }
.shophelp__cta { text-align: center; margin-top: var(--sp-5); }

/* ---- See it before you choose ---- */
.shopseeit { max-width: var(--maxw); margin: 0 auto; padding: var(--sp-6) var(--gutter); }
.shopseeit__inner { display: grid; gap: var(--sp-4); align-items: center; background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius-lg); padding: clamp(1.5rem, 4vw, 2.75rem); box-shadow: var(--shadow-sm); }
.shopseeit__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }

/* ---- Education mini-strip ---- */
.shopedu { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter) var(--sp-6); }
.shopedu__list { display: grid; grid-template-columns: 1fr; gap: var(--sp-3); }
.shopedu__list li { display: flex; flex-direction: column; gap: 0.2rem; padding: var(--sp-3); background: var(--cream); border: 1px solid var(--cream-deep); border-radius: var(--radius); }
.shopedu__t { font-weight: 700; font-size: 0.95rem; }
.shopedu__d { font-size: 0.85rem; color: var(--ink-700); line-height: 1.45; }
.shopedu__more { display: inline-block; margin-top: var(--sp-3); }

/* ---- Reviews snippet ---- */
.shopproof { text-align: center; padding: var(--sp-5) var(--gutter); background: var(--cream); border-top: 1px solid var(--cream-deep); }
.shopproof__rating { font-size: 1.05rem; font-weight: 700; }
.shopproof__sub { margin-top: 0.4rem; font-size: 0.85rem; color: var(--ink-500); }

/* ---- Final CTA ---- */
.shopfinal { text-align: center; padding: var(--sp-7) var(--gutter); }
.shopfinal__title { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); font-weight: 800; letter-spacing: -0.03em; }
.shopfinal__sub { max-width: 52ch; margin: var(--sp-2) auto 0; color: var(--ink-700); line-height: 1.55; }
.shopfinal__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: var(--sp-4); }

/* ---- shared link button ---- */
.linkbtn { background: none; border: 0; padding: 0; font-family: inherit; font-size: 0.9rem; font-weight: 600; color: var(--orange); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* ---- Trays ---- */
.shoptray { position: fixed; z-index: 90; }
.shoptray[hidden] { display: none; }
.shoptray__inner { display: flex; align-items: center; gap: var(--sp-3); background: var(--white); border: 1px solid var(--cream-deep); border-radius: var(--radius-pill); box-shadow: var(--shadow-lg); padding: 0.55rem 0.7rem 0.55rem 1.1rem; }
.shoptray__meta { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.shoptray__title { font-size: 0.82rem; font-weight: 700; }
.shoptray__hint { font-size: 0.7rem; color: var(--ink-500); }
.shoptray__dots { display: flex; gap: 3px; margin-top: 2px; }
.shoptray__dot { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(21,17,15,0.1); }
.shoptray__actions { display: flex; align-items: center; gap: 0.6rem; }
.shoptray--cmp.is-flash .shoptray__inner { animation: trayFlash 0.6s ease; }
@keyframes trayFlash { 0%,100% { box-shadow: var(--shadow-lg); } 40% { box-shadow: 0 0 0 3px var(--orange); } }

/* ---- Quick view / colour detail modal ---- */
/* Note: the bare `.cmp` class is also used by the homepage comparison table in sections.css.
   shop.html loads sections.css, so reset those container styles here so the compare MODAL
   fills the viewport correctly (shop.css is not loaded on index.html, so the table is unaffected). */
.qv, .cmp { position: fixed; inset: 0; z-index: 200; margin: 0; max-width: none; background: transparent; border: 0; box-shadow: none; overflow: visible; }
.qv[hidden], .cmp[hidden] { display: none; }
.qv__backdrop, .cmp__backdrop { position: absolute; inset: 0; background: rgba(20,14,10,0.55); opacity: 0; transition: opacity 0.22s ease; }
.qv.is-open .qv__backdrop, .cmp.is-open .cmp__backdrop { opacity: 1; }
.qv__dialog, .cmp__dialog { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(1040px, 94vw); max-height: 92vh; overflow: auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); opacity: 0; transition: opacity 0.22s ease, transform 0.22s ease; -webkit-overflow-scrolling: touch; }
.qv.is-open .qv__dialog, .cmp.is-open .cmp__dialog { opacity: 1; transform: translate(-50%, -50%); }
.qv__close, .cmp__close { position: absolute; top: 0.8rem; right: 0.8rem; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-content: center; background: rgba(255,255,255,0.92); border: 1px solid var(--cream-deep); color: var(--black); cursor: pointer; }

.qvgrid { display: grid; grid-template-columns: 1fr; }
.qvgallery { padding: clamp(1rem, 3vw, 1.75rem); }
.qvgallery__main { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); }
.qvgallery__name { font-size: 1.1rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; text-shadow: 0 1px 8px rgba(0,0,0,0.45); padding: var(--sp-3); }
.qvgallery__thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; margin-top: 0.5rem; }
.qvthumb { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-btn); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(21,17,15,0.08); }
.qvthumb img { width: 100%; height: 100%; object-fit: cover; }

.qvinfo { padding: clamp(1.25rem, 3vw, 2rem); border-top: 1px solid var(--cream-deep); }
.qvinfo__title { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
.qvinfo__sub { color: var(--ink-700); margin-top: 0.5rem; line-height: 1.55; }
.qvtags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: var(--sp-3); }
.qvtags span { font-size: 0.74rem; font-weight: 600; color: var(--ink-700); background: var(--cream); border: 1px solid var(--cream-deep); padding: 0.3rem 0.7rem; border-radius: var(--radius-pill); }
.qvbest { margin-top: var(--sp-3); }
.qvbest h4 { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-500); }
.qvbest ul { display: grid; gap: 0.35rem; margin-top: 0.5rem; }
.qvbest li { position: relative; padding-left: 1.4rem; font-size: 0.92rem; }
.qvbest li::before { content: ""; position: absolute; left: 0; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }
.qvchips { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: var(--sp-3); }
.qvchips li { font-size: 0.76rem; font-weight: 600; color: var(--ink-700); background: var(--white); border: 1px solid var(--cream-deep); padding: 0.35rem 0.7rem; border-radius: var(--radius-pill); }
.qvprice { margin-top: var(--sp-3); font-size: 0.86rem; color: var(--ink-500); }
.qvcta { margin-top: var(--sp-3); display: flex; flex-direction: column; gap: 0.6rem; }
.qvcta .btn--lg { width: 100%; }
.qvcta__row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.qvcta .btn--sm.is-saved { background: var(--orange); border-color: var(--orange); color: #fff; }
.qvnote { margin-top: var(--sp-3); font-size: 0.8rem; color: var(--ink-500); line-height: 1.5; }

/* Accordions */
.qvacc { margin-top: var(--sp-4); border-top: 1px solid var(--cream-deep); }
.qvacc__item { border-bottom: 1px solid var(--cream-deep); }
.qvacc__item summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: var(--sp-3) 0; font-weight: 700; font-size: 0.98rem; cursor: pointer; list-style: none; }
.qvacc__item summary::-webkit-details-marker { display: none; }
.qvacc__chev { width: 10px; height: 10px; border-right: 2px solid var(--ink-500); border-bottom: 2px solid var(--ink-500); transform: rotate(45deg); transition: transform var(--t-fast); flex: none; }
.qvacc__item[open] .qvacc__chev { transform: rotate(-135deg); }
.qvacc__body { padding-bottom: var(--sp-3); }
.qvacc__body ul { display: grid; gap: 0.4rem; }
.qvacc__body li { position: relative; padding-left: 1.3rem; font-size: 0.9rem; color: var(--ink-700); line-height: 1.45; }
.qvacc__body li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.qvacc__body p { font-size: 0.9rem; color: var(--ink-700); line-height: 1.55; }

/* Compare modal: flex column with a fixed heading and an internally-scrolling body */
.cmp__dialog { width: min(820px, 94vw); max-height: 88vh; padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.cmp__title { flex: none; font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; margin: 0; padding: clamp(1.25rem, 3vw, 1.6rem) 3.5rem var(--sp-3) clamp(1.25rem, 3vw, 1.6rem); }
.cmp__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 clamp(1.25rem, 3vw, 1.6rem) clamp(1.25rem, 3vw, 1.6rem); }
.cmpgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--sp-3); }
.cmpcol { border: 1px solid var(--cream-deep); border-radius: var(--radius-lg); overflow: hidden; padding-bottom: var(--sp-3); display: flex; flex-direction: column; }
.cmpcol__sw { height: 120px; flex: none; }
.cmpcol__name { font-size: 1.05rem; font-weight: 700; padding: var(--sp-3) var(--sp-3) 0; }
.cmpcol__specs { margin: 0; padding: 0.5rem var(--sp-3) var(--sp-3); display: grid; grid-template-columns: auto 1fr; gap: 0.3rem 0.75rem; font-size: 0.84rem; }
.cmpcol__specs dt { color: var(--ink-500); font-weight: 600; }
.cmpcol__specs dd { color: var(--black); margin: 0; }
.cmpcol .btn { margin: auto var(--sp-3) 0; width: calc(100% - 2 * var(--sp-3)); }

/* ============ RESPONSIVE ============ */
@media (max-width: 767px) {
  .ccard__fav { width: 44px; height: 44px; }        /* comfortable thumb target */
}
@media (max-width: 479px) {
  .ccard__cta .btn--ghost-dark { display: none; }   /* swatch tap opens detail; keep cards clean */
}
@media (min-width: 720px) {
  .shopcards { grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
  .shophelp__cards { grid-template-columns: repeat(4, 1fr); }
  .shopedu__list { grid-template-columns: repeat(2, 1fr); }
  .shopseeit__inner { grid-template-columns: 1.3fr 1fr; }
  .qvgrid { grid-template-columns: 1.05fr 0.95fr; }
  .qvinfo { border-top: 0; border-left: 1px solid var(--cream-deep); }
  .cmpgrid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}
@media (min-width: 1080px) {
  .shopcards { grid-template-columns: repeat(4, 1fr); }
  .shopedu__list { grid-template-columns: repeat(4, 1fr); }
}

/* Tray positions, desktop corners; mobile stacked above the sticky CTA */
@media (min-width: 768px) {
  .shoptray--fav { right: 24px; bottom: 24px; }
  .shoptray--cmp { left: 24px; bottom: 24px; }
}
@media (max-width: 767px) {
  .shoptray { left: 12px; right: 12px; }
  .shoptray__inner { justify-content: space-between; }
  .shoptray--cmp { bottom: 84px; }
  .shoptray--fav { bottom: 148px; }
  body.has-sticky-cta .sticky-cta.is-visible ~ .shoptray--cmp { bottom: 84px; }
}

/* Mobile: quick-view & compare slide up as a bottom sheet */
@media (max-width: 767px) {
  .qv__dialog, .cmp__dialog { left: 0; top: auto; bottom: 0; width: 100%; max-height: 92vh; transform: translateY(100%); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .qv.is-open .qv__dialog, .cmp.is-open .cmp__dialog { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .qv__dialog, .cmp__dialog, .qv__backdrop, .cmp__backdrop { transition: none; }
}

/* ---- Real swatch photos (object-fit cover, no distortion) ---- */
.ccard__swatch { overflow: hidden; }
.ccard__pic, .qvgallery__pic, .qvthumb__pic, .cmpcol__pic { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.ccard__pic img, .qvgallery__pic img, .qvthumb__pic img, .cmpcol__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.qvgallery__main { overflow: hidden; }
.qvgallery__name { position: relative; z-index: 2; }
.qvthumb--photo { position: relative; }
.cmpcol__sw { position: relative; overflow: hidden; }
