/* 
  PasarDesa - Premium E-Commerce Design System & Stylesheet
  Theme: Warm Orange (Jingga & Jingga Muda)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- Custom Properties (Design Tokens) --- */
:root {
  --primary: #d31209;
  --primary-hover: #b50f07;
  --primary-light: #fdf2f2;
  --primary-soft: #fde2e1;
  --primary-gradient: linear-gradient(135deg, #e51a13 0%, #b31006 100%);
  --secondary: #3b7a30;
  /* Green for fresh produce (Hasil Bumi) */
  --secondary-light: #eff7ee;
  --secondary-soft: #dcedda;
  --accent: #d6700c;
  /* Gold/Orange from logo stripe */
  --accent-light: #fdf7f0;
  --dark-slate: #1e293b;
  --text-main: #334155;
  --text-muted: #64748b;
  --bg-main: #fafaf9;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;

  --shadow-sm: 0 2px 4px rgba(211, 18, 9, 0.04);
  --shadow-md: 0 8px 24px rgba(211, 18, 9, 0.08);
  --shadow-lg: 0 16px 36px rgba(211, 18, 9, 0.12);
  --shadow-inset: inset 0 2px 4px rgba(0, 0, 0, 0.06);

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base Styles --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #ffffff;
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Outfit', sans-serif;
  color: var(--dark-slate);
  font-weight: 700;
}

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

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  outline: none;
}

input,
select,
textarea {
  font-family: inherit;
  outline: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  color: var(--dark-slate);
  transition: var(--transition-fast);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211, 18, 9, 0.15);
}

/* --- Container --- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Utility Classes --- */
.text-orange {
  color: var(--primary);
}

.bg-orange-light {
  background-color: var(--primary-light);
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-green {
  background-color: var(--secondary-light);
  color: var(--secondary);
}

.badge-orange {
  background-color: var(--primary-light);
  color: var(--primary);
}

/* --- Header / Navigation --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-fast);
}


.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark-slate);
}

.logo-icon {
  background: var(--primary-gradient);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(211, 18, 9, 0.3);
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-item {
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition-fast);
  position: relative;
  padding: 0.5rem 0;
}

.nav-item:hover,
.nav-item.active {
  color: var(--primary);
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition-fast);
}

.nav-item:hover::after,
.nav-item.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--primary-light);
  border-radius: var(--radius-full);
  padding: 0.25rem 0.5rem 0.25rem 1.25rem;
  width: 280px;
  transition: var(--transition-normal);
}

.search-bar:focus-within {
  width: 320px;
  box-shadow: 0 0 0 3px rgba(211, 18, 9, 0.1);
  background: white;
  border: 1px solid var(--primary-soft);
}

.search-input {
  border: none;
  background: transparent;
  padding: 0.5rem 0;
  width: 100%;
  font-size: 0.9rem;
}

.search-input:focus {
  box-shadow: none;
}

.btn-search {
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-search:hover {
  background: var(--primary-hover);
}

.cart-icon-btn {
  position: relative;
  background: var(--primary-light);
  color: var(--primary);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.cart-icon-btn:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(211, 18, 9, 0.2);
}

.cart-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
}

/* --- Views Layout --- */
.view-section {
  display: none;
  padding: 2.5rem 0;
  animation: fadeIn var(--transition-slow) forwards;
}

.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.88) 0%, rgba(255, 255, 255, 0.65) 45%, rgba(255, 255, 255, 0.15) 100%), url('../assets/hero_pasar_desa.png');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  border-radius: var(--radius-lg);
  padding: 5rem 3.5rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 3.5rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 16px 32px rgba(211, 18, 9, 0.06);
  border: 1px solid rgba(211, 18, 9, 0.15);
}

.hero-content {
  max-width: 600px;
  z-index: 2;
}

.hero-tagline {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: inline-block;
  background: rgba(211, 18, 9, 0.08);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
}

