:root {
  --saffron: #F5C24D;
  --deep: #151A33;
  --cream: #F4F5FB;
  --gold: #FFD36A;
  --rust: #C85E42;
  --sage: #5264A4;
  --muted: #5B648B;
  --white: #ffffff;
  --bg: #EEF1FB;
  --surface: #FFFFFF;
  --surface-soft: #E5E9F8;
  --line: #D6DCEE;
  --line-strong: #BCC6E2;
  --overlay: rgba(21, 26, 51, 0.36);
  --hero-a: rgba(82, 100, 164, 0.22);
  --hero-b: rgba(245, 194, 77, 0.25);
  --shadow: 0 10px 30px rgba(21, 26, 51, 0.1);
}

:root[data-theme="heritage-warm"] {
  --saffron: #F4842A;
  --deep: #1A0A00;
  --cream: #FDF6EC;
  --gold: #D4A853;
  --rust: #C0441F;
  --sage: #4A6741;
  --muted: #8B7355;
  --bg: #FDF6EC;
  --surface: #FFFFFF;
  --surface-soft: #FFF9F2;
  --line: #EFE1D0;
  --line-strong: #E9DBC8;
  --overlay: rgba(26, 10, 0, 0.25);
  --hero-a: rgba(244, 132, 42, 0.2);
  --hero-b: rgba(212, 168, 83, 0.25);
  --shadow: 0 10px 30px rgba(26, 10, 0, 0.08);
}

:root[data-theme="vaisakhi-vibrance"] {
  --saffron: #F9A825;
  --deep: #1B5E20;
  --cream: #FFFDF3;
  --gold: #FBC02D;
  --rust: #D84315;
  --sage: #2E7D32;
  --muted: #6D4C41;
  --bg: #FFF8E1;
  --surface: #FFFFFF;
  --surface-soft: #FFF3CD;
  --line: #F1D99A;
  --line-strong: #E9C46A;
  --overlay: rgba(27, 94, 32, 0.3);
  --hero-a: rgba(249, 168, 37, 0.24);
  --hero-b: rgba(46, 125, 50, 0.18);
  --shadow: 0 10px 30px rgba(109, 76, 65, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--deep);
  font-family: "DM Sans", sans-serif;
}

a {
  color: inherit;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 20px;
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  margin: 0;
}

.top-banner {
  background: var(--saffron);
  color: var(--deep);
  font-weight: 700;
  padding: 10px 0;
  text-align: center;
  font-size: 14px;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 64px;
  background: var(--deep);
  color: var(--cream);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 38%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
  display: block;
}

.brand-name {
  font-family: "Bebas Neue", sans-serif;
  color: var(--saffron);
  font-size: 24px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  color: var(--cream);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 10px;
}

.cart-pill {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: var(--saffron);
  color: var(--deep);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.hero {
  display: grid;
  gap: 20px;
  padding-top: 34px;
  padding-bottom: 20px;
}

.hero-copy h1 {
  font-size: clamp(34px, 7vw, 64px);
  line-height: 1.05;
  margin-bottom: 10px;
}

.eyebrow {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-copy p {
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
}

.btn-primary,
.btn-deep,
button {
  border-radius: 4px;
  font-family: "DM Sans", sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  border: 0;
  padding: 12px 18px;
  background: var(--saffron);
  color: var(--deep);
}

.btn-primary:hover {
  background: var(--gold);
}

.btn-deep {
  border: 0;
  padding: 12px 18px;
  background: var(--deep);
  color: var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-tile {
  background: linear-gradient(150deg, var(--hero-a), var(--hero-b));
  border-radius: 8px;
  min-height: 110px;
  display: grid;
  place-items: center;
  font-family: "Playfair Display", serif;
}

.trust-bar {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.trust-list {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.products-section {
  padding-top: 24px;
  padding-bottom: 44px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.section-head select {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  padding: 10px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.product-card {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.product-card:hover {
  transform: translateY(-6px);
}

.product-image-wrap {
  width: 100%;
  aspect-ratio: 4 / 5;
  background: var(--surface-soft);
}

.product-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content {
  padding: 14px;
}

.product-content h3 {
  margin-bottom: 7px;
  font-size: 23px;
}

.meta {
  color: var(--muted);
  font-size: 14px;
}

.product-tag {
  text-transform: uppercase;
  color: var(--saffron);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.price-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.stock-pill {
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: var(--surface-soft);
}

.stock-pill.low {
  background: rgba(192, 68, 31, 0.14);
  color: var(--rust);
}

.badge-new {
  background: rgba(74, 103, 65, 0.15);
  color: var(--sage);
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  margin-left: 6px;
}

.cart-drawer {
  position: fixed;
  inset: 0;
  display: none;
  background: var(--overlay);
  z-index: 35;
}

.cart-drawer.show {
  display: block;
}

.cart-drawer-inner {
  margin-left: auto;
  width: min(400px, 100%);
  height: 100%;
  background: var(--surface);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-drawer-header {
  padding: 14px 18px;
  background: var(--deep);
  color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-drawer-header button {
  background: transparent;
  color: var(--cream);
  border: 0;
  font-size: 24px;
}

.cart-items-scroll {
  overflow: auto;
  padding: 14px;
}

.cart-item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.qty-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-row button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

.cart-footer {
  border-top: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 10px;
}

.discount-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.discount-row input {
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px;
}

.discount-row button {
  border: 0;
  background: var(--saffron);
  padding: 10px 12px;
}

.totals-row {
  display: flex;
  justify-content: space-between;
}

.product-dialog {
  border: 0;
  border-radius: 8px;
  max-width: 780px;
  width: calc(100% - 28px);
  padding: 0;
}

.product-dialog::backdrop {
  background: var(--overlay);
}

.product-modal {
  background: var(--surface);
  padding: 16px;
}

.product-modal-grid {
  display: grid;
  gap: 16px;
}

.product-modal img {
  width: 100%;
  border-radius: 8px;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.site-footer {
  background: var(--deep);
  color: var(--cream);
  padding: 24px 0;
}

.text-rust {
  color: var(--rust);
  font-weight: 700;
}

.page-pad {
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--cream);
  font-weight: 600;
}

.footer-logo {
  height: 34px;
  width: auto;
  display: block;
  opacity: 0.9;
}

@media (max-width: 560px) {
  .brand-name {
    font-size: 20px;
  }
}

.pwa-status {
  position: fixed;
  left: 12px;
  bottom: 12px;
  margin: 0;
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow);
  font-size: 11px;
  color: var(--muted);
  padding: 5px 10px;
  z-index: 50;
}

.admin-shell {
  padding-top: 24px;
  padding-bottom: 36px;
  display: grid;
  gap: 16px;
}

.card {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

label {
  display: block;
  font-size: 14px;
  color: var(--muted);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  padding: 10px;
  margin-top: 4px;
  margin-bottom: 8px;
  font-family: "DM Sans", sans-serif;
}

textarea {
  min-height: 86px;
}

.grid-2,
.grid-3,
.grid-4 {
  display: grid;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: var(--surface-soft);
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-actions button {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 6px 10px;
}

@media (min-width: 760px) {
  .hero {
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    padding-top: 44px;
  }

  .trust-list {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .product-modal-grid {
    grid-template-columns: 1fr 1fr;
  }
}
