/* ═══════════════════════════════════════════════
   SHOP — buy buttons, cart drawer, checkout
   Built by js/shop.js and js/checkout.js, so all of
   this styles markup the HTML does not contain.
   ═══════════════════════════════════════════════ */

/* ── the two buttons in the chosen-product panel ── */
.buy{
  position:absolute; left:50%; bottom:13%;
  transform:translateX(-50%);
  display:flex; gap:10px;
  pointer-events:auto;
}
.buy__btn{
  appearance:none; cursor:pointer;
  min-height:42px; padding:0 22px;
  border-radius:99px;
  font:600 11px/1 var(--sans); letter-spacing:.14em; text-transform:uppercase;
  white-space:nowrap;
  transition:background .25s var(--ease), color .25s var(--ease),
             border-color .25s var(--ease), transform .18s var(--ease);
}
.buy__btn:active{transform:translateY(1px)}
.buy__btn:focus-visible{outline:2px solid var(--wine); outline-offset:3px}
.buy__btn[disabled]{cursor:default; opacity:.75}

/* secondary: add to cart */
.buy__btn--add{
  background:transparent; color:var(--wine);
  border:1.5px solid rgba(136,1,42,.4);
}
.buy__btn--add:hover{border-color:var(--wine); background:rgba(136,1,42,.06)}

/* primary: buy now */
.buy__btn--now{
  background:var(--wine); color:var(--cream);
  border:1.5px solid var(--wine);
}
.buy__btn--now:hover{background:var(--wine-soft); border-color:var(--wine-soft)}

/* ── cart button in the nav ── */
.cartbtn{
  position:relative; display:grid; place-items:center;
  width:30px; height:30px; padding:0;
  appearance:none; cursor:pointer; background:none; border:0;
  color:var(--wine);
  transition:transform .2s var(--ease);
}
.cartbtn svg{width:21px; height:21px; display:block}
.cartbtn:hover{transform:translateY(-1px)}
.cartbtn:focus-visible{outline:2px solid var(--wine); outline-offset:3px; border-radius:6px}
.cartbtn__n{
  position:absolute; top:-3px; right:-5px;
  min-width:16px; height:16px; padding:0 4px;
  display:grid; place-items:center;
  background:var(--wine); color:var(--cream);
  border-radius:99px;
  font:700 10px/1 var(--sans);
}
.cartbtn__n[hidden]{display:none}

/* ── scrim shared by drawer and checkout ──
   Above the cookie bar (9000) on purpose: the bar was covering the checkout
   button. The scrim dims it along with the page, which is correct — an open
   cart is the thing being attended to, and the bar returns on close. */
.scrim{
  position:fixed; inset:0; z-index:9050;
  background:rgba(30,6,16,.42);
  opacity:0; pointer-events:none;
  transition:opacity .3s var(--ease);
}
.scrim.is-on{opacity:1; pointer-events:auto}

/* ── the drawer ── */
.drawer{
  position:fixed; top:0; right:0; bottom:0; z-index:9100;
  width:min(420px,100vw);
  display:flex; flex-direction:column;
  background:var(--cream);
  box-shadow:-20px 0 50px -24px rgba(84,20,44,.5);
  transform:translateX(100%);
  transition:transform .38s var(--ease);
}
.drawer.is-on{transform:none}

.drawer__head{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 22px 14px;
  border-bottom:1px solid rgba(136,1,42,.12);
}
.drawer__title{
  margin:0; font-family:var(--serif); font-style:italic; font-weight:400;
  font-size:23px; color:var(--ink);
}
.drawer__x, .co__x{
  appearance:none; cursor:pointer; background:none; border:0;
  font-size:26px; line-height:1; color:var(--wine); padding:0 4px;
}
.drawer__x:focus-visible, .co__x:focus-visible{outline:2px solid var(--wine); outline-offset:2px}

.drawer__body{flex:1 1 auto; overflow-y:auto; padding:8px 22px}
.drawer__empty{
  margin:44px 0; text-align:center;
  font:400 14px/1.6 var(--sans); color:var(--ink-soft);
}

.line{
  display:grid;
  grid-template-columns:1fr auto auto auto;
  align-items:center; gap:12px;
  padding:15px 0;
  border-bottom:1px solid rgba(136,1,42,.09);
}
.line__info{min-width:0}
.line__name{margin:0; font:600 13.5px/1.3 var(--sans); color:var(--ink)}
.line__spec{margin:4px 0 0; font:400 11.5px/1 var(--sans); color:var(--ink-soft)}

.line__qty{display:flex; align-items:center; gap:2px}
.line__qty button{
  appearance:none; cursor:pointer;
  width:26px; height:26px;
  background:none; border:1px solid rgba(136,1,42,.24);
  border-radius:7px; color:var(--wine);
  font:600 14px/1 var(--sans);
  transition:background .2s, border-color .2s;
}
.line__qty button:hover{background:rgba(136,1,42,.07); border-color:var(--wine)}
.line__qty button:focus-visible{outline:2px solid var(--wine); outline-offset:1px}
.line__qty span{min-width:24px; text-align:center; font:600 13px/1 var(--sans); color:var(--ink)}