.hero-title {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-title span {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  color: var(--text-main);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: 0 8px 24px rgba(211, 18, 9, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(211, 18, 9, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--primary);
  border: 1.5px solid var(--primary-soft);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* --- Features Section --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.feature-card {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.feature-card:nth-child(1) {
  border-top: 4px solid var(--secondary);
}

.feature-card:nth-child(2) {
  border-top: 4px solid var(--primary);
}

.feature-card:nth-child(3) {
  border-top: 4px solid #f59e0b;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-card:hover:nth-child(1) {
  background: #f0fdf4;
  border-color: rgba(16, 185, 129, 0.25);
}

.feature-card:hover:nth-child(2) {
  background: #fff7ed;
  border-color: rgba(211, 18, 9, 0.25);
}

.feature-card:hover:nth-child(3) {
  background: #fffbeb;
  border-color: rgba(245, 158, 11, 0.25);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.feature-card:nth-child(1) .feature-icon {
  background: var(--secondary-light);
  color: var(--secondary);
}

.feature-card:nth-child(2) .feature-icon {
  background: var(--primary-light);
  color: var(--primary);
}

.feature-card:nth-child(3) .feature-icon {
  background: #fef3c7;
  color: #d97706;
}

.feature-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.feature-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --- Categories Section --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2rem;
}

.section-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.section-subtitle {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.section-title {
  font-size: 2rem;
}

.categories-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 4rem;
}

.category-card {
  position: relative;
  border-radius: var(--radius-md);
  height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2rem;
  color: white;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  border: 1px solid var(--border-color);
}

.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.2) 100%);
  z-index: 1;
  transition: var(--transition-normal);
}

.category-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

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

.category-card:hover img {
  transform: scale(1.08);
}

.category-card:hover::before {
  background: linear-gradient(to top, rgba(211, 18, 9, 0.85) 0%, rgba(211, 18, 9, 0.3) 100%);
}

.category-info {
  position: relative;
  z-index: 2;
}

.category-name {
  font-size: 1.5rem;
  color: white;
  margin-bottom: 0.25rem;
}

.category-count {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* --- Product Grid & Cards --- */
.product-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-full);
  background: white;
  border: 1px solid var(--border-color);
  font-weight: 600;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.filter-btn:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-soft);
}

.filter-btn[data-category="all"].active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(211, 18, 9, 0.25);
}

.filter-btn[data-category="hasil-bumi"].active {
  background: var(--secondary);
  color: white;
  border-color: var(--secondary);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.filter-btn[data-category="bahan-pokok"].active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

.filter-btn[data-category="kebutuhan-rumah"].active {
  background: #8b5cf6;
  color: white;
  border-color: #8b5cf6;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(211, 18, 9, 0.12);
  border-color: var(--primary-soft);
}

.product-img-wrapper {
  position: relative;
  height: 200px;
  background: linear-gradient(135deg, #fff9f5 0%, #f4fbf7 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.product-card:hover .product-img {
  transform: scale(1.06);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 10;
}

.product-farmer-badge {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(15, 23, 42, 0.75);
  color: white;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.product-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  display: inline-block;
  align-self: flex-start;
  margin-bottom: 0.75rem;
}

.product-cat.cat-hasil-bumi {
  background: var(--secondary-light);
  color: var(--secondary);
}

.product-cat.cat-bahan-pokok {
  background: #eff6ff;
  color: #2563eb;
}

.product-cat.cat-kebutuhan-rumah {
  background: #faf5ff;
  color: #7c3aed;
}

.product-name {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.product-stock {
  font-size: 0.8rem;
  color: var(--secondary);
  font-weight: 500;
  margin-bottom: 1rem;
}

.product-stock.out-of-stock {
  color: #ef4444;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
}

.product-price {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.product-unit {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

.btn-add-cart {
  background: var(--primary-light);
  color: var(--primary);
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.btn-add-cart:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

/* --- Cart Drawer --- */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-normal);
}

.cart-drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 100%;
  max-width: 450px;
  height: 100%;
  background: white;
  box-shadow: -10px 0 40px rgba(15, 23, 42, 0.15);
  z-index: 101;
  display: flex;
  flex-direction: column;
  transition: var(--transition-normal);
}

.cart-drawer.active {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-title {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.cart-close-btn:hover {
  background: #f1f5f9;
  color: var(--dark-slate);
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cart-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  gap: 1rem;
}

.cart-empty-icon {
  font-size: 3rem;
  color: var(--primary-soft);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.cart-item-details {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cart-item-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--dark-slate);
  margin-bottom: 0.25rem;
}

.cart-item-farmer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-item-actions {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
}

.btn-remove-item {
  color: var(--text-muted);
  font-size: 0.85rem;
  transition: var(--transition-fast);
}

.btn-remove-item:hover {
  color: #ef4444;
}

.quantity-control {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #f8fafc;
}

.qty-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  transition: var(--transition-fast);
}

.qty-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.qty-val {
  padding: 0 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 24px;
  text-align: center;
}

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #fdfaf7;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.cart-summary-row.total {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border-color);
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  font-weight: 600;
}

/* --- Checkout Layout --- */
.checkout-container {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.checkout-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.checkout-section-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1.5px solid var(--primary-light);
  padding-bottom: 0.75rem;
}

.form-group-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark-slate);
}

/* Custom Delivery & Payment Selectors */
.delivery-options,
.payment-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.option-selector {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.option-selector:hover {
  border-color: var(--primary-soft);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.option-selector.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

.option-selector:active {
  transform: scale(0.98);
}

/* --- Schedule Selectors styling --- */
.schedule-days-grid,
.schedule-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
}

.schedule-btn-selector {
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: white;
  position: relative;
}

.schedule-btn-selector input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.schedule-btn-selector:hover {
  border-color: var(--primary-soft);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.schedule-btn-selector.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 1px var(--primary);
}

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

.schedule-btn-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.day-name,
.time-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-slate);
}

