/* ===== NIKS Shade Edit (home page) ===== */

/* The product type line, the shade name and the price are defined once here.
   The home grid and every product page read these tokens, so the three lines
   match in font, weight, size and colour on all 13 products. */
:root{
  --shade-type-font:"Lato","Helvetica Neue",Arial,sans-serif;
  --shade-type-weight:700;
  --shade-type-size:.72rem;
  --shade-type-spacing:.18em;
  --shade-type-color:#a0687c;
  --shade-name-font:"Lato","Helvetica Neue",Arial,sans-serif;
  --shade-name-weight:900;
  --shade-name-size:1.55rem;
  --shade-name-color:#6b3820;
  --shade-price-size:1.1rem;
  --shade-price-color:#8d4f67;
}
.shade-edit{position:relative;overflow:hidden;padding:96px 0 110px;background:linear-gradient(180deg,#fff 0%,#fdf1f6 48%,#fff 100%)}
.shade-glow{position:absolute;border-radius:50%;pointer-events:none;filter:blur(24px);opacity:.75}
.shade-glow.g1{width:560px;height:560px;left:-180px;top:40px;background:radial-gradient(circle,#f9cfe1 0%,transparent 66%);animation:shade-drift 18s ease-in-out infinite alternate}
.shade-glow.g2{width:480px;height:480px;right:-160px;bottom:-60px;background:radial-gradient(circle,#fbe0c9 0%,transparent 66%);animation:shade-drift 22s ease-in-out infinite alternate-reverse}
.shade-edit .container{position:relative;z-index:1}
.shade-head{margin-bottom:58px;max-width:820px}
.shade-head h2{white-space:nowrap;font-size:clamp(2.1rem,5vw,3.1rem);margin-bottom:.2em}
.shade-head p{font-size:1.3rem}
.shade-wordmark{width:1.7em;height:1.15em;vertical-align:-.14em;margin:0 .04em}
@media(max-width:760px){.shade-head h2{white-space:normal;font-size:clamp(1.7rem,5.8vw,2.3rem)}}

.shade-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:30px;align-items:start}
.shade-card:nth-child(even){margin-top:60px}

.shade-media{display:block;position:relative;aspect-ratio:1;border-radius:0;overflow:hidden;isolation:isolate;background:#fbe3ec;
  box-shadow:0 28px 50px -30px #9d466e80,0 6px 16px -10px #9d466e40;
  transform:perspective(900px) rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg)) translateY(var(--lift,0px));
  transition:transform .5s cubic-bezier(.2,.7,.2,1),box-shadow .5s}
.shade-media img{width:100%;height:100%;object-fit:cover;display:block;transform:scale(1.02);transition:transform 1.1s cubic-bezier(.2,.7,.2,1);animation:shade-breathe 10s ease-in-out infinite}
.shade-card:nth-child(2) .shade-media img{animation-delay:-2.5s}
.shade-card:nth-child(3) .shade-media img{animation-delay:-5s}
.shade-card:nth-child(4) .shade-media img{animation-delay:-7.5s}
.shade-shine{position:absolute;inset:0;z-index:2;pointer-events:none;background:linear-gradient(115deg,transparent 35%,#ffffff8c 50%,transparent 65%);transform:translateX(-120%);transition:transform 1s ease}
.shade-card:hover .shade-media,.shade-card:focus-within .shade-media{--lift:-10px;box-shadow:0 40px 60px -30px #9d466e99,0 10px 22px -12px #9d466e55}
.shade-card:hover .shade-media img,.shade-card:focus-within .shade-media img{transform:scale(1.09)}
.shade-card:hover .shade-shine,.shade-card:focus-within .shade-shine{transform:translateX(120%)}
.shade-tag{position:absolute;top:14px;left:14px;z-index:3;background:#ffffffd9;backdrop-filter:blur(6px);color:#8a4b5f;font-size:.68rem;letter-spacing:.16em;text-transform:uppercase;padding:7px 12px;border-radius:0}

.shade-info{padding:32px 4px 0}
.shade-type{display:block;font-family:var(--shade-type-font);font-weight:var(--shade-type-weight);font-size:var(--shade-type-size);letter-spacing:var(--shade-type-spacing);text-transform:uppercase;color:var(--shade-type-color);margin-bottom:6px}
.shade-info h3{font-family:var(--shade-name-font);font-weight:var(--shade-name-weight);font-size:var(--shade-name-size);margin:0 0 6px;color:var(--shade-name-color)}
.shade-meta{display:flex;align-items:center;gap:10px;color:#7d5b66;font-size:.92rem;margin-bottom:14px}
.shade-dot{display:inline-block;vertical-align:middle;position:relative;width:15px;height:15px;margin-right:8px;margin-bottom:4px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 -2px 3px #0003,inset 0 2px 2px #fff6}
.shade-price{display:block;font-family:var(--ff-price,"Jost","Helvetica Neue",Arial,sans-serif);font-weight:600;font-size:var(--shade-price-size);color:var(--shade-price-color);margin-bottom:16px}
/* Star rating: hidden until a product actually has reviews. */
.shade-rating{display:flex;align-items:center;gap:6px;font-size:.82rem;margin:0 0 6px}
.shade-rating[hidden]{display:none}
.shade-rating-stars{color:#4a3a40;font-size:.9rem;letter-spacing:2px;line-height:1}
.shade-rating-value{color:#7d5b66;font-family:"Jost","Helvetica Neue",Arial,sans-serif}
html[data-theme="dark"] .shade-rating-stars{color:#ffffff}
html[data-theme="dark"] .shade-rating-value{color:#ffffff}
.shade-actions{display:flex;gap:10px}
.shade-add-btn,.shade-buy-btn{flex:1;border:0;cursor:pointer;font-family:"Jost","Helvetica Neue",Arial,sans-serif;font-weight:600;font-size:.92rem;letter-spacing:.03em;padding:12px 10px;border-radius:0;transition:background .25s ease,color .25s ease,transform .2s ease}
.shade-add-btn{background:transparent;border:1.5px solid #8d4f67;color:#8d4f67}
.shade-add-btn:hover{background:#8d4f67;color:#fff}
.shade-buy-btn{background:#8d4f67;color:#fff}
.shade-buy-btn:hover{background:#6b3820}
.shade-add-btn:active,.shade-buy-btn:active{transform:scale(.97)}
.shade-add-btn:disabled{opacity:.55;cursor:not-allowed;border-color:#b78b9d;color:#b78b9d;background:transparent}
.shade-add-btn:disabled:hover{background:transparent}
.shade-card.is-out-of-stock .hue-viewport{filter:grayscale(.55);opacity:.75}
.shade-dot::after{content:"";position:absolute;inset:-5px;border-radius:50%;border:1.5px solid var(--swatch);opacity:0;animation:shade-ping 2.8s ease-out infinite}
.shade-card:nth-child(2) .shade-dot::after{animation-delay:.7s}
.shade-card:nth-child(3) .shade-dot::after{animation-delay:1.4s}
.shade-card:nth-child(4) .shade-dot::after{animation-delay:2.1s}
.shade-link{position:relative;display:inline-block;font-size:.88rem;letter-spacing:.06em;color:#8d4f67;font-weight:500;padding-bottom:4px}
.shade-link::after{content:"";position:absolute;left:0;bottom:0;height:1.5px;width:28px;background:currentColor;transition:width .35s ease}
.shade-link:hover::after,.shade-card:hover .shade-link::after{width:100%}
.shade-link:focus-visible{outline:2px solid #8d4f67;outline-offset:4px}

/* scroll reveal (only when JS is running, so content never stays hidden) */
.js-shades .shade-card{opacity:0;transform:translateY(46px);transition:opacity .9s ease,transform 1s cubic-bezier(.2,.7,.2,1);transition-delay:calc(var(--i,0)*.14s)}
.js-shades .shade-card.is-visible{opacity:1;transform:none}
.js-shades .shade-head{opacity:0;transform:translateY(24px);transition:opacity .8s ease,transform .8s ease}
.js-shades .shade-head.is-visible{opacity:1;transform:none}

@keyframes shade-breathe{0%,100%{transform:scale(1.02) translateY(0)}50%{transform:scale(1.045) translateY(-4px)}}
@keyframes shade-ping{0%{transform:scale(.6);opacity:.8}80%,100%{transform:scale(1.5);opacity:0}}
@keyframes shade-gold{0%,100%{background-position:100% 0}50%{background-position:0 0}}
@keyframes shade-drift{from{transform:translate(0,0) scale(1)}to{transform:translate(80px,40px) scale(1.12)}}

@media(max-width:960px){
 .shade-grid{grid-template-columns:repeat(2,1fr);gap:26px 20px}
 .shade-card:nth-child(even){margin-top:44px}
}
@media(max-width:600px){
 .shade-edit{padding:70px 0 80px}
 .shade-head{margin-bottom:36px}
 .shade-head h2{white-space:nowrap;font-size:clamp(1rem,4.6vw,1.3rem)}
 .shade-head p{font-size:.82rem;line-height:1.4}
 .shade-grid{gap:22px 14px}
 .shade-card:nth-child(even){margin-top:0}
 .js-shades .shade-card{opacity:1;transform:none;transition:none}
 .shade-media{border-radius:0}
 .shade-tag{font-size:.58rem;padding:5px 9px;top:10px;left:10px}
 .shade-info{padding-top:22px}
 :root{--shade-type-size:.6rem;--shade-type-spacing:.12em;--shade-name-size:1.2rem;--shade-price-size:1rem}
 .shade-info h3{margin-bottom:6px}
 .shade-meta{font-size:.8rem;margin-bottom:10px}
 .shade-price{margin-bottom:12px}
 .shade-add-btn,.shade-buy-btn{font-size:.78rem;padding:10px 4px;white-space:nowrap;letter-spacing:.005em}
}
@media(prefers-reduced-motion:reduce){
 .shade-edit *,.shade-edit *::after{animation:none!important;transition:none!important}
 .js-shades .shade-card,.js-shades .shade-head{opacity:1;transform:none}
}

/* ---- Swipeable multi-image slider (currently used on the Rosé card) ---- */
.shade-media-slider{ touch-action:pan-y; cursor:grab; }
.shade-media-slider:active{ cursor:grabbing; }
.shade-slides{
  display:flex;
  width:200%;
  height:100%;
  transition:transform .4s cubic-bezier(.2,.7,.2,1);
}
.shade-slide{
  width:50%;
  height:100%;
  flex-shrink:0;
}
.shade-dots{
  position:absolute;
  bottom:12px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  z-index:3;
}
.shade-dots i{
  width:6px;height:6px;
  border-radius:50%;
  background:rgba(255,255,255,.55);
  display:block;
  transition:background .25s ease, transform .25s ease;
}
.shade-dots i.active{
  background:#fff;
  transform:scale(1.25);
}

/* Hué: product, lips, video, then hand swatches. */
.hue-viewport{aspect-ratio:1;overflow:hidden;background:#fbe3ec;touch-action:pan-y;cursor:grab;user-select:none}
/* In dark mode the pale backing showed as a thin light line wherever a photo is a
   fraction narrower or shorter than its square. Let the section show through instead. */
html[data-theme="dark"] .hue-viewport{background:transparent}
.hue-viewport.is-dragging{cursor:grabbing}
.hue-track{display:flex;width:100%;height:100%;transition:transform .3s ease}
.hue-slide{flex:0 0 100%;min-width:0;height:100%;overflow:hidden;position:relative}
.hue-slide img,.hue-slide video{display:block;width:100%;height:100%;object-fit:contain}
.hue-slide video{background:#21151c;user-select:auto}
/* The supplied hand photo has white bars; frame its central square photograph. */
.hue-hand img{object-fit:cover}
/* Gloss product shots carry the printed "SHADE: <name>" line near their edges, so fill
   the square frame (cover) — the sliver this trims is at most 8px of background, well
   clear of the lettering — which also stops the pale backing showing as a hairline. */
.hue-product img{object-fit:cover}
/* Tint packaging photos and the shared shade-swatches photo aren't perfectly square; crop to fill instead of letterboxing. */
.hue-box img{object-fit:cover}
.hue-swatches img{object-fit:cover}
.hue-dots{display:flex;justify-content:center;gap:2px;padding-top:8px}
.hue-dots button{display:grid;place-items:center;width:28px;height:28px;padding:0;border:0;background:transparent;cursor:pointer}
.hue-dots button::before{content:"";width:7px;height:7px;border-radius:50%;background:#b78b9d;transition:background .2s,transform .2s}
.hue-dots button[aria-pressed="true"]::before{background:#7a2c52;transform:scale(1.3)}
.hue-dots button:focus-visible,.hue-viewport:focus-visible{outline:2px solid #a34e65;outline-offset:3px}
html[data-theme="dark"] .hue-dots button::before{background:#cd9daf}
html[data-theme="dark"] .hue-dots button[aria-pressed="true"]::before{background:#fff}
@media(prefers-reduced-motion:reduce){.hue-track{transition:none}}

/* White video letterboxing, compact dots, and a drag surface above native controls. */
.hue-slide video{background:#fff}
.hue-video-swipe{position:absolute;inset:0 0 48px;z-index:1;cursor:grab;touch-action:pan-y;pointer-events:none}
.hue-video-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);z-index:2;width:48px;height:48px;border:1px solid #ffffffb3;border-radius:50%;background:#7a2c52dd;color:#fff;font-size:20px;cursor:pointer}
.hue-video-play[hidden]{display:none}
.hue-dots{gap:0;padding-top:0}
.hue-dots button{width:14px;height:24px}

/* Small before/after-style prev/next arrows on every product's gallery. */
.hue-gallery{position:relative}
.hue-nav{position:absolute;top:50%;z-index:3;width:28px;height:28px;display:grid;place-items:center;border:0;border-radius:50%;background:#ffffffe6;color:#7a2c52;box-shadow:0 2px 8px #0003;cursor:pointer;padding:0}
.hue-nav svg{width:15px;height:15px}
/* Straddle the image edge — half inside, half outside. */
.hue-nav-prev{left:0;transform:translate(-50%,-50%)}
.hue-nav-next{right:0;transform:translate(50%,-50%)}
.hue-nav:hover{background:#fff}
.hue-nav:focus-visible{outline:2px solid #a34e65;outline-offset:2px}
.hue-nav[hidden]{display:none}
html[data-theme="dark"] .hue-nav{background:#2a1c22e6;color:#ffffff}
html[data-theme="dark"] .hue-nav:hover{background:#2a1c22}

/* Hello Pink alone: retain the complete supplied composition inside its box. */
.shade-media.hello-pink-media img,
.shade-card:hover .hello-pink-media img,
.shade-card:focus-within .hello-pink-media img{
 object-fit:contain;object-position:center;transform:none;animation:none;
}

/* Match Hello Pink: show original tint backgrounds without zoom cropping. */
.shade-media.tint-natural-media img,
.shade-card:hover .tint-natural-media img,
.shade-card:focus-within .tint-natural-media img{
 object-fit:contain;object-position:center;transform:none;animation:none;
}

/* Mobile + tablet: no prev/next arrows on the product image galleries — the
   galleries are swiped with a finger instead (pointer handling in
   hue-gallery.js, shades.js and ingredient-gallery alike). Declared after the
   arrow rules above so it wins the cascade. Desktop keeps its arrows. */
@media(max-width:860px){
 .hue-nav{display:none!important}
}

/* Compact text on mobile catalog cards only; product-detail tokens stay intact. */
@media(max-width:600px){
 .shade-grid .shade-card .shade-type{font-size:.55rem;letter-spacing:.08em}
 .shade-grid .shade-card .shade-rating-stars{font-size:.78rem;letter-spacing:1.5px}
 .shade-grid .shade-card .shade-info h3{font-size:1.05rem}
 .shade-grid .shade-card .shade-price{font-size:.9rem}
}
