/* ==========================================================================
   Mekarsari Agro Store - Master Stylesheet
   Agritech Modern Aesthetic & Responsive E-Commerce System
   ========================================================================== */

:root {
  --primary: #064e3b;
  --primary-hover: #022c22;
  --primary-light: #059669;
  --primary-mint: #10b981;
  --primary-bg: #ecfdf5;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --accent-light: #fef3c7;
  
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  
  /* Bayer-style crisp, corporate corners */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-full: 9999px;

  /* Bayer-style soft, neutral, flat shadows */
  --shadow-sm: 0 1px 2px rgba(16, 42, 67, 0.04);
  --shadow-md: 0 2px 8px rgba(16, 42, 67, 0.06);
  --shadow-lg: 0 8px 24px rgba(16, 42, 67, 0.08);
  --shadow-xl: 0 16px 48px rgba(16, 42, 67, 0.12);

  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.16, 1, 0.3, 1);

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

[data-theme="dark"] {
  --bg-body: #09130e;
  --bg-surface: #112219;
  --bg-glass: rgba(17, 34, 25, 0.9);
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #1e3a2b;
  --primary-bg: #062c20;
}

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

/* Atribut hidden harus selalu menang atas display dari class (mis. display:flex). */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11', 'ss01';
  transition: background-color var(--transition-fast), color var(--transition-fast);
  overflow-x: hidden;
}

/* Bayer-style tight, confident headings */
h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

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

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

input, select, textarea {
  font-family: inherit;
  outline: none;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-hot { background: #fee2e2; color: #dc2626; }
.badge-eco { background: #dcfce7; color: #15803d; }
.badge-premium { background: var(--accent-light); color: #b45309; }

/* Top Announcement Bar */
.top-bar {
  background: linear-gradient(90deg, var(--primary) 0%, #065f46 100%);
  color: #ffffff;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  text-align: center;
  font-weight: 500;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-highlights {
  display: flex;
  gap: 1.5rem;
}
.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  transition: background-color var(--transition-fast);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
  gap: 1.5rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-light);
}
.brand-icon {
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: none;
}
.brand-text span {
  color: var(--accent);
}
.brand-sub {
  display: block;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Search Bar */
.search-box {
  flex: 1;
  max-width: 450px;
  position: relative;
}
.search-input {
  width: 100%;
  padding: 0.7rem 1rem 0.7rem 2.8rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}
.search-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}
.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* Header Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.btn-icon-nav {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all var(--transition-fast);
}
.btn-icon-nav:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}
.cart-badge-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent);
  color: #000;
  font-size: 0.75rem;
  font-weight: 800;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary-consult {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--primary-light);
  color: white;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: none;
  transition: all var(--transition-fast);
}
.btn-primary-consult:hover {
  background: var(--primary);
}

/* Hero Banner Section */
.hero-section {
  position: relative;
  padding: 5rem 0 5.5rem;
  background: var(--bg-body);
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
.hero-content h1 {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.4rem;
  color: var(--text-main);
}
.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 580px;
}
.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-hero-main {
  background: var(--accent);
  color: #000000;
  font-weight: 800;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: none;
  transition: all var(--transition-fast);
}
.btn-hero-main:hover {
  background: var(--accent-hover);
}
.btn-hero-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 2px solid var(--border-color);
  font-weight: 700;
  padding: 0.9rem 1.8rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  transition: all var(--transition-fast);
}
.btn-hero-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.hero-image-wrapper {
  position: relative;
}
.hero-img-card {
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  object-fit: cover;
  border: none;
}
.floating-stat-card {
  position: absolute;
  bottom: -20px;
  left: -20px;
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  padding: 1.2rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
}
.stat-icon {
  width: 48px;
  height: 48px;
  background: #dcfce7;
  color: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}
.stat-info h4 {
  font-size: 1.2rem;
  font-weight: 800;
}
.stat-info p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Category Pills & Crop Filters */
.filters-section {
  padding: 2.5rem 0 1.5rem;
}
.section-header {
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-main);
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  margin-top: 0.4rem;
}

.categories-bar {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.75rem;
  scrollbar-width: thin;
}
.category-btn {
  padding: 0.65rem 1.25rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.category-btn.active, .category-btn:hover {
  background: var(--primary-light);
  color: white;
  border-color: var(--primary-light);
  box-shadow: none;
}

/* Filter Sub Bar */
.sub-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}
.crop-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.crop-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.5rem;
}
.crop-pill {
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-sm);
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}
.crop-pill.active, .crop-pill:hover {
  background: var(--primary-bg);
  border-color: var(--primary-light);
  color: var(--primary-light);
}

.sort-select {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.75rem;
  margin: 1.5rem 0 3.5rem;
}

.product-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  position: relative;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.product-img-wrapper {
  position: relative;
  width: 100%;
  padding-top: 100%; /* Rasio 1:1 — foto produk aslinya 640x640 */
  background: #ffffff;
  overflow: hidden;
}
.product-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* contain, bukan cover: foto tampil utuh tanpa terpotong walau nanti
     admin memakai foto yang tidak persegi. */
  object-fit: contain;
  transition: transform 0.5s ease;
}
.product-card:hover .product-img {
  transform: scale(1.06);
}
.product-badge-pos {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
}

