/* =====================================================================
   POPHO MAKHANA — store screens: cart, shop, product, checkout,
   account, order tracking and the admin desk.
   ===================================================================== */

/* ---------- cart drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 120; visibility: hidden; transition: visibility 0s .5s; }
.drawer-open .drawer { visibility: visible; transition-delay: 0s; }
.drawer-scrim { position: absolute; inset: 0; background: rgba(18, 35, 26, .48); opacity: 0; transition: opacity .45s; backdrop-filter: blur(3px); }
.drawer-open .drawer-scrim { opacity: 1; }
.drawer-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(450px, 100%); background: var(--ivory); display: grid; grid-template-rows: auto auto 1fr auto; transform: translateX(104%); transition: transform .55s var(--ease); box-shadow: var(--shadow-lg); outline: 0; }
.drawer-open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 14px 24px; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.5rem; }
.drawer-head small { font: 500 .9rem var(--sans); color: var(--muted); }
.drawer-items { overflow-y: auto; padding: 6px 24px; overscroll-behavior: contain; }
.drawer-foot { padding: 18px 24px 22px; border-top: 1px solid var(--line); display: grid; gap: 10px; background: var(--cream); }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; font-size: .96rem; }
.sum-row b { font-size: 1.05rem; }
.sum-total { padding-top: 14px; margin-top: 4px; border-top: 1px solid var(--line); }
.sum-total b { font: 440 1.6rem/1 var(--serif); }
.meter { padding: 14px 24px 12px; font-size: .86rem; border-bottom: 1px solid var(--line-soft); }
.meter:empty { display: none; }
.meter-bar { position: relative; height: 5px; border-radius: 3px; background: var(--sand); margin: 14px 10px 6px 0; }
.meter-bar i { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: linear-gradient(90deg, var(--green-700), var(--gold)); transition: width .8s var(--ease); }
.meter-bar span { position: absolute; top: -17px; width: 20px; margin-left: -6px; transition: left .8s var(--ease); }
.cline { display: grid; grid-template-columns: 78px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line-soft); align-items: start; animation: acc-in .4s var(--ease); }
.cline-img { width: 78px; aspect-ratio: 1; border-radius: 14px; display: grid; place-items: center; overflow: hidden; }
.cline-img img { width: 70%; max-height: 88%; object-fit: contain; }
.cline-img img.is-photo { width: 100%; max-height: none; height: 100%; object-fit: cover; }
.cline-info { display: grid; gap: 4px; font-size: .92rem; justify-items: start; }
.cline-info span { color: var(--muted); font-size: .82rem; }
.cline-end { display: grid; gap: 14px; justify-items: end; font-size: .95rem; }
.cline-x { color: var(--muted); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; transition: color .2s, background-color .2s; }
.cline-x:hover { color: var(--danger); background: rgba(169, 59, 42, .08); }
.cline-x svg { width: 17px; height: 17px; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; margin-top: 6px; background: var(--cream); }
.qty button { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; transition: background-color .2s; }
.qty button:hover { background: var(--paper); }
.qty svg { width: 14px; height: 14px; }
.qty output { min-width: 26px; text-align: center; font-weight: 600; font-size: .9rem; }
.qty-lg button { width: 50px; height: 50px; }
.qty-lg output { min-width: 34px; font-size: 1rem; }
.cart-empty { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 70px 10px; }
.cart-empty .pmark { width: 56px; opacity: .8; margin-bottom: 8px; }
.acct-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--green-800); color: var(--cream); display: grid; place-items: center; font: 500 .9rem var(--serif); }

/* ---------- shop ---------- */
.shop-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: clamp(22px, 3vw, 38px); }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line); font-size: .9rem; font-weight: 600; background: rgba(252, 249, 241, .6); transition: all .3s var(--ease); white-space: nowrap; }
.tab:hover { border-color: var(--green-700); }
.tab.on { background: var(--green-800); border-color: var(--green-800); color: var(--cream); }
.select { height: 46px; padding: 0 40px 0 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231B2A20' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 14px; appearance: none; font-size: .9rem; font-weight: 500; outline: 0; }
.shop-intro { display: grid; gap: 6px; margin-bottom: 22px; }
.shop-intro h2 { font-size: clamp(1.6rem, 2.6vw, 2.3rem); }
.soon { border-radius: var(--r-lg); padding: clamp(34px, 6vw, 80px) 24px; text-align: center; display: grid; gap: 16px; justify-items: center; background: var(--paper); position: relative; overflow: hidden; }
.soon .pmark { width: 64px; }
.soon form { width: min(100%, 460px); }
.soon .news-row { background: var(--cream); border-color: var(--line); }
.soon .news-row input { color: var(--ink); }
.soon .news-row input::placeholder { color: #9AA39B; }
.cta-strip { margin-top: clamp(28px, 4vw, 54px); border-radius: var(--r-lg); background: var(--green-900); color: #E9E6D8; padding: clamp(24px, 3.4vw, 44px); display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.cta-strip h3 { color: var(--cream); font-size: clamp(1.4rem, 2.2vw, 1.9rem); }

/* ---------- product page ---------- */
.pd { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(26px, 5vw, 80px); align-items: start; padding-top: clamp(18px, 3vw, 34px); }
.pd-gallery { position: sticky; top: calc(var(--hdr-h) + 24px); display: grid; gap: 12px; }
.pd-main { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--tint, var(--paper)); display: grid; place-items: center; overflow: hidden; }
.pd-main::before { content: ""; position: absolute; width: 78%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .8), rgba(255, 255, 255, 0) 68%); }
.pd-main img { position: relative; width: 58%; max-height: 86%; object-fit: contain; filter: drop-shadow(0 30px 26px rgba(18, 35, 26, .24)); transition: opacity .35s, transform .7s var(--spring); }
.pd-main img.is-photo { width: 76%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.pd-main.swap img { opacity: 0; transform: scale(.9) rotate(-6deg); }
.pd-main .float { width: 13%; }
.pd-thumbs { display: flex; gap: 10px; }
.pd-thumb { width: 82px; aspect-ratio: 1; border-radius: 16px; background: var(--tint, var(--paper)); display: grid; place-items: center; border: 1.5px solid transparent; overflow: hidden; transition: border-color .25s, transform .3s var(--ease); }
.pd-thumb:hover { transform: translateY(-2px); }
.pd-thumb.on { border-color: var(--green-800); }
.pd-thumb img { width: 66%; max-height: 86%; object-fit: contain; }
.pd-thumb img.is-photo { width: 100%; height: 100%; max-height: none; object-fit: cover; }
.pd-info { display: grid; gap: 22px; align-content: start; }
.pd-info h1 { font-size: clamp(2.3rem, 4.4vw, 3.8rem); }
.pd-tagline { font: italic 400 1.25rem/1.3 var(--serif); color: var(--gold-ink); margin-top: -12px; }
.pd-rating { display: flex; align-items: center; gap: 10px; font-size: .88rem; color: var(--muted); }
.pd-price { font-size: 1.9rem; }
.pd-price s { font-size: 1.05rem; }
.pd-price .off { font-size: .84rem; padding: 4px 10px; border-radius: 999px; background: var(--lotus-soft); }
.pd-tax { font-size: .8rem; color: var(--muted); margin-top: -14px; }
.opt-group { display: grid; gap: 10px; }
.opt-group .label { display: flex; gap: 8px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; }
.opt-group .label b { color: var(--green-700); letter-spacing: .04em; text-transform: none; font-size: .88rem; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { min-width: 84px; padding: 12px 18px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--cream); font-weight: 600; font-size: .92rem; text-align: left; display: grid; gap: 2px; transition: border-color .25s, background-color .25s, transform .3s var(--ease); }
.opt small { font-weight: 500; color: var(--muted); font-size: .78rem; }
.opt:hover { border-color: var(--green-700); transform: translateY(-2px); }
.opt.on { border-color: var(--green-800); background: var(--green-800); color: var(--cream); }
.opt.on small { color: rgba(252, 249, 241, .75); }
.opt svg { width: 22px; height: 22px; margin-bottom: 4px; }
.pd-buy { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: center; }
.pd-buy .btn { min-height: 56px; }
.pd-buy .buy-now { grid-column: 1 / -1; }
.pd-points { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; padding: 20px 0; border-block: 1px solid var(--line); font-size: .9rem; font-weight: 500; }
.pd-points li { display: flex; align-items: center; gap: 10px; }
.pd-points .pmark { width: 16px; flex: none; }
.pd-assure { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; font-size: .8rem; color: var(--muted); text-align: center; }
.pd-assure li { display: grid; gap: 6px; justify-items: center; padding: 14px 8px; border-radius: 14px; background: var(--cream); border: 1px solid var(--line-soft); }
.pd-assure svg { width: 22px; height: 22px; color: var(--green-700); }
.rev-form { display: grid; gap: 14px; }
.rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { cursor: pointer; color: var(--sand); transition: color .15s, transform .2s var(--spring); }
.rate label svg { width: 30px; height: 30px; }
.rate label:hover, .rate label:hover ~ label, .rate input:checked ~ label { color: var(--gold); }
.rate label:hover { transform: scale(1.15); }
.rev-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.rev-summary b { font: 420 3.2rem/1 var(--serif); }

/* ---------- checkout ---------- */
.co { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr); gap: clamp(22px, 4vw, 56px); align-items: start; }
.co-main { display: grid; gap: 18px; }
.co-step { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.co-step i { width: 32px; height: 32px; border-radius: 50%; background: var(--green-800); color: var(--cream); display: grid; place-items: center; font: 500 .95rem var(--serif); font-style: normal; flex: none; }
.co-step h2 { font-size: 1.45rem; }
.co-step a { margin-left: auto; font-size: .86rem; }
.co-sum { position: sticky; top: calc(var(--hdr-h) + 24px); display: grid; gap: 14px; }
.co-sum .cline { grid-template-columns: 62px 1fr auto; padding: 12px 0; }
.co-sum .cline-img { width: 62px; }
.co-sum ul { max-height: 380px; overflow-y: auto; margin: -6px 0 4px; }
.pay { display: grid; gap: 10px; }
.pay-opt { position: relative; display: grid; grid-template-columns: 22px 1fr auto; gap: 14px; align-items: center; padding: 18px; border-radius: 16px; border: 1.5px solid var(--line); background: var(--cream); cursor: pointer; transition: border-color .25s, background-color .25s; }
.pay-opt input { appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--muted); margin: 0; display: grid; place-items: center; }
.pay-opt input::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green-800); transform: scale(0); transition: transform .25s var(--spring); }
.pay-opt input:checked { border-color: var(--green-800); }
.pay-opt input:checked::after { transform: none; }
.pay-opt:has(input:checked) { border-color: var(--green-800); background: #fff; }
.pay-opt b { display: block; font-size: .96rem; }
.pay-opt small { color: var(--muted); font-size: .82rem; }
.pay-opt svg { width: 24px; height: 24px; color: var(--green-700); }
.pay-opt.off { opacity: .55; cursor: not-allowed; }
.done { text-align: center; display: grid; gap: 18px; justify-items: center; padding: clamp(30px, 6vw, 70px) 0; }
.done-mark { width: 110px; height: 110px; border-radius: 50%; background: var(--green-800); display: grid; place-items: center; animation: lg-pop .9s var(--spring) both; }
.done-mark .pmark { width: 52px; }
.done-mark .plogo-leaf-s { animation: lg-sprout-s 1s var(--spring) .3s both; }
.done-mark .plogo-leaf-b { animation: lg-sprout-b 1.1s var(--spring) .45s both; }
.done-no { font: 500 1.1rem var(--sans); letter-spacing: .12em; padding: 10px 22px; border-radius: 999px; background: var(--paper); }

/* ---------- account ---------- */
.auth { width: min(100%, 480px); margin-inline: auto; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; border-radius: 999px; background: var(--paper); margin-bottom: 26px; position: relative; }
.auth-tabs button { height: 46px; border-radius: 999px; font-weight: 600; font-size: .92rem; position: relative; z-index: 1; transition: color .3s; }
.auth-tabs button.on { color: var(--cream); }
.auth-tabs::before { content: ""; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 999px; background: var(--green-800); transition: transform .45s var(--ease); }
.auth-tabs.r::before { transform: translateX(100%); }
.acct { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: clamp(20px, 3.4vw, 44px); align-items: start; }
.acct-side { position: sticky; top: calc(var(--hdr-h) + 24px); display: grid; gap: 16px; }
.acct-av { width: 64px; height: 64px; border-radius: 50%; background: var(--green-800); color: var(--cream); display: grid; place-items: center; font: 440 1.7rem var(--serif); }
.orders { display: grid; gap: 14px; }
.order { background: var(--cream); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; }
.order-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.order-head b { font-size: 1.02rem; letter-spacing: .04em; }
.order-items { font-size: .9rem; color: var(--muted); display: grid; gap: 3px; }
.order-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--paper); color: var(--ink); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.s-pending, .pill.p-pending { background: #F6E9C8; color: #7A5A0E; }
.pill.s-confirmed, .pill.s-packed { background: #DFE9D8; color: #2B5134; }
.pill.s-shipped, .pill.s-out_for_delivery { background: #E3DCEB; color: #5E2E7C; }
.pill.s-delivered, .pill.p-paid { background: #2F7A45; color: #fff; }
.pill.s-cancelled, .pill.p-failed, .pill.p-refunded { background: #F3D9D2; color: #8E2E1F; }
.pill.p-cod { background: var(--paper); color: var(--ink); }

/* ---------- tracking timeline ---------- */
.track-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 14px; align-items: end; }
.tl { display: grid; grid-template-columns: repeat(6, 1fr); position: relative; margin: 30px 0 10px; }
.tl::before { content: ""; position: absolute; left: 8.33%; right: 8.33%; top: 21px; height: 2px; background: var(--line); }
.tl-fill { position: absolute; left: 8.33%; top: 21px; height: 2px; width: 0; max-width: 83.34%; background: linear-gradient(90deg, var(--green-700), var(--gold)); transition: width 1.4s var(--ease) .2s; }
.tl li { position: relative; display: grid; gap: 10px; justify-items: center; text-align: center; font-size: .8rem; font-weight: 600; color: var(--muted); padding: 0 4px; }
.tl li i { width: 44px; height: 44px; border-radius: 50%; background: var(--ivory); border: 1.5px solid var(--line); display: grid; place-items: center; position: relative; z-index: 1; transition: background-color .5s, border-color .5s, transform .6s var(--spring); transition-delay: calc(var(--i) * 180ms + 200ms); }
.tl li .pmark { width: 20px; opacity: .3; transform: scale(.5); transition: transform .6s var(--spring), opacity .4s; transition-delay: calc(var(--i) * 180ms + 200ms); }
.tl li.on { color: var(--ink); }
.tl li.on i { background: var(--green-800); border-color: var(--green-800); }
.tl li.on .pmark { opacity: 1; transform: none; }
.tl li.now i { transform: scale(1.14); box-shadow: 0 0 0 7px rgba(43, 81, 52, .13); }
.tl small { display: block; font-weight: 400; font-size: .74rem; color: var(--muted); }
.hist { display: grid; gap: 0; border-left: 2px solid var(--line); margin-left: 8px; }
.hist li { position: relative; padding: 0 0 18px 22px; font-size: .9rem; }
.hist li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.hist small { display: block; color: var(--muted); }

/* ---------- admin desk ---------- */
.adm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 26px; }
.adm-stat { background: var(--cream); border: 1px solid var(--line-soft); border-radius: var(--r); padding: 20px; display: grid; gap: 4px; }
.adm-stat b { font: 420 2rem/1 var(--serif); }
.adm-stat span { font-size: .8rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--cream); }
table.t { width: 100%; border-collapse: collapse; font-size: .88rem; min-width: 760px; }
.t th { text-align: left; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t small { color: var(--muted); display: block; }
.t td:first-child b { white-space: nowrap; }
.t .input { min-height: 40px; padding: 8px 12px; border-radius: 10px; font-size: .86rem; }
.adm-edit { display: grid; gap: 8px; min-width: 230px; }
.adm-edit .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

@media (max-width: 960px) {
  .pd, .co, .acct { grid-template-columns: 1fr; }
  .pd-gallery, .co-sum, .acct-side { position: relative; top: 0; }
  .co-sum { order: -1; }
  .track-form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .tl { grid-template-columns: 1fr; gap: 0; margin-left: 4px; }
  .tl::before { left: 21px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; }
  .tl-fill { display: none; }
  .tl li { grid-template-columns: 44px 1fr; justify-items: start; text-align: left; align-items: center; gap: 14px; padding: 8px 0; font-size: .92rem; }
  .pd-points { grid-template-columns: 1fr; }
  .pd-buy { grid-template-columns: 1fr; }
  .pd-buy .qty { justify-self: start; }
}
