/* ============================================================================
   THE SKIN LOVERS — shop engine styles
   assets/css/shop.css — consumes the :root tokens already declared inline on
   every page (see docs/TSL-SHOP-SPEC.md §1/§9). No new colour tokens here,
   no gold, no emoji content — shadows are always the rose tint
   0 24px 44px -30px rgba(176,126,128,.5) family.

   This file EXTENDS .btn / .btn-primary / .btn-ghost / .field (already
   defined inline on every page) — it never redeclares their base look,
   only adds what those pages don't already cover (select styling, focus
   rings, small sizing tweaks like .add-btn).

   Loaded after each page's inline <style> block, so equal-specificity
   rules here correctly win by source order.
   ============================================================================ */

/* ---------------------------------------------------------------------- */
/* toast                                                                   */
/* ---------------------------------------------------------------------- */
.tsl-toast{
  position:fixed; left:50%; bottom:26px; z-index:300;
  display:flex; align-items:center; gap:10px;
  background:var(--charcoal); color:var(--petal);
  font-family:var(--sans); font-size:13.5px; font-weight:600;
  padding:13px 20px; border-radius:40px;
  box-shadow:0 24px 44px -20px rgba(176,126,128,.65);
  opacity:0; pointer-events:none;
  transform:translate(-50%,14px);
  transition:opacity .25s ease, transform .25s ease;
  max-width:calc(100% - 40px);
}
.tsl-toast.show{ opacity:1; transform:translate(-50%,0); }
.tsl-toast-icon{ display:flex; flex:none; color:var(--coral); }
.tsl-toast-msg{ white-space:nowrap; }

/* ---------------------------------------------------------------------- */
/* header bag / account icons — markup injected by the site-wide retrofit,
   styling owned here per spec §11.4                                      */
/* ---------------------------------------------------------------------- */
.icon-btn.nav-bag{ position:relative; }
.cart-bubble{
  position:absolute; top:-4px; right:-6px; min-width:17px; height:17px;
  padding:0 4px; border-radius:20px;
  background:var(--coral); color:var(--charcoal);
  font-family:var(--sans); font-size:11px; font-weight:700; line-height:17px; text-align:center;
}
.cart-bubble[hidden]{ display:none; }
.cart-bubble.tsl-pulse{ animation:tslBadgeBump .5s ease; }
@keyframes tslBadgeBump{
  0%{ transform:scale(1); }
  35%{ transform:scale(1.3); }
  100%{ transform:scale(1); }
}
@media(max-width:720px){
  .icon-btn.nav-account{ display:none; }
}

/* ---------------------------------------------------------------------- */
/* bag drawer                                                              */
/* ---------------------------------------------------------------------- */
html.tsl-noscroll{ overflow:hidden; }

.bagdrawer{
  position:fixed; inset:0; z-index:220;
  visibility:hidden; opacity:0;
  transition:opacity .25s ease, visibility 0s linear .25s;
}
.bagdrawer.open{
  visibility:visible; opacity:1;
  transition:opacity .25s ease;
}
.bagdrawer-overlay{
  position:absolute; inset:0;
  background:rgba(33,33,33,.45);
}
.bagdrawer-panel{
  position:absolute; top:0; right:0; height:100%;
  width:min(100%,400px);
  background:var(--petal);
  border-left:1px solid var(--taupe);
  box-shadow:-30px 0 60px -30px rgba(176,126,128,.6);
  display:flex; flex-direction:column;
  transform:translateX(100%);
  transition:transform .3s ease;
}
.bagdrawer.open .bagdrawer-panel{ transform:translateX(0); }

.bagdrawer-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 22px 16px; border-bottom:1px solid var(--taupe); flex:none;
}
.bagdrawer-head h3{ font-size:20px; }
.bagdrawer-x{
  width:40px; height:40px; min-width:40px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; color:var(--charcoal); cursor:pointer; border-radius:50%;
  transition:background .18s;
}
.bagdrawer-x:hover{ background:var(--blush); }

.bagdrawer-body{ flex:1; overflow-y:auto; padding:6px 22px; }
.bagdrawer-empty{
  text-align:center; padding:70px 10px 40px;
  display:flex; flex-direction:column; align-items:center; gap:20px;
}
.bagdrawer-empty p{ color:var(--stone); font-size:15px; }

