/* =========================================================
   রূপালি আভা — style.css
   Shared tokens + mobile-first styles for cart & checkout
   ========================================================= */
:root{
  /* --- Color tokens: classic black + antique gold + ivory --- */
  --navy-deep:    #FFFDF8;
  --navy:         #FCFAF5;
  --navy-2:       #F6F1E7;

  --silver:       #4b4740;
  --silver-bright:#C5E1B1;
  --ivory:        #FAF6EE;

  /* Text Colors (More Dark) */
  --ink:          #111111;
  --ink-soft:     #3A3A3A;

  --rose:         #C89B3C;
  --rose-deep:    #9F7622;

  --wine:         #6D4C1E;

  --line:         rgba(0, 0, 0, 0.10);

  /* --- Type --- */
  --font-bn-display: 'Tiro Bangla', 'Noto Serif Bengali', serif;
  --font-en-display: 'Cormorant Garamond', serif;
  --font-body: 'Hind Siliguri', 'Segoe UI', sans-serif;

  /* --- Radii / shadow --- */
  --radius-card: 14px;
  --shadow-soft: 0 10px 30px -12px rgba(8,16,32,0.35);
  --shadow-lift: 0 18px 40px -14px rgba(8,16,32,0.45);

  --container-pad: 1.25rem;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ -webkit-text-size-adjust: 100%; }
body{
  margin:0;
  background: var(--navy);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  padding: 0;
}
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; }
img{ max-width:100%; display:block; }

.container{
  max-width: 1120px;
  margin: 0 auto;
}

/* ---------- signature motif: woven "পাড়" (saree-border) rule ---------- */
.pallu-rule{
  height: 6px;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--rose) 0 6px,
      var(--rose-deep) 6px 12px
    );
  opacity: 0.85;
}
.pallu-divider{
  position: relative;
  height: 1px;
  background: var(--line);
  margin: 1.75rem 0;
}
.pallu-divider::after{
  content: "◆";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: var(--navy);
  color: var(--rose-deep);
  font-size: .6rem;
  padding: 0 .6rem;
}

/* ---------- site header ---------- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(252,250,245,0.92);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header__row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: .85rem 0;
}
.brand{
  font-family: var(--font-bn-display);
  font-size: 1.4rem;
  letter-spacing: .02em;
  color: var(--ink);
}
.brand small{
  display:block;
  font-family: var(--font-en-display);
  font-style: italic;
  font-size: .62rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rose-deep);
}
.header-icons{ display:flex; align-items:center; gap: 1rem; }
.icon-btn{
  position: relative;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 40px; height:40px;
  border-radius: 999px;
  color: var(--ink-soft);
}
.icon-btn svg{ width:22px; height:22px; }
.cart-badge{
  position:absolute;
  top: -2px; right: -2px;
  min-width: 18px; height:18px;
  padding: 0 4px;
  border-radius:999px;
  background: var(--rose-deep);
  color: var(--ivory);
  font-size: .65rem;
  line-height:18px;
  text-align:center;
  font-weight:600;
}
.breadcrumb{
  padding: .9rem 0 0;
  font-size: .8rem;
  color: var(--ink-soft);
}
.breadcrumb .current{ color: var(--rose-deep); font-weight:600; }

.page-title{
  font-family: var(--font-bn-display);
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  margin: .6rem 0 1.1rem;
  color: var(--ink);
}

/* ---------- steps indicator ---------- */
.steps{
  display:flex;
  gap: .5rem;
  list-style:none;
  padding:0; margin: 0 0 1.25rem;
  font-size: .75rem;
  color: var(--ink-soft);
}
.steps li{ display:flex; align-items:center; gap:.4rem; }
.steps li::before{
  content: attr(data-n);
  width: 20px; height:20px;
  border-radius:999px;
  border:1px solid var(--line);
  display:inline-flex; align-items:center; justify-content:center;
  font-size: .68rem;
}
.steps li[aria-current="step"]{ color: var(--rose-deep); font-weight:700; }
.steps li[aria-current="step"]::before{ background: var(--rose-deep); border-color: var(--rose-deep); color:var(--ivory); }
.steps li[data-done]::before{ background: var(--wine); border-color: var(--wine); color:var(--ivory); content:"✓"; }

/* ============================================================
   CART PAGE
   ============================================================ */
.cart-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 6.5rem; /* room for mobile sticky bar */
}

