:root {
  --primary: #e63946;
  --primary-dark: #b82430;
  --bg: #fff8f0;
  --surface: #ffffff;
  --surface-soft: #fff1e4;
  --text: #2f2a28;
  --muted: #776b65;
  --border: #edd8c7;
  --accent: #0f766e;
  --shadow: 0 14px 34px rgba(69, 41, 31, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 16px;
  background: rgba(255, 248, 240, 0.96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0;
}

.logo-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #ffffff;
  background: var(--primary);
  border-radius: 50%;
  font-size: 0.9rem;
}

.cart-button,
.primary-button,
.secondary-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 800;
}

.cart-button,
.primary-button {
  color: #ffffff;
  background: var(--primary);
}

.cart-button:hover,
.primary-button:hover {
  background: var(--primary-dark);
}

.cart-button:disabled,
.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button,
.link-button {
  color: var(--primary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
}

.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  color: var(--primary);
  background: #ffffff;
  border-radius: 999px;
  font-size: 0.8rem;
}

.page {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.collection-heading,
.checkout-heading,
.success-box {
  margin: 18px 0 20px;
}

.collection-heading h1,
.checkout-heading h1,
.success-box h1 {
  margin: 0 0 8px;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.12;
}

.collection-heading p,
.checkout-heading p,
.success-box p {
  margin: 0;
  color: var(--muted);
}

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

.product-card {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(69, 41, 31, 0.07);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-soft);
}

.product-card-info {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.product-card-info h2 {
  min-height: 42px;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.25;
}

.price {
  color: var(--primary);
  font-weight: 900;
}

.product-detail {
  display: grid;
  gap: 22px;
  margin-top: 18px;
}

.product-media img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.product-copy {
  display: grid;
  align-content: start;
  gap: 16px;
}

.product-copy h1 {
  margin: 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.1;
}

.product-copy p {
  margin: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.13);
}

.cart-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  visibility: hidden;
  background: rgba(47, 42, 40, 0.38);
  opacity: 0;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.cart-overlay.is-open {
  visibility: visible;
  opacity: 1;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 40;
  display: grid;
  grid-template-rows: auto 1fr auto;
  width: min(420px, 92vw);
  height: 100vh;
  background: var(--surface);
  box-shadow: -18px 0 36px rgba(47, 42, 40, 0.2);
  transform: translateX(100%);
  transition: transform 220ms ease;
}

.cart-drawer.is-open {
  transform: translateX(0);
}

.cart-header,
.cart-footer {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cart-header h2 {
  margin: 0;
  font-size: 1.1rem;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

.cart-item,
.summary-item {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img,
.summary-item img {
  width: 74px;
  height: 74px;
  object-fit: cover;
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.cart-item h4,
.summary-item h3 {
  margin: 0 0 4px;
  font-size: 0.95rem;
  line-height: 1.25;
}

.cart-item p,
.summary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.cart-item-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.qty-controls {
  display: inline-grid;
  grid-template-columns: 32px 34px 32px;
  align-items: center;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.qty-controls button {
  width: 32px;
  height: 32px;
  border: 0;
  background: var(--surface-soft);
  font-weight: 900;
}

.qty-controls span {
  text-align: center;
  font-weight: 800;
}

.remove-btn {
  padding: 0;
  color: var(--primary);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 1.05rem;
  font-weight: 900;
}

.cart-footer {
  border-top: 1px solid var(--border);
  border-bottom: 0;
}

.cart-footer .primary-button {
  width: 100%;
}

.empty-cart {
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

.checkout-layout {
  display: grid;
  gap: 18px;
}

.checkout-panel,
.payment-panel,
.delivery-panel,
.success-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(69, 41, 31, 0.06);
}

.checkout-panel,
.payment-panel,
.delivery-panel {
  padding: 16px;
}

.checkout-panel h2,
.payment-panel h2,
.delivery-panel h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.coupon-row {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.totals {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.totals div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.grand-total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  color: var(--primary);
  font-size: 1.12rem;
}

.payment-box {
  display: grid;
  gap: 16px;
}

.payment-box img,
.payment-box canvas {
  width: 220px;
  height: 220px;
  padding: 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.qr-error {
  background: var(--surface-soft);
}

.upi-detail {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.upi-detail strong {
  color: var(--text);
}

.checkout-form {
  display: grid;
  gap: 14px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.form-message.error {
  color: var(--primary);
}

.form-message.success {
  color: var(--accent);
}

.success-page {
  display: grid;
  min-height: calc(100vh - 64px);
  place-items: center;
  padding: 20px 16px;
}

.success-box {
  width: min(560px, 100%);
  padding: 24px;
  text-align: center;
}

.success-order {
  display: inline-flex;
  margin: 14px 0 18px;
  padding: 8px 12px;
  color: var(--primary);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 900;
}

.notice-box {
  padding: 12px 14px;
  color: #5c372f;
  background: #fff1e4;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-weight: 700;
}

.site-footer {
  display: grid;
  gap: 14px;
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 22px 16px 30px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}

.site-footer strong {
  display: block;
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 1.05rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.site-footer a {
  color: var(--text);
  font-weight: 800;
}

.policy-content {
  display: grid;
  gap: 16px;
  width: min(820px, 100%);
  margin: 0 auto;
}

.policy-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(69, 41, 31, 0.06);
}

.policy-card h1,
.policy-card h2 {
  margin: 0 0 10px;
}

.policy-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.policy-card ul {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.image-fallback {
  background:
    linear-gradient(135deg, rgba(230, 57, 70, 0.18), rgba(15, 118, 110, 0.12)),
    var(--surface-soft);
}

@media (min-width: 720px) {
  .site-header {
    padding: 12px 28px;
  }

  .page {
    padding: 28px 28px 64px;
  }

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

  .product-detail {
    grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
    align-items: start;
  }

  .coupon-row {
    grid-template-columns: 1fr auto;
  }

  .payment-box {
    grid-template-columns: auto 1fr;
    align-items: center;
  }

  .site-footer {
    grid-template-columns: 1fr auto;
    align-items: start;
    padding: 26px 28px 34px;
  }
}