.bagdrawer-foot{ padding:16px 22px 24px; border-top:1px solid var(--taupe); flex:none; }
.bagdrawer-actions{ display:flex; gap:10px; margin-top:14px; }
.bagdrawer-actions .btn{ flex:1; justify-content:center; padding:13px 16px; font-size:13.5px; }

@media(max-width:720px){
  .bagdrawer-panel{ width:100%; }
}

/* ---------------------------------------------------------------------- */
/* bag item row — used by the drawer AND cart.html (owner: reuse verbatim) */
/* Wrap each row in an element carrying data-sku="SKU" so the qty-step     */
/* inside it mutates the cart live (see shop.js contract notes).           */
/* ---------------------------------------------------------------------- */
.bag-item{
  display:grid; grid-template-columns:64px 1fr auto; gap:14px;
  align-items:flex-start; padding:18px 0; border-bottom:1px solid var(--taupe);
}
.bag-item:last-child{ border-bottom:none; }
.bag-item-thumb{
  width:64px; height:64px; border-radius:var(--r-sm); object-fit:cover;
  background:var(--soft); border:1px solid var(--taupe);
}
.bag-item-info{ min-width:0; }
.bag-item-name{ font-size:14.5px; font-weight:600; color:var(--charcoal); line-height:1.35; }
.bag-item-tag{ font-size:12px; color:var(--stone); margin:2px 0 10px; }
.bag-item-side{
  display:flex; flex-direction:column; align-items:flex-end; justify-content:space-between;
  gap:12px; min-height:64px;
}
.bag-item-total{ font-family:var(--serif); font-size:15px; color:var(--rose-dk); white-space:nowrap; }
.bag-item-remove{
  width:40px; height:40px; min-width:40px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; color:var(--stone); cursor:pointer; border-radius:50%;
  transition:background .18s, color .18s;
}
.bag-item-remove:hover{ background:var(--blush); color:var(--rose-dk); }

@media(max-width:480px){
  .bag-item{ grid-template-columns:52px 1fr auto; gap:10px; }
  .bag-item-thumb{ width:52px; height:52px; }
}

/* ---------------------------------------------------------------------- */
/* qty stepper — drawer, cart.html, PDP .pd-buy (§11.8 markup)             */
/* ---------------------------------------------------------------------- */
.qty-step{
  display:inline-flex; align-items:center;
  border:1.5px solid var(--taupe); border-radius:40px; background:var(--soft);
  overflow:hidden; width:max-content;
}
.qty-step button{
  width:40px; height:40px; min-width:40px;
  display:flex; align-items:center; justify-content:center;
  background:none; border:none; font-size:17px; font-weight:600; color:var(--charcoal);
  cursor:pointer; transition:background .18s;
}
.qty-step button:hover{ background:var(--blush); }
.qty-step input{
  width:38px; height:40px; border:none; background:none; text-align:center;
  font-family:var(--sans); font-size:14.5px; font-weight:600; color:var(--charcoal);
}
.qty-step input:focus{ outline:none; }

/* ---------------------------------------------------------------------- */
/* points pill (PDP + rewards) — brand law §1: blush bg, rose-dk text      */
/* ---------------------------------------------------------------------- */
.pts-pill{
  display:inline-flex; align-items:center; gap:6px; margin-top:12px;
  background:var(--blush); color:var(--rose-dk);
  font-family:var(--sans); font-size:12.5px; font-weight:600;
  padding:7px 14px; border-radius:30px;
}

/* ---------------------------------------------------------------------- */
/* product card price row / add-to-bag button (§11.7)                     */
/* ---------------------------------------------------------------------- */
.price-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:2px; }
.card-price{ font-family:var(--serif); font-size:17px; color:var(--rose-dk); }
.add-btn{ padding:10px 20px; font-size:12.5px; white-space:nowrap; }

/* ---------------------------------------------------------------------- */
/* checkout layout                                                         */
/* ---------------------------------------------------------------------- */
.co-grid{ display:grid; grid-template-columns:1.15fr .85fr; gap:clamp(24px,3vw,40px); align-items:start; }
.co-grid > *:last-child{ position:sticky; top:96px; }
@media(max-width:880px){
  .co-grid{ grid-template-columns:1fr; }
  .co-grid > *:last-child{ position:static; }
}

.co-panel{
  background:var(--soft); border:1px solid var(--taupe); border-radius:var(--r);
  padding:clamp(20px,3vw,28px);
  box-shadow:0 24px 44px -34px rgba(176,126,128,.5);
  margin-bottom:20px;
}
.co-panel:last-child{ margin-bottom:0; }
.co-panel h3{ font-size:18px; margin-bottom:16px; }
.co-panel h3 small{ display:block; font-size:12px; color:var(--stone); font-weight:500; margin-top:4px; font-family:var(--sans); }

