/* =============================================
   QuickMart - Blinkit Clone CSS
   ============================================= */

:root {
  --green: #0c831f;
  --green-light: #e8f5e9;
  --green-dark: #086a19;
  --yellow: #f8b700;
  --yellow-bg: #fff8e1;
  --red: #e23744;
  --orange: #f97316;
  --text: #1d1d1d;
  --text-light: #666;
  --text-muted: #999;
  --border: #e8e8e8;
  --bg: #f2f2f2;
  --white: #ffffff;
  --card-shadow: 0 2px 12px rgba(0,0,0,0.08);
  --card-shadow-hover: 0 8px 24px rgba(0,0,0,0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --header-h: 72px;
  --mobile-header-h: 110px;
  --mobile-nav-h: 60px;
}

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

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--header-h);
  min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 10px; }

/* ===== HEADER ===== */
.main-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
}
.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 20px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  white-space: nowrap;
}
.logo-icon { font-size: 26px; }
.logo-text { color: var(--text); }

.location-bar {
  display: flex;
  flex-direction: column;
  min-width: 180px;
  cursor: pointer;
}
.delivery-label {
  font-size: 12px;
  color: var(--text-light);
}
.delivery-label strong { color: var(--green); }
.location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 0;
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-btn .fa-map-marker-alt { color: var(--green); }
.location-btn .fa-chevron-down { font-size: 11px; color: var(--text-light); }

.search-wrap {
  flex: 1;
  position: relative;
}
.search-form {
  position: relative;
  display: flex;
  align-items: center;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
  font-size: 16px;
}
.search-input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}
.search-input:focus {
  border-color: var(--green);
  background: var(--white);
}
.search-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--card-shadow-hover);
  z-index: 100;
  max-height: 360px;
  overflow-y: auto;
}
.suggestion-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background: var(--bg); }
.suggestion-item img { width: 40px; height: 40px; object-fit: contain; border-radius: 6px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.btn-login, .btn-account {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-login:hover, .btn-account:hover {
  background: var(--green);
  color: var(--white);
}
.user-avatar-sm {
  width: 24px; height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.btn-cart {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  position: relative;
  transition: background 0.2s;
  white-space: nowrap;
}
.btn-cart:hover { background: var(--green-dark); }
.cart-badge {
  background: var(--yellow);
  color: var(--text);
  border-radius: 50%;
  width: 20px; height: 20px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== MOBILE HEADER ===== */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
  flex-direction: column;
  gap: 8px;
}
.mobile-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.m-location {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.m-delivery-txt { font-size: 11px; color: var(--text-light); }
.m-delivery-txt strong { color: var(--green); }
.m-location-txt { font-size: 14px; font-weight: 700; }
.m-account-btn { color: var(--text); }
.mobile-search-form {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.mobile-search-form i { color: var(--text-muted); }
.mobile-search-form input {
  flex: 1;
  border: none;
  background: none;
  font-size: 14px;
  outline: none;
  color: var(--text);
}

/* ===== MOBILE BOTTOM NAV ===== */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--white);
  border-top: 1px solid var(--border);
  height: var(--mobile-nav-h);
  justify-content: space-around;
  align-items: center;
}
.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 12px;
  position: relative;
}
.m-nav-item.active { color: var(--green); }
.m-nav-item i { font-size: 20px; }
.m-cart-badge {
  position: absolute;
  top: 2px; right: 4px;
  background: var(--green);
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 10px;
}

/* ===== LOCATION MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  background: var(--white);
  border-radius: 16px;
  padding: 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { font-size: 20px; margin-bottom: 20px; }
.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 18px;
  color: var(--text-light);
}
.modal-close:hover { color: var(--text); }
.btn-detect-location {
  width: 100%;
  padding: 14px;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}
.btn-detect-location:hover { background: var(--green); color: white; }
.or-divider { text-align: center; color: var(--text-muted); margin: 16px 0; font-size: 13px; }
.location-search-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
}
.location-search-input:focus { border-color: var(--green); }
.location-search-results { margin-top: 8px; }
.location-result-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  transition: background 0.15s;
}
.location-result-item:hover { background: var(--bg); }
.location-result-item i { color: var(--green); margin-top: 2px; flex-shrink: 0; }

/* ===== CONTAINER ===== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
.section { padding: 24px 0; }

/* ===== HERO BANNER ===== */
.hero-banner {
  background: var(--green);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 24px;
  min-height: 180px;
  display: flex;
  align-items: center;
}
.hero-slider {
  display: flex;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
}
.hero-slide {
  flex: 0 0 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  padding: 28px 36px;
  color: white;
  background: linear-gradient(135deg, #0c831f 0%, #1ca534 100%);
}
.hero-slide-content { flex: 1; }
.hero-slide h1 { font-size: 32px; font-weight: 800; line-height: 1.2; margin-bottom: 8px; }
.hero-slide p { font-size: 16px; opacity: 0.9; margin-bottom: 20px; }
.btn-shop-now {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--yellow);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.2s;
}
.btn-shop-now:hover { transform: translateY(-2px); }

/* ===== CATEGORY PILLS ===== */
.category-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
  margin-bottom: 24px;
}
.category-scroll::-webkit-scrollbar { display: none; }
.cat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 80px;
  padding: 12px 8px;
  background: var(--white);
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.cat-pill:hover, .cat-pill.active {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green);
}
.cat-pill img {
  width: 42px; height: 42px;
  object-fit: contain;
}

