/* =====================================================================
   Tangra Square — customer site v13 (mobile-first)
   style.css ke baad load hota hai; cart/checkout/orders ke purane styles waise hi rehte hain.
   ===================================================================== */
:root {
  --font-display: 'Fraunces', 'Playfair Display', Georgia, serif;
  --page: #FBF7F1;
  --ring: rgba(33, 26, 21, .08);
  --shadow-card: 0 1px 2px rgba(33, 26, 21, .05), 0 8px 22px rgba(33, 26, 21, .07);
  --wrap: 1240px;
}
html { -webkit-text-size-adjust: 100%; }
body { background: var(--page); }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.01em; }
body.no-scroll { overflow: hidden; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px;
  padding: 10px max(14px, calc((100vw - var(--wrap)) / 2 + 20px)) 10px;
  background: rgba(251, 247, 241, .94); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--ring);
}
.brand-row { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand-seal { width: 44px; height: 44px; font-size: 24px; border-radius: 14px; box-shadow: 0 6px 14px rgba(196, 30, 52, .28); }
.brand-text h1 { font-family: var(--font-display); font-size: 21px; font-weight: 800; color: var(--red-dark); letter-spacing: -.02em; }
.brand-text p { font-size: 11.5px; }
.topbar-actions { display: flex; gap: 8px; }
.icon-btn { width: 42px; height: 42px; box-shadow: none; border: 1px solid var(--ring); background: #fff; color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { border-color: var(--red); color: var(--red); }
.search-wrap { width: 100%; margin-top: 0; }
#searchInput { padding: 13px 16px 13px 42px; border-radius: 16px; border: 1px solid var(--ring); background: #fff; font-size: 15px; box-shadow: 0 1px 2px rgba(33, 26, 21, .04); }
#searchInput:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(214, 41, 59, .12); }
.search-icon { left: 15px; width: 18px; height: 18px; }

/* ---------- Banners / hero ---------- */
.closed-banner { margin: 12px 14px 0; border-radius: 14px; }
.hero-card {
  margin: 14px 14px 6px; padding: 26px 20px 24px; min-height: 236px; border-radius: 28px;
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(255, 170, 80, .55) 0%, rgba(255, 170, 80, 0) 55%),
    linear-gradient(135deg, #D8283B 0%, #A8142A 60%, #7E0F20 100%);
  box-shadow: 0 18px 40px rgba(168, 20, 42, .28); display: flex; flex-direction: column; justify-content: center;
}
.hero-carousel { width: 100%; }
.hero-copy { max-width: 100%; }
.hero-card.has-art .hero-copy { max-width: 62%; }
.hero-kicker { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; font-weight: 700; }
.hero-copy h2 { font-family: var(--font-display); font-size: clamp(30px, 8.6vw, 46px); line-height: 1.05; font-weight: 800; letter-spacing: -.025em; margin: 12px 0 8px; }
.hero-copy h2 span { color: #FFD27A; font-style: italic; }
.hero-copy p { font-size: 14.5px; line-height: 1.5; opacity: .92; }
.hero-menu-btn { margin-top: 16px; background: #fff; color: var(--red-dark); border-radius: 999px; padding: 12px 20px; font-weight: 800; box-shadow: 0 8px 18px rgba(0, 0, 0, .18); }
.hero-bowl { right: 14px; bottom: 8px; opacity: .95; }
.hero-card.has-art .hero-bowl { display: none; }
.hero-dots { position: absolute; left: 20px; right: auto; bottom: 12px; margin: 0; z-index: 2; }

.hero-art { position: absolute; right: 0; top: 0; bottom: 0; width: 44%; pointer-events: none; z-index: 1; }
.art-dish { position: absolute; display: block; border-radius: 50%; overflow: hidden; border: 4px solid rgba(255, 255, 255, .95); box-shadow: 0 14px 28px rgba(0, 0, 0, .32); background: #F3E7D8; }
.art-dish img { width: 100%; height: 100%; object-fit: cover; display: block; }
.art-0 { width: 116px; height: 116px; right: 12px; top: 50%; transform: translateY(-46%); }
.art-1 { width: 68px; height: 68px; right: 104px; bottom: 12px; }
.art-2 { width: 62px; height: 62px; right: 6px; top: 12px; }

.offers-strip { padding: 4px 14px 2px; margin-top: 4px; }

/* ---------- Layout: mobile = one column, desktop = sidebar + grid ---------- */
.shop { display: block; }
.shop-side { display: contents; }
.shop-main { min-width: 0; }

.diet-filter { padding: 12px 14px 2px; gap: 8px; }
.diet-chip { padding: 8px 14px; border: 1px solid var(--ring); background: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 1px 2px rgba(33, 26, 21, .04); }
.diet-chip.active { background: var(--ink); border-color: var(--ink); }

.cat-tabs { top: var(--topbar-h, 96px); padding: 10px 14px; background: rgba(251, 247, 241, .96); backdrop-filter: blur(8px); border-top: 0; border-bottom: 1px solid var(--ring); box-shadow: none; }
.cat-tab { border: 1px solid var(--ring); padding: 8px 15px; font-weight: 700; font-size: 13.5px; }
.cat-tab.active { background: var(--ink); border-color: var(--ink); color: #fff; }

.menu-list { padding: 6px 14px 24px; max-width: none; }
.menu-section { margin: 20px 0 8px; scroll-margin-top: calc(var(--topbar-h, 96px) + 56px); }
.menu-section h2 { font-size: 24px; font-weight: 800; margin-bottom: 2px; }
.cat-note { color: var(--muted); font-size: 13px; margin-bottom: 4px; }

/* ---------- Dish cards ---------- */
.dish-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.dish { display: flex; flex-direction: column; background: #fff; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--ring); min-width: 0; }
.dish-media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; background: #F3E7D8; overflow: hidden; cursor: pointer; }
.dish:not(.has-photo) .dish-media { aspect-ratio: 16 / 9; }
.dish-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.dish-media:hover img { transform: scale(1.04); }
.dish-ph { position: absolute; inset: 0; display: grid; place-items: center; color: #B79A7D; background: linear-gradient(160deg, #F8EEDF, #F1E1CB); }
.dish-ph svg { width: 46%; max-width: 64px; height: auto; opacity: .9; }
.dish-ph.veg { color: #4E9C6B; background: linear-gradient(160deg, #EEF7F0, #DDEEE2); }
.dish-ph.nonveg { color: #C9525C; background: linear-gradient(160deg, #FCEFEF, #F6DCDD); }
.dish-ph.egg { color: #C9962F; background: linear-gradient(160deg, #FDF6E4, #F7EBC8); }
.dish-tags { position: absolute; left: 8px; top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; max-width: calc(100% - 16px); }
.dish-diet { display: grid; place-items: center; background: #fff; border-radius: 7px; padding: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); }
.dish-diet .diet-dot { margin: 0; }
.dish .tag-popular { margin: 0; background: #FFF1D6; color: #8A4F00; box-shadow: 0 2px 6px rgba(0, 0, 0, .12); font-size: 10.5px; padding: 3px 8px; border-radius: 7px; }
.dish-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 12px 12px; flex: 1; }
.dish-name { text-align: left; font-family: var(--font-display); font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--ink); padding: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; letter-spacing: -.005em; }
.dish-note { font-size: 12px; line-height: 1.4; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish-sizes, .sheet-sizes { display: flex; background: #F5EDE1; border-radius: 12px; padding: 3px; gap: 2px; }
.dish-sizes button, .sheet-sizes button { flex: 1; padding: 7px 4px; border-radius: 9px; font-size: 12px; font-weight: 600; color: #6B5F54; white-space: nowrap; }
.dish-sizes button span, .sheet-sizes button span { font-weight: 800; }
.dish-sizes button.active, .sheet-sizes button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(33, 26, 21, .14); }
.dish-foot { margin-top: auto; padding-top: 4px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dish-price { font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.dish-action { display: flex; }
.dish-soon { font-size: 12px; color: var(--muted); font-weight: 600; }
.dish .add-btn { background: #fff; color: var(--red); border: 1.5px solid var(--red); border-radius: 999px; padding: 8px 18px; font-weight: 800; font-size: 13px; letter-spacing: .02em; min-height: 36px; transition: background .15s, color .15s; }
.dish .add-btn:hover, .dish .add-btn:active { background: var(--red); color: #fff; }
.dish .qty-stepper, .sheet-qty { display: inline-flex; align-items: center; background: var(--red); color: #fff; border-radius: 999px; overflow: hidden; }
.dish .qty-stepper button, .sheet-qty button { color: #fff; width: 34px; height: 36px; font-size: 18px; font-weight: 700; background: transparent; }
.dish .qty-stepper button:disabled, .sheet-qty button:disabled { opacity: .45; cursor: default; }
.dish .qty-stepper span, .sheet-qty span { min-width: 22px; text-align: center; font-weight: 800; font-size: 14px; }

/* Bestsellers rail */
.dish-rail { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x proximity; margin: 12px -14px 0; padding: 2px 14px 14px; scrollbar-width: none; }
.dish-rail::-webkit-scrollbar { display: none; }
.dish--rail { flex: 0 0 176px; scroll-snap-align: start; }

/* ---------- Dish sheet ---------- */
.sheet-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(20, 12, 8, .58); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 28px 28px 0 0; animation: sheetUp .26s cubic-bezier(.2, .8, .2, 1); padding-bottom: env(safe-area-inset-bottom); }
.sheet-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .95); box-shadow: 0 2px 10px rgba(0, 0, 0, .2); font-size: 15px; font-weight: 700; color: var(--ink); }
.sheet-media { position: relative; aspect-ratio: 4 / 3; background: #F3E7D8; overflow: hidden; border-radius: 28px 28px 0 0; }
.sheet-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sheet-body { padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 10px; }
.sheet-title { display: flex; align-items: center; gap: 10px; }
.sheet-title h2 { font-size: 24px; line-height: 1.15; font-weight: 800; }
.tag-inline { align-self: flex-start; margin: 0; }
.sheet-note { font-size: 14.5px; line-height: 1.55; color: #5E544B; }
.sheet-sizes button { padding: 10px 6px; font-size: 14px; }
.sheet-bar { position: sticky; bottom: 0; display: flex; gap: 12px; align-items: center; padding: 12px 18px 16px; background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 24%); }
.sheet-qty { flex: none; background: var(--red); border-radius: 999px; color: #fff; align-items: center; }
.sheet-qty button { width: 40px; height: 46px; }
.sheet-cta { flex: 1; min-width: 0; white-space: nowrap; background: var(--red); color: #fff; border-radius: 999px; padding: 0 14px; height: 46px; font-weight: 800; font-size: 15px; box-shadow: 0 10px 20px rgba(214, 41, 59, .28); }
.sheet-cta.danger { background: #fff; color: var(--red); border: 1.5px solid var(--red); box-shadow: none; }
.sheet-cta:disabled { background: #D9D2CA; box-shadow: none; cursor: default; }
@keyframes sheetUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Cart bar + bottom nav ---------- */
.cart-bar { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); border-radius: 18px; padding: 14px 18px; background: var(--ink); box-shadow: 0 14px 30px rgba(33, 26, 21, .35); }
.cart-bar-cta { background: var(--red); padding: 9px 16px; border-radius: 999px; font-size: 14px; }
.cart-bar-count { font-weight: 700; font-size: 14px; opacity: 1; }
.mobile-nav { background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--ring); }
.mobile-nav-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mobile-nav-btn small { font-size: 11px; }
.mobile-nav-btn.active { color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { margin: 18px 0 0; padding: 26px max(16px, calc((100vw - var(--wrap)) / 2 + 20px)) 110px; background: var(--ink); color: #E9DFD3; }
.foot-in { display: flex; flex-direction: column; gap: 14px; }
.foot-brand strong { display: block; font-family: var(--font-display); font-size: 22px; color: #fff; }
.foot-brand span { font-size: 13px; color: #B9AB9B; }
.foot-info p { font-size: 13.5px; line-height: 1.55; color: #D4C8BA; margin-bottom: 12px; }
.foot-btns { display: flex; flex-wrap: wrap; gap: 10px; }
.foot-btn { padding: 10px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .22); color: #fff; font-weight: 700; font-size: 13.5px; }
.foot-btn:hover { background: rgba(255, 255, 255, .1); }

/* ---------- Skeleton ---------- */
.skeleton-wrap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 12px 0; }
.skeleton-header { grid-column: 1 / -1; }
.skeleton-card { height: 230px; border-radius: 20px; }
.no-results { padding: 40px 16px; }

/* ---------- Wider screens ---------- */
@media (min-width: 560px) {
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .skeleton-wrap { grid-template-columns: repeat(3, 1fr); }
  .sheet-overlay { align-items: center; }
  .sheet { border-radius: 28px; }
  .sheet-media { border-radius: 28px 28px 0 0; }
}
@media (min-width: 720px) {
  .topbar, .hero-card, .cat-tabs, .menu-list { max-width: none; }
  .hero-card, .closed-banner, .offers-strip { margin-left: max(14px, calc((100vw - var(--wrap)) / 2 + 20px)); margin-right: max(14px, calc((100vw - var(--wrap)) / 2 + 20px)); }
  .offers-strip { padding-left: 0; padding-right: 0; }
  .hero-card { min-height: 300px; padding: 40px 44px; }
  .hero-dots { left: 44px; bottom: 18px; }
  .hero-card.has-art .hero-copy { max-width: 52%; }
  .hero-copy p { font-size: 16px; max-width: 46ch; }
  .art-0 { width: 200px; height: 200px; right: 70px; }
  .art-1 { width: 118px; height: 118px; right: 280px; bottom: 28px; }
  .art-2 { width: 96px; height: 96px; right: 28px; top: 28px; }
  .cart-bar { max-width: 560px; left: 50%; right: auto; width: calc(100% - 28px); transform: translateX(-50%); bottom: 22px; }
}
@media (min-width: 900px) {
  /* header ek hi line mein: brand | search | icons */
  .brand-row { display: contents; }
  .brand { order: 1; }
  .search-wrap { order: 2; flex: 1; width: auto; max-width: 560px; margin: 0 auto; }
  .topbar-actions { order: 3; }

  .shop { max-width: var(--wrap); margin: 0 auto; padding: 8px 20px 0; display: grid; grid-template-columns: 232px minmax(0, 1fr); gap: 28px; align-items: start; }
  .shop-side { display: block; position: sticky; top: calc(var(--topbar-h, 96px) + 16px); margin-top: 16px; background: #fff; border: 1px solid var(--ring); border-radius: 22px; padding: 14px; box-shadow: var(--shadow-card); max-height: calc(100vh - var(--topbar-h, 96px) - 32px); overflow-y: auto; }
  .shop-side .diet-filter { flex-wrap: wrap; padding: 0 0 12px; border-bottom: 1px solid var(--ring); margin-bottom: 8px; }
  .shop-side .diet-chip { padding: 6px 12px; font-size: 12.5px; box-shadow: none; }
  .shop-side .cat-tabs { position: static; display: flex; flex-direction: column; gap: 2px; overflow: visible; padding: 0; background: none; border: 0; backdrop-filter: none; cursor: default; touch-action: auto; }
  .shop-side .cat-tab { text-align: left; border: 0; border-radius: 12px; background: transparent; padding: 10px 12px; font-size: 14px; white-space: normal; }
  .shop-side .cat-tab:hover { background: #F6EFE5; }
  .shop-side .cat-tab.active { background: #FDECEE; color: var(--red-dark); }
  .menu-list { padding: 0 0 24px; }
  .menu-section { margin-top: 24px; scroll-margin-top: calc(var(--topbar-h, 96px) + 16px); }
  .dish-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .dish-rail { margin-left: 0; margin-right: 0; padding-left: 0; }
  .dish--rail { flex-basis: 220px; }
  .dish-name { font-size: 16.5px; }
}
@media (min-width: 1200px) {
  .dish-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .sheet, .sheet-overlay { animation: none; }
  .dish-media img { transition: none; }
  html { scroll-behavior: auto; }
}
