/* AR Traders — Mobile-first fabric shop */

:root {
  --bg: #faf7f2;
  --bg-dark: #1a1410;
  --surface: #ffffff;
  --text: #1a1410;
  --text-muted: #6b5e54;
  --accent: #b8860b;
  --accent-light: #d4a843;
  --accent-dark: #8b6914;
  --border: #e8e0d4;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(26, 20, 16, 0.08);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
  --bottom-nav-h: 64px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

.app {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  background: var(--bg);
}

.desktop-nav {
  display: none;
}

.desktop-only-logo {
  display: none;
}

.mobile-only {
  display: block;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top, 0px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 16px;
  max-width: 1280px;
  margin: 0 auto;
  gap: 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--bg-dark);
  color: var(--accent-light);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  border-radius: 8px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.menu-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.menu-btn span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.cart-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 0;
  min-width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  border-radius: 9px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.back-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  text-decoration: none;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
}

.header-spacer {
  width: 40px;
}

/* Side Menu */
.side-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  pointer-events: none;
}

.side-menu.open {
  pointer-events: auto;
}

.side-menu-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s;
}

.side-menu.open .side-menu-overlay {
  opacity: 1;
}

.side-menu-panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-dark);
  color: #fff;
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px 24px;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.side-menu.open .side-menu-panel {
  transform: translateX(0);
}

.side-menu-header {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 32px;
  color: var(--accent-light);
}

.side-link {
  display: block;
  padding: 14px 0;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-size: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-link.active {
  color: var(--accent-light);
}

.side-contact {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.side-contact p {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.side-contact a {
  color: var(--accent-light);
  text-decoration: none;
  font-weight: 500;
}

/* Hero */
.hero {
  position: relative;
  padding: 32px 20px 40px;
  overflow: hidden;
  min-height: 280px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, var(--bg-dark) 0%, #2a2018 50%, var(--bg-dark) 100%);
  opacity: 0.92;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 8px,
    rgba(184, 134, 11, 0.06) 8px,
    rgba(184, 134, 11, 0.06) 16px
  );
}

.hero-image {
  display: none;
}

.hero-content {
  position: relative;
  color: #fff;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-light);
  margin-bottom: 12px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 12px;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent-light);
}

.hero-desc {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 24px;
  max-width: 280px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.15s, opacity 0.15s;
  touch-action: manipulation;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(184, 134, 11, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.8rem;
}

.btn-full {
  width: 100%;
}

.btn-lg {
  padding: 16px 24px;
  font-size: 1rem;
}

/* Sections */
.section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
}

.categories {
  padding: 24px 0 8px;
}

.categories .section-title {
  padding: 0 20px;
  margin-bottom: 18px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 20px 20px;
}

.category-card {
  position: relative;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4 / 5;
  min-height: 200px;
  background: var(--bg-dark);
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:active {
  transform: scale(0.98);
}

.category-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.category-card:hover img {
  transform: scale(1.06);
}

.category-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 20, 16, 0.85) 0%, rgba(26, 20, 16, 0.2) 55%, transparent 100%);
  pointer-events: none;
}

.category-card-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #fff;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.category-card.active {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.category-card.active .category-card-name {
  color: var(--accent-light);
}

.category-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 20px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  text-transform: capitalize;
  transition: all 0.2s;
}

.cat-chip.active {
  background: var(--bg-dark);
  color: #fff;
  border-color: var(--bg-dark);
}

/* Products */
.products {
  padding: 16px 20px 100px;
}

.products-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}

.product-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.product-thumb {
  height: 220px;
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.product-cat {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(255, 255, 255, 0.9);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.product-info {
  padding: 12px;
}

.product-info h3 {
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-weight: 600;
  color: var(--accent-dark);
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.product-price span {
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.product-actions {
  display: flex;
  gap: 6px;
}

.product-actions .btn {
  flex: 1;
  padding: 7px 6px;
  font-size: 0.72rem;
}

/* About */
.about {
  padding: 0 20px 100px;
}

.about-card {
  background: var(--bg-dark);
  color: #fff;
  border-radius: var(--radius);
  padding: 28px 24px;
}

.about-card h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 12px;
  color: var(--accent-light);
}

.about-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 24px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.about-stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--accent-light);
}

.about-stats span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.5);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  pointer-events: none;
}

