:root {
  --orange: #ee4d2d;
  --orange-dark: #d94123;
  --orange-soft: #ff7b55;
  --gold: #ffcc66;
  --cream: #fff5f1;
  --sand: #ffefe6;
  --ink: #2b2b2b;
  --muted: #6a6a6a;
  --line: #f3d8cb;
  --card: #ffffff;
  --shadow: 0 14px 36px rgba(238, 77, 45, 0.16);
  --shadow-soft: 0 10px 24px rgba(32, 20, 14, 0.08);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "SF Pro Rounded", "Segoe UI Variable", "Segoe UI", "Noto Sans Thai", "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(255, 187, 154, 0.55), transparent 60%),
    radial-gradient(900px 380px at 90% 10%, rgba(255, 142, 94, 0.45), transparent 62%),
    linear-gradient(180deg, #fff6f1 0%, #fff1ea 40%, #f8e1d6 100%);
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -220px;
  left: -160px;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(255, 165, 120, 0.35) 0%, rgba(255, 165, 120, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  bottom: -260px;
  right: -180px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, rgba(255, 203, 167, 0.35) 0%, rgba(255, 203, 167, 0) 70%);
  z-index: -1;
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

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

button,
input,
textarea {
  font-family: inherit;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px 48px;
  background: linear-gradient(135deg, var(--orange), #ff6a3a 60%, #ff8355);
  color: white;
  position: sticky;
  top: 0;
  z-index: 10;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 46px;
  height: 46px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.brand-slogan {
  font-size: 13px;
  opacity: 0.9;
}

.search {
  display: flex;
  gap: 12px;
  background: white;
  border-radius: 999px;
  padding: 8px 14px;
  align-items: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.search:focus-within {
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.2), 0 8px 18px rgba(0, 0, 0, 0.08);
}

.search input {
  border: none;
  outline: none;
  flex: 1;
  font-size: 14px;
  background: transparent;
}

.search-btn {
  border: none;
  background: linear-gradient(135deg, var(--orange-dark), var(--orange));
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.top-actions {
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  align-items: center;
  font-size: 14px;
}

.nav-link {
  font-weight: 600;
  opacity: 0.95;
}

.nav-link:hover {
  opacity: 1;
}

.cart-pill {
  background: rgba(255, 255, 255, 0.18);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}

.cart-count {
  background: white;
  color: var(--orange-dark);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 12px;
}

.subnav {
  display: flex;
  gap: 12px;
  padding: 12px 48px;
  background: rgba(255, 246, 240, 0.92);
  border-bottom: 1px solid var(--line);
}

.chip {
  padding: 8px 16px;
  border-radius: 999px;
  background: white;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.content {
  padding: 36px 48px 70px;
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
  align-items: center;
  background: linear-gradient(120deg, #fff4ef, #ffe1d3 70%, #ffd3bd);
  border-radius: 28px;
  padding: 36px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.7s ease both;
}

.hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--orange-dark);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.3px;
}

.badge.gold {
  background: #ffe7b3;
  color: #a96300;
}

.hero-text h1 {
  margin: 16px 0 12px;
  font-size: 34px;
  line-height: 1.2;
}

.hero-text p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 16px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card {
  background: white;
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 16px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f5d8ca;
}

.hero-image {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  animation: float 6s ease-in-out infinite;
}

.hero-title {
  font-weight: 700;
  font-size: 18px;
}

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

.hero-price {
  font-size: 26px;
  font-weight: 700;
  color: var(--orange);
}

.category-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 26px 0;
}

.category {
  background: white;
  padding: 14px 18px;
  border-radius: 16px;
  text-align: center;
  font-weight: 600;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f6e0d6;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.product-section {
  display: grid;
  gap: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
}

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

.rating-pill {
  background: var(--cream);
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--orange-dark);
  border: 1px solid #f2d7cb;
}

.product-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.product-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border: 1px solid #f5d8ca;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  animation: rise 0.8s ease both;
}

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

.product-card.light {
  grid-template-columns: 1fr;
  padding: 24px;
  gap: 16px;
}

.product-media {
  background: radial-gradient(circle at top, #fff8f3, #ffe4d6);
  padding: 24px;
  position: relative;
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(238, 77, 45, 0.18));
}

.tag-fast {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--orange);
  color: white;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 6px 14px rgba(238, 77, 45, 0.25);
}

.product-body {
  padding: 24px;
  display: grid;
  gap: 12px;
}

.product-title {
  font-size: 20px;
  font-weight: 700;
}

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

.product-rating {
  font-size: 14px;
  color: #ffb23e;
  font-weight: 700;
}

.product-rating span {
  color: var(--muted);
  font-weight: 600;
}

.product-price {
  font-size: 24px;
  color: var(--orange);
  font-weight: 700;
}

.sweetness-form {
  display: grid;
  gap: 12px;
  background: #fff7f2;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid #f5d8ca;
}

.form-title {
  font-weight: 700;
}

.radio-group {
  display: grid;
  gap: 10px;
}

.radio {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14px;
  background: white;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid #f2d4c7;
}

.radio input {
  accent-color: var(--orange);
}

.button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--orange), var(--orange-soft));
  color: white;
  box-shadow: 0 10px 18px rgba(238, 77, 45, 0.25);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 22px rgba(238, 77, 45, 0.3);
}