/* ---------------------------------------------------------------------- */
/* pay / shipping option cards (§7)                                        */
/* ---------------------------------------------------------------------- */
.pay-opt{
  display:flex; align-items:center; gap:14px;
  background:var(--petal); border:1.5px solid var(--taupe); border-radius:var(--r-sm);
  padding:14px 16px; cursor:pointer; transition:border-color .18s, background .18s, box-shadow .18s;
  margin-bottom:10px;
}
.pay-opt:last-child{ margin-bottom:0; }
.pay-opt:hover{ border-color:var(--rose); }
.pay-opt.selected{
  border-color:var(--coral); background:var(--blush);
  box-shadow:0 16px 30px -22px rgba(176,126,128,.6);
}
.pay-opt input[type="radio"]{ width:20px; height:20px; min-width:20px; accent-color:var(--coral); flex:none; }
.pay-opt .info{ min-width:0; flex:1; }
.pay-opt b{ font-size:14.5px; display:block; color:var(--charcoal); }
.pay-opt small{ display:block; color:var(--stone); font-size:12.5px; margin-top:2px; }
.pay-opt .chip{
  flex:none; font-size:11px; font-weight:700; letter-spacing:.03em; color:var(--stone);
  background:var(--sand); border:1px solid var(--taupe); border-radius:20px; padding:4px 10px;
}

/* ---------------------------------------------------------------------- */
/* Glow Points redemption slider (§4/§9)                                   */
/* ---------------------------------------------------------------------- */
.redeem-slider{ margin-top:14px; }
.redeem-slider input[type="range"]{
  -webkit-appearance:none; appearance:none;
  width:100%; height:6px; border-radius:6px; background:var(--blush);
  outline:none; cursor:pointer;
}
.redeem-slider input[type="range"]::-webkit-slider-runnable-track{
  height:6px; border-radius:6px; background:var(--blush);
}
.redeem-slider input[type="range"]::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:22px; height:22px; border-radius:50%; margin-top:-8px;
  background:var(--coral); border:3px solid var(--soft);
  box-shadow:0 6px 14px -6px rgba(176,126,128,.85); cursor:pointer;
}
.redeem-slider input[type="range"]::-moz-range-track{
  height:6px; border-radius:6px; background:var(--blush);
}
.redeem-slider input[type="range"]::-moz-range-thumb{
  width:22px; height:22px; border-radius:50%; border:3px solid var(--soft);
  background:var(--coral); box-shadow:0 6px 14px -6px rgba(176,126,128,.85); cursor:pointer;
}
.redeem-slider input[type="range"]:focus{ outline:2px solid var(--coral); outline-offset:4px; }
.redeem-readout{ display:flex; justify-content:space-between; font-size:13px; color:var(--stone); margin-top:8px; }
.redeem-readout b{ color:var(--rose-dk); font-weight:700; }

/* ---------------------------------------------------------------------- */
/* order summary lines                                                     */
/* ---------------------------------------------------------------------- */
.summary-line{ display:flex; justify-content:space-between; align-items:center; gap:10px; font-size:14.5px; color:var(--ink); padding:7px 0; }
.summary-line .neg{ color:var(--rose-dk); }
.summary-line .free{ color:var(--coral-dk); font-weight:700; }
.summary-line.total{
  border-top:1.5px solid var(--taupe); margin-top:8px; padding-top:16px;
  font-family:var(--serif); font-size:21px; color:var(--charcoal); font-weight:500;
}

/* ---------------------------------------------------------------------- */
/* free shipping nudge (bag drawer, cart.html, checkout)                   */
/* ---------------------------------------------------------------------- */
.free-ship-nudge{
  background:var(--sand); border:1px dashed var(--rose); border-radius:var(--r-sm);
  color:var(--rose-dk); font-size:12.5px; font-weight:600;
  padding:10px 14px; margin:12px 0;
}

/* ---------------------------------------------------------------------- */
/* form grid + field extensions (baseline .field lives in every page's     */
/* inline <style>; we only add what it doesn't cover)                      */
/* ---------------------------------------------------------------------- */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.form-grid .full{ grid-column:1 / -1; }
@media(max-width:720px){ .form-grid{ grid-template-columns:1fr; } }

