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

:root {
  --primary: #03AC0E;
  --primary-light: #f0fdf4;
  --primary-dark: #029A0C;
  --green-50: #f0fdf4; --green-100: #dcfce7; --green-200: #bbf7d0;
  --green-300: #86efac; --green-400: #4ade80; --green-500: #03AC0E;
  --green-600: #029A0C; --green-700: #15803d; --green-800: #166534;
  --green-900: #14532d;
  --gray-50: #f8fafc; --gray-100: #f1f5f9; --gray-200: #e2e8f0;
  --gray-300: #cbd5e1; --gray-400: #94a3b8; --gray-500: #64748b;
  --gray-600: #475569; --gray-700: #334155; --gray-800: #1e293b;
  --gray-900: #0f172a;
  --orange-500: #FF5722; --red-500: #ef4444; --yellow-500: #FFD700;
  --blue-500: #3b82f6;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.05);
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-xl: 20px;
  --header-h: 52px; --nav-h: 40px;
  --max-w: 1200px;
  --transition: .2s cubic-bezier(.4,0,.2,1);
}

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

html { overflow-x: clip; }

body {
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
img { max-width: 100%; display: block; }
picture, video, iframe, svg { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
input, select { font-family: inherit; }

/* ===== HEADER ===== */
.header { background: var(--green-500); position: sticky; top: 0; z-index: 50; }
.header-top {
  max-width: var(--max-w); margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; height: var(--header-h); gap: 12px;
}
.logo { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.logo svg { width: 32px; height: 32px; }
.logo-text { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.5px; }

.search-box {
  flex: 1; display: flex; align-items: center; position: relative;
  background: #fff; border-radius: var(--radius-sm); padding: 0 40px 0 12px;
  height: 38px; transition: var(--transition);
}
.search-box:focus-within { box-shadow: 0 0 0 3px rgba(255,255,255,.3); }
.search-box input {
  flex: 1; border: none; outline: none; font-size: 14px;
  background: transparent; color: var(--gray-800);
}
.search-box input::placeholder { color: var(--gray-400); }
.search-box button {
  width: 32px; height: 32px; display: grid; place-items: center;
  color: var(--green-500); border-radius: 6px;
  position: absolute; right: 4px; top: 3px;
  background: transparent; border: none; cursor: pointer;
}
.search-box button svg { width: 18px; height: 18px; }
.search-box button:hover { background: var(--green-50); }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.header-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: #fff; border-radius: var(--radius-sm); position: relative;
  transition: var(--transition);
}
.header-btn:hover { background: rgba(255,255,255,.15); }
.header-btn .badge {
  position: absolute; top: 4px; right: 4px;
  background: var(--red-500); color: #fff; font-size: 10px;
  font-weight: 700; min-width: 16px; height: 16px;
  border-radius: 99px; display: grid; place-items: center; padding: 0 4px;
}
.header-btn svg { width: 22px; height: 22px; }

.btn-login, .btn-register {
  height: 34px; padding: 0 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; white-space: nowrap; transition: var(--transition);
  outline: none; box-sizing: border-box; display: flex; align-items: center;
}
.btn-login { border: 1.5px solid #fff; color: #fff; background: transparent; }
.btn-login:hover { background: rgba(255,255,255,.15); }
.btn-register { background: #fff; color: var(--green-500); border: 1.5px solid #fff; }
.btn-register:hover { background: var(--green-50); border-color: var(--green-50); }

/* Avatar & Dropdown */
.header-divider {
  width: 1px; height: 24px; background: rgba(255,255,255,.3); margin: 0 8px;
}
.header-avatar-wrap { position: relative; display: flex; align-items: center; }
.header-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff; font-size: 14px;
  font-weight: 700; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255,255,255,.3); transition: var(--transition);
}
.header-avatar:hover { background: rgba(255,255,255,.3); }
.avatar-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0;
  background: #fff; border-radius: var(--radius-md); width: 220px;
  box-shadow: var(--shadow-xl); opacity: 0; visibility: hidden;
  transform: translateY(-10px); transition: var(--transition);
  padding: 8px 0; border: 1px solid var(--gray-200); z-index: 60;
}
.avatar-dropdown.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  font-size: 14px; font-weight: 500; color: var(--gray-700);
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--gray-50); color: var(--green-500); }
.dropdown-item svg { width: 18px; height: 18px; color: var(--gray-400); }
.dropdown-item.danger { color: var(--red-500); }
.dropdown-item.danger svg { color: var(--red-500); }
.dropdown-divider { height: 1px; background: var(--gray-100); margin: 6px 0; }