.modal.open {
  pointer-events: auto;
}

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.open .modal-overlay {
  opacity: 1;
}

.modal-sheet {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border-radius: 20px 20px 0 0;
  max-height: 85dvh;
  overflow-y: auto;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: calc(var(--safe-bottom) + 16px);
}

.modal.open .modal-sheet {
  transform: translateX(-50%) translateY(0);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 1;
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: var(--text);
}

.modal-image {
  height: 340px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.modal-body {
  padding: 20px;
}

.modal-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.modal-body h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 4px 0 8px;
}

.modal-price {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin-bottom: 12px;
}

.modal-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.qty-row label {
  display: block;
  font-size: 0.85rem;
  margin-bottom: 8px;
  color: var(--text-muted);
}

.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 20px;
  width: fit-content;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.qty-control button {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg);
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--text);
}

.qty-control input {
  width: 56px;
  height: 44px;
  border: none;
  border-left: 1.5px solid var(--border);
  border-right: 1.5px solid var(--border);
  text-align: center;
  font-family: var(--font-body);
  font-size: 1rem;
  -moz-appearance: textfield;
}

.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.modal-body .btn {
  margin-bottom: 10px;
}

/* Toast */
.toast {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 16px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg-dark);
  color: #fff;
  padding: 12px 24px;
  border-radius: 24px;
  font-size: 0.9rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s;
  z-index: 400;
  white-space: nowrap;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Bottom Nav */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1280px;
  height: calc(var(--bottom-nav-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 90;
}

.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.65rem;
}

.bottom-nav-item.active {
  color: var(--accent-dark);
}

.bottom-nav-item svg {
  opacity: 0.7;
}

.bottom-nav-item.active svg {
  opacity: 1;
  stroke: var(--accent);
}

/* Cart Page */
.cart-page {
  padding: 16px 20px calc(var(--bottom-nav-h) + var(--safe-bottom) + 24px);
  min-height: calc(100dvh - var(--header-h));
  max-width: 1280px;
  margin: 0 auto;
}

.cart-layout {
  display: block;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.cart-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px;
  border: 1px solid var(--border);
  align-items: center;
}