.field select{
  width:100%; padding:13px 16px; border:1px solid var(--taupe); border-radius:var(--r-sm);
  background:var(--petal); font-family:var(--sans); font-size:14.5px; color:var(--charcoal);
}
.field .error{ display:block; color:var(--rose-dk); font-size:12.5px; margin-top:6px; font-weight:500; }
.field.has-error input, .field.has-error select{ border-color:var(--rose-dk); }
.field input:focus, .field select:focus, .field textarea:focus{
  outline:2px solid var(--coral); outline-offset:2px; border-color:var(--coral);
}

/* ---------------------------------------------------------------------- */
/* order cards + timeline (account-orders.html, order-confirmation.html)   */
/* ---------------------------------------------------------------------- */
.order-card{
  background:var(--soft); border:1px solid var(--taupe); border-radius:var(--r);
  padding:22px 24px; margin-bottom:18px;
  box-shadow:0 20px 40px -32px rgba(176,126,128,.5);
}
.order-card:last-child{ margin-bottom:0; }
.order-card-head{
  display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px;
  border-bottom:1px solid var(--taupe); padding-bottom:14px; margin-bottom:14px;
}
.order-card-head .no{ font-family:var(--serif); font-size:17px; color:var(--charcoal); }
.order-card-head .date{ font-size:12.5px; color:var(--stone); }
.order-status{
  display:inline-flex; align-items:center;
  font-size:11px; font-weight:700; letter-spacing:.05em; text-transform:uppercase;
  padding:5px 12px; border-radius:20px; background:var(--blush); color:var(--rose-dk);
}

/* Placed -> Processing -> Shipped -> Delivered; wrap 4 .tl-step children in
   order, add .done to steps that have been reached. */
.order-timeline{ position:relative; display:flex; justify-content:space-between; margin:20px 0 8px; }
.order-timeline::before{
  content:''; position:absolute; top:7px; left:0; right:0; height:2px; background:var(--taupe); z-index:0;
}
.order-timeline .tl-step{
  position:relative; z-index:1; flex:1; text-align:center;
  font-size:11.5px; font-weight:600; color:var(--stone);
}
.order-timeline .tl-step::before{
  content:''; display:block; width:16px; height:16px; margin:0 auto 8px;
  border-radius:50%; background:var(--soft); border:2px solid var(--taupe);
}
.order-timeline .tl-step.done{ color:var(--rose-dk); }
.order-timeline .tl-step.done::before{ background:var(--coral); border-color:var(--coral); }

/* ---------------------------------------------------------------------- */
/* auth card (login.html / register.html)                                  */
/* ---------------------------------------------------------------------- */
.auth-card{
  max-width:440px; margin:0 auto;
  background:var(--soft); border:1px solid var(--taupe); border-radius:var(--r);
  padding:38px 34px;
  box-shadow:0 28px 50px -36px rgba(176,126,128,.55);
}
.auth-card h1{ font-size:26px; text-align:center; }
.auth-card .sub{ text-align:center; color:var(--stone); font-size:13.5px; margin:8px 0 26px; }
.auth-card .switch{ text-align:center; font-size:13.5px; color:var(--stone); margin-top:20px; }
.auth-card .switch a{ color:var(--coral-dk); font-weight:600; text-decoration:underline; }
.auth-card .demo-note{ text-align:center; font-size:11.5px; color:var(--stone); margin-top:18px; }
.auth-card .form-error{
  background:var(--blush); color:var(--rose-dk); font-size:13px; font-weight:600;
  padding:11px 14px; border-radius:var(--r-sm); margin-bottom:16px;
}
@media(max-width:480px){
  .auth-card{ padding:30px 22px; }
}

/* ---------------------------------------------------------------------- */
/* rewards (rewards.html)                                                  */
/* ---------------------------------------------------------------------- */
.reward-hero{
  background:linear-gradient(150deg,var(--blush),var(--sand));
  border-radius:var(--r); padding:clamp(30px,5vw,44px) 34px; text-align:center;
  box-shadow:0 30px 60px -40px rgba(176,126,128,.6);
}
.reward-hero .eyebrow{ color:var(--rose-dk); }
.reward-hero .bal{ font-family:var(--serif); font-size:clamp(38px,6vw,58px); color:var(--charcoal); margin-top:8px; line-height:1; }
.reward-hero .bal small{ font-size:16px; color:var(--rose-dk); font-family:var(--sans); font-weight:600; }