.line__sum{margin:0; font:600 13px/1 var(--sans); color:var(--wine); min-width:56px; text-align:right}
.line__rm{
  appearance:none; cursor:pointer; background:none; border:0;
  color:var(--ink-soft); font-size:17px; line-height:1; padding:2px 4px;
  transition:color .2s;
}
.line__rm:hover{color:var(--wine)}
.line__rm:focus-visible{outline:2px solid var(--wine); outline-offset:1px}

.drawer__foot{
  padding:16px 22px 22px;
  border-top:1px solid rgba(136,1,42,.12);
  background:rgba(255,255,255,.45);
}
.sums{margin:0 0 14px; font:400 13px/1 var(--sans)}
.sums div{display:flex; justify-content:space-between; padding:5px 0}
.sums dt{color:var(--ink-soft)}
.sums dd{margin:0; color:var(--ink)}
.sums__total{
  margin-top:6px; padding-top:11px !important;
  border-top:1px solid rgba(136,1,42,.14);
  font-weight:700;
}
.sums__total dt, .sums__total dd{color:var(--wine); font-size:15px}

.nudge{
  margin:0 0 13px; padding:9px 12px;
  background:rgba(231,208,207,.45);
  border-radius:9px;
  font:500 12px/1.45 var(--sans); color:var(--wine);
}

.drawer__go, .co__go{
  width:100%; min-height:46px;
  appearance:none; cursor:pointer;
  background:var(--wine); color:var(--cream);
  border:0; border-radius:99px;
  font:600 12px/1 var(--sans); letter-spacing:.16em; text-transform:uppercase;
  transition:background .25s var(--ease);
}
.drawer__go:hover, .co__go:hover{background:var(--wine-soft)}
.drawer__go:focus-visible, .co__go:focus-visible{outline:2px solid var(--wine); outline-offset:3px}
.co__go[disabled]{opacity:.6; cursor:default}

/* ── checkout ── */
.co{
  position:fixed; inset:0; z-index:9200;
  display:grid; place-items:center;
  padding:20px;
  background:rgba(30,6,16,.5);
  opacity:0; pointer-events:none;
  transition:opacity .3s var(--ease);
  overflow-y:auto;
}
.co.is-on{opacity:1; pointer-events:auto}

.co__card{
  width:min(440px,100%);
  max-height:calc(100vh - 40px);
  overflow-y:auto;
  background:var(--cream);
  border-radius:18px;
  box-shadow:0 30px 70px -28px rgba(84,20,44,.6);
}
.co__head{
  position:sticky; top:0; z-index:1;
  display:flex; align-items:center; justify-content:space-between;
  padding:20px 22px 12px;
  background:var(--cream);
  border-bottom:1px solid rgba(136,1,42,.12);
}
.co__title{
  margin:0; font-family:var(--serif); font-style:italic; font-weight:400;
  font-size:22px; color:var(--ink);
}
.co__form, .co__done{padding:18px 22px 22px}

.co__sum{
  margin:0 0 16px; padding:11px 13px;
  background:rgba(231,208,207,.42); border-radius:9px;
  font:600 12.5px/1.4 var(--sans); color:var(--wine);
}

.co__field{margin-bottom:13px}
.co__label{
  display:block; margin-bottom:6px;
  font:600 10.5px/1 var(--sans); letter-spacing:.14em; text-transform:uppercase;
  color:var(--wine);
}
.co__opt{font-weight:400; letter-spacing:.06em; text-transform:none; color:var(--ink-soft)}
.co__in{
  width:100%; box-sizing:border-box;
  padding:11px 13px;
  background:#fff;
  border:1px solid rgba(136,1,42,.18); border-radius:10px;
  font:400 14px/1.4 var(--sans); color:var(--ink);
}
.co__in:focus{border-color:var(--wine); outline:none}
.co__in:focus-visible{outline:2px solid var(--wine); outline-offset:1px}

.co__pay{margin:18px 0 14px; padding:0; border:0}
.co__radio{
  display:flex; align-items:flex-start; gap:10px;
  padding:11px 13px; margin-top:8px;
  background:#fff;
  border:1px solid rgba(136,1,42,.16); border-radius:11px;
  cursor:pointer;
}
.co__radio input{margin:2px 0 0; accent-color:var(--wine)}
.co__radio strong{display:block; font:600 13px/1.3 var(--sans); color:var(--ink)}
.co__radio em{
  display:block; margin-top:3px; font-style:normal;
  font:400 11.5px/1.4 var(--sans); color:var(--ink-soft);
}
.co__radio.is-off{opacity:.55; cursor:default; background:transparent}

