:root {
  --bg: #0d0d0d;
  --surface: #171717;
  --surface-soft: #1e1e1e;
  --panel: rgba(23, 23, 23, 0.96);
  --primary: #ef4444;
  --primary-2: #f97316;
  --text: #f5f5f5;
  --muted: #c4c4c4;
  --success: #4ade80;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  background: linear-gradient(180deg, #090909 0%, #121212 100%);
  color: var(--text);
}

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

button,
input {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 140px;
}

.card {
  background: rgba(25, 25, 25, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 16px 10px;
  backdrop-filter: blur(10px);
  background: rgba(12, 12, 12, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  font-weight: 800;
  color: white;
}

.eyebrow {
  margin: 0;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow.accent {
  color: #ffb38a;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.topbar h1 {
  font-size: 1.1rem;
}

.status-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px rgba(74, 222, 128, 0.6);
}

.page {
  padding: 16px;
}

.hero {
  display: grid;
  gap: 18px;
  padding: 20px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(249, 115, 22, 0.12));
}

.hero-copy h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin: 10px 0 12px;
  line-height: 1.05;
}

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

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
}

.primary-btn,
.secondary-btn,
.add-cart-btn,
.qty-btn,
.remove-btn,
.close-cart,
.category-pill {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.primary-btn, .add-cart-btn, .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  font-weight: 700;
  text-decoration: none;
}

.primary-btn, .add-cart-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: white;
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.full-width {
  width: 100%;
}

.business-hours {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  color: #ffd8b0;
  font-size: 0.8rem;
}

.hero-image {
  min-height: 200px;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(45deg, rgba(239, 68, 68, 0.5), rgba(249, 115, 22, 0.18)), url('https://images.unsplash.com/photo-1559847844-5315695dadae?auto=format&fit=crop&w=900&q=80') center/cover;
}

.hero-badge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 2rem;
}

.promo-strip {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.promo-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
}

.promo-card img {
  width: 86px;
  height: 86px;
  object-fit: cover;
  border-radius: 16px;
}

.promo-copy {
  flex: 1;
}

.promo-copy h3 {
  margin: 8px 0 6px;
}

.promo-copy p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px 16px 16px;
}

.section-header h3 {
  font-size: 1.4rem;
}

.section-header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.category-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 0 16px 10px;
  scrollbar-width: none;
}

.category-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 10px 14px;
  white-space: nowrap;
  font-weight: 600;
}

.category-pill.active {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.14), rgba(249, 115, 22, 0.2));
  border: 1px solid rgba(249, 115, 22, 0.5);
}

.products-grid {
  display: grid;
  gap: 14px;
  padding: 0 16px;
}

.product-card {
  overflow: hidden;
}

.product-card.is-soldout {
  opacity: 0.74;
}

.product-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  background: #1d1d1d;
}

.product-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 170px;
  background: linear-gradient(135deg, #2c2c2c, #171717);
  color: var(--muted);
}

.product-body {
  padding: 15px;
}

.badge-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.soldout-tag,
.featured-tag {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.soldout-tag {
  background: rgba(239, 68, 68, 0.14);
  color: #ff9f9f;
}

.featured-tag {
  background: rgba(245, 158, 11, 0.14);
  color: #f7c868;
}

.product-body h4 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.product-body p {
  color: var(--muted);
  line-height: 1.5;
  min-height: 48px;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 14px 0 16px;
}

.product-meta strong {
  font-size: 1.05rem;
}

.status-on,
.status-off {
  font-size: 0.7rem;
  font-weight: 700;
}

.status-on {
  color: var(--success);
}

.status-off {
  color: #ffb0a1;
}

.add-cart-btn:disabled {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  cursor: not-allowed;
}

.cart-fab {
  position: fixed;
  right: 16px;
  bottom: 18px;
  width: min(340px, calc(100vw - 32px));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  z-index: 30;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.9), rgba(249, 115, 22, 0.85));
  color: white;
  box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
}

.cart-fab__summary,
.cart-fab__price {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cart-fab__summary strong,
.cart-fab__price strong {
  font-size: 1.2rem;
}

.cart-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cart-panel {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  padding: 18px 16px 120px;
  background: rgba(11, 11, 11, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.4);
  max-height: 82vh;
  overflow: auto;
  transform: translateY(0);
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.cart-panel.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(110%);
}

.cart-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.close-cart {
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.4rem;
}

.cart-items {
  display: grid;
  gap: 14px;
}

.cart-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.cart-item__controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.cart-item__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.remove-btn {
  padding: 6px 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffadad;
}

.empty-cart {
  color: var(--muted);
  padding: 24px 0;
}

.order-form {
  margin-top: 18px;
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 8px;
}

.form-group label {
  font-weight: 600;
}

.form-group input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 12px;
  padding: 12px 14px;
}

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

.location-status {
  color: var(--muted);
  font-size: 0.8rem;
}

.location-status.ok {
  color: var(--success);
}

.totals-box {
  display: grid;
  gap: 10px;
  padding: 16px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.total-row.muted {
  color: var(--muted);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 98px;
  transform: translateX(-50%) translateY(20px);
  opacity: 0;
  background: rgba(17, 17, 17, 0.95);
  color: white;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.8rem;
  transition: all 0.2s ease;
  z-index: 60;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (min-width: 768px) {
  .page {
    max-width: 1100px;
    margin: 0 auto;
  }

  .hero {
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    padding: 26px;
  }

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

  .cart-panel {
    left: auto;
    right: 16px;
    width: min(440px, calc(100vw - 32px));
    border-radius: 22px 22px 0 0;
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