.mobile-search-btn { display: none; }
.search-box .search-close { display: none; right: 36px; color: var(--gray-400); }
.search-box .search-close:hover { color: var(--gray-600); }
.desktop-only { display: inherit; }

/* ===== CATEGORY NAV ===== */
.category-nav { background: #fff; border-bottom: 1px solid var(--gray-200); }
.category-nav-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; height: var(--nav-h);
  gap: 0; overflow-x: auto; scrollbar-width: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.cat-link {
  padding: 0 14px; height: 100%; display: flex; align-items: center;
  font-size: 13px; color: var(--gray-600); white-space: nowrap;
  border-bottom: 2px solid transparent; transition: var(--transition);
}
.cat-link:hover { color: var(--green-500); border-bottom-color: var(--green-500); }
.cat-link.active { color: var(--green-500); font-weight: 600; border-bottom-color: var(--green-500); }

/* ===== MAIN CONTENT ===== */
.main { max-width: var(--max-w); margin: 0 auto; padding: 16px; }

/* ===== HERO BANNER ===== */
.hero-banner { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 20px; }
.banner-track { display: flex; transition: transform .5s cubic-bezier(.4,0,.2,1); }
.banner-slide {
  min-width: 100%; aspect-ratio: 3.5/1; position: relative;
  background: linear-gradient(135deg, var(--green-500), var(--green-700));
  display: flex; align-items: center; overflow: hidden;
}
.banner-slide .banner-content {
  position: relative; z-index: 2; padding: 40px 48px; max-width: 55%;
}
.banner-slide h2 { font-size: clamp(20px,3vw,36px); font-weight: 800; color: #fff; margin-bottom: 8px; }
.banner-slide p { font-size: clamp(13px,1.5vw,16px); color: rgba(255,255,255,.85); margin-bottom: 16px; }
.banner-cta {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; color: var(--green-600); padding: 10px 24px;
  border-radius: var(--radius-sm); font-weight: 600; font-size: 14px;
  transition: var(--transition);
}
.banner-cta:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.banner-deco {
  position: absolute; right: -20px; top: 50%; transform: translateY(-50%);
  width: 45%; opacity: .15; z-index: 1;
}
.banner-dots {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 3;
}
.banner-dot {
  width: 8px; height: 8px; border-radius: 99px;
  background: rgba(255,255,255,.4); transition: var(--transition);
}
.banner-dot.active { background: #fff; width: 24px; }
.banner-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.85); color: var(--gray-700);
  display: grid; place-items: center; z-index: 3;
  transition: var(--transition); backdrop-filter: blur(4px);
  box-shadow: var(--shadow-md);
}
.banner-arrow:hover { background: #fff; box-shadow: var(--shadow-lg); }
.banner-arrow.prev { left: 12px; }
.banner-arrow.next { right: 12px; }

/* ===== QUICK MENU ===== */
.quick-menu { display: grid; grid-template-columns: repeat(10,1fr); gap: 8px; margin-bottom: 20px; }
.qm-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 4px; border-radius: var(--radius-md);
  background: #fff; transition: var(--transition);
  cursor: pointer; text-align: center;
}
.qm-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.qm-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: grid; place-items: center; font-size: 20px;
}
.qm-item span { font-size: 11px; font-weight: 500; color: var(--gray-600); line-height: 1.3; }