/* ===== SECTION HEADER ===== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.section-title span { color: var(--green); }
.see-all {
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 4px;
}
.see-all:hover { text-decoration: underline; }

/* ===== PRODUCT CARD ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  position: relative;
  cursor: pointer;
  border: 1px solid var(--border);
}
.product-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}
.product-image-wrap {
  position: relative;
  background: #f8f8f8;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px;
}
.product-image-wrap img {
  height: 130px;
  width: 100%;
  object-fit: contain;
  transition: transform 0.2s;
}
.product-card:hover .product-image-wrap img { transform: scale(1.05); }
.discount-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--green);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.out-of-stock-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: #999;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}
.wishlist-btn {
  position: absolute;
  top: 8px; right: 8px;
  width: 30px; height: 30px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: all 0.2s;
  z-index: 1;
}
.wishlist-btn:hover, .wishlist-btn.active { color: var(--red); }

.product-info { padding: 12px; }
.product-qty { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.product-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}
.product-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price-wrap { display: flex; align-items: center; gap: 6px; }
.price-current { font-size: 15px; font-weight: 700; color: var(--text); }
.price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}
.add-to-cart-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  background: white;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 18px;
  font-weight: 700;
  transition: all 0.2s;
  flex-shrink: 0;
}
.add-to-cart-btn:hover { background: var(--green); color: white; }
.qty-control {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--green);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-btn {
  width: 28px; height: 30px;
  background: var(--green);
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qty-num {
  width: 28px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
}

/* ===== PRODUCT SCROLL ROW ===== */
.products-row {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.products-row::-webkit-scrollbar { display: none; }
.products-row .product-card { min-width: 180px; flex: 0 0 180px; }

/* ===== PROMO BANNERS ===== */
.promo-banners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.promo-banner {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, #1ca534, #0c831f);
  display: flex;
  align-items: center;
  padding: 20px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}
.promo-banner:hover { transform: scale(1.02); }
.promo-banner:nth-child(2) { background: linear-gradient(135deg, #f97316, #ef4444); }
.promo-banner:nth-child(3) { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.promo-banner-text h3 { font-size: 18px; font-weight: 800; }
.promo-banner-text p { font-size: 12px; opacity: 0.9; margin-top: 4px; }

/* ===== CATEGORY GRID (Home page) ===== */
.home-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.home-cat-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.home-cat-card:hover {
  border-color: var(--green);
  box-shadow: var(--card-shadow);
}
.home-cat-card img { width: 60px; height: 60px; object-fit: contain; margin-bottom: 10px; }
.home-cat-card span { font-size: 13px; font-weight: 600; }

/* ===== CATEGORIES PAGE ===== */
.categories-layout {
  display: flex;
  gap: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.cat-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  overflow-y: auto;
  max-height: calc(100vh - 100px);
  position: sticky;
  top: 80px;
}
.cat-sidebar-item {
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.cat-sidebar-item:hover, .cat-sidebar-item.active {
  background: var(--green-light);
  border-left-color: var(--green);
  color: var(--green);
}
.cat-sidebar-item img { width: 32px; height: 32px; object-fit: contain; }

.cat-main-content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  max-height: calc(100vh - 100px);
}
.cat-sub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 14px;
  margin-bottom: 32px;
}
.cat-sub-item {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
}
.cat-sub-item:hover { border-color: var(--green); color: var(--green); }
.cat-sub-item img { width: 50px; height: 50px; object-fit: contain; margin-bottom: 6px; }

/* ===== SEARCH PAGE ===== */
.search-page-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 24px;
}
.search-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  background: var(--white);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn.active, .filter-btn:hover {
  background: var(--green);
  color: white;
  border-color: var(--green);
}
.search-results-count { font-size: 14px; color: var(--text-light); margin-bottom: 16px; }
.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.no-results i { font-size: 60px; margin-bottom: 16px; }
.no-results h3 { font-size: 20px; color: var(--text); margin-bottom: 8px; }

/* ===== CART ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  align-items: start;
}
.cart-items-section {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}
.cart-section-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.cart-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
  width: 70px; height: 70px;
  object-fit: contain;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 6px;
  flex-shrink: 0;
}
.cart-item-info { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.cart-item-qty-label { font-size: 12px; color: var(--text-muted); }
.cart-item-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.cart-item-price { font-size: 15px; font-weight: 700; }
.cart-summary {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 88px;
}
.cart-summary-header {
  padding: 16px 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.cart-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.cart-summary-row.total {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}
.cart-summary-row.savings { color: var(--green); font-weight: 600; }
.coupon-input-wrap {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.coupon-input-wrap input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  outline: none;
  text-transform: uppercase;
}
.coupon-input-wrap input:focus { border-color: var(--green); }
.btn-apply {
  padding: 10px 16px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.btn-checkout {
  width: calc(100% - 40px);
  margin: 20px;
  padding: 16px;
  background: var(--green);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.2s;
}
.btn-checkout:hover { background: var(--green-dark); }
.empty-cart {
  text-align: center;
  padding: 80px 20px;
}
.empty-cart i { font-size: 80px; color: #ddd; margin-bottom: 20px; }
.empty-cart h2 { font-size: 22px; margin-bottom: 8px; }
.empty-cart p { color: var(--text-light); margin-bottom: 24px; }
.btn-continue-shopping {
  display: inline-block;
  padding: 12px 28px;
  background: var(--green);
  color: white;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* ===== ACCOUNT PAGE ===== */
.account-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 24px;
  align-items: start;
}
.account-sidebar {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 88px;
}
.account-profile-card {
  padding: 24px;
  background: var(--green);
  color: white;
  text-align: center;
}
.account-avatar {
  width: 70px; height: 70px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
  margin-bottom: 12px;
}
.account-avatar-placeholder {
  width: 70px; height: 70px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 12px;
}
.account-name { font-size: 16px; font-weight: 700; }
.account-email { font-size: 12px; opacity: 0.85; margin-top: 4px; }
.account-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  font-size: 14px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid var(--border);
  transition: all 0.15s;
}
.account-nav a:hover, .account-nav a.active {
  background: var(--green-light);
  border-left-color: var(--green);
  color: var(--green);
}
.account-nav a i { width: 20px; }

