/* ===== HEADER ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--surface-2);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 16px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.icon-button:hover,
.icon-button:focus-visible {
  background: var(--surface-2);
  color: var(--text);
}

/* ===== SEARCH ===== */
.search-container {
  padding: 0 16px 12px;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  max-height: 0;
  opacity: 0;
}

.search-container.open {
  max-height: 80px;
  opacity: 1;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 0 14px;
  height: 44px;
  border: 1.5px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.search-bar:focus-within {
  border-color: var(--accent);
  background: var(--surface);
}

.search-bar svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-bar input {
  flex: 1;
  height: 100%;
  font-size: 15px;
  color: var(--text);
  background: transparent;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.search-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 20px;
  transition: background 0.2s;
}

.search-close:hover {
  background: var(--surface-3);
}

/* ===== HERO ===== */
.hero {
  padding: 32px 16px 24px;
  text-align: center;
}

.hero-content {
  max-width: 360px;
  margin: 0 auto;
}

.hero-moon {
  width: 48px;
  height: 48px;
  color: var(--accent);
  margin-bottom: 16px;
  filter: drop-shadow(0 0 20px var(--accent-glow));
  animation: moonFloat 4s ease-in-out infinite;
}

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

.hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  color: var(--text);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent-muted);
  color: var(--accent-hover);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

/* ===== PROMO STRIP ===== */
.promo-strip {
  padding: 0 0 12px;
  overflow: hidden;
  position: relative;
}

.promo-strip-inner {
  display: inline-flex;
  gap: 10px;
  padding: 0 16px;
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.promo-card {
  flex-shrink: 0;
  min-width: 200px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid rgba(168, 130, 255, 0.15);
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.promo-card:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.promo-card:active {
  transform: scale(0.97);
}

.promo-card-code {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 2px;
  letter-spacing: 0.3px;
}

.promo-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.promo-card-min {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ===== CATEGORY TABS ===== */
.category-container {
  display: flex;
  gap: 4px;
  padding: 0 16px 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-container::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex-shrink: 0;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--surface-2);
  transition: all 0.25s ease;
  min-height: 36px;
}

.category-tab:hover {
  background: var(--surface-2);
  color: var(--text);
}

.category-tab.active {
  background: var(--accent-muted);
  color: var(--accent-hover);
  border-color: var(--accent);
}

/* ===== PRODUCT GRID ===== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 0 16px 16px;
}

@media (min-width: 768px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px 24px;
  }
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
  animation: cardIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--index, 0) * 0.05s);
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

.product-card:active {
  transform: translateY(-1px) scale(0.98);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface-2);
  overflow: hidden;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.product-card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-fav {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s;
  z-index: 2;
}

.card-fav.active {
  color: var(--warning);
}

.card-fav:hover {
  background: rgba(0, 0, 0, 0.7);
  transform: scale(1.1);
}

.card-stock-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  backdrop-filter: blur(12px);
  z-index: 2;
  pointer-events: none;
}

.card-stock-badge.low {
  background: rgba(251, 191, 36, 0.2);
  color: var(--warning);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.card-stock-badge.sold {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  backdrop-filter: blur(2px);
  z-index: 1;
  border: none;
  border-radius: 0;
}

.card-promo-badge {
  position: absolute;
  bottom: 8px;
  left: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  color: #000;
  background: var(--accent);
  z-index: 2;
  pointer-events: none;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.card-add {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.card-add:hover {
  transform: scale(1.1);
  background: var(--accent-hover);
}

.card-add:active {
  transform: scale(0.9);
}

.card-body {
  padding: 10px 12px 12px;
}

.card-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}

/* Sold out product card */
.product-card.sold-out {
  opacity: 0.5;
}

.product-card.sold-out .card-image-wrap img {
  filter: grayscale(0.6);
}

.product-card.sold-out .card-add {
  display: none;
}

/* ===== BOTTOM TAB BAR ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--tab-bar-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.tab-item svg {
  width: 22px;
  height: 22px;
}

.tab-item span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.tab-item {
  position: relative;
}

.tab-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  opacity: 0;
  transition: opacity 0.2s;
}

.tab-item.active::after {
  opacity: 1;
}

.tab-item.active {
  color: var(--accent);
}

.tab-item:hover {
  color: var(--text-secondary);
}

.tab-item.active:hover {
  color: var(--accent);
}

/* ===== BOTTOM SHEET ===== */
.bottom-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  display: flex;
  align-items: flex-end;
  visibility: hidden;
}

.bottom-sheet.open {
  visibility: visible;
}

.sheet-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bottom-sheet.open .sheet-overlay {
  opacity: 1;
}

.sheet-content {
  position: relative;
  width: 100%;
  max-height: 85vh;
  background: var(--surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.bottom-sheet.open .sheet-content {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: var(--text-muted);
  opacity: 0.4;
  margin: 10px auto;
  flex-shrink: 0;
}

/* ===== CART FAB ===== */
.cart-fab {
  position: fixed;
  bottom: calc(var(--tab-bar-height) + 16px + env(safe-area-inset-bottom));
  right: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px var(--accent-glow);
  z-index: 50;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s;
  animation: fabIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes fabIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.cart-fab:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 28px var(--accent-glow);
}

.cart-fab:active {
  transform: scale(0.95);
}

.cart-count {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--error);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.cart-fab.bounce {
  animation: fabBounce 0.5s ease-out;
}

@keyframes fabBounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.2); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}

/* ===== SHEET INNER CONTENT (Product Detail) ===== */
.detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--surface-2);
}