.btn.secondary {
  background: #fff1ea;
  color: var(--orange-dark);
  border: 1px solid #f1cdbf;
}

.btn.secondary:hover {
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
  color: var(--orange-dark);
  border: 1px solid rgba(238, 77, 45, 0.35);
}

.btn.ghost:hover {
  background: rgba(238, 77, 45, 0.08);
}

.btn.full {
  width: 100%;
}

.form-status {
  font-size: 13px;
  color: var(--muted);
}

.promo-title {
  font-size: 20px;
  font-weight: 700;
}

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

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

.promo-item {
  background: #fff4ef;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #f3d7cc;
}

.promo-label {
  font-size: 12px;
  color: var(--muted);
}

.promo-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--orange-dark);
}

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

.page-title {
  font-size: 26px;
  font-weight: 700;
}

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

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 14px;
  border: 1px solid #f4d7cb;
  animation: rise 0.7s ease both;
}

.card-title {
  font-size: 18px;
  font-weight: 700;
}

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

.order-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
}

.order-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
}

.note {
  font-size: 13px;
  color: var(--muted);
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.field input {
  border: 1px solid #f0d8cc;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  background: white;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: rgba(238, 77, 45, 0.6);
  box-shadow: 0 0 0 3px rgba(238, 77, 45, 0.12);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-error {
  color: #b4271f;
  font-size: 14px;
  min-height: 20px;
}

.rewards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.list-title {
  font-weight: 700;
  font-size: 14px;
}

.receipt-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.receipt-list li {
  background: #fff7f2;
  border-radius: 12px;
  padding: 10px 12px;
  font-family: "SF Mono", "Segoe UI", "Noto Sans Thai", monospace;
  font-size: 13px;
  border: 1px solid #f0d7cc;
}

.vip-status-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  align-items: center;
}

.vip-value {
  font-weight: 700;
  color: var(--orange-dark);
}

.vip-phone {
  font-size: 13px;
  color: var(--muted);
}

.vip-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  background: linear-gradient(120deg, #fff3da, #ffe2c2);
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  animation: rise 0.8s ease both;
}

.vip-card {
  background: white;
  border-radius: 20px;
  padding: 20px;
  display: grid;
  gap: 18px;
  box-shadow: var(--shadow-soft);
  border: 1px solid #f4d7cb;
}

.vip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vip-card-title {
  font-size: 18px;
  font-weight: 700;
}

.vip-card-subtitle {
  font-size: 13px;
  color: var(--muted);
}

.vip-chip {
  background: #fff0c7;
  color: #a35a00;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.vip-card-body {
  display: grid;
  gap: 14px;
}

.vip-flag {
  background: linear-gradient(120deg, #fff3ea, #ffe2d3);
  padding: 16px;
  border-radius: 16px;
  font-family: "SF Mono", "Segoe UI", "Noto Sans Thai", monospace;
  font-weight: 700;
  text-align: center;
  color: var(--orange-dark);
  border: 1px solid #f2d7cb;
}

.vip-perks {
  display: grid;
  gap: 10px;
}

.perk {
  background: #fff4ef;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid #f2d6cb;
}

.vip-deals {
  margin-top: 32px;
  display: grid;
  gap: 16px;
}

.vip-deal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.deal-card {
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 8px;
  border: 1px solid #f4d7cb;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.deal-title {
  font-weight: 700;
}

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

.deal-price {
  font-size: 18px;
  color: var(--orange);
  font-weight: 700;
}

.footer {
  background: linear-gradient(180deg, #fff6f0, #fff1ea);
  padding: 32px 48px;
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.footer-title {
  font-weight: 700;
  margin-bottom: 8px;
}

.footer-text {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.footer-bottom {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.loading {
  opacity: 0.7;
  pointer-events: none;
  filter: saturate(0.8);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
  }

  .search {
    order: 3;
  }

  .top-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero {
    grid-template-columns: 1fr;
  }

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

  .checkout-grid,
  .rewards-grid,
  .vip-hero {
    grid-template-columns: 1fr;
  }

  .vip-deal-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    padding: 16px 20px;
  }

  .subnav {
    padding: 12px 20px;
    flex-wrap: wrap;
  }

  .content {
    padding: 24px 20px 40px;
  }

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

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

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

  .footer {
    padding: 24px 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}