.day-date,
.time-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.schedule-btn-selector.active .day-name,
.schedule-btn-selector.active .time-title {
  color: var(--primary);
}

.option-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.option-selector::before {
  content: '';
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: white;
  margin-top: 0.1rem;
  flex-shrink: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.option-selector.active::before {
  border-width: 6px;
  border-color: var(--primary);
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.option-details {
  display: flex;
  flex-direction: column;
}

.option-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark-slate);
  margin-bottom: 0.25rem;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.option-price {
  font-weight: 700;
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

/* Order Summary card */
.order-summary-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-height: 250px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
}

.summary-item-name {
  color: var(--dark-slate);
  font-weight: 500;
}

.summary-item-price {
  font-weight: 600;
}

/* --- Payment Simulator Modal --- */
.payment-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
}

.payment-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.payment-modal {
  background: white;
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: var(--transition-normal);
  border: 1px solid var(--border-color);
}

.payment-modal-overlay.active .payment-modal {
  transform: scale(1);
}

.payment-anim {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  position: relative;
}

.payment-anim.processing {
  border: 4px solid var(--primary-soft);
  border-top-color: var(--primary);
  animation: spin 1s infinite linear;
}

.payment-anim.success {
  background: var(--secondary-light);
  color: var(--secondary);
  animation: scaleUp 0.4s ease-out forwards;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes scaleUp {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.payment-title {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.payment-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* --- Order Tracking Layout --- */
.tracking-container {
  display: grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap: 2.5rem;
  align-items: start;
}

/* Stepper Component */
.stepper-vertical {
  position: relative;
  padding-left: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.stepper-vertical::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 11px;
  width: 2px;
  height: calc(100% - 20px);
  background: var(--border-color);
  z-index: 1;
}

.step-item {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.step-marker {
  position: absolute;
  left: -2.5rem;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 0.7rem;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.step-item.completed .step-marker {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.step-item.active .step-marker {
  background: white;
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
  animation: pulseMarker 2s infinite;
}

@keyframes pulseMarker {
  0% {
    box-shadow: 0 0 0 0px rgba(211, 18, 9, 0.4);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(211, 18, 9, 0);
  }

  100% {
    box-shadow: 0 0 0 0px rgba(211, 18, 9, 0);
  }
}

/* Connecting lines progress styling */
.stepper-progress-line {
  position: absolute;
  top: 10px;
  left: 11px;
  width: 2px;
  height: 0;
  background: var(--primary);
  z-index: 1;
  transition: height 1s ease-in-out;
}

.step-title {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition-normal);
}

.step-item.active .step-title,
.step-item.completed .step-title {
  color: var(--dark-slate);
}

.step-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.step-time {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 500;
}

.step-item:last-child::after {
  content: '';
  position: absolute;
  top: 26px;
  left: -32px;
  width: 10px;
  height: 100%;
  background: var(--bg-card);
  z-index: 5;
}

/* Delivery Map Simulation */
.map-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.map-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.map-status-pill {
  background: var(--primary-light);
  color: var(--primary);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  animation: pulsePill 2s infinite;
}

@keyframes pulsePill {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

.map-canvas-container {
  height: 380px;
  background-color: #f8fafc;
  position: relative;
  overflow: hidden;
}

/* Stylized SVG Village Map Overlay */
.village-map-svg {
  width: 100%;
  height: 100%;
  stroke: #cbd5e1;
  stroke-width: 3px;
  stroke-linecap: round;
  fill: none;
}

.map-road-bg {
  stroke: #e2e8f0;
  stroke-width: 8px;
}

.map-road-active {
  stroke: var(--primary-soft);
  stroke-width: 8px;
}

.map-road-highlight {
  stroke: var(--primary);
  stroke-width: 4px;
  stroke-dasharray: 8 8;
  animation: dash 30s linear infinite;
}

@keyframes dash {
  to {
    stroke-dashoffset: -1000;
  }
}

.map-node {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.9rem;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transform: translate(-50%, -50%);
}

.node-shop {
  background: var(--primary);
  border: 2px solid white;
}

.node-home {
  background: var(--secondary);
  border: 2px solid white;
}

/* Interactive Courier Icon */
.map-courier {
  position: absolute;
  width: 42px;
  height: 42px;
  background: white;
  border: 2.5px solid var(--primary);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 6px 16px rgba(211, 18, 9, 0.25);
  transform: translate(-50%, -50%);
  transition: left 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), top 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 10;
}

.map-courier::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--primary);
  animation: ripple 2s infinite;
  opacity: 0.6;
}

@keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }

  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Courier Profile Overlay */
.courier-card {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: #fdfaf7;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.courier-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.courier-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}

.courier-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--dark-slate);
}

.courier-type {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.courier-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.btn-icon:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary-soft);
  transform: translateY(-2px);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 2rem;
  left: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  z-index: 300;
}