.product-content {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-formula {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}
.product-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--accent);
  font-weight: 700;
}

.product-price-row {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
}
[data-theme="dark"] .product-price {
  color: var(--primary-mint);
}
.product-unit {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-add-cart {
  background: var(--primary-bg);
  color: var(--primary-light);
  border: 1px solid var(--primary-light);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all var(--transition-fast);
}
.btn-add-cart:hover {
  background: var(--primary-light);
  color: white;
}

/* Fertilizer Dosage Calculator Section */
.calculator-section {
  background: var(--primary);
  color: white;
  padding: 4.5rem 0;
  border-radius: var(--radius-lg);
  margin: 4rem 0;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.calculator-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}
.calc-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: #ffffff;
}
.calc-header p {
  color: #a7f3d0;
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.calc-card-form {
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}
.form-group {
  margin-bottom: 1.25rem;
}
.form-label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-size: 0.95rem;
  background: var(--bg-body);
  color: var(--text-main);
}
.form-control:focus {
  border-color: var(--primary-light);
}
.form-control:disabled,
.form-control[readonly] {
  cursor: not-allowed;
  opacity: 0.72;
  background: color-mix(in srgb, var(--bg-body) 82%, var(--border-color));
}

/* Pencarian wilayah tujuan (autocomplete kota + kecamatan) */
.area-autocomplete {
  position: relative;
}

.area-input-wrap {
  position: relative;
}

.area-input {
  padding-right: 2.75rem;
}

.area-autocomplete.has-error .area-input {
  border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.area-input-icon,
.area-input-spinner {
  position: absolute;
  top: 50%;
  right: 0.9rem;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
}

.area-autocomplete.is-busy .area-input-icon {
  display: none;
}

.area-input-spinner {
  color: var(--primary-light);
}

.area-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  max-height: 17rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: 0 12px 32px rgba(16, 42, 67, 0.14);
}

.area-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-main);
  cursor: pointer;
  font-size: 0.88rem;
  line-height: 1.45;
}

.area-option:hover,
.area-option.active {
  background: var(--primary-bg);
}

.area-option-name {
  min-width: 0;
}

.area-option-name mark {
  padding: 0;
  background: transparent;
  color: var(--primary-light);
  font-weight: 800;
}