.detail-body {
  padding: 20px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.detail-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  flex: 1;
}

.detail-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  margin-left: 12px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.detail-stock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
}

.detail-stock.in-stock { color: var(--success); }
.detail-stock.low-stock { color: var(--warning); }
.detail-stock.out-of-stock { color: var(--error); }

.detail-stock .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.detail-stock.in-stock .dot { background: var(--success); }
.detail-stock.low-stock .dot { background: var(--warning); }
.detail-stock.out-of-stock .dot { background: var(--error); }

.qty-selector {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.qty-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 600;
  transition: background 0.2s;
}

.qty-btn:hover {
  background: var(--accent);
  color: #fff;
}

.qty-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.qty-btn:disabled:hover {
  background: var(--surface-3);
  color: var(--text);
}

.qty-value {
  font-size: 18px;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.add-to-cart-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.add-to-cart-btn:hover {
  background: var(--accent-hover);
}

.add-to-cart-btn:active {
  transform: scale(0.98);
}

.add-to-cart-btn:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ===== CART BOTTOM SHEET ===== */
.cart-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 20px 16px;
}

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

.cart-clear {
  font-size: 13px;
  color: var(--error);
  font-weight: 500;
  padding: 8px;
}

.cart-list {
  padding: 0 20px;
  max-height: 40vh;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface-2);
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-img {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-2);
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-price {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.qty-btn-sm {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s;
}

.qty-btn-sm:hover {
  background: var(--surface-3);
}

.qty-btn-sm:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cart-item-qty {
  font-size: 14px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.cart-item-total {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  min-width: 48px;
  text-align: right;
}

.cart-item-remove {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 18px;
  transition: color 0.2s, background 0.2s;
}

.cart-item-remove:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

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

.cart-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--surface-3);
}

.cart-empty p {
  font-size: 15px;
}

.cart-promo-banner {
  margin: 8px 20px 0;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.cart-promo-banner.hidden {
  display: none;
}

.cart-promo-text {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  line-height: 1.4;
}

.cart-promo-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.cart-promo-btn:hover {
  opacity: 0.9;
}

.cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--surface-2);
  margin-top: 8px;
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  margin-bottom: 12px;
}

.cart-subtotal span:last-child {
  font-weight: 700;
  font-size: 18px;
}

.checkout-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.checkout-btn:hover {
  background: var(--accent-hover);
}

.checkout-btn:active {
  transform: scale(0.98);
}

.checkout-btn:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
}

/* ===== MODAL ===== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
}

.modal.open {
  visibility: visible;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  transition: opacity 0.3s;
}

.modal.open .modal-overlay {
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 92%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--surface);
  border-radius: var(--radius-xl);
  opacity: 0;
  transform: scale(0.92) translateY(10px);
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
  padding: 24px;
}

.modal.open .modal-content {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.modal-close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 24px;
  transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ===== CHECKOUT FORM ===== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1.5px solid var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 80px;
}

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 4px;
  min-height: 18px;
}

/* Delivery options */
.delivery-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.delivery-option {
  display: block;
  cursor: pointer;
}