.toast {
  background: #0f172a;
  color: white;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  transform: translateY(100px);
  opacity: 0;
  animation: slideInUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.removing {
  animation: fadeOut 0.2s forwards;
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

/* Flying Dot Animation */
.flying-dot {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(211, 18, 9, 0.4);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s;
}

/* Footer Section */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 5rem 0 2rem 0;
  margin-top: 5rem;
  position: relative;
}


.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-about {
  grid-column: span 1.5;
}

.footer-brand {
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.footer-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-social-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e293b;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.footer-social-btn:hover {
  background: var(--primary);
  transform: translateY(-2px);
}

.footer-title {
  color: white;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--primary);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-link:hover {
  color: white;
  padding-left: 4px;
}

.footer-contact-item {
  display: flex;
  gap: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-contact-icon {
  color: var(--primary);
  margin-top: 0.25rem;
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
}

/* --- Responsive Adaptations --- */
@media (max-width: 1024px) {
  .hero {
    padding: 3.5rem 2rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.8) 100%), url('../assets/hero_pasar_desa_mobile.png');
    background-size: cover;
    background-position: center;
    text-align: center;
    justify-content: center;
  }

  .hero-desc {
    margin-inline: auto;
  }

  .hero-buttons {
    justify-content: center;
  }

  .checkout-container,
  .tracking-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

/* --- Mobile Bottom Navigation (Default Hidden) --- */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 75px;
    /* Prevent bottom nav from covering content */
  }

  .header-container {
    height: 70px;
  }

  .nav-links {
    display: none;
  }

  .search-bar {
    display: none;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  /* Double Column Grid on Mobile */
  .products-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  .product-card {
    border-radius: var(--radius-sm);
  }

  .product-img-wrapper {
    height: 130px;
  }

  .product-farmer-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .product-content {
    padding: 0.85rem;
  }

  .product-cat {
    font-size: 0.7rem;
    margin-bottom: 0.25rem;
  }

  .product-name {
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 2.5rem;
    /* Consistent name height */
    line-height: 1.25;
  }

  .product-stock {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .product-price {
    font-size: 1.05rem;
  }

  .btn-add-cart {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }

  .btn-add-cart svg {
    width: 16px;
    height: 16px;
  }

  /* Category responsive count adjustments */
  .categories-container {
    grid-template-columns: 1fr;
  }

  .category-card {
    height: 120px;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .product-filters {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 0.75rem;
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1.15rem;
    font-size: 0.85rem;
  }

  /* Cart Drawer Fullscreen on Mobile */
  .cart-drawer {
    max-width: 100%;
    right: -100%;
  }

  /* Mobile Bottom Navigation styling */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    justify-content: space-around;
    align-items: center;
    z-index: 99;
    box-shadow: 0 -4px 16px rgba(211, 18, 9, 0.06);
  }


  .mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.25rem;
    flex: 1;
    height: 100%;
    transition: var(--transition-fast);
  }

  .mobile-nav-item i {
    font-size: 1.25rem;
    transition: var(--transition-fast);
  }

  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: var(--primary);
  }

  .mobile-nav-item.active i {
    transform: translateY(-2px);
  }

  .mobile-nav-item .cart-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid white;
  }
}