.co__terms{
  display:flex; align-items:flex-start; gap:9px;
  margin:4px 0 14px;
  font:400 12px/1.45 var(--sans); color:var(--ink-soft);
  cursor:pointer;
}
.co__terms input{flex:0 0 auto; margin:1px 0 0; width:16px; height:16px; accent-color:var(--wine)}
.co__terms a{color:var(--wine)}

.co__err{
  margin:0 0 13px; padding:11px 13px;
  background:rgba(231,208,207,.5);
  border:1px solid rgba(136,1,42,.24); border-radius:9px;
  font:500 12.5px/1.45 var(--sans); color:var(--wine);
}
.co__err[hidden]{display:none}

.co__done{text-align:center}
.co__done[hidden]{display:none}
.co__done-eyebrow{
  margin:0 0 8px; font:600 10.5px/1 var(--sans);
  letter-spacing:.24em; text-transform:uppercase; color:var(--wine);
}
.co__done-title{
  margin:0 0 10px; font-family:var(--serif); font-style:italic; font-weight:400;
  font-size:24px; color:var(--ink);
}
.co__done-text{margin:0 0 20px; font:400 13.5px/1.6 var(--sans); color:var(--ink-soft)}
.co__x2{
  appearance:none; cursor:pointer;
  background:none; border:0; border-bottom:1px solid rgba(136,1,42,.3);
  padding:4px 2px; color:var(--wine);
  font:600 10px/1 var(--sans); letter-spacing:.24em; text-transform:uppercase;
}
.co__x2:focus-visible{outline:2px solid var(--wine); outline-offset:3px}

@media (max-width:860px){
  .buy{bottom:17%}
  .buy__btn{padding:0 16px; font-size:10px}
}
@media (prefers-reduced-motion:reduce){
  .drawer, .scrim, .co, .buy__btn, .cartbtn{transition:none}
}

/* ═══ PROFILE — device memory, not an account ═══ */
.profbtn{
  position:relative; display:grid; place-items:center;
  width:30px; height:30px; padding:0;
  appearance:none; cursor:pointer; background:none; border:0;
  color:var(--wine);
  transition:transform .2s var(--ease);
}
.profbtn svg{width:21px; height:21px; display:block}
.profbtn:hover{transform:translateY(-1px)}
.profbtn:focus-visible{outline:2px solid var(--wine); outline-offset:3px; border-radius:6px}
/* a quiet dot, not a count — it only says "something is remembered here" */
.profbtn__dot{
  position:absolute; top:1px; right:0;
  width:7px; height:7px; border-radius:50%;
  background:var(--wine);
  box-shadow:0 0 0 2px var(--cream);
}
.profbtn__dot[hidden]{display:none}

.prof .drawer__body{padding-bottom:28px}

/* the honest line about what this is. Stated, not buried — someone who
   believes they have an account will expect it on their next phone. */
.prof__note{
  margin:14px 0 22px; padding:12px 14px;
  background:rgba(231,208,207,.4);
  border-radius:10px;
  font:400 12px/1.55 var(--sans); color:var(--ink-soft);
}

.prof__h{
  margin:24px 0 10px;
  font:600 10.5px/1 var(--sans);
  letter-spacing:.16em; text-transform:uppercase; color:var(--wine);
}
.prof__h:first-of-type{margin-top:0}

.prof__empty{
  margin:0; padding:14px 0;
  font:400 13px/1.6 var(--sans); color:var(--ink-soft);
}

.prof__dl{margin:0; font:400 13px/1 var(--sans)}
.prof__dl div{
  display:flex; justify-content:space-between; gap:16px;
  padding:9px 0; border-bottom:1px solid rgba(136,1,42,.09);
}
.prof__dl dt{color:var(--ink-soft); flex:0 0 auto}
.prof__dl dd{margin:0; color:var(--ink); text-align:right; word-break:break-word}

.prof__orders{margin:0; padding:0; list-style:none}
.prof__order{
  padding:12px 0;
  border-bottom:1px solid rgba(136,1,42,.09);
}
.prof__order-top{
  display:flex; justify-content:space-between; align-items:baseline; gap:12px;
  margin:0 0 4px;
  font:400 12px/1 var(--sans); color:var(--ink-soft);
}
.prof__order-top strong{font:700 13px/1 var(--sans); color:var(--wine)}
.prof__order-items{margin:0; font:500 13px/1.45 var(--sans); color:var(--ink)}

.prof__forget{
  margin-top:26px;
  appearance:none; cursor:pointer;
  background:none; border:0; border-bottom:1px solid rgba(136,1,42,.3);
  padding:4px 2px; color:var(--wine);
  font:600 10px/1 var(--sans); letter-spacing:.2em; text-transform:uppercase;
}
.prof__forget:hover{border-color:var(--wine)}
.prof__forget:focus-visible{outline:2px solid var(--wine); outline-offset:3px}

@media (max-width:560px){
  .nav__right{gap:10px}
}
