/* v8: modern SaaS-style chrome (floating glass header, card footer) + product page upgrade */

:root { --pill-h: 60px; --radius: 18px; --radius-sm: 12px; --glass: rgba(251, 248, 242, .78); --glass-line: rgba(27, 23, 20, .09); --shadow-soft: 0 12px 40px -18px rgba(27, 23, 20, .28); }

/* ---------- buttons: soft pills to match the header ---------- */
.btn, .btn-outline, .pi-pair-add, .pi-ask, .pi-offer { border-radius: 999px; }
.pi-ask, .pi-offer { border-radius: var(--radius-sm); }

/* ---------- floating glass header ---------- */
.hdr.hdr--pill { position: sticky; top: 12px; z-index: 60; background: transparent; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; padding: 0 var(--gutter); margin-top: 12px; color: var(--ink); }
.hdr--pill .hdr-inner { position: relative; max-width: 1240px; height: var(--pill-h); margin: 0 auto; padding: 0 10px 0 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  background: var(--glass); -webkit-backdrop-filter: saturate(1.6) blur(18px); backdrop-filter: saturate(1.6) blur(18px);
  border: 1px solid var(--glass-line); border-radius: 999px; box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, var(--shadow-soft); transition: height .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease); }
.hdr--pill.is-scrolled .hdr-inner { height: 54px; background: rgba(251, 248, 242, .9); }
.hdr--pill .hdr-left { display: flex; align-items: center; gap: 6px; height: 100%; }
.hdr--pill .hdr-logo { justify-self: start; gap: 10px; }
.hdr--pill .hdr-mark { height: 28px; filter: none !important; }
.hdr--pill .hdr-word { height: 11px; filter: none !important; }
.hdr--pill .hdr-nav { display: flex; align-items: center; gap: 2px; height: 100%; }
.hdr--pill .nav-item { height: 100%; display: flex; align-items: center; }
.hdr--pill .nav-link { height: auto; padding: 9px 14px; border-radius: 999px; font-family: var(--sans); font-size: .86rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--ink); transition: background .2s, color .2s; }
.hdr--pill .nav-link::after { display: none; }
.hdr--pill .nav-link:hover, .hdr--pill .nav-item.is-open > .nav-link, .hdr--pill .nav-link[aria-current="page"] { background: rgba(27, 23, 20, .06); color: var(--ink); }
.hdr--pill .nav-link .icon-xs { width: 10px; height: 10px; margin-left: 4px; transition: transform .2s; }
.hdr--pill .nav-item.is-open > .nav-link .icon-xs { transform: rotate(180deg); }
.hdr--pill .hdr-right { display: flex; justify-content: flex-end; align-items: center; gap: 4px; }
.hdr--pill .icon-btn { width: 42px; height: 42px; border-radius: 999px; color: var(--ink); transition: background .2s; }
.hdr--pill .icon-btn:hover { background: rgba(27, 23, 20, .06); color: var(--ink); opacity: 1; }
.hdr-bag-pill { display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 8px 0 16px; margin-left: 4px; border-radius: 999px; background: var(--ink); color: #fbf6ee; font: 500 .86rem var(--sans); transition: background .2s, transform .2s; }
.hdr-bag-pill:hover { background: #000; }
.hdr-bag-pill:active { transform: scale(.97); }
.hdr-bag-count { min-width: 26px; height: 26px; padding: 0 7px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: .78rem; font-variant-numeric: tabular-nums; }
.hdr-bag-count.has-items { background: #fbf6ee; color: var(--ink); }
.hdr-bag-count.bump { animation: bagBump .4s var(--ease-out); }
@keyframes bagBump { 40% { transform: scale(1.25); } }

/* mega menu: a floating card under the pill */
.hdr--pill .mega { position: absolute; top: calc(100% + 10px); left: 50%; right: auto; width: min(1040px, calc(100vw - 2 * var(--gutter))); transform: translate(-50%, -6px); border: 1px solid var(--glass-line); border-radius: 24px; background: #fffdf9; box-shadow: 0 30px 70px -30px rgba(27, 23, 20, .4); }
.hdr--pill .nav-item.is-open .mega { transform: translate(-50%, 0); }
.hdr--pill .nav-item[data-mega] { position: static; }
.hdr--pill .mega-inner { padding: 28px 30px; gap: 40px; grid-template-columns: repeat(3, minmax(0, 1fr)) 240px; justify-content: stretch; }
.hdr--pill .mega-col h4 { font-size: .68rem; letter-spacing: .14em; margin-bottom: 14px; }
.hdr--pill .mega-col a { font-family: var(--sans); font-size: .95rem; color: var(--ink); }
.hdr--pill .mega-col a:hover { color: var(--gray); }
.hdr--pill .mega-feature .img { aspect-ratio: 4 / 3; border-radius: var(--radius-sm); }
.hdr--pill .mega-feature strong { font-size: 1.05rem; margin-top: 10px; }
.hdr--pill .mega-feature span { text-transform: none; letter-spacing: 0; font-size: .82rem; }

/* home: the pill floats over the hero banner and never turns transparent */
.home .hdr.hdr--pill { position: fixed; left: 0; right: 0; margin-top: 0; }
.home .hdr.hdr--pill.is-transparent { background: transparent; color: var(--ink); border: 0; }
.hdr--pill.is-transparent .hdr-mark, .hdr--pill.is-transparent .hdr-word { filter: none; }
.hdr--pill.is-transparent .icon-btn:hover { color: var(--ink); opacity: 1; }
.home .hdr--pill .hdr-inner { margin-top: 12px; }

@media (max-width: 1080px) {
  .hdr--pill .nav-link { padding: 9px 10px; font-size: .82rem; }
}
@media (max-width: 960px) {
  .hdr--pill .hdr-inner { grid-template-columns: auto 1fr auto; padding: 0 6px 0 6px; height: 56px; }
  .hdr--pill .hdr-nav { display: none; }
  .hdr--pill .hdr-logo { justify-self: start; }
  .hdr--pill .hdr-word { display: none; }
  .hdr-bag-label { display: none; }
  .hdr-bag-pill { padding: 0 6px 0 12px; }
}
@media (max-width: 420px) { .hdr.hdr--pill { padding: 0 10px; } }

/* ---------- footer: newsletter card + columns ---------- */
.ftr.ftr--saas { padding: clamp(40px, 6vw, 72px) 0 28px; }
.ftr-cta { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; padding: clamp(26px, 4vw, 44px); border-radius: 28px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); margin-bottom: clamp(40px, 6vw, 64px); }
.ftr-cta h2 { color: #fbf6ee; font-size: clamp(1.8rem, 3vw, 2.4rem); margin: 0 0 8px; }
.ftr-cta p { margin: 0; color: rgba(251, 246, 238, .72); }
.ftr-form--pill { position: relative; display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); max-width: none; margin: 0; }
.ftr-form--pill input[type="email"] { flex: 1; min-width: 0; height: 48px; padding: 0 18px; border: 0; background: transparent; color: #fbf6ee; font-size: .95rem; }
.ftr-form--pill input[type="email"]::placeholder { color: rgba(251, 246, 238, .55); }
.ftr-form--pill input[type="email"]:focus { outline: none; }
.ftr-form--pill:focus-within { border-color: rgba(255, 255, 255, .45); }
.ftr-form--pill button { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border-radius: 999px; background: #fbf6ee; color: var(--ink); font: 500 .9rem var(--sans); letter-spacing: 0; text-transform: none; position: static; width: auto; }
.ftr-form--pill button span { display: inline; }
.ftr-form--pill .form-msg { position: absolute; left: 18px; top: calc(100% + 8px); }
.ftr-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: clamp(24px, 4vw, 56px); padding-bottom: 36px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ftr-logo img { height: 64px; width: auto; }
.ftr-brand p { color: rgba(251, 246, 238, .7); max-width: 34ch; margin: 16px 0 18px; font-size: .92rem; }
.ftr-col h4 { font: 600 .74rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: rgba(251, 246, 238, .55); margin: 0 0 16px; }
.ftr-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ftr-col a, .ftr-col li { color: rgba(251, 246, 238, .86); font-size: .92rem; }
.ftr-col a:hover { color: #fff; }
.ftr--saas .socials a { width: 40px; height: 40px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); display: inline-grid; place-items: center; }
.ftr--saas .socials a:hover { background: rgba(255, 255, 255, .08); }
.ftr--saas .ftr-promise { display: flex; flex-wrap: wrap; gap: 10px; padding: 24px 0; margin: 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.ftr--saas .ftr-promise li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); font-size: .84rem; color: rgba(251, 246, 238, .86); }
.ftr--saas .ftr-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding-top: 22px; font-size: .82rem; color: rgba(251, 246, 238, .6); }
.ftr-legal { display: flex; gap: 18px; }
.ftr-legal a { color: rgba(251, 246, 238, .75); }
.ftr-legal a:hover { color: #fff; }
.ftr--saas .pay-icons span { border-radius: 999px; }
@media (max-width: 900px) { .ftr-cta { grid-template-columns: 1fr; } .ftr-grid { grid-template-columns: 1fr 1fr; } .ftr-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .ftr-grid { grid-template-columns: 1fr; } .ftr-form--pill button span { display: none; } .ftr-form--pill button { padding: 0 16px; } }

/* ---------- product page ---------- */
/* desktop: every image large in a grid, buy box pinned beside it */
@media (min-width: 1025px) {
  .pdp-v4 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); padding-top: 28px; }
  .pg { position: static; }
  .pg-stage { aspect-ratio: auto; overflow: visible; background: none; }
  .pg-stage .gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow: visible; height: auto; scroll-snap-type: none; }
  .pg-stage .gallery-item { aspect-ratio: 4 / 5; height: auto; border-radius: var(--radius); background: var(--parchment); }
  .pg-stage .gallery-item:first-child { grid-column: 1 / -1; }
  .pg-stage .gallery-item img { transition: transform .8s var(--ease); }
  .pg-stage .gallery-item:hover img { transform: scale(1.03); }
  .pg-arrow, .pg-zoom, .pg-thumbs, .pg .gallery-dots, .pg-count { display: none !important; }
  .pi { position: sticky; top: calc(var(--pill-h) + 36px); }
}
@media (max-width: 1024px) {
  .pg-stage { border-radius: var(--radius); }
  .pg-thumbs button { border-radius: 10px; }
}

/* buy box */
.pi h1 { letter-spacing: -.01em; }
.pi-facts { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 18px; padding: 0; }
.pi-facts li { padding: 6px 12px; border-radius: 999px; background: rgba(27, 23, 20, .05); font-size: .78rem; color: var(--ink); }
.pi .buy-row .btn { height: 56px; font-size: .78rem; }
.pi .buy-alt .btn-outline { height: 52px; }
.pi .qty-lg { border-radius: 999px; overflow: hidden; }
.pi .wish-square { border-radius: 999px; }
.pi-assure { border-radius: var(--radius); overflow: hidden; }
.pi-delivery { border-radius: var(--radius-sm); }
.pi-pairs { border-radius: var(--radius); }
.pi-pair img { border-radius: 10px; }

/* who it's for */
.who-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.who-card { padding: 24px 22px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.who-k { font: 600 .68rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gray); }
.who-v { font-family: var(--serif); font-size: 1.35rem; line-height: 1.25; margin: 6px 0 0; color: var(--ink); text-transform: capitalize; }
.who-s { margin: 0; font-size: .86rem; color: var(--gray); }
@media (max-width: 900px) { .who-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .who-grid { grid-template-columns: 1fr; } }

/* scent journey */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; position: relative; }
.journey::before { content: ""; position: absolute; top: 9px; left: 9px; right: 9px; height: 2px; background: linear-gradient(90deg, #d9c8a2, #b98d5f 50%, #5a3d2b); border-radius: 2px; }
.journey-step { position: relative; padding-top: 40px; }
.journey-dot { position: absolute; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--ivory); border: 2px solid var(--ink); }
.journey-step:nth-child(2) .journey-dot { left: 0; }
.journey-step h3 { font-size: 1.4rem; margin: 6px 0 14px; }
.journey-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.journey-notes li { padding: 8px 14px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .86rem; }
@media (max-width: 760px) {
  .journey { grid-template-columns: 1fr; gap: 26px; padding-left: 34px; }
  .journey::before { top: 9px; bottom: 9px; left: 9px; right: auto; width: 2px; height: auto; background: linear-gradient(180deg, #d9c8a2, #b98d5f 50%, #5a3d2b); }
  .journey-step { padding-top: 0; }
  .journey-dot { left: -34px; }
}

/* lifestyle rail */
.worn-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, calc((100% - 28px) / 3)); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding-bottom: 6px; }
.worn-item { margin: 0; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 5; background: var(--parchment); }
.worn-item img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 820px) { .worn-rail { grid-auto-columns: 78%; } }

/* softer corners on the rest of the page */
.review-card, .wear-summary, .rating-box, .note-card, .split-media img { border-radius: var(--radius); }
.card .card-media { border-radius: var(--radius); overflow: hidden; }

/* polish */
.pi-pairs { border-radius: 0; }
.who-v { text-transform: none; }
.who-v::first-letter { text-transform: uppercase; }
@media (min-width: 1025px) { .pg-stage .gallery-item:nth-child(even):last-child { grid-column: 1 / -1; aspect-ratio: 16 / 10; } }
.ftr-form--pill input[type="email"], .ftr-form--pill input[type="email"]::placeholder { font-family: var(--sans); font-style: normal; }
.card .btn, .card-add, .card [data-add] { border-radius: 999px; }
.pg-zoom { border-radius: 999px; }