.streak-dots{ display:flex; gap:9px; justify-content:center; margin:22px 0; flex-wrap:wrap; }
.streak-dots span{
  width:34px; height:34px; border-radius:50%;
  background:var(--soft); border:1.5px solid var(--taupe);
  display:flex; align-items:center; justify-content:center;
  font-size:11px; font-weight:700; color:var(--stone);
}
.streak-dots span.filled{
  background:linear-gradient(135deg,var(--blush),var(--coral));
  border-color:var(--coral); color:var(--charcoal);
}
.streak-dots span:nth-child(7){ box-shadow:0 0 0 2px var(--coral) inset; } /* day-7 bonus marker */

.ledger-scroll{ overflow-x:auto; }
.ledger-table{ width:100%; border-collapse:collapse; font-size:13.5px; }
.ledger-table th{
  text-align:left; font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase;
  color:var(--stone); padding:10px 12px; border-bottom:1.5px solid var(--taupe); white-space:nowrap;
}
.ledger-table td{ padding:12px; border-bottom:1px solid var(--taupe); color:var(--ink); }
.ledger-table tr:last-child td{ border-bottom:none; }
.ledger-table .amt-plus{ color:var(--coral-dk); font-weight:700; }
.ledger-table .amt-minus{ color:var(--rose-dk); font-weight:700; }

/* ---------------------------------------------------------------------- */
/* focus states — brand law §9: 2px coral outline, 2px offset              */
/* ---------------------------------------------------------------------- */
.qty-step button:focus-visible,
.bagdrawer-x:focus-visible,
.bag-item-remove:focus-visible,
.add-btn:focus-visible,
.streak-dots span:focus-visible,
.btn:focus-visible{
  outline:2px solid var(--coral); outline-offset:2px;
}
.pay-opt:focus-within{ outline:2px solid var(--coral); outline-offset:2px; }

/* ---------------------------------------------------------------------- */
/* shared mobile breakpoints (matches site: 880px, 720px)                  */
/* ---------------------------------------------------------------------- */
@media(max-width:720px){
  .order-card-head{ flex-direction:column; align-items:flex-start; }
  .reward-hero{ padding:28px 20px; }
}

/* ---------------------------------------------------------------------- */
/* PDP variant / option picker                                             */
/* ---------------------------------------------------------------------- */
.pd-variants{ display:flex; flex-direction:column; gap:10px; margin:18px 0 4px; }
.pd-variant{ display:flex; align-items:center; gap:12px; padding:13px 16px; border:1.5px solid var(--taupe); border-radius:var(--r-sm); cursor:pointer; transition:.18s; background:var(--soft); }
.pd-variant:hover{ border-color:var(--rose); }
.pd-variant.selected{ border-color:var(--coral); background:var(--petal); box-shadow:0 0 0 1px var(--coral) inset; }
.pd-variant input{ accent-color:var(--coral-dk); width:18px; height:18px; flex:none; margin:0; }
.pd-variant > span{ flex:1; font-weight:600; font-size:14.5px; color:var(--charcoal); }
.pd-variant > span em{ font-style:normal; font-size:11px; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--coral-dk); margin-left:8px; }
.pd-variant > b{ font-family:var(--serif); font-weight:500; color:var(--rose-dk); white-space:nowrap; }

/* ---------------------------------------------------------------------- */
/* Floating bag button (appears bottom-right once the bag has items)       */
/* ---------------------------------------------------------------------- */
.tsl-fab{
  position:fixed; right:20px; bottom:20px; z-index:60;
  width:60px; height:60px; border-radius:50%; border:none; cursor:pointer;
  background:var(--coral); color:var(--charcoal);
  display:flex; align-items:center; justify-content:center;
  box-shadow:0 16px 34px -12px rgba(176,126,128,.7);
  transition:transform .18s ease, background .2s ease;
}
.tsl-fab:hover{ background:var(--coral-dk); transform:translateY(-2px); }
.tsl-fab[hidden]{ display:none; }
.tsl-fab-count{
  position:absolute; top:-4px; right:-4px; min-width:22px; height:22px; padding:0 6px;
  border-radius:11px; background:var(--charcoal); color:#fff;
  font-family:var(--sans); font-size:12px; font-weight:700; line-height:22px; text-align:center;
  border:2px solid var(--petal);
}
.tsl-fab-count[hidden]{ display:none; }
@media(max-width:600px){ .tsl-fab{ right:16px; bottom:16px; width:56px; height:56px; } }
