/* ================================================================
   Demo pages — the styling the try-on demo and the Neo Skin demo share
   ================================================================
   One look for both: the base, the header (logo, category track, and
   the actions: Pricing & plans and Book your demo, or Contact us on a
   client preview; their markup and behaviour are demo-header.js), the
   loading and error states, the product page's layout, type, labels
   and buttons. A page keeps only what is its own (the try-on demo's
   swatches, gallery and looks; Neo Skin's tags and ingredients) and its
   category dropdowns.

   The accent (--cta-gradient, --cta-glow, --accent) is Holition's by
   default; the Neo Skin demo writes a client's own colours into the
   same tokens, so a client preview keeps its brand.
   ================================================================ */

/* Brand tokens for every demo button, the header's and the page's */
:root {
  /* The solid accent: small labels in the accent colour */
  --accent: #d54c90;
  /* Brand tokens shared by every button */
  --ink: #1a1a1a;
  --cta-gradient: linear-gradient(105deg, #d54c90, #e8890f);
  --cta-glow: 213, 76, 144;
  /* The glossy top sheen every filled pill shares — active category, Book
     your demo, Find My Shade — so they read as one family */
  --gloss: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0) 55%
  );
}

/* ─── Base ───────────────────────────────────────────────────────── */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    'Open Sans',
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  background-color: #faf9f7;
  color: #333;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ─── Header ─────────────────────────────────────────────────────── */

/* The actions element draws its children straight into the header row */
demo-header-actions {
  display: contents;
}