.auth-card {
  max-width: 440px;
  margin: 60px auto;
  background: var(--white);
  border-radius: 16px;
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--card-shadow);
}
.auth-logo { text-align: center; font-size: 28px; font-weight: 800; color: var(--green); margin-bottom: 8px; }
.auth-card h2 { text-align: center; font-size: 22px; margin-bottom: 6px; }
.auth-subtitle { text-align: center; color: var(--text-light); font-size: 14px; margin-bottom: 28px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--green); }
.btn-auth {
  width: 100%;
  padding: 14px;
  background: var(--green);
  color: white;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  margin-top: 8px;
  transition: background 0.2s;
}
.btn-auth:hover { background: var(--green-dark); }
.divider { text-align: center; color: var(--text-muted); font-size: 13px; margin: 20px 0; position: relative; }
.divider::before, .divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.divider::before { left: 0; }
.divider::after { right: 0; }
.btn-google {
  width: 100%;
  padding: 13px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.2s;
  background: white;
}
.btn-google:hover { border-color: #4285f4; box-shadow: 0 2px 8px rgba(66,133,244,0.2); }
.btn-google img { width: 20px; height: 20px; }
.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-light); }
.auth-switch a { color: var(--green); font-weight: 600; }
.auth-error { background: #fee2e2; color: var(--red); padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; border: 1px solid #fecaca; }
.auth-success { background: var(--green-light); color: var(--green-dark); padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; border: 1px solid #a7d7a8; }
.tabs {
  display: flex;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.tab-btn {
  flex: 1;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

/* ===== TOAST ===== */
.toast-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--text);
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  animation: toast-in 0.3s ease, toast-out 0.3s ease 2.5s forwards;
  pointer-events: auto;
}
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
@keyframes toast-in { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
@keyframes toast-out { from { opacity:1; } to { opacity:0; } }

/* ===== LOADING SKELETON ===== */
.skeleton { background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: 8px; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ===== ORDERS ===== */
.order-card {
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 16px;
}
.order-card-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.order-number { font-weight: 700; font-size: 15px; }
.order-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.status-delivered { background: var(--green-light); color: var(--green); }
.status-pending { background: var(--yellow-bg); color: #b45309; }
.status-cancelled { background: #fee2e2; color: var(--red); }
.order-items-preview {
  padding: 16px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.order-item-img { width: 56px; height: 56px; border-radius: 8px; border: 1px solid var(--border); object-fit: contain; padding: 4px; }
.order-total { padding: 12px 20px; background: var(--bg); font-weight: 600; font-size: 14px; display: flex; justify-content: space-between; }

/* ===== PRODUCT DETAIL ===== */
.product-detail-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.product-main-img { background: #f8f8f8; border-radius: var(--radius); padding: 40px; display: flex; align-items: center; justify-content: center; min-height: 360px; }
.product-main-img img { max-height: 280px; object-fit: contain; }
.product-detail-info { padding: 10px 0; }
.product-detail-name { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.product-detail-brand { color: var(--text-muted); font-size: 14px; margin-bottom: 12px; }
.product-detail-price { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.product-detail-price .current { font-size: 28px; font-weight: 800; }
.product-detail-price .original { font-size: 16px; color: var(--text-muted); text-decoration: line-through; }
.product-detail-price .badge { background: var(--green); color: white; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 6px; }
.btn-add-detail {
  padding: 14px 32px;
  background: var(--green);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  transition: background 0.2s;
}
.btn-add-detail:hover { background: var(--green-dark); }

/* ===== FOOTER ===== */
.main-footer {
  background: var(--white);
  border-top: 1px solid var(--border);
  margin-top: 48px;
  padding-bottom: 0;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px 32px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
  gap: 32px;
}
.footer-logo { font-size: 22px; font-weight: 800; color: var(--green); margin-bottom: 10px; }
.footer-tagline { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
  width: 36px; height: 36px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--text-muted);
  transition: all 0.2s;
}
.footer-social a:hover { background: var(--green); color: white; }
.footer-col h4 { font-size: 14px; font-weight: 700; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { font-size: 13px; color: var(--text-muted); transition: color 0.15s; }
.footer-col ul li a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 20px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--green); }

/* ===== PAGE TRANSITIONS ===== */
.page-enter { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .home-cat-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-banners { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
}

@media (max-width: 768px) {
  .main-header, .main-footer, .mobile-bottom-nav { }
  .main-header { display: none; }
  .mobile-header { display: flex; }
  .mobile-bottom-nav { display: flex; }
  body {
    padding-top: var(--mobile-header-h);
    padding-bottom: var(--mobile-nav-h);
  }
  .home-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .promo-banners { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero-slide h1 { font-size: 22px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-col:first-child { grid-column: 1 / -1; }
  .account-layout { grid-template-columns: 1fr; }
  .account-sidebar { position: static; }
  .product-detail-layout { grid-template-columns: 1fr; }
  .categories-layout { flex-direction: column; }
  .cat-sidebar { width: 100%; max-height: 180px; display: flex; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .cat-sidebar-item { flex-direction: column; min-width: 80px; border-left: none; border-bottom: 3px solid transparent; text-align: center; font-size: 11px; }
  .cat-sidebar-item.active { border-bottom-color: var(--green); border-left-color: transparent; }
}