.area-option-postal {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.area-empty {
  padding: 0.9rem 0.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  text-align: center;
}

.area-empty b,
.area-hint b {
  color: var(--primary-light);
}

.area-hint {
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.area-input {
  color: var(--text-main);
}

.area-selected {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  background: var(--primary-bg);
}

.area-selected > i {
  flex: 0 0 auto;
  color: var(--primary-light);
  font-size: 1rem;
}

.area-selected-text {
  flex: 1 1 auto;
  min-width: 0;
}

.area-selected-text strong {
  display: block;
  color: var(--text-main);
  font-size: 0.88rem;
  line-height: 1.45;
}

.area-selected-text small {
  display: block;
  margin-top: 0.15rem;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.area-change-button {
  flex: 0 0 auto;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  color: var(--primary-light);
  font-size: 0.78rem;
  font-weight: 800;
}

.area-change-button:hover {
  background: var(--primary-light);
  color: #ffffff;
}

.region-status {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 1.25rem;
  margin: -0.55rem 0 1.1rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.region-status.success {
  color: var(--primary-light);
}

.region-status.error {
  color: #dc2626;
}

.region-retry-button {
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: var(--radius-full);
  padding: 0.25rem 0.6rem;
  color: inherit;
  font-size: 0.75rem;
  font-weight: 700;
}

#btnCheckShippingRates:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.btn-calculate {
  width: 100%;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  transition: all var(--transition-fast);
}
.btn-calculate:hover {
  background: var(--accent-hover);
}

/* Calculator Result Box */
.calc-results-box {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 2rem;
}
.calc-results-box h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--accent);
}
.calc-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.calc-stat-card {
  background: rgba(0, 0, 0, 0.25);
  padding: 1rem;
  border-radius: var(--radius-sm);
  text-align: center;
}
.calc-stat-val {
  font-size: 1.5rem;
  font-weight: 800;
  color: #ffffff;
}
.calc-stat-lbl {
  font-size: 0.78rem;
  color: #a7f3d0;
}

.bundle-items-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.bundle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Educational Hub Section */
.articles-section {
  padding: 3rem 0;
}
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}
.article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-fast);
}
.article-card:hover {
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.article-tag {
  color: var(--primary-light);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.article-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.35;
}
.article-excerpt {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 1.25rem;
}
.btn-read-more {
  margin-top: auto;
  color: var(--primary-light);
  font-weight: 700;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* Drawer Cart */
.cart-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.cart-drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  z-index: 201;
  transform: translateX(100%);
  transition: transform var(--transition-smooth);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.cart-drawer.open {
  transform: translateX(0);
}

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

.drawer-scroll-area {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}
.drawer-header h3 {
  font-size: 1.2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-close-drawer {
  font-size: 1.4rem;
  color: var(--text-muted);
}

.drawer-body {
  overflow: visible;
  padding: 1.25rem 1.5rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
  align-items: center;
}
.cart-item-img {
  width: 70px;
  height: 70px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: #f1f5f9;
}
.cart-item-details {
  flex: 1;
}
.cart-item-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.cart-item-price {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary-light);
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-body);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.5rem;
}
.btn-qty {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.drawer-footer {
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-surface);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.summary-row.total {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border-color);
}

.btn-checkout-wa {
  width: 100%;
  background: #25d366;
  color: white;
  font-weight: 800;
  padding: 0.9rem;
  border-radius: var(--radius-full);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
  transition: all var(--transition-fast);
}
.btn-checkout-wa:hover {
  background: #1eb957;
  transform: translateY(-2px);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  max-width: 750px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
  padding: 2rem;
}
.btn-close-modal {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 1.5rem;
  color: var(--text-muted);
}

/* Floating WhatsApp Consultant Widget */
.wa-floating-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 90;
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: white;
  padding: 0.8rem 1.3rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
  animation: pulseFloating 2.5s infinite;
}
.wa-floating-btn:hover {
  transform: scale(1.05);
}
@keyframes pulseFloating {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
  70% { box-shadow: 0 0 0 16px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Outlet & Lokasi Toko */
.outlet-section {
  margin-top: 3.5rem;
  scroll-margin-top: 100px; /* offset navbar sticky saat klik anchor #outlet */
}
.outlet-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
  align-items: stretch;
}
.outlet-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.75rem;
}
.outlet-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--primary-bg);
  color: var(--primary-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.outlet-name {
  margin: 0.9rem 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 800;
}
.outlet-tagline {
  margin: 0 0 1.35rem;
  color: var(--text-muted);
  font-size: 0.88rem;
}
.outlet-details {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin: 0 0 1.5rem;
  padding: 0;
}
.outlet-details li {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 0.75rem;
  align-items: start;
}
.outlet-details li > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-md);
  background: var(--primary-bg);
  color: var(--primary-light);
  font-size: 0.9rem;
}
.outlet-details strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.outlet-details span,
.outlet-details a {
  display: block;
  font-size: 0.92rem;
  line-height: 1.55;
  font-weight: 600;
}
.outlet-details a {
  color: var(--primary-light);
  text-decoration: none;
}
.outlet-details a:hover {
  text-decoration: underline;
}
.outlet-details small {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-muted);
  font-size: 0.76rem;
}
.outlet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}
.outlet-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.15rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-main, inherit);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}
.outlet-btn:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  transform: translateY(-1px);
}
.outlet-btn.primary {
  border-color: var(--primary-light);
  background: var(--primary-light);
  color: #ffffff;
}
.outlet-btn.primary:hover {
  background: var(--primary-mint);
  border-color: var(--primary-mint);
  color: #ffffff;
}
.outlet-map {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  background: var(--primary-bg);
}
.outlet-map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Footer */
.footer {
  background: #062c20;
  color: #94a3b8;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  border-top: 1px solid #1e3a2b;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-brand h3 {
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 1rem;
}
.footer-links h4 {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.footer-links ul {
  list-style: none;
}
.footer-links li {
  margin-bottom: 0.65rem;
}
.footer-links a:hover {
  color: var(--primary-mint);
  text-decoration: underline;
}
.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #1e3a2b;
  font-size: 0.85rem;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .hero-grid, .calculator-grid {
    grid-template-columns: 1fr;
  }
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .outlet-grid {
    grid-template-columns: 1fr;
  }
  .outlet-map {
    min-height: 280px;
  }
}

@media (max-width: 640px) {
  .outlet-card {
    padding: 1.25rem;
  }
  .outlet-map {
    min-height: 240px;
  }
  .outlet-actions .outlet-btn {
    flex: 1 1 100%;
    justify-content: center;
  }
  .navbar-inner {
    height: 70px;
  }
  .search-box {
    display: none; /* Mobile search drawer or toggle */
  }
  .hero-content h1 {
    font-size: 1.8rem;
  }
  .calc-stats-row {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cart-drawer {
    max-width: none;
  }

  .drawer-scroll-area {
    scrollbar-gutter: auto;
  }

  .drawer-header,
  .drawer-body,
  .drawer-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .drawer-header h3 {
    font-size: 1.05rem;
  }

  .area-results {
    max-height: 14rem;
  }

  .area-option {
    font-size: 0.85rem;
  }

  .cart-item {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.45rem;
  }

  .cart-item-img {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 60px;
    height: 60px;
  }

  .cart-item-details {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .cart-item-title {
    font-size: 0.85rem;
  }

  .cart-item-price {
    font-size: 0.82rem;
  }

  .cart-item .qty-controls {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }

  .cart-item > button:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }
}
