:root {
  --bg: #fff8e7;
  --ink: #1d1a14;
  --muted: #6b6253;
  --card: #ffffff;
  --line: #eadfc4;
  --chilli: #d7261e;
  --turmeric: #f5b301;
  --leaf: #1f8a4c;
  --shadow: 0 6px 0 #1d1a14;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Noto Sans Telugu", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}
h1, h2, h3, .logo-te, .stamp, .big { font-family: "Ramabhadra", "Noto Sans Telugu", sans-serif; font-weight: 400; }
button { font: inherit; cursor: pointer; }

/* ticker */
.ticker { background: var(--ink); color: var(--turmeric); overflow: hidden; white-space: nowrap; font-size: 14px; }
.ticker-track { display: inline-block; padding: 6px 0; animation: tick 40s linear infinite; }
.ticker-track span { margin: 0 2rem; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px; background: var(--turmeric); border-bottom: 3px solid var(--ink);
}
.logo { text-decoration: none; color: var(--ink); font-size: clamp(22px, 5vw, 32px); }
.logo-dot { font-size: .55em; font-weight: 800; color: var(--chilli); }
.cart-btn {
  background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 8px 14px; font-weight: 600;
}
.cart-btn b { background: var(--chilli); border-radius: 999px; padding: 0 8px; margin-left: 4px; }
.cart-btn.bump { animation: bump .4s; }
@keyframes bump { 50% { transform: scale(1.2) rotate(-6deg); } }

/* hero */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 32px; align-items: center;
  max-width: 1100px; margin: 0 auto; padding: 40px 16px;
}
.hero-img {
  position: relative; aspect-ratio: 1; border: 4px solid var(--ink); border-radius: 18px; overflow: hidden;
  background: linear-gradient(135deg, #ffe08a, #ff9f68); box-shadow: 10px 10px 0 var(--ink); transform: rotate(-2deg);
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-img .fallback { display: none; position: absolute; inset: 0; place-items: center; font-size: 140px; }
.hero-img.noimg img { display: none; }
.hero-img.noimg .fallback { display: grid; }
.stamp {
  position: absolute; right: -6px; bottom: 14px; background: var(--chilli); color: #fff;
  padding: 8px 18px; font-size: 28px; line-height: 1.1; text-align: center;
  border: 3px solid #fff; border-radius: 10px; transform: rotate(-10deg); box-shadow: 0 4px 0 var(--ink);
  animation: wobble 2.4s ease-in-out infinite;
}
@keyframes wobble { 50% { transform: rotate(-4deg) scale(1.05); } }
.kicker { color: var(--chilli); font-weight: 800; margin: 0; }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.25; margin: 8px 0; }
.hero h1 em { font-style: normal; background: var(--turmeric); padding: 0 6px; }
.sub { color: var(--muted); font-weight: 600; }
.badges { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.badges li { background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 4px 12px; font-size: 14px; }

.cta {
  display: inline-block; background: var(--chilli); color: #fff; text-decoration: none; border: 3px solid var(--ink);
  border-radius: 12px; padding: 10px 20px; font-weight: 800; box-shadow: 0 5px 0 var(--ink); transition: transform .1s, box-shadow .1s;
}
.cta:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.cta.wide { width: 100%; text-align: center; margin-top: 12px; }
.ghost { background: transparent; border: 2px dashed var(--ink); border-radius: 12px; padding: 10px 18px; font-weight: 600; }

/* categories */
.cats { display: flex; gap: 8px; overflow-x: auto; padding: 0 16px 8px; max-width: 1100px; margin: 0 auto; }
.cats button {
  flex: none; background: #fff; border: 2px solid var(--ink); border-radius: 999px; padding: 6px 14px; font-weight: 600;
}
.cats button.on { background: var(--ink); color: var(--turmeric); }

/* products */
.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px;
  max-width: 1100px; margin: 16px auto 48px; padding: 0 16px;
}
.card {
  background: var(--card); border: 3px solid var(--ink); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .15s;
}
.card:hover { transform: translateY(-4px) rotate(-.5deg); }
.pic { position: relative; height: 170px; display: grid; place-items: center; font-size: 84px; border-bottom: 3px solid var(--ink); }
.pic .tag {
  position: absolute; top: 10px; left: 10px; background: var(--ink); color: var(--turmeric);
  font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 6px;
}
.pic .off {
  position: absolute; top: 10px; right: 10px; background: var(--leaf); color: #fff;
  font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 6px;
}
.body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.body h3 { margin: 0; font-size: 22px; line-height: 1.3; }
.body .desc { margin: 0; color: var(--muted); font-size: 14px; }
.body .fine { margin: 0; font-size: 11px; color: var(--chilli); }
.price { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.price b { font-size: 22px; }
.price s { color: var(--muted); font-size: 14px; }
.price small { color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
.qty { display: flex; border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.qty button { border: 0; background: #fff; width: 30px; font-weight: 800; }
.qty span { min-width: 28px; text-align: center; font-weight: 800; padding-top: 2px; }
.add { flex: 1; background: var(--turmeric); border: 2px solid var(--ink); border-radius: 10px; padding: 6px; font-weight: 800; }
.add:hover { background: var(--chilli); color: #fff; }

/* reviews */
.reviews { max-width: 1100px; margin: 0 auto 48px; padding: 0 16px; }
.reviews h2 { font-size: 30px; }
.rev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.rev { background: #fff; border: 2px solid var(--ink); border-radius: 14px; padding: 14px; }
.rev .stars { color: var(--turmeric); letter-spacing: 2px; }
.rev p { margin: 6px 0; }
.rev small { color: var(--muted); }

.foot { background: var(--ink); color: #f3e9d2; text-align: center; padding: 28px 16px; }
.foot .tiny { font-size: 12px; opacity: .7; }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.45); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 30; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--bg);
  border-left: 3px solid var(--ink); z-index: 40; transform: translateX(100%); transition: transform .25s;
  display: flex; flex-direction: column; padding: 16px; overflow-y: auto;
}
.drawer.on { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.drawer-head h3 { margin: 0; font-size: 26px; }
.x { background: #fff; border: 2px solid var(--ink); border-radius: 50%; width: 36px; height: 36px; font-weight: 800; }
.cart-items { flex: 1; margin: 12px 0; }
.ci { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 2px dashed var(--line); }
.ci .e { font-size: 34px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 10px; border: 2px solid var(--ink); flex: none; }
.ci .n { flex: 1; min-width: 0; }
.ci .n b { display: block; }
.ci .n small { color: var(--muted); }
.ci .rm { background: none; border: 0; color: var(--chilli); font-weight: 800; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }
.empty div { font-size: 60px; }
.coupon { display: flex; gap: 8px; }
.coupon input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-radius: 10px; padding: 8px; font: inherit; }
.coupon button { background: var(--ink); color: #fff; border: 0; border-radius: 10px; padding: 0 16px; }
.coupon-msg { min-height: 1.5em; font-size: 14px; color: var(--leaf); font-weight: 600; margin: 6px 0; }
.totals div { display: flex; justify-content: space-between; font-size: 14px; }
.totals .grand { font-size: 20px; font-weight: 800; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 6px; }

/* modal */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 16px; background: rgba(0,0,0,.55); }
.modal.on { display: grid; }
.sheet {
  position: relative; background: var(--bg); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 10px 10px 0 var(--ink);
  width: min(520px, 100%); max-height: 92vh; overflow-y: auto; padding: 24px 20px;
}
.sheet > .x { position: absolute; top: 12px; right: 12px; }
.steps { display: flex; gap: 4px; padding: 0; margin: 0 40px 16px 0; list-style: none; font-size: 12px; font-weight: 600; }
.steps li { flex: 1; text-align: center; border-bottom: 4px solid var(--line); padding-bottom: 4px; color: var(--muted); }
.steps li.on { border-color: var(--chilli); color: var(--ink); }
.step h3 { font-size: 26px; margin: 0 0 12px; }
.step label { display: block; font-weight: 600; margin-bottom: 10px; }
.step input:not([type=checkbox]):not([type=range]):not([type=radio]), .step select {
  display: block; width: 100%; border: 2px solid var(--ink); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; margin-top: 4px;
}
.step .check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
.step .check input { margin-top: 6px; }
#trust { width: 100%; accent-color: var(--chilli); }
.trust-out { font-size: 20px; font-weight: 800; text-align: center; min-height: 2.2em; }
.pay { display: grid; gap: 8px; }
.pay label {
  display: flex; gap: 10px; align-items: center; background: #fff; border: 2px solid var(--ink); border-radius: 12px; padding: 10px; margin: 0;
}
.pay label:has(input:checked) { background: var(--turmeric); }
.pay label span { font-size: 26px; }
.pay-note { color: var(--chilli); font-weight: 600; min-height: 1.5em; }
.done { text-align: center; }
.loader { font-size: 18px; font-weight: 600; min-height: 200px; display: grid; place-items: center; }
.loader .spin { font-size: 56px; display: inline-block; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero-img.small { width: 200px; margin: 0 auto 8px; }
.big { font-size: clamp(36px, 9vw, 56px); color: var(--chilli); margin: 12px 0 0; animation: pop .5s cubic-bezier(.3,1.8,.5,1); }
@keyframes pop { from { transform: scale(0); } }
.order-id { font-size: 13px; color: var(--muted); }
.share { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 120px); z-index: 60;
  background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; max-width: calc(100% - 32px);
  font-weight: 600; transition: transform .25s; text-align: center;
}
.toast.on { transform: translate(-50%, 0); }

.shake { animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* support chat */
.chat-btn {
  position: fixed; left: 16px; bottom: 16px; z-index: 25; background: var(--leaf); color: #fff;
  border: 3px solid var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 800; box-shadow: 0 4px 0 var(--ink);
  animation: nudge 4s ease-in-out infinite;
}
@keyframes nudge { 0%, 90%, 100% { transform: none; } 93% { transform: rotate(-8deg); } 96% { transform: rotate(8deg); } }
.chat {
  position: fixed; left: 16px; bottom: 72px; z-index: 25; width: min(340px, calc(100% - 32px));
  background: var(--bg); border: 3px solid var(--ink); border-radius: 16px; box-shadow: 6px 6px 0 var(--ink);
  display: none; flex-direction: column; overflow: hidden;
}
.chat.on { display: flex; }
.chat-head { background: var(--leaf); color: #fff; padding: 8px 12px; font-weight: 800; border-bottom: 3px solid var(--ink); }
.chat-head small { font-weight: 400; opacity: .85; margin-left: 6px; }
.chat-log { height: 260px; overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 85%; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 12px; font-size: 14px; line-height: 1.5; }
.msg.bot { background: #fff; align-self: flex-start; border-bottom-left-radius: 2px; }
.msg.me { background: var(--turmeric); align-self: flex-end; border-bottom-right-radius: 2px; }
.msg.typing { color: var(--muted); font-style: italic; border-style: dashed; }
.chat-form { display: flex; border-top: 2px solid var(--ink); }
.chat-form input { flex: 1; min-width: 0; border: 0; padding: 10px; font: inherit; background: #fff; }
.chat-form button { border: 0; border-left: 2px solid var(--ink); background: var(--chilli); color: #fff; padding: 0 14px; font-weight: 800; }

@media (max-width: 720px) {
  .chat-btn span { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 24px; }
  .hero-img { max-width: 320px; margin: 0 auto; }
  .cart-btn span { display: none; }
}