.cart-empty{
  text-align:center;
  padding: 3rem 1rem;
  background: var(--navy-2);
  border-radius: var(--radius-card);
}
.cart-empty__icon{ font-size: 2.4rem; margin-bottom: .75rem; }
.cart-empty p{ color: var(--ink-soft); margin: .3rem 0 1.4rem; }
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:.5rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight:600;
  font-size: .92rem;
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:active{ transform: scale(.97); }
.btn-primary{
  background: var(--rose-deep);
  color: var(--ivory);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover{ background: var(--wine); }
.btn-primary[aria-disabled="true"]{
  pointer-events:none;
  opacity:.45;
}
.btn-outline{
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover{ border-color: var(--rose-deep); color: var(--rose-deep); }
.btn-block{ width:100%; }

#cartTableWrap{ display:flex; flex-direction:column; gap: .85rem; }

.cart-row{
  display:grid;
  grid-template-columns: 64px 1fr;
  grid-template-areas:
    "img info"
    "qty qty"
    "total total";
  gap: .6rem .9rem;
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: .9rem;
  align-items:start;
}
.cart-row__img{ grid-area: img; width:64px; height:64px; border-radius: 10px; overflow:hidden; background:#fff; }
.cart-row__img img{ width:100%; height:100%; object-fit:cover; }
.cart-row__info{ grid-area: info; display:flex; flex-direction:column; gap:.25rem; }
.cart-row__name{ font-weight:600; font-size: .95rem; }
.cart-row__name:hover{ color: var(--rose-deep); }
.cart-row__price{ color: var(--ink-soft); font-size: .85rem;font-family: sans-serif; }
.cart-row__remove{
  align-self:flex-start;
  margin-top:.25rem;
  background:none; border:none; padding:0;
  color: var(--silver); font-size: .78rem;
  text-decoration: underline;
  cursor:pointer;
}
.cart-row__remove:hover{ color: var(--wine); }

.cart-row__qty{ grid-area: qty; display:flex; align-items:center; gap:.5rem; }
.qty-btn{
  width: 32px; height:32px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--ivory);
  font-size: 1rem;
  line-height:1;
  cursor:pointer;
}
.qty-btn:hover{ border-color: var(--rose-deep); color: var(--rose-deep); }
.qty-input{
  width: 35px;
  text-align:center;
  padding: .4rem .2rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .9rem;
}
.cart-row__total{
  grid-area: total;
  font-weight:700;
  font-family: sans-serif;
  font-size: 1.05rem;
  color: var(--rose-deep);
  text-align: right;
}

/* ---------- order summary card ---------- */
.summary-card{
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.25rem;
}
.summary-card h2{
  font-family: var(--font-bn-display);
  font-size: 1.1rem;
  margin: 0 0 .9rem;
}
.summary-line{
  display:flex;
  justify-content:space-between;
  font-size: .9rem;
  padding: .4rem 0;
  color: var(--ink-soft);
}
.summary-line strong{ color: var(--ink);font-family: sans-serif; }
.summary-line--total{
  border-top: 1px solid var(--line);
  margin-top: .4rem;
  padding-top: .8rem;
  font-size: 1.05rem;
  color: var(--ink);
  font-weight: 700;
  font-family: sans-serif;
}
.summary-line--total span:last-child{ color: var(--rose-deep); font-family: sans-serif; font-size:1.2rem; }

/* sticky mobile checkout bar */
.mobile-cart-bar{
  position: fixed;
  left:0; right:0; bottom:0;
  z-index: 30;
  background: var(--navy);
  border-top: 1px solid var(--line);
  padding: .75rem var(--container-pad);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 1rem;
  box-shadow: 0 -10px 24px -18px rgba(0,0,0,.35);
}
.mobile-cart-bar__sub{ font-size:.78rem; color:var(--ink-soft); }
.mobile-cart-bar__amt{ font-family: var(--font-en-display); font-weight:700; font-size:1.15rem; color:var(--rose-deep); }

/* ============================================================
   CHECKOUT PAGE
   ============================================================ */
.checkout-layout{
  display:grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding-bottom: 6.5rem;
}

.form-card{
  background: var(--navy-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 1.25rem;
}
.form-card h2{
  font-family: var(--font-bn-display);
  font-size: 1.15rem;
  margin: 0 0 1rem;
}
.field-grid{ display:grid; grid-template-columns: 1fr; gap: 1rem; }
.field{ display:flex; flex-direction:column; gap:.35rem; }
.field label{ font-size: .85rem; font-weight:600; color: var(--ink); }
.field label .opt{ font-weight:400; color: var(--ink-soft); font-size:.75rem; }
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field textarea,
.field select{
  width:100%;
  padding: .78rem .9rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font-family: var(--font-body);
  font-size: .95rem;
  color: var(--ink);
}
.field input:focus-visible,
.field textarea:focus-visible,
.field select:focus-visible,
.qty-input:focus-visible,
.btn:focus-visible,
.pay-option:focus-within{
  outline: 2px solid var(--rose-deep);
  outline-offset: 2px;
}
.field textarea{ resize: vertical; min-height: 84px; }
.field-error{ font-size: .78rem; color: #B3261E; min-height: 1em; }
.field.has-error input, .field.has-error textarea{ border-color:#B3261E; }

.pay-options{ display:flex; flex-direction:column; gap:.6rem; }
.pay-option{
  display:flex; align-items:center; gap:.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem .9rem;
  cursor:pointer;
  background:#fff;
}
.pay-option:has(input:checked){ border-color: var(--rose-deep); background: var(--ivory); }
.pay-option input{ accent-color: var(--rose-deep); width:18px; height:18px; }
.pay-option__label{ font-weight:600; font-size:.92rem; }
.pay-option__sub{ font-size:.78rem; color: var(--ink-soft); }

.terms-row{ display:flex; align-items:flex-start; gap:.6rem; font-size:.85rem; color:var(--ink-soft); margin-top:.25rem; }
.terms-row input{ margin-top:.2rem; accent-color: var(--rose-deep); }

.mini-item{ display:flex; gap:.7rem; padding:.55rem 0; border-bottom:1px solid var(--line); font-size:.85rem; }
.mini-item:last-child{ border-bottom:none; }
.mini-item img{ width:44px; height:44px; border-radius:8px; object-fit:cover; }
.mini-item__name{ font-weight:600; }
.mini-item__meta{ color:var(--ink-soft); font-size:.78rem; }
.mini-item__total{ margin-left:auto; font-family: var(--font-en-display); font-weight:700; color:var(--rose-deep); white-space:nowrap; }

.summary-toggle{
  display:flex; align-items:center; justify-content:space-between;
  cursor:pointer;
  font-family: var(--font-bn-display);
  font-size: 1.05rem;
}
.summary-toggle svg{ width:18px; height:18px; transition: transform .2s ease; }
details[open] .summary-toggle svg{ transform: rotate(180deg); }
details > summary{ list-style:none; }
details > summary::-webkit-details-marker{ display:none; }

.toast{
  position: fixed;
  left:50%; bottom: 5.5rem;
  transform: translateX(-50%) translateY(10px);
  background: var(--ink);
  color: var(--ivory);
  padding: .7rem 1.1rem;
  border-radius: 999px;
  font-size: .85rem;
  opacity:0;
  pointer-events:none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 60;
  max-width: 90vw;
  text-align:center;
}
.toast.show{ opacity:1; transform: translateX(-50%) translateY(0); }
.toast.error{ background: #7A241D; }

.confirm-wrap{
  max-width: 560px;
  margin: 3rem auto;
  text-align:center;
  padding: 2.25rem 1.5rem;
  background: var(--navy-2);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}
.confirm-wrap .check{
  width: 64px; height:64px; margin:0 auto 1rem;
  border-radius:999px;
  background: var(--wine);
  color: var(--ivory);
  display:flex; align-items:center; justify-content:center;
  font-size: 1.8rem;
}
.confirm-wrap h1{ font-family: var(--font-bn-display); margin:.2rem 0; }
.confirm-wrap .order-no{ font-family: var(--font-en-display); font-size:1.3rem; color: var(--rose-deep); font-weight:700; }

/* screen-reader only */
.sr-only{
  position:absolute; width:1px; height:1px;
  padding:0; margin:-1px; overflow:hidden;
  clip: rect(0,0,0,0); white-space:nowrap; border:0;
}

/* ============================================================
   RESPONSIVE — tablet and up
   ============================================================ */
@media (min-width: 640px){
  .cart-row{
    grid-template-columns: 90px 1fr auto auto;
    grid-template-areas: "img info qty total";
    align-items:center;
  }
  .cart-row__img{ width:90px; height:90px; }
  .cart-row__total{ font-size:1.15rem; }
  .field-grid.cols-2{ grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px){
  .cart-layout{
    grid-template-columns: 1fr 340px;
    align-items: start;
    padding-bottom: 2rem;
  }
  .summary-card{ position: sticky; top: 84px; }
  .mobile-cart-bar{ display:none; }

  .checkout-layout{
    grid-template-columns: 1fr 380px;
    align-items:start;
    padding-bottom: 2rem;
  }
  .checkout-layout .summary-card{ position: sticky; top: 84px; }
  .summary-toggle{ pointer-events:none; }
  .summary-toggle svg{ display:none; }
}

@media (min-width: 1100px){
  .container{ padding: 0 2.5rem; }
}

@media (prefers-reduced-motion: reduce){
  *{ transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}