/* ===== SECTION HEADERS ===== */
.section { margin-bottom: 24px; }
.section-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 12px;
}
.section-header h2 { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.see-all {
  font-size: 13px; font-weight: 600; color: var(--green-500);
  display: flex; align-items: center; gap: 4px; transition: var(--transition);
}
.see-all:hover { gap: 8px; }

/* ===== FLASH SALE ===== */
.flash-sale-bar {
  background: linear-gradient(90deg, #FF6B35, var(--red-500));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
}
.flash-sale-bar h2 { color: #fff; font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.flash-timer { display: flex; gap: 4px; }
.flash-timer span {
  background: var(--gray-900); color: #fff; font-size: 14px; font-weight: 700;
  padding: 4px 8px; border-radius: 6px; min-width: 32px; text-align: center;
}
.flash-timer .sep { background: none; padding: 0; min-width: auto; color: #fff; }

.flash-products {
  display: grid; grid-template-columns: repeat(6,1fr); gap: 0;
  background: #fff; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  overflow: hidden;
}
.flash-product {
  padding: 12px; border-right: 1px solid var(--gray-100);
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition); cursor: pointer;
}
.flash-product:hover { background: var(--green-50); }
.flash-product:last-child { border-right: none; }
.flash-product img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 8px; background: var(--gray-100); }
.flash-price { font-size: 14px; font-weight: 700; color: var(--red-500); }
.flash-original { font-size: 11px; color: var(--gray-400); text-decoration: line-through; }
.flash-discount {
  display: inline-block; background: #FFF0F0; color: var(--red-500);
  font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; margin-left: 4px;
}
.flash-bar-track { height: 4px; background: var(--gray-200); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.flash-bar-fill { height: 100%; background: linear-gradient(90deg, var(--orange-500), var(--red-500)); border-radius: 99px; }

/* ===== PRODUCT CARD ===== */
.product-grid { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; }
.product-card {
  background: #fff; border-radius: var(--radius-md); overflow: hidden;
  transition: var(--transition); cursor: pointer; border: 1px solid transparent;
}
.product-card:hover { border-color: var(--gray-200); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.product-card img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  background: var(--gray-100);
}
.product-info { padding: 10px 12px; }
.product-name {
  font-size: 13px; color: var(--gray-700); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px; min-height: 36px;
}
.product-price { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.product-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.product-badge {
  font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px;
}
.badge-official { background: var(--green-50); color: var(--green-600); border: 1px solid var(--green-200); }
.product-location { font-size: 11px; color: var(--gray-400); }
.product-rating { display: flex; align-items: center; gap: 2px; font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.product-rating svg { width: 12px; height: 12px; color: var(--yellow-500); }
.product-sold { font-size: 11px; color: var(--gray-400); }

/* ===== SSR PRODUCT CARD (index.php) ===== */
.product-card a { display: block; text-decoration: none; color: inherit; }
.product-image {
  width: 100%; aspect-ratio: 1; background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  font-size: 48px; overflow: hidden; position: relative;
}
.product-image img { width: 100%; height: 100%; object-fit: cover; }
.product-title {
  font-size: 13px; color: var(--gray-700); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 6px; min-height: 36px;
}
.product-stats { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.discount-badge {
  position: absolute; top: 8px; right: 8px;
  background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px;
  z-index: 1;
}
.add-to-cart-btn {
  width: 100%; padding: 8px 0; margin: 0;
  background: var(--green-500); color: #fff; border: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  font-size: 12px; font-weight: 700; cursor: pointer;
  font-family: inherit; transition: var(--transition);
}
.add-to-cart-btn:hover { background: var(--green-600); }

/* ===== CATEGORY CARDS ===== */
.category-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.category-card {
  background: #fff; border-radius: var(--radius-md); padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: var(--transition); cursor: pointer; text-align: center;
}
.category-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.category-card .cat-icon {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
}
.category-card span {
  font-size: 11px; font-weight: 500; color: var(--gray-700);
  line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.cat-extra { display: flex; }
.cat-see-all { display: none; }

/* ===== PROMO BANNER ROW ===== */
.promo-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 24px; }
.promo-card {
  border-radius: var(--radius-md); padding: 20px 24px;
  color: #fff; position: relative; overflow: hidden;
  min-height: 120px; display: flex; flex-direction: column;
  justify-content: center; transition: var(--transition); cursor: pointer;
}
.promo-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.promo-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.promo-card p { font-size: 12px; opacity: .85; }

/* ===== FOOTER ===== */
.footer { background: #fff; border-top: 1px solid var(--gray-200); margin-top: 32px; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto; padding: 40px 16px 20px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr; gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.footer-col a {
  display: block; font-size: 13px; color: var(--gray-500);
  padding: 3px 0; transition: var(--transition);
}
.footer-col a:hover { color: var(--green-500); }
.footer-about p { font-size: 13px; color: var(--gray-500); line-height: 1.6; margin-bottom: 12px; }
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--gray-100); display: grid; place-items: center;
  color: var(--gray-500); transition: var(--transition);
}
.footer-social a:hover { background: var(--green-500); color: #fff; }
.footer-bottom {
  border-top: 1px solid var(--gray-200); padding-top: 20px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; color: var(--gray-400);
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff; border-top: 1px solid var(--gray-200);
  z-index: 999; padding: 0 0 env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0,0,0,.06);
}
.mobile-nav-inner {
  display: flex; justify-content: stretch;
  width: 100%; margin: 0; padding: 0;
}
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 2px;
  padding: 8px 0 6px; font-size: 10px; color: var(--gray-400);
  transition: var(--transition); position: relative;
  text-align: center; min-width: 0;
}
.mobile-nav-item.active { color: var(--green-500); font-weight: 600; }
.mobile-nav-item.active svg { stroke-width: 2.5; }
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item .badge {
  position: absolute; top: 2px; right: calc(50% - 20px);
  background: var(--red-500); color: #fff; font-size: 9px;
  font-weight: 700; min-width: 14px; height: 14px;
  border-radius: 99px; display: grid; place-items: center;
}

/* ===== HAMBURGER MENU ===== */
.hamburger { display: none; }
.mobile-menu-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 2000; opacity: 0; transition: opacity .3s;
}
.mobile-menu-overlay.open { display: block; opacity: 1; }
.mobile-menu {
  position: fixed; top: 0; left: 0; width: min(280px, 100%); height: 100%;
  background: #fff; z-index: 2001; transition: transform .3s cubic-bezier(.4,0,.2,1);
  transform: translateX(-100%);
  overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu-header {
  background: var(--green-500); padding: 24px 16px;
  color: #fff; display: flex; align-items: center; gap: 12px;
}
.mobile-menu-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.2); display: grid; place-items: center;
}
.mobile-menu-user h3 { font-size: 15px; font-weight: 600; }
.mobile-menu-user p { font-size: 12px; opacity: .8; }
.mobile-menu-section { padding: 12px 0; border-bottom: 1px solid var(--gray-100); }
.mobile-menu-section h4 { font-size: 12px; font-weight: 600; color: var(--gray-400); padding: 0 16px; margin-bottom: 4px; text-transform: uppercase; letter-spacing: .5px; }
.mobile-menu-link {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  font-size: 14px; color: var(--gray-700); transition: var(--transition);
}
.mobile-menu-link:hover { background: var(--green-50); color: var(--green-600); }
.mobile-menu-link svg { width: 20px; height: 20px; color: var(--gray-400); }
.mobile-menu-divider { height: 1px; background: var(--gray-100); margin: 8px 0; }
.mobile-menu-link.danger { color: var(--red-500); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .product-grid, .flash-products { grid-template-columns: repeat(4,1fr); }
  .category-grid { grid-template-columns: repeat(4,1fr); }
  .footer-grid { grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 768px) {
  .desktop-only { display: none !important; }
  .header-top { padding: 0 10px; gap: 6px; justify-content: space-between; height: 48px; }
  .hamburger {
    display: grid; place-items: center; width: 36px; height: 36px;
    color: #fff; border-radius: var(--radius-sm);
  }
  .logo { flex: 1; }
  .logo-text { font-size: 17px; }
  .mobile-search-btn {
    display: flex !important; place-items: center; width: 36px; height: 36px;
    color: #fff; border-radius: var(--radius-sm);
  }
  .search-box {
    position: absolute; top: 100%; left: 0; right: 0;
    padding: 10px 12px; background: var(--green-600); border-radius: 0;
    transform: translateY(-10px); opacity: 0; visibility: hidden; z-index: -1; height: auto;
  }
  .search-box.active { transform: translateY(0); opacity: 1; visibility: visible; z-index: 40; }
  .search-box input { font-size: 15px; padding-right: 70px; width: 100%; background: #fff; height: 40px; border-radius: 8px; padding-left: 14px; }
  .search-box button { top: 14px; right: 16px; }
  .search-box .search-close { right: 50px; display: block; }
  .header-actions { flex-shrink: 0; }
  .header-btn { width: 36px; height: 36px; }
  .header-btn svg { width: 20px; height: 20px; }
  .header-avatar-wrap { display: flex !important; }
  .header-avatar { width: 30px; height: 30px; font-size: 11px; }
  .category-nav-inner { padding: 0 12px; }
  .main { padding: 12px; padding-top: 16px; }
  .section { margin-bottom: 20px; }
  .section-header h2 { font-size: 16px; }
  .hero-banner { border-radius: var(--radius-md); margin-bottom: 16px; }
  .banner-slide { aspect-ratio: 2/1; }
  .banner-slide .banner-content { max-width: 75%; padding: 16px 20px; }
  .banner-slide h2 { font-size: 16px; margin-bottom: 4px; }
  .banner-slide p { font-size: 12px; margin-bottom: 10px; }
  .banner-cta { padding: 8px 16px; font-size: 12px; }
  .banner-arrow { display: none; }
  .quick-menu { grid-template-columns: repeat(5,1fr); gap: 6px; margin-bottom: 16px; }
  .qm-item { padding: 10px 2px; gap: 4px; }
  .qm-icon { width: 36px; height: 36px; font-size: 18px; }
  .qm-item span { font-size: 10px; }
  .product-grid { grid-template-columns: repeat(2,1fr); gap: 8px; }
  .product-card { border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
  .product-image { aspect-ratio: 1; }
  .product-image img { width: 100%; height: 100%; object-fit: cover; }
  .product-info { padding: 8px 10px; }
  .product-title { font-size: 12px; min-height: 32px; margin-bottom: 4px; line-height: 1.35; }
  .product-price { font-size: 14px; font-weight: 800; margin-bottom: 2px; }
  .product-stats { font-size: 10px; margin-top: 2px; }
  .add-to-cart-btn { padding: 7px 0; font-size: 11px; }
  .discount-badge { font-size: 10px; padding: 2px 6px; top: 6px; right: 6px; }
  .flash-sale-bar { padding: 10px 14px; border-radius: 10px 10px 0 0; }
  .flash-sale-bar h2 { font-size: 15px; }
  .flash-timer span { font-size: 12px; padding: 3px 6px; min-width: 28px; }
  .flash-products { grid-template-columns: repeat(2,1fr); }
  .flash-product { padding: 10px; }
  .flash-product img { border-radius: 6px; }
  .flash-price { font-size: 13px; }
  .category-grid { grid-template-columns: repeat(4,1fr); gap: 6px; }
  .category-card { padding: 10px 4px; gap: 6px; border-radius: 10px; }
  .category-card .cat-icon { width: 44px; height: 44px; font-size: 20px; }
  .category-card span { font-size: 10px; }
  .cat-extra { display: none !important; }
  .cat-see-all { display: flex !important; }
  .category-grid.expanded .cat-extra { display: flex !important; }
  .category-grid.expanded .cat-see-all span { }
  .category-grid.expanded { grid-template-columns: repeat(4,1fr); }
  .promo-row { grid-template-columns: 1fr; gap: 8px; margin-bottom: 20px; }
  .promo-card { min-height: 90px; padding: 16px; border-radius: 10px; }
  .promo-card h3 { font-size: 14px; }
  .promo-card p { font-size: 11px; }
  .footer { margin-top: 20px; }
  .footer-inner { padding: 24px 12px 16px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
  .footer-col h4 { font-size: 13px; margin-bottom: 8px; }
  .footer-col a { font-size: 12px; }
  .footer-bottom { flex-direction: column; gap: 4px; text-align: center; font-size: 11px; }
  .mobile-nav { display: block; }
  .mobile-nav-inner { padding: 0; }
  .mobile-nav-item { padding: 8px 0 calc(6px + env(safe-area-inset-bottom, 0px)); font-size: 10px; gap: 3px; }
  .mobile-nav-item svg { width: 22px; height: 22px; }
  body { padding-bottom: 58px; }
}
@media (max-width: 480px) {
  .main { padding: 10px; padding-top: 12px; }
  .product-grid { grid-template-columns: repeat(2,1fr); gap: 7px; }
  .product-title { font-size: 11px; min-height: 30px; }
  .product-price { font-size: 13px; }
  .flash-products { grid-template-columns: repeat(2,1fr); }
  .quick-menu { grid-template-columns: repeat(5,1fr); gap: 4px; }
  .qm-icon { width: 32px; height: 32px; font-size: 16px; }
  .qm-item span { font-size: 9px; }
  .category-grid { grid-template-columns: repeat(4,1fr); gap: 5px; }
  .category-card { padding: 8px 4px; }
  .category-card .cat-icon { width: 40px; height: 40px; font-size: 18px; }
  .category-card span { font-size: 9px; }
  .footer-grid { grid-template-columns: 1fr; }
  .banner-slide .banner-content { max-width: 90%; padding: 14px; }
  .banner-slide h2 { font-size: 14px; }
  .section-header h2 { font-size: 15px; }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
.animate-in { animation: fadeInUp .5s ease both; }
.skeleton { background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%); background-size: 200% 100%; animation: pulse 1.5s infinite; border-radius: var(--radius-sm); }

/* ===== SCROLL TO TOP ===== */
.scroll-top {
  position: fixed; bottom: 80px; right: 20px; width: 44px; height: 44px;
  border-radius: 50%; background: var(--green-500); color: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-lg);
  z-index: 998; opacity: 0; transform: translateY(20px);
  transition: var(--transition); pointer-events: none;
}
.scroll-top.visible { opacity: 1; transform: none; pointer-events: auto; }
.scroll-top:hover { background: var(--green-600); transform: translateY(-2px); }

/* ===== SEARCH SUGGESTIONS ===== */
.search-suggestions {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-xl); z-index: 100; display: none; max-height: 400px; overflow-y: auto;
}
.search-suggestions.open { display: block; }
.search-suggestion-item {
  padding: 10px 16px; display: flex; align-items: center; gap: 10px;
  transition: var(--transition); cursor: pointer; font-size: 14px; color: var(--gray-700);
}
.search-suggestion-item:hover { background: var(--green-50); }
.search-suggestion-item svg { width: 16px; height: 16px; color: var(--gray-400); flex-shrink: 0; }
.search-group-title { padding: 8px 16px; font-size: 12px; font-weight: 600; color: var(--gray-400); text-transform: uppercase; }

.header-top { position: relative; }