.header {
  height: 64px;
  display: flex;
  align-items: center;
  /* Logo and category nav sit together on the left; the business actions
     are pinned right */
  justify-content: flex-start;
  gap: 32px;
  padding: 0 24px;
  /* Frosted glass: products scrolling under it show through, softened */
  background: rgba(250, 249, 247, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: box-shadow 0.25s ease;
}

/* Lifts off the page once content scrolls under it (set by JS) */
.header.is-scrolled {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

/* Logo pinned left, the category track beside it */
.header-brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

/* 40px keeps "BY HOLITION" legible; at the old 28px it was ~4px tall */
.header-brand img {
  height: 40px;
  width: auto;
}

/* Header actions — "Pricing & plans" + "Book your demo", pinned right.
   Book is the glossy ink pill with a calendar icon, the brand gradient
   arriving only as a ring on hover; Pricing is a quiet text link so the eye
   still lands on Book. Both speak the page's button language (uppercase,
   letter-spaced). Below 980px they move behind the menu button. */
.header-actions {
  margin-left: auto;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Uppercase and letter-spaced like every other button on the page (and
   holitionbeauty.com's own nav), only smaller for the header */
.header-link {
  color: #555;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.header-link:hover {
  color: #1a1a1a;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px 0 13px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background:
    var(--gloss) padding-box,
    linear-gradient(var(--ink), var(--ink)) padding-box,
    linear-gradient(var(--ink), var(--ink)) border-box;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

.header-cta svg {
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.header-cta-dot {
  fill: #e8890f;
  stroke: none;
}

.header-cta:hover {
  background:
    var(--gloss) padding-box,
    linear-gradient(var(--ink), var(--ink)) padding-box,
    var(--cta-gradient) border-box;
  box-shadow: 0 6px 18px rgba(var(--cta-glow), 0.28);
  transform: translateY(-1px);
}

#header-categories::-webkit-scrollbar {
  display: none;
}

#header-categories.has-more {
  -webkit-mask-image: linear-gradient(to right, #000 82%, transparent);
  mask-image: linear-gradient(to right, #000 82%, transparent);
}

/* Client previews (?clientId=<brand>, html.is-client-preview, set in the page <head>) swap the
   sales actions for one quiet "Contact us", inline at every width — a
   single link needs no menu. */
.header-contact {
  display: none;
  margin-left: auto;
}

.is-client-preview .header-contact {
  display: inline;
}

.is-client-preview .header-actions,
.is-client-preview .header-menu-btn {
  display: none;
}

/* Menu button — two bars like holitionbeauty.com's own; turns into an X */
.header-menu-btn {
  display: none;
  flex-shrink: 0;
  margin: 0 -6px 0 auto;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
}

.header-menu-btn span {
  display: block;
  width: 26px;
  height: 2.5px;
  border-radius: 2px;
  background: #1a1a1a;
  transition: transform 0.25s ease;
}

.header-menu-btn[aria-expanded='true'] span:first-child {
  transform: translateY(4.75px) rotate(45deg);
}

.header-menu-btn[aria-expanded='true'] span:last-child {
  transform: translateY(-4.75px) rotate(-45deg);
}

@media (max-width: 980px) {
  .header-menu-btn {
    display: flex;
  }

  /* The actions become a panel dropping from under the header: Book first
     and full width, Pricing beneath it. */
  .header-actions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    /* Solid, not glass: it holds text, and a backdrop-filter nested inside the
       header's own lets the page read through it in Chrome. */
    background: #faf9f7;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  }

  .header-actions.is-open {
    display: flex;
  }

  .header-cta {
    height: 46px;
    font-size: 12.5px;
  }

  .header-actions .header-link {
    padding: 12px 0;
    text-align: center;
    font-size: 12.5px;
  }
}

/* Category navigation — the same vocabulary as holitionbeauty.com's own
   product nav (a floating white track, letter-spaced uppercase labels, the
   active item a solid black pill), finished as glass: a translucent track
   with a top highlight, and a glossy sheen on the active pill. Sits beside
   the logo; with one category (e.g. ?filterTags=neoshade) it is still the
   way to switch products, through its dropdown. */
/* Hugs its tiles — a single category (?filterTags=neoshade) is just its pill —
   and shrinks to scroll, with a trailing fade (.has-more, set by JS), only
   when they don't fit beside the actions. */
#header-categories {
  flex: 0 1 auto;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  display: flex;
  align-items: center;
  gap: 2px;
  /* 3px + 28px tiles + 3px + 1px borders = 36px, Book your demo's height */
  padding: 3px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 999px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.header-cat-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 16px;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #1a1a1a;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.header-cat-tile:not(.active):hover {
  background: rgba(0, 0, 0, 0.05);
}

/* Shadow sized to fit the track's 3px padding — the track scrolls, so it clips */
.header-cat-tile.active {
  background: var(--gloss), #1a1a1a;
  color: #fff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

/* Label + subtitle stacked */
.tile-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.tile-label {
  display: block;
}

.tile-sub {
  font-size: 9px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.03em;
  opacity: 0.82;
  white-space: nowrap;
  overflow: hidden;
  max-width: 90px;
  text-overflow: ellipsis;
}

.tile-chevron {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  opacity: 0.45;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.header-cat-tile:hover .tile-chevron {
  opacity: 0.6;
}

/* The chevron flips while its menu is open */
.header-cat-tile[aria-expanded='true'] .tile-chevron {
  transform: rotate(180deg);
  opacity: 0.75;
}

.header-cat-tile.active .tile-chevron {
  opacity: 0.75;
}

/* Keyboard focus and a slight press, as the page's own buttons */
.header-link:focus-visible,
.header-cta:focus-visible,
.header-menu-btn:focus-visible {
  outline: 2px solid #d54c90;
  outline-offset: 2px;
}

/* Inside the tile: the scrolling track would clip an outer ring */
.header-cat-tile:focus-visible {
  outline: 2px solid #d54c90;
  outline-offset: -2px;
}

.header-cta:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .header,
  .header-cta,
  .header-menu-btn span,
  .tile-chevron {
    transition: none;
  }
  .header-cta.header-cta:hover,
  .header-cta.header-cta:active {
    transform: none;
  }
}

/* ─── Loading, layout, product detail, labels, buttons ──────────── */

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #eee;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading-text {
  color: #666;
  font-size: 14px;
}

.error {
  text-align: center;
  padding: 60px 20px;
  color: #c00;
}

.main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* Two-column grid: product image on left, details on right.       */

.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
  margin-bottom: 60px;
}

.product-image-container {
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}

.product-image {
  max-width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.product-details {
  padding-top: 20px;
}

.product-line {
  font-family: 'Open Sans', sans-serif;
  font-size: 36px;
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-bottom: 6px;
  color: #1a1a1a;
}

.product-shade-name {
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 12px;
}

.product-price {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 32px;
  background: var(--cta-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section labels — used for "Select Shade" and "About The Product" */
.shade-label,
.about-title {
  font-family: 'Open Sans', sans-serif;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #aaa;
  margin-bottom: 14px;
}

.shade-label span {
  font-weight: 600;
  color: #1a1a1a;
  text-transform: none;
  letter-spacing: normal;
}

/* Spacing for shade selector and about sections */
.shade-selector,
.about-product {
  margin-bottom: 30px;
}

.about-description {
  font-size: 15px;
  color: #555;
  line-height: 1.7;
  margin-bottom: 12px;
}

/* "Try On" CTA — ghost gradient border, shared by the product and
   look pages ("Try On" / "Try On Look"). The brand gradient and its glow
   are defined ONCE here and inherited by every CTA flavour (hover, active,
   the filled Find My Shade twin). */
.try-on-btn,
.ask-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  /* One product-button size: 52px (48px on phones), fully rounded */
  border-radius: 999px;
  gap: 11px;
  min-height: 52px;
  padding: 0 32px;
  font-size: 13px;
  margin-bottom: 12px;
  /* Outline — Find My Shade carries the colour, so the row stays light */
  color: var(--ink);
  background: transparent;
  border: 2px solid var(--ink);
  box-shadow: none;
  transition:
    background 0.25s ease,
    color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}

/* Find My Shade and Try On share one row: on foundation/concealer pages
   they split it evenly; on every other line the row holds Try On alone at
   full width. The buttons keep their own bottom margin for the Add to Bag
   below. */
.cta-row {
  display: flex;
  gap: 12px;
}

.cta-row .try-on-btn {
  flex: 1 1 0;
  min-width: 0;
  white-space: nowrap;
  padding-left: 12px;
  padding-right: 12px;
}

/* The hero CTA: "Find My Shade" (Neo Shade journey) and Neo Skin's "Scan my
   skin" — Try On's filled twin: same
   geometry, gradient + gloss so the journey reads as the hero action on
   foundation/concealer pages. */
.find-my-shade-btn,
.ask-ai-btn {
  color: #fff;
  background: var(--gloss), var(--cta-gradient);
  /* Size the gradient to the border box, or it repeats into the 2px
     transparent border as a seam at each end */
  background-origin: border-box;
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(var(--cta-glow), 0.28);
}

.find-my-shade-btn:hover,
.ask-ai-btn:hover {
  box-shadow: 0 8px 24px rgba(var(--cta-glow), 0.4);
  transform: translateY(-1px);
}

.find-my-shade-btn .find-my-shade-icon {
  /* The widget's three-stars.svg (38×42) — height leads, width follows.
     Capped to the Try On camera icon's height (17px) so the two buttons
     in the CTA row stay exactly the same height. */
  height: 17px;
  width: auto;
}

/* Hover: fills with the brand gradient */
.try-on-btn:not(.find-my-shade-btn):hover {
  color: #fff;
  background: var(--cta-gradient);
  background-origin: border-box;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(var(--cta-glow), 0.32);
  transform: translateY(-1px);
}

.try-on-btn svg {
  width: 22px;
  height: 17px;
  fill: currentColor;
  flex-shrink: 0;
}

/* "Add to Bag" (desktop & mobile) — a tonal button: a soft ink tint with
   dark text. Still plainly a button, but quieter than the try-on actions
   this page exists to show. */
.add-to-bag,
.mobile-add-to-bag {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: rgba(26, 26, 26, 0.06);
  color: var(--ink);
  border: none;
  border-radius: 999px;
  font-family: 'Open Sans', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.add-to-bag:hover,
.mobile-add-to-bag:hover {
  background: rgba(26, 26, 26, 0.1);
}

.add-to-bag {
  min-height: 52px;
  padding: 0 32px;
  font-size: 13px;
}

.mobile-add-to-bag {
  min-height: 48px;
  padding: 0 24px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
}

/* Shared states for the product buttons. Kept
   after all the button rules so reduced motion outranks their :hover. */
.try-on-btn:focus-visible,
.ask-ai-btn:focus-visible,
.add-to-bag:focus-visible,
.mobile-add-to-bag:focus-visible {
  outline: 2px solid #d54c90;
  outline-offset: 2px;
}

/* A slight press — tactile, and shows the tap landed. Try On's class is
   doubled to outrank its :not(...):hover lift, which also matches mid-press. */
.try-on-btn.try-on-btn:active,
.ask-ai-btn.ask-ai-btn:active,
.add-to-bag:active,
.mobile-add-to-bag:active {
  transform: scale(0.98);
}

@media (prefers-reduced-motion: reduce) {
  .try-on-btn,
  .ask-ai-btn,
  .add-to-bag,
  .mobile-add-to-bag {
    transition: none;
  }
  .try-on-btn.try-on-btn:hover,
  .try-on-btn.try-on-btn:active,
  .ask-ai-btn.ask-ai-btn:hover,
  .ask-ai-btn.ask-ai-btn:active,
  .add-to-bag:active,
  .mobile-add-to-bag:active {
    transform: none;
  }
}

/* The phone layout's own blocks, hidden on desktop: the title and price
   above the image, the about text, and Add to Bag */
.mobile-product-info,
.mobile-about-product,
.mobile-add-to-bag {
  display: none;
}

/* ─── Phones ─────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .header {
    height: 58px;
    padding: 0 16px;
    gap: 12px;
  }

  .header-brand img {
    height: 30px;
  }

  /* 32px tap targets */
  .header-cat-tile {
    min-height: 32px;
    padding: 0 12px;
    gap: 5px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
  }

  .main-content {
    padding: 20px 16px;
  }

  /* The desktop hero gives way to the stacked phone layout */
  .product-hero {
    display: none;
  }

  .mobile-product-info {
    display: block;
    text-align: center;
    margin-bottom: 20px;
  }

  .mobile-product-info .product-line {
    font-size: 32px;
  }

  .mobile-product-info .product-shade-name {
    font-size: 11px;
  }

  .mobile-product-info .product-price {
    font-size: 16px;
    margin-bottom: 0;
  }

  .mobile-about-product {
    display: block;
    margin-bottom: 24px;
    text-align: center;
  }

  .mobile-about-product .about-description {
    font-size: 14px;
  }

  /* flex, like the desktop button, so its label stays centred */
  .mobile-add-to-bag {
    display: flex;
  }

  /* The product CTAs at the phone Add to Bag's 48px / 11.5px */
  .try-on-btn,
  .ask-ai-btn {
    min-height: 48px;
    padding: 0 10px;
    font-size: 11.5px;
    letter-spacing: 0.1em;
    gap: 7px;
  }
}
