/* Shared styles for the Blonde Denm product pages. Base, navigation, footer and accessibility rules match merch.html. */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    :root {
      --warm-white: #fdf9f5;
      --cream: #f0e8de;
      --sand: #e2d5c5;
      --stone: #b09880;
      --bark: #6d5a4c;
      --dark: #51433a;
      --gold: #dcb188;
      --gold-light: #e4c09e;
      --black: #1a1410;
      /* Accessible text tones (WCAG AA): darker bark/gold for light backgrounds, lighter stone for dark backgrounds */
      --gold-text: #925d2b;
      --stone-light: #c2b09e;
    }

    html { scroll-behavior: smooth; }

    body {
      font-family: 'Jost', sans-serif;
      background: var(--warm-white);
      color: var(--dark);
      font-weight: 300;
      overflow-x: hidden;
    }

    /* NAV */
    nav {
      position: fixed;
      top: 0; left: 0; right: 0;
      z-index: 100;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 1.2rem 4rem;
      background: rgba(26, 20, 16, 0.88);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .nav-logo img { height: 26px; width: auto; display: block; }

    .nav-links { display: flex; gap: 2.5rem; list-style: none; }

    .nav-links a {
      font-size: 0.72rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--stone);
      text-decoration: none;
      transition: color 0.2s;
    }

    .nav-links a:hover { color: var(--gold); }
    .nav-links a.active { color: var(--gold); }

    .nav-book {
      font-size: 0.7rem;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--black);
      background: var(--gold);
      padding: 0.65rem 1.6rem;
      text-decoration: none;
      transition: background 0.2s;
    }

    .nav-book:hover { background: var(--gold-light); }

    /* MOBILE NAV — hamburger + full-screen overlay */
    .nav-toggle {
      display: none;
      flex-direction: column;
      justify-content: center;
      gap: 5px;
      width: 30px;
      height: 30px;
      background: none;
      border: none;
      cursor: pointer;
      padding: 0;
      z-index: 210;
    }
    .nav-toggle span {
      display: block;
      width: 24px;
      height: 1.5px;
      background: var(--warm-white);
      transition: transform 0.3s ease, opacity 0.3s ease;
    }
    .nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
    .nav-toggle.open span:nth-child(2) { opacity: 0; }
    .nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

    .nav-overlay {
      position: fixed;
      inset: 0;
      background: rgba(26, 20, 16, 0.98);
      backdrop-filter: blur(8px);
      z-index: 200;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 2.2rem;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      transition: opacity 0.35s ease, visibility 0s linear 0.35s;
    }
    .nav-overlay.open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transition: opacity 0.35s ease, visibility 0s;
    }
    .nav-overlay a {
      font-family: 'Cormorant Garamond', serif;
      font-size: 2rem;
      font-weight: 300;
      letter-spacing: 0.05em;
      color: var(--warm-white);
      text-decoration: none;
      transition: color 0.2s;
    }
    .nav-overlay a:hover, .nav-overlay a.active { color: var(--gold); }
    .nav-overlay .nav-overlay-book {
      margin-top: 1rem;
      font-family: 'Jost', sans-serif;
      font-size: 0.8rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--black);
      background: var(--gold);
      padding: 0.9rem 2.4rem;
    }
    body.nav-open { overflow: hidden; }
    .nav-toggle:focus-visible, .nav-overlay a:focus-visible {
      outline: 1px solid var(--gold);
      outline-offset: 6px;
    }


    /* FOOTER */
    footer {
      background: var(--black);
      padding: 2.5rem 4rem;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .footer-logo {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.2rem;
      color: var(--cream);
      letter-spacing: 0.1em;
    }

    .footer-copy { font-size: 0.7rem; letter-spacing: 0.12em; color: var(--stone); }

    /* ACCESSIBILITY */
    .skip-link {
      position: absolute;
      left: 1rem;
      top: -5rem;
      z-index: 300;
      background: var(--gold);
      color: var(--black);
      padding: 0.8rem 1.2rem;
      font-size: 0.75rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-decoration: none;
    }
    .skip-link:focus { top: 1rem; }
    main:focus { outline: none; }
    img { height: auto; }
    a:focus-visible, button:focus-visible, input:focus-visible,
    select:focus-visible, textarea:focus-visible {
      outline: 2px solid var(--gold-text);
      outline-offset: 3px;
    }
    nav a:focus-visible, .nav-overlay a:focus-visible, .nav-toggle:focus-visible, footer a:focus-visible { outline-color: var(--gold); }

    .visually-hidden {
      position: absolute;
      width: 1px; height: 1px;
      margin: -1px; padding: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      border: 0;
    }

    /* ACCESSIBILITY */
    .skip-link {
      position: absolute;
      left: 1rem;
      top: -5rem;
      z-index: 300;
      background: var(--gold);
      color: var(--black);
      padding: 0.8rem 1.2rem;
      font-size: 0.75rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-decoration: none;
    }
    .skip-link:focus { top: 1rem; }
    main:focus { outline: none; }
    img { height: auto; }
    a:focus-visible, button:focus-visible, input:focus-visible,
    select:focus-visible, textarea:focus-visible {
      outline: 2px solid var(--gold-text);
      outline-offset: 3px;
    }
    nav a:focus-visible, .nav-overlay a:focus-visible, .nav-toggle:focus-visible, footer a:focus-visible { outline-color: var(--gold); }

    .visually-hidden {
      position: absolute;
      width: 1px; height: 1px;
      margin: -1px; padding: 0;
      overflow: hidden;
      clip: rect(0 0 0 0);
      white-space: nowrap;
      border: 0;
    }


    /* PRODUCT PAGE */
    main { padding: calc(4.75rem + 2.5rem) 0 6rem; background: var(--warm-white); }

    .product-page {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 4rem;
      display: grid;
      grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr);
      grid-template-areas: "viewer head" "viewer info";
      grid-template-rows: auto 1fr;
      column-gap: 4rem;
      align-items: start;
    }

    .product-head { grid-area: head; }
    .product-viewer { grid-area: viewer; }
    .product-info { grid-area: info; align-self: start; }

    .back-link {
      display: inline-flex;
      align-items: center;
      gap: 0.75rem;
      padding: 0.5rem 0;
      font-size: 0.72rem;
      font-weight: 400;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      text-decoration: none;
      color: var(--bark);
      border-bottom: 1px solid var(--gold-text);
      transition: color 0.3s ease, gap 0.3s ease;
    }
    .back-link:hover { color: var(--black); gap: 1.1rem; }

    .product-title {
      margin-top: 3rem;
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(2.8rem, 5vw, 4.8rem);
      font-weight: 300;
      line-height: 1;
      letter-spacing: -0.01em;
      color: var(--dark);
    }

    .product-colour {
      margin-top: 1rem;
      font-size: 0.75rem;
      letter-spacing: 0.22em;
      text-transform: uppercase;
      color: var(--bark);
    }

    .product-info {
      margin-top: 2.5rem;
      padding-top: 1.5rem;
      border-top: 1px solid var(--sand);
    }

    .product-note {
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.6rem;
      font-style: italic;
      font-weight: 300;
      color: var(--bark);
    }

    /* ENTRANCE (runs once, shorter than the collection opening). JavaScript-enabled only; the end state is the normal state. */
    .line { display: block; overflow: hidden; padding: 0.06em 0 0.12em; margin: -0.06em 0 -0.12em; }
    .line-inner { display: block; }

    @keyframes line-rise { from { opacity: 0; transform: translateY(105%); } to { opacity: 1; transform: none; } }
    @keyframes wipe-up { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
    @keyframes image-settle { from { transform: scale(1.04); } to { transform: none; } }
    @keyframes rise-small { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

    .js .product-title .line-inner { animation: line-rise 600ms cubic-bezier(0.22, 0.61, 0.36, 1) backwards; }
    .js .viewer-frame { animation: wipe-up 800ms cubic-bezier(0.65, 0, 0.35, 1) 40ms backwards; }
    .js .viewer-frame img { animation: image-settle 900ms cubic-bezier(0.22, 0.61, 0.36, 1) 40ms backwards; }
    .js .product-colour { animation: rise-small 450ms cubic-bezier(0.22, 0.61, 0.36, 1) 180ms backwards; }
    .js .viewer-thumbs { animation: rise-small 450ms cubic-bezier(0.22, 0.61, 0.36, 1) 280ms backwards; }
    .js .product-note { animation: rise-small 450ms cubic-bezier(0.22, 0.61, 0.36, 1) 380ms backwards; }

    /* image viewer: both photographs are shown one after the other without JavaScript,
       and as a single frame with labelled controls when JavaScript is available */
    .viewer-frame { display: grid; gap: 1.5rem; }

    .viewer-frame figure { background: var(--sand); aspect-ratio: 1 / 1; overflow: hidden; }

    .viewer-frame img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .js .viewer-frame { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--sand); overflow: hidden; }
    /* crossfade inside a fixed frame: the incoming photograph fades in over the outgoing one, which stays
       fully opaque underneath until the fade ends, so the frame is never blank or half-transparent */
    .js .viewer-frame figure { position: absolute; inset: 0; opacity: 0; z-index: 0; transition: opacity 0.3s ease; }
    .js .viewer-frame figure.is-active { opacity: 1; z-index: 2; }
    .js .viewer-frame figure.is-leaving { opacity: 1; z-index: 1; transition: none; }

    .viewer-frame figure[data-view="model"] img { object-position: var(--model-position, center 12%); }

    .viewer-thumbs { display: none; gap: 1.1rem; margin-top: 1.25rem; padding-left: 3px; }
    .js .viewer-thumbs { display: flex; }

    /* photographic thumbnails: a square photograph with its label beneath; the selected one is outlined and underlined */
    .thumb {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 0.6rem;
      width: 5.5rem;
      padding: 0;
      font-family: 'Jost', sans-serif;
      background: none;
      border: 0;
      cursor: pointer;
      text-align: left;
    }
    .thumb-media {
      display: block;
      aspect-ratio: 1 / 1;
      overflow: hidden;
      background: var(--sand);
      outline: 2px solid transparent;
      outline-offset: 3px;
      transition: outline-color 0.3s ease;
    }
    .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0.7; transition: opacity 0.3s ease; }
    .thumb-media-model img { object-position: var(--model-position, center 12%); }
    .thumb-label {
      font-size: 0.66rem;
      font-weight: 400;
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--bark);
      text-decoration: underline transparent;
      text-decoration-thickness: 1px;
      text-underline-offset: 0.45em;
      transition: color 0.3s ease, text-decoration-color 0.3s ease;
    }
    .thumb:hover img { opacity: 1; }
    .thumb[aria-pressed="true"] img { opacity: 1; }
    .thumb[aria-pressed="true"] .thumb-media { outline-color: var(--dark); }
    .thumb[aria-pressed="true"] .thumb-label { color: var(--dark); text-decoration-color: var(--dark); }

    @media (min-width: 901px) {
      .product-viewer { max-width: max(26rem, calc(100svh - 16rem)); }
    }

    @media (min-width: 901px) and (max-width: 1100px) {
      .product-page, .section-grid { padding: 0 2.5rem; column-gap: 2.5rem; }
    }

    @media (prefers-reduced-motion: reduce) {
      html { scroll-behavior: auto; }
      .reveal-ready .reveal { opacity: 1; transform: none; transition: none; }
      .js .viewer-frame figure, .thumb-media, .thumb img, .thumb-label, .back-link, .mini-name, .mini-media img { transition: none; }
      .js .product-title .line-inner, .js .viewer-frame, .js .viewer-frame img, .js .product-colour, .js .viewer-thumbs, .js .product-note { animation: none; }
    }

    /* CLOSER LOOK AND EXPLORE */
    .product-section { margin-top: 7.5rem; }

    .section-grid {
      max-width: 1400px;
      margin: 0 auto;
      padding: 0 4rem;
      display: grid;
      grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 1fr);
      column-gap: 4rem;
      align-items: start;
    }

    .section-title {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(2rem, 3.6vw, 3.2rem);
      font-weight: 300;
      line-height: 1.05;
      letter-spacing: -0.005em;
      color: var(--dark);
    }

    /* A closer look: the alternate photograph at its own proportions (not the viewer's square crop), aligned under the
       main image and held to 400px wide because the export is 800px wide and should not be enlarged on dense screens.
       The heading sits in the information column above, echoing the page's own alignment. */
    .closer-media { grid-column: 1; grid-row: 1; max-width: 25rem; background: var(--sand); }
    .closer-look .section-title { grid-column: 2; grid-row: 1; align-self: start; }
    .closer-media img { width: 100%; height: auto; display: block; }

    .explore { padding-top: 3.5rem; border-top: 1px solid var(--sand); }
    .explore .section-grid { position: relative; }
    .explore-head { display: flex; flex-direction: column; align-items: flex-start; gap: 1.75rem; }

    .mini-cards { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
    @media (min-width: 901px) {
      .mini-cards--three { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); width: 100%; max-width: 54rem; margin-top: 2rem; }
    }
    .mini-card { display: block; text-decoration: none; color: inherit; }
    .mini-media { display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--sand); }
    .mini-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.4s ease; }
    .mini-card:hover .mini-media img, .mini-card:focus-visible .mini-media img { opacity: 0.88; }
    .mini-name {
      display: block;
      margin-top: 0.9rem;
      font-family: 'Cormorant Garamond', serif;
      font-size: 1.35rem;
      font-weight: 400;
      line-height: 1.15;
      color: var(--dark);
    }
    .mini-name { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.4s ease; width: fit-content; }
    .mini-card:hover .mini-name, .mini-card:focus-visible .mini-name { background-size: 100% 1px; }
    .mini-colour {
      display: block;
      margin-top: 0.35rem;
      font-size: 0.62rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--bark);
    }

    /* scroll reveal for the sections below the fold (same language as the collection page). The class that hides
       them is only added by script, so nothing is hidden if script does not run. */
    .reveal-ready .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
    .reveal-ready .reveal.visible { opacity: 1; transform: none; }

    @media (min-width: 901px) and (max-width: 1100px) {
      .section-grid { padding: 0 2.5rem; column-gap: 2.5rem; }
    }

    /* MOBILE */
    @media (max-width: 900px) {
      nav { padding: 1.2rem 1.5rem; }
      .nav-links { display: none; }
      .nav-toggle { display: flex !important; }
      main { padding-top: 6.5rem; padding-bottom: 4rem; }
      .product-page {
        padding: 0 1.5rem;
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "head" "viewer" "info";
        grid-template-rows: auto;
      }
      .product-title { margin-top: 1.75rem; }
      .product-viewer { margin-top: 2rem; }
      .product-info { margin-top: 2rem; }
      .viewer-thumbs { gap: 1rem; }
      .thumb { width: 5rem; }
      .product-section { margin-top: 5rem; }
      .section-grid { padding: 0 1.5rem; grid-template-columns: minmax(0, 1fr); row-gap: 2rem; }
      .closer-look .section-title, .closer-media { grid-column: 1; }
      .closer-look .section-title { grid-row: 1; }
      .closer-media { grid-row: 2; max-width: 100%; }
      .explore { padding-top: 2.5rem; }
      .mini-cards { gap: 1rem; }
      footer { flex-direction: column; gap: 1rem; text-align: center; padding: 2.5rem 1.5rem; }
    }