.delivery-option input {
  display: none;
}

.delivery-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border: 1.5px solid var(--surface-2);
  border-radius: var(--radius);
  transition: all 0.2s;
}

.delivery-card:hover {
  border-color: var(--surface-3);
}

.delivery-option input:checked + .delivery-card {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.delivery-card-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.delivery-card-info {
  flex: 1;
}

.delivery-card-title {
  font-size: 14px;
  font-weight: 600;
}

.delivery-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
}

.delivery-option input:checked + .delivery-card .delivery-card-title {
  color: var(--accent);
}

/* Order summary */
.order-summary {
  margin: 16px 0;
  padding: 16px;
  background: var(--surface-2);
  border-radius: var(--radius);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
  color: var(--text-secondary);
}

.summary-line.total {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  border-top: 1px solid var(--surface-3);
  margin-top: 6px;
  padding-top: 10px;
}

.summary-line.promo-discount {
  color: var(--success);
  font-weight: 600;
}

.summary-line.promo-free-item {
  color: var(--accent);
  font-weight: 500;
}

/* Upsell */
.upsell-section {
  margin: 12px 0 16px;
}

.upsell-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.upsell-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.upsell-scroll::-webkit-scrollbar {
  display: none;
}

.upsell-item {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  max-width: 170px;
}

.upsell-item:hover {
  border-color: var(--accent);
}

.upsell-item:active {
  transform: scale(0.96);
}

.upsell-item img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
  flex-shrink: 0;
}

.upsell-item-info {
  min-width: 0;
  flex: 1;
}