/* --- Order History & Tracking List Styles --- */
.orders-history-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.order-history-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  transition: var(--transition-normal);
}

.order-history-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-soft);
}

.order-history-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1;
}

.order-history-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.order-id-label {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.order-date-label {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.order-items-preview {
  font-size: 0.95rem;
  color: var(--dark-slate);
  font-weight: 500;
}

.order-total-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.order-total-label strong {
  color: var(--dark-slate);
  font-size: 1.05rem;
}

.order-history-status-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  min-width: 150px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  min-width: 110px;
}

.status-success {
  background-color: var(--secondary-light);
  color: var(--secondary);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-failed {
  background-color: #fef2f2;
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.status-unpaid {
  background-color: #fffbeb;
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.2);
}

.status-active {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(211, 18, 9, 0.2);
  animation: pulseStatus 2s infinite;
}

@keyframes pulseStatus {
  0% {
    opacity: 0.85;
  }

  50% {
    opacity: 1;
    box-shadow: 0 0 0 3px var(--primary-soft);
  }

  100% {
    opacity: 0.85;
  }
}

.btn-history-action {
  padding: 0.5rem 1rem !important;
  font-size: 0.85rem !important;
  border-radius: var(--radius-sm) !important;
  width: 100%;
  text-align: center;
}

/* Back button in detailed tracking view */
.btn-back-history {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  padding: 0.5rem 0;
}

.btn-back-history:hover {
  color: var(--primary);
  transform: translateX(-4px);
}

/* Mobile adjustments for Order History & Layout components */
@media (max-width: 768px) {
  /* Clean header on mobile: logo only (all actions are moved to bottom nav) */
  .header .nav-actions .user-info,
  .header .nav-actions .btn-primary,
  .header .nav-actions .cart-icon-btn {
    display: none !important;
  }
}

@media (max-width: 600px) {
  .order-history-card {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    padding: 1.25rem;
  }

  .order-history-status-block {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 0.75rem;
  }

  .btn-history-action {
    width: auto;
    min-width: 130px;
  }

  /* Form layouts: stack 2-column inputs vertically on mobile */
  .form-group-grid {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Promo Banner slide details: stack items vertically for readability */
  .promo-content {
    flex-direction: column !important;
    align-items: stretch !important;
    text-align: center !important;
    padding: 15px !important;
  }

  .promo-action {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    width: 100%;
  }

  .promo-code-box {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Reduce card padding on mobile to save precious screen real estate */
  .checkout-card {
    padding: 1rem !important;
  }

  /* Stack delivery/courier options and payment options to 1-column on mobile */
  .delivery-options,
  .payment-options {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  /* Force schedule days to be 3 columns and times to be 2 columns */
  .schedule-days-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.5rem !important;
  }

  .schedule-times-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
  }

  /* Prevent long product names from breaking summary rows */
  .summary-item-name {
    flex: 1;
    padding-right: 0.5rem;
    word-break: break-word;
  }

  .summary-item-price {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  /* Stack buttons below inputs in search and promo areas */
  #address-search-container > div,
  .promo-section > div[style*="display: flex"] {
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  #address-search-container button,
  .promo-section button {
    width: 100% !important;
  }

  /* Compact padding & text for schedule selectors on small devices */
  .schedule-btn-selector {
    padding: 0.6rem 0.3rem !important;
  }

  .day-name, .time-title {
    font-size: 0.8rem !important;
  }

  .day-date, .time-desc {
    font-size: 0.65rem !important;
  }
}