.cart-item-thumb {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-details h3 {
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-item-right {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.cart-item-right strong {
  font-size: 0.95rem;
  color: var(--accent-dark);
}

.remove-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
}

.cart-summary {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.summary-row.total {
  border-top: 1.5px solid var(--border);
  margin-top: 8px;
  padding-top: 16px;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.cart-summary .btn {
  margin-top: 12px;
}

.empty-cart {
  text-align: center;
  padding: 60px 20px;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

.empty-cart h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.empty-cart p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

/* Checkout */
.checkout-page {
  padding: 16px 20px calc(var(--safe-bottom) + 32px);
  min-height: calc(100dvh - var(--header-h));
  max-width: 720px;
  margin: 0 auto;
}

.checkout-section {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
}

.checkout-section h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

.order-items {
  margin-bottom: 12px;
}

.order-line {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.order-line:last-child {
  border-bottom: none;
}

.order-total {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1.5px solid var(--border);
  font-size: 1.1rem;
}

.order-total strong {
  color: var(--accent-dark);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--bg);
  color: var(--text);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.checkout-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
}

.checkout-note a {
  color: var(--accent-dark);
  text-decoration: underline;
}

.order-success {
  text-align: center;
  padding: 48px 20px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #2d8a4e, #1e6b3a);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 20px;
}

.order-success h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.order-success p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.order-id {
  margin: 16px 0 24px !important;
}

.order-id strong {
  color: var(--accent-dark);
}

/* Legal pages */
.legal-page {
  padding: 20px 20px 32px;
  max-width: 720px;
  margin: 0 auto;
  min-height: calc(100dvh - var(--header-h) - 80px);
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.legal-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.legal-section h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 12px;
  color: var(--text);
}

.legal-section p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  line-height: 1.65;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 0 0 12px 18px;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-section li {
  margin-bottom: 6px;
}

.legal-section a {
  color: var(--accent-dark);
  text-decoration: none;
}

.legal-contact {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px;
}

.legal-contact p {
  margin-bottom: 6px;
}

.legal-back-btn {
  margin-top: 8px;
  margin-bottom: 24px;
}

.site-footer {
  text-align: center;
  padding: 20px 20px calc(var(--safe-bottom) + 24px);
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--accent-dark);
  text-decoration: none;
  font-weight: 500;
}

.site-footer span {
  margin: 0 8px;
  color: var(--border);
}

.site-footer p {
  margin-top: 10px;
  font-size: 0.75rem;
}

.index-footer {
  padding-bottom: calc(var(--bottom-nav-h) + var(--safe-bottom) + 20px);
}

/* Tablet */
@media (min-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
  }

  .category-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 0 32px 24px;
  }

  .category-card {
    aspect-ratio: 3 / 4;
    min-height: 240px;
  }

  .category-card-name {
    font-size: 1.5rem;
    padding: 20px 16px;
  }

  .product-thumb {
    height: 260px;
  }

  .hero {
    padding: 48px 32px 56px;
  }

  .hero h1 {
    font-size: 2.8rem;
  }

  .categories,
  .products,
  .about {
    padding-left: 32px;
    padding-right: 32px;
  }
}

/* Desktop */
@media (min-width: 900px) {
  :root {
    --header-h: 64px;
  }

  body {
    background: #ebe6de;
  }

  .app {
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.08);
  }

  .menu-btn {
    display: none;
  }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: center;
  }

  .desktop-nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
  }

  .desktop-nav-link:hover,
  .desktop-nav-link.active {
    color: var(--accent-dark);
    background: rgba(184, 134, 11, 0.1);
  }

  .desktop-nav-phone {
    margin-left: 12px;
    padding: 8px 16px;
    background: var(--bg-dark);
    color: var(--accent-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
  }

  .desktop-nav-phone:hover {
    background: #2a2018;
  }

  .bottom-nav {
    display: none;
  }

  .mobile-only {
    display: none;
  }

  .desktop-only-logo {
    display: flex;
  }

  .page-title {
    display: none;
  }

  .header-inner {
    padding: 0 32px;
  }

  .products {
    padding-bottom: 48px;
  }

  .about {
    padding-bottom: 64px;
  }

  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }

  .category-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    padding: 0 48px 28px;
  }

  .category-card {
    aspect-ratio: 3 / 4;
    min-height: 280px;
  }

  .category-card-name {
    font-size: 1.6rem;
    padding: 24px 16px;
  }

  .product-thumb {
    height: 280px;
  }

  .hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 420px;
    padding: 0;
    gap: 0;
  }

  .hero-bg {
    grid-column: 1 / -1;
    grid-row: 1;
    opacity: 0.75;
  }

  .hero-image {
    display: block;
    grid-column: 2;
    grid-row: 1;
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 420px;
    background-size: cover;
    background-position: center;
    clip-path: polygon(12% 0, 100% 0, 100% 100%, 0 100%);
  }

  .hero-content {
    grid-column: 1;
    grid-row: 1;
    padding: 56px 48px;
    z-index: 2;
  }

  .hero h1 {
    font-size: 3.2rem;
  }

  .hero-desc {
    max-width: 360px;
    font-size: 1rem;
  }

  .toast {
    bottom: 32px;
  }

  .modal-sheet {
    top: 50%;
    bottom: auto;
    transform: translateX(-50%) translateY(-50%) scale(0.95);
    max-width: 560px;
    border-radius: var(--radius);
    opacity: 0;
    max-height: 90vh;
  }

  .modal.open .modal-sheet {
    transform: translateX(-50%) translateY(-50%) scale(1);
    opacity: 1;
  }

  .modal-image {
    height: 400px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .cart-page {
    padding: 32px 32px 48px;
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 32px;
    align-items: start;
  }

  .cart-page .empty-cart {
    grid-column: 1 / -1;
  }

  #cartItems {
    margin-bottom: 0;
  }

  .cart-summary {
    position: sticky;
    top: calc(var(--header-h) + 16px);
  }

  .checkout-page {
    max-width: 640px;
    padding: 32px;
  }

  .legal-page {
    padding: 32px 48px 48px;
  }

  .category-scroll {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }
}

/* Large desktop */
@media (min-width: 1200px) {
  .hero-content {
    padding: 64px 64px;
  }

  .categories,
  .products,
  .about {
    padding-left: 48px;
    padding-right: 48px;
  }
}