.upsell-item-name {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upsell-item-price {
  font-size: 11px;
  color: var(--accent);
  font-weight: 700;
}

.upsell-item-plus {
  font-size: 18px;
  color: var(--accent);
  font-weight: 600;
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.submit-btn:hover {
  background: var(--accent-hover);
}

.submit-btn:active {
  transform: scale(0.98);
}

/* ===== INVOICE CARD ===== */
.invoice-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
}

.invoice-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.invoice-brand {
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
}

.invoice-order-id {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
}

.invoice-customer {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--surface-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.invoice-items {
  margin-bottom: 4px;
}

.invoice-row {
  display: flex;
  padding: 5px 0;
  font-size: 13px;
  gap: 6px;
  align-items: center;
}

.invoice-row span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-row span:nth-child(2) {
  width: 30px;
  text-align: center;
  flex-shrink: 0;
}

.invoice-row span:nth-child(3) {
  width: 46px;
  text-align: right;
  flex-shrink: 0;
  color: var(--text-muted);
}

.invoice-row span:last-child {
  width: 60px;
  text-align: right;
  font-weight: 600;
  flex-shrink: 0;
}

.invoice-summary {
  border-top: 1px solid var(--surface-3);
  padding-top: 4px;
  margin-top: 4px;
}

.invoice-row.subtotal span:last-child {
  font-weight: 400;
  color: var(--text-secondary);
}

.invoice-row.promo span:last-child {
  color: var(--success);
}

.invoice-row.fee span:last-child {
  color: var(--text-secondary);
}

.invoice-row.grand-total {
  border-top: 2px solid var(--text);
  margin-top: 4px;
  padding-top: 8px;
  font-size: 15px;
}

.invoice-row.grand-total span:last-child {
  font-size: 17px;
  font-weight: 800;
  color: var(--accent);
}

@media print {
  body * { visibility: hidden; }
  #invoice-card, #invoice-card * { visibility: visible; }
  #invoice-card { position: fixed; top: 0; left: 0; right: 0; padding: 24px; background: #fff; color: #111; }
  .invoice-brand { color: #000; }
  .invoice-row.grand-total { border-top-color: #000; }
}

/* ===== CONFIRMATION ===== */
.confirmation-content {
  text-align: center;
  padding: 8px 0;
}

.confirm-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 32px;
  color: #fff;
  animation: confirmPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes confirmPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.confirm-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.confirm-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.share-card {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
  text-align: left;
}

.share-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.share-text {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.share-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.share-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.share-btn-print {
  background: var(--accent);
  color: #fff;
}

.share-btn-print:hover {
  opacity: 0.9;
}

.share-btn-copy {
  background: var(--surface-3);
  color: var(--text-secondary);
}

.share-btn-copy:hover {
  color: var(--text);
}

.continue-btn {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.2s;
}

.continue-btn:hover {
  background: var(--surface-3);
}

/* ===== FAVORITES & ORDERS ===== */
.section-header {
  padding: 20px 16px 8px;
}

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

.section-body {
  padding: 0 16px 80px;
}

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

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

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: var(--surface-3);
}

.empty-state p {
  font-size: 15px;
}

.order-item {
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.order-id {
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}

.order-date {
  font-size: 12px;
  color: var(--text-muted);
}

.order-items {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--surface-3);
  padding-top: 8px;
}

.order-total {
  font-weight: 700;
}

.order-status {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.order-status.sent {
  background: var(--accent-muted);
  color: var(--accent);
}

.reorder-btn {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--surface-3);
  color: var(--text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}

.reorder-btn:hover {
  background: var(--accent);
  color: #000;
}

/* ===== TOAST ===== */
#toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: 90%;
  max-width: 380px;
}

.toast {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-success {
  background: var(--success);
}

.toast-error {
  background: var(--error);
}

.toast-info {
  background: var(--accent);
}

/* ===== CLOSED OVERLAY ===== */
.closed-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 15, 0.95);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.closed-content {
  text-align: center;
  max-width: 320px;
}

.closed-content .hero-moon {
  width: 64px;
  height: 64px;
  margin-bottom: 20px;
}

.closed-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.closed-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.closed-hours {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--surface-2);
}

.closed-hours-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.closed-hours-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

/* ===== PROMO CODE ===== */
.promo-section {
  margin-bottom: 18px;
}

.promo-input-group {
  display: flex;
  gap: 8px;
}

.promo-input {
  flex: 1;
  text-transform: uppercase;
}

.promo-apply-btn {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.2s;
}

.promo-apply-btn:hover {
  background: var(--accent-hover);
}

.promo-apply-btn:disabled {
  background: var(--surface-3);
  color: var(--text-muted);
  cursor: not-allowed;
}

.promo-status {
  font-size: 13px;
  margin-top: 6px;
  min-height: 20px;
}

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

.promo-status.error {
  color: var(--error);
}

.promo-status.info {
  color: var(--accent);
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.promo-badge.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.promo-badge.removed {
  background: rgba(239,68,68,0.15);
  color: var(--error);
  cursor: pointer;
}

.promo-badge.removed:hover {
  background: rgba(239,68,68,0.25);
}

.promo-suggestions {
  margin-top: 8px;
}

.promo-suggestions-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.promo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.promo-chip {
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-muted);
  border: 1px solid rgba(168, 130, 255, 0.2);
  cursor: pointer;
  transition: all 0.2s;
}

.promo-chip:hover {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.promo-chip:active {
  transform: scale(0.96);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 390px) {
  .hero-title {
    font-size: 24px;
  }
  .product-grid {
    gap: 10px;
    padding: 0 12px 12px;
  }
  .card-body {
    padding: 8px 10px 10px;
  }
  .card-name {
    font-size: 13px;
  }
  .card-price {
    font-size: 14px;
  }
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 24px;
  }
  .hero {
    padding: 48px 24px 32px;
  }
  .hero-title {
    font-size: 36px;
  }
  .promo-strip {
    padding: 0 0 16px;
  }
  .promo-strip-inner {
    padding: 0 24px;
  }
  .category-container {
    padding: 0 24px 20px;
    justify-content: center;
  }
  .product-grid {
    gap: 20px;
  }
  .cart-fab {
    bottom: calc(var(--tab-bar-height) + 16px);
    right: 24px;
    z-index: 101;
  }
  .modal-content {
    padding: 32px;
  }
  /* Desktop sidebar layout for cart */
  .bottom-sheet .sheet-content {
    max-width: 420px;
    margin-left: auto;
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }
}

/* Touch device hover fixes */
@media (hover: none) and (pointer: coarse) {
  .product-card:hover {
    transform: none;
    box-shadow: none;
  }
  .product-card:active {
    transform: scale(0.97);
  }
  .product-card:hover .card-image-wrap img {
    transform: none;
  }
  .category-tab:hover {
    background: var(--surface);
    color: var(--text-secondary);
  }
}
