/* ============================================
   HOMEFOODY - DESIGN SYSTEM & GLOBAL STYLES
   ============================================ */

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

/* ---- CSS Variables ---- */
:root {
  --primary:        #2E7D32;
  --primary-light:  #66BB6A;
  --primary-dark:   #1B5E20;
  --primary-bg:     #E8F5E9;
  --accent:         #FF6F00;
  --accent-light:   #FFA726;
  --accent-bg:      #FFF3E0;
  --text-primary:   #1A1A1A;
  --text-secondary: #555;
  --text-muted:     #888;
  --bg-main:        #F9FBF7;
  --bg-white:       #FFFFFF;
  --border:         #E0E0E0;
  --shadow-sm:      0 2px 8px rgba(0,0,0,0.08);
  --shadow-md:      0 4px 20px rgba(0,0,0,0.12);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.15);
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      20px;
  --radius-xl:      32px;
  --transition:     all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Nunito', Arial, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 3px; }

/* ============================
   TOP BAR
   ============================ */
.topbar {
  width: 100%;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  height: 44px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: white;
  position: relative;
  z-index: 100;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 20px; }
.topbar-left span { opacity: 0.9; }
.topbar-left b { font-weight: 700; }
.topbar-left .divider { opacity: 0.4; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-right a {
  color: white;
  opacity: 0.9;
  font-weight: 600;
  padding: 4px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: var(--transition);
  font-size: 13px;
}
.topbar-right a:hover {
  background: rgba(255,255,255,0.2);
  opacity: 1;
}

/* ============================
   HEADER
   ============================ */
.header {
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 200;
  transition: var(--transition);
}
.header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 0;
}

/* Logo */
.logo { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.logo-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}
.logo-text { line-height: 1.2; }
.logo-text strong { display: block; font-size: 20px; font-weight: 900; color: var(--primary-dark); }
.logo-text span { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 1px; }

/* Search Bar */
.search-bar {
  flex: 1;
  position: relative;
  max-width: 500px;
}
.search-bar input {
  width: 100%;
  padding: 12px 56px 12px 20px;
  border: 2px solid var(--border);
  border-radius: 30px;
  font-size: 14px;
  background: var(--bg-main);
  transition: var(--transition);
}
.search-bar input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 4px rgba(102,187,106,0.15);
}
.search-bar input::placeholder { color: var(--text-muted); }
.search-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none; border-radius: 24px;
  width: 44px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: var(--transition);
}
.search-btn:hover { background: var(--primary-dark); transform: translateY(-50%) scale(1.05); }

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }

.header-action-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
}
.header-action-item:hover { background: var(--primary-bg); }

.header-action-item .icon {
  font-size: 22px;
  position: relative;
}
.header-action-item .text-sm { font-size: 11px; color: var(--text-muted); }
.header-action-item .text-main { font-size: 14px; font-weight: 700; color: var(--text-primary); }

.cart-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent);
  color: white;
  font-size: 10px; font-weight: 800;
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* ============================
   NAV MENU
   ============================ */
.navbar {
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  position: relative;
  z-index: 150;
}
.nav-list {
  display: flex; align-items: center;
}
.nav-item { position: relative; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  color: white; font-weight: 600; font-size: 14px;
  padding: 14px 18px;
  transition: var(--transition);
  opacity: 0.9;
}
.nav-link:hover { opacity: 1; background: rgba(255,255,255,0.15); }
.nav-link.active { opacity: 1; background: rgba(255,255,255,0.2); }
.nav-link .caret { font-size: 10px; transition: var(--transition); }
.nav-item:hover .caret { transform: rotate(180deg); }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute; top: 100%; left: 0;
  background: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: 300;
  overflow: hidden;
}
.nav-item:hover .dropdown { display: block; animation: dropDown 0.2s ease; }
@keyframes dropDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 18px;
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
  transition: var(--transition);
}
.dropdown-item:hover { background: var(--primary-bg); color: var(--primary); padding-left: 24px; }

/* ============================
   CONTAINER
   ============================ */
.container {
  width: 90%; max-width: 1280px;
  margin: 0 auto;
}

/* ============================
   HERO SLIDER
   ============================ */
.hero { position: relative; overflow: hidden; height: 480px; }

.slide {
  display: none; position: absolute; inset: 0;
  align-items: center;
  animation: fadeSlide 0.6s ease;
}
.slide.active { display: flex; }
@keyframes fadeSlide {
  from { opacity: 0; transform: scale(1.03); }
  to   { opacity: 1; transform: scale(1); }
}

.slide-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.5);
}
.slide-content {
  position: relative; z-index: 2;
  color: white;
  max-width: 600px;
}
.slide-label {
  display: inline-block;
  background: var(--accent);
  color: white; font-size: 12px; font-weight: 700;
  padding: 4px 14px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 1px;
  margin-bottom: 16px;
}
.slide-content h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.slide-content p {
  font-size: 16px; opacity: 0.9;
  margin-bottom: 28px;
  line-height: 1.7;
}
.slide-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Slider controls */
.slider-dots {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10;
}
.dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer; transition: var(--transition);
}
.dot.active { background: white; width: 28px; border-radius: 5px; }

.slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,0.2); border: none;
  color: white; font-size: 22px;
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); z-index: 10;
  backdrop-filter: blur(4px);
}
.slider-arrow:hover { background: rgba(255,255,255,0.35); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* ============================
   POLICY BAR
   ============================ */
.policy-bar {
  background: white;
  border-bottom: 1px solid var(--border);
}
.policy-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 0;
}
.policy-item {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 24px;
  border-right: 1px solid var(--border);
  transition: var(--transition);
}
.policy-item:last-child { border-right: none; }
.policy-item:hover { background: var(--primary-bg); }
.policy-icon {
  font-size: 32px;
  width: 52px; height: 52px;
  background: var(--primary-bg);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}
.policy-item:hover .policy-icon { background: var(--primary); font-size: 30px; animation: bounce 0.4s; }
@keyframes bounce { 0%,100%{transform:scale(1)} 50%{transform:scale(1.2)} }
.policy-text strong { display: block; font-size: 14px; font-weight: 700; color: var(--text-primary); }
.policy-text span { font-size: 12px; color: var(--text-muted); }

/* ============================
   SECTIONS
   ============================ */
.section { padding: 56px 0; }
.section-sm { padding: 36px 0; }

.section-header {
  display: flex; align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.section-title { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1.2; }
.section-title span { color: var(--primary); }
.section-subtitle { font-size: 14px; color: var(--text-muted); margin-top: 6px; }
.section-link {
  font-size: 14px; font-weight: 700; color: var(--primary);
  display: flex; align-items: center; gap: 4px;
  transition: var(--transition); white-space: nowrap;
}
.section-link:hover { color: var(--primary-dark); gap: 8px; }

/* ============================
   CATEGORY GRID
   ============================ */
.category-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.category-card {
  background: white;
  border-radius: var(--radius-md);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition);
  border: 2px solid transparent;
}
.category-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}
.category-card.active {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.cat-icon {
  font-size: 42px;
  margin-bottom: 10px;
  display: block;
  transition: var(--transition);
}
.category-card:hover .cat-icon { transform: scale(1.15) rotate(-5deg); }
.cat-name { font-size: 13px; font-weight: 700; color: var(--text-secondary); }
.cat-count { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============================
   PRODUCT GRID
   ============================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-img-wrap {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--bg-main);
}
.product-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }

.product-badges {
  position: absolute; top: 12px; left: 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.badge {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 20px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.badge-new    { background: var(--primary); color: white; }
.badge-sale   { background: var(--accent); color: white; }
.badge-hot    { background: #E53935; color: white; }
.badge-org    { background: #7B1FA2; color: white; }

.product-actions {
  position: absolute; top: 12px; right: 12px;
  display: flex; flex-direction: column; gap: 8px;
  opacity: 0; transform: translateX(10px);
  transition: var(--transition);
}
.product-card:hover .product-actions { opacity: 1; transform: translateX(0); }
.action-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: white; box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition);
  border: none; cursor: pointer;
}
.action-btn:hover { background: var(--primary); color: white; transform: scale(1.1); }

.product-body { padding: 16px; }
.product-category { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.product-name { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; line-height: 1.4; }
.product-name:hover { color: var(--primary); }

.product-rating { display: flex; align-items: center; gap: 6px; margin-bottom: 10px; }
.stars { color: #FFB300; font-size: 13px; letter-spacing: 1px; }
.rating-count { font-size: 12px; color: var(--text-muted); }

.product-price { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.price-current { font-size: 20px; font-weight: 900; color: var(--primary); }
.price-original { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.price-discount {
  font-size: 11px; font-weight: 700;
  color: var(--accent); background: var(--accent-bg);
  padding: 2px 7px; border-radius: 10px;
}

.btn-add-cart {
  width: 100%;
  background: var(--primary);
  color: white;
  padding: 11px;
  border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: var(--transition);
  border: none;
}
.btn-add-cart:hover {
  background: var(--primary-dark);
  transform: scale(1.02);
}
.btn-add-cart.added {
  background: var(--accent);
  animation: addedPop 0.4s ease;
}
@keyframes addedPop {
  0%,100%{transform:scale(1)} 50%{transform:scale(1.06)}
}

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 28px;
  border-radius: 30px;
  font-size: 14px; font-weight: 700;
  transition: var(--transition);
  border: none; cursor: pointer;
  letter-spacing: 0.3px;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(46,125,50,0.35);
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46,125,50,0.4);
}
.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(255,111,0,0.35);
}
.btn-accent:hover {
  background: #E65100;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255,111,0,0.4);
}
.btn-outline {
  background: transparent;
  border: 2px solid white;
  color: white;
}
.btn-outline:hover {
  background: white;
  color: var(--primary-dark);
}
.btn-outline-dark {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline-dark:hover {
  background: var(--primary);
  color: white;
}

/* ============================
   PROMO BANNERS
   ============================ */
.promo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.promo-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  height: 180px;
  display: flex; align-items: center;
  padding: 32px;
  cursor: pointer;
  transition: var(--transition);
}
.promo-card:hover { transform: scale(1.02); box-shadow: var(--shadow-md); }
.promo-card .bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(0.55);
  transition: var(--transition);
}
.promo-card:hover .bg { filter: brightness(0.6); transform: scale(1.05); }
.promo-card .content { position: relative; z-index: 2; color: white; }
.promo-card .tag {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  background: var(--accent); color: white;
  padding: 3px 12px; border-radius: 20px; display: inline-block; margin-bottom: 8px;
}
.promo-card h3 { font-size: 24px; font-weight: 900; margin-bottom: 8px; }
.promo-card p { font-size: 13px; opacity: 0.9; margin-bottom: 14px; }

/* ============================
   TESTIMONIALS
   ============================ */
.testimonials-wrap { position: relative; overflow: hidden; }
.testimonial-slider { display: flex; gap: 20px; transition: transform 0.4s ease; }
.testimonial-card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  min-width: calc(33.33% - 14px);
  transition: var(--transition);
  border: 2px solid transparent;
}
.testimonial-card:hover { border-color: var(--primary-light); box-shadow: var(--shadow-md); }
.testimonial-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.avatar {
  width: 52px; height: 52px; border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--primary-light);
}
.reviewer-name { font-weight: 700; font-size: 15px; }
.reviewer-location { font-size: 12px; color: var(--text-muted); }
.test-stars { color: #FFB300; font-size: 14px; margin-bottom: 10px; }
.test-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; font-style: italic; }

/* ============================
   FOOTER
   ============================ */
.footer {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #2E7D32 100%);
  color: white;
  padding: 60px 0 0;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px; padding-bottom: 40px;
}
.footer-brand .logo-text strong,
.footer-brand .logo-text span { color: white; }
.footer-brand .logo-icon { background: rgba(255,255,255,0.2); }
.footer-desc { font-size: 14px; opacity: 0.8; margin: 16px 0; line-height: 1.8; }
.social-links { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; transition: var(--transition); cursor: pointer;
}
.social-btn:hover { background: white; transform: translateY(-3px); }

.footer-col h4 { font-size: 16px; font-weight: 800; margin-bottom: 20px; position: relative; padding-bottom: 10px; }
.footer-col h4::after {
  content: ''; position: absolute; bottom: 0; left: 0;
  width: 32px; height: 3px; background: var(--primary-light); border-radius: 2px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: 14px; opacity: 0.8;
  display: flex; align-items: center; gap: 8px;
  transition: var(--transition);
}
.footer-links a:hover { opacity: 1; padding-left: 6px; }

.footer-contact-item {
  display: flex; align-items: flex-start; gap: 12px;
  margin-bottom: 14px;
}
.contact-icon { font-size: 18px; margin-top: 2px; flex-shrink: 0; }
.contact-info { font-size: 14px; opacity: 0.85; line-height: 1.6; }
.contact-info strong { display: block; font-size: 15px; opacity: 1; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 0;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; opacity: 0.7;
}
.payment-icons { display: flex; gap: 10px; }
.payment-icon {
  background: white; color: var(--primary-dark);
  padding: 4px 10px; border-radius: 6px;
  font-size: 11px; font-weight: 800;
}

/* ============================
   AUTH PAGES
   ============================ */
.auth-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--primary-bg) 0%, #F1F8E9 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 460px;
  overflow: hidden;
}
.auth-card-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
  color: white; text-align: center;
  padding: 36px 32px 28px;
}
.auth-card-header .icon { font-size: 48px; margin-bottom: 10px; }
.auth-card-header h2 { font-size: 26px; font-weight: 900; }
.auth-card-header p { opacity: 0.85; font-size: 14px; margin-top: 6px; }

.auth-body { padding: 36px; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px;
}
.input-wrap { position: relative; }
.input-wrap .input-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--text-muted);
}
.input-wrap input {
  width: 100%; padding: 13px 16px 13px 46px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 15px; background: var(--bg-main);
  transition: var(--transition); color: var(--text-primary);
}
.input-wrap input:focus {
  border-color: var(--primary-light);
  background: white;
  box-shadow: 0 0 0 4px rgba(102,187,106,0.15);
}
.input-wrap input.error { border-color: #E53935; }
.form-error { font-size: 12px; color: #E53935; margin-top: 5px; display: none; }
.form-error.show { display: block; }

.form-options {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px;
}
.checkbox-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; cursor: pointer;
}
.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; }
.forgot-link { font-size: 13px; color: var(--primary); font-weight: 600; transition: var(--transition); }
.forgot-link:hover { color: var(--primary-dark); }

.btn-auth {
  width: 100%; padding: 14px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary-light));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 800;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 16px rgba(46,125,50,0.35);
  letter-spacing: 0.5px;
}
.btn-auth:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(46,125,50,0.45);
}

.divider-or {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 0; font-size: 13px; color: var(--text-muted);
}
.divider-or::before, .divider-or::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.social-login { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.btn-social {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition); background: white; color: var(--text-primary);
}
.btn-social:hover { border-color: var(--primary-light); background: var(--primary-bg); transform: translateY(-1px); }

.auth-switch { text-align: center; font-size: 14px; color: var(--text-secondary); }
.auth-switch a { color: var(--primary); font-weight: 700; }
.auth-switch a:hover { color: var(--primary-dark); }

/* ============================
   CART PAGE
   ============================ */
.cart-page { padding: 40px 0 60px; }
.cart-page-header { margin-bottom: 32px; }
.cart-page-header h1 { font-size: 32px; font-weight: 900; }
.cart-page-header span { color: var(--primary); }
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.breadcrumb a { color: var(--primary); }

.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }

/* Cart table */
.cart-table-wrap {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
}
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  text-align: left; padding: 16px 20px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-main);
}
.cart-table td { padding: 16px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-table tr:last-child td { border-bottom: none; }
.cart-table tbody tr:hover { background: var(--bg-main); }

.cart-product { display: flex; align-items: center; gap: 14px; }
.cart-product img {
  width: 72px; height: 72px; border-radius: var(--radius-sm);
  object-fit: cover; flex-shrink: 0;
}
.cart-product-name { font-weight: 700; font-size: 14px; }
.cart-product-sku { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.qty-control { display: flex; align-items: center; gap: 2px; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg-main); border: 1px solid var(--border);
  font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); color: var(--text-primary);
}
.qty-btn:hover { background: var(--primary); border-color: var(--primary); color: white; }
.qty-input {
  width: 44px; text-align: center;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 0; font-size: 14px; font-weight: 700;
}
.cart-price { font-size: 16px; font-weight: 700; color: var(--primary); }
.cart-subtotal { font-size: 16px; font-weight: 800; color: var(--accent); }
.btn-remove {
  background: none; border: none; cursor: pointer;
  font-size: 20px; color: var(--text-muted);
  transition: var(--transition); padding: 4px;
}
.btn-remove:hover { color: #E53935; transform: scale(1.2); }

.cart-footer { display: flex; align-items: center; justify-content: space-between; padding: 20px; }
.coupon-form { display: flex; gap: 10px; }
.coupon-form input {
  padding: 10px 16px; border: 2px solid var(--border);
  border-radius: var(--radius-sm); font-size: 14px;
  width: 200px; background: var(--bg-main);
  transition: var(--transition);
}
.coupon-form input:focus { border-color: var(--primary-light); background: white; }
.btn-coupon {
  padding: 10px 20px; background: #333; color: white;
  border-radius: var(--radius-sm); font-size: 13px; font-weight: 700;
  transition: var(--transition);
}
.btn-coupon:hover { background: var(--primary); }

/* Order Summary */
.order-summary {
  background: white; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm); overflow: hidden;
  position: sticky; top: 100px;
}
.order-summary-header {
  padding: 20px 24px;
  background: var(--primary-bg);
  border-bottom: 1px solid var(--border);
}
.order-summary-header h3 { font-size: 18px; font-weight: 800; color: var(--primary-dark); }
.order-summary-body { padding: 24px; }
.summary-row {
  display: flex; justify-content: space-between;
  margin-bottom: 14px; font-size: 14px;
}
.summary-row .label { color: var(--text-muted); }
.summary-row .value { font-weight: 700; }
.summary-row.free .value { color: var(--primary); }
.summary-row.discount .value { color: var(--accent); }
.summary-total {
  display: flex; justify-content: space-between;
  padding-top: 16px;
  border-top: 2px solid var(--border);
  margin-bottom: 20px;
}
.summary-total .label { font-size: 16px; font-weight: 700; }
.summary-total .value { font-size: 24px; font-weight: 900; color: var(--primary); }

.btn-checkout {
  width: 100%; padding: 16px;
  background: linear-gradient(90deg, var(--primary-dark), var(--primary));
  color: white; border: none; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 800;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 16px rgba(46,125,50,0.35);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(46,125,50,0.45); }

.payment-methods { margin-top: 20px; }
.payment-methods p { font-size: 12px; color: var(--text-muted); margin-bottom: 10px; text-align: center; }
.payment-icons-row { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pay-icon {
  background: var(--bg-main); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 6px;
  font-size: 12px; font-weight: 700;
}

/* Empty cart */
.empty-cart {
  text-align: center; padding: 80px 20px;
  background: white; border-radius: var(--radius-lg);
}
.empty-cart .icon { font-size: 80px; margin-bottom: 20px; }
.empty-cart h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.empty-cart p { color: var(--text-muted); margin-bottom: 24px; }

/* ============================
   FLOATING CART BTN
   ============================ */
.floating-cart {
  position: fixed; bottom: 30px; right: 30px; z-index: 999;
  display: none;
}
.floating-cart.visible { display: block; }
.floating-cart-btn {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent);
  color: white; font-size: 26px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(255,111,0,0.45);
  cursor: pointer; border: none;
  animation: float 3s ease-in-out infinite;
  position: relative;
}
@keyframes float {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
.floating-cart-count {
  position: absolute; top: -4px; right: -4px;
  background: var(--primary);
  color: white; font-size: 11px; font-weight: 800;
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid white;
}

/* ============================
   TOAST NOTIFICATION
   ============================ */
.toast-container {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}
.toast {
  background: var(--primary-dark); color: white;
  padding: 14px 20px 14px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 12px;
  min-width: 280px; max-width: 360px;
  animation: slideInRight 0.3s ease;
  font-size: 14px; font-weight: 600;
}
.toast.success { background: var(--primary); }
.toast.error   { background: #C62828; }
.toast.info    { background: #0277BD; }
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}

/* ============================
   PAGE HEADER
   ============================ */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  color: white; text-align: center; padding: 50px 20px;
}
.page-hero h1 { font-size: 36px; font-weight: 900; margin-bottom: 10px; }
.page-hero p { opacity: 0.85; font-size: 16px; }

/* ============================
   USER DROPDOWN MENU
   ============================ */
.user-menu-trigger { position: relative; cursor: pointer; }
.user-dropdown {
  display: none;
  position: absolute; top: calc(100% + 8px); right: 0;
  background: white; border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 260px; z-index: 999;
  overflow: hidden;
  border: 1px solid var(--border);
  animation: dropDown 0.2s ease;
}
.user-dropdown.open { display: block; }
.user-dropdown-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px; background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}
.ud-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.5); flex-shrink: 0; }
.ud-name { font-weight: 800; font-size: 15px; }
.ud-email { font-size: 12px; opacity: 0.8; margin-top: 2px; }
.ud-rank { font-size: 12px; font-weight: 700; margin-top: 5px; padding: 2px 10px; border-radius: 20px; display: inline-block; }
.ud-rank.rank-vàng  { background: #FFF3E0; color: #E65100; }
.ud-rank.rank-bạc   { background: #ECEFF1; color: #546E7A; }
.ud-rank.rank-đồng  { background: #FBE9E7; color: #BF360C; }
.ud-links { padding: 8px 0; }
.ud-link {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 18px; font-size: 14px; color: var(--text-secondary);
  transition: var(--transition); font-weight: 500;
}
.ud-link:hover { background: var(--primary-bg); color: var(--primary); padding-left: 24px; }
.ud-logout {
  width: 100%; padding: 12px 18px;
  background: #FFF5F5; color: #C62828;
  border: none; border-top: 1px solid var(--border);
  text-align: left; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.ud-logout:hover { background: #FFEBEE; }

/* ============================
   PROFILE PAGE
   ============================ */
.profile-page { padding: 40px 0 60px; }
.profile-layout { display: grid; grid-template-columns: 280px 1fr; gap: 28px; align-items: start; }

/* Sidebar */
.profile-sidebar { background: white; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); position: sticky; top: 90px; }
.profile-avatar-section { background: linear-gradient(135deg, var(--primary-dark), var(--primary-light)); padding: 32px 24px; text-align: center; color: white; }
.profile-avatar-wrap { position: relative; display: inline-block; }
.profile-avatar { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.8); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
.profile-avatar-edit { position: absolute; bottom: 0; right: 0; background: var(--accent); color: white; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 14px; cursor: pointer; border: 2px solid white; }
.profile-name { font-size: 18px; font-weight: 900; margin-top: 12px; }
.profile-email { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.profile-rank-badge { display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 4px 14px; background: rgba(255,255,255,0.2); border-radius: 20px; font-size: 13px; font-weight: 700; }
.profile-points { font-size: 28px; font-weight: 900; margin-top: 14px; }
.profile-points span { font-size: 14px; font-weight: 400; opacity: 0.85; }

.profile-nav { padding: 12px 0; }
.profile-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 24px; font-size: 14px; font-weight: 600;
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  border-left: 3px solid transparent;
}
.profile-nav-item:hover { background: var(--primary-bg); color: var(--primary); border-left-color: var(--primary-light); }
.profile-nav-item.active { background: var(--primary-bg); color: var(--primary); border-left-color: var(--primary); }
.profile-nav-item .nav-icon { font-size: 20px; }

/* Profile panels */
.profile-panel { display: none; }
.profile-panel.active { display: block; }

.panel-card { background: white; border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; margin-bottom: 20px; }
.panel-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.panel-header h3 { font-size: 17px; font-weight: 800; }
.panel-body { padding: 24px; }

/* Info form */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.info-field label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 6px; }
.info-field input, .info-field select {
  width: 100%; padding: 11px 14px;
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  font-size: 14px; background: var(--bg-main); transition: var(--transition);
  font-family: inherit;
}
.info-field input:focus, .info-field select:focus { border-color: var(--primary-light); background: white; }
.info-field.full-width { grid-column: 1 / -1; }

/* Orders */
.order-card { border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; margin-bottom: 14px; transition: var(--transition); }
.order-card:hover { box-shadow: var(--shadow-sm); border-color: var(--primary-light); }
.order-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--bg-main); }
.order-id { font-weight: 800; font-size: 14px; color: var(--primary-dark); }
.order-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.order-status { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 700; }
.status-delivered { background: #E8F5E9; color: #2E7D32; }
.status-shipping  { background: #E3F2FD; color: #1565C0; }
.status-pending   { background: #FFF8E1; color: #F57F17; }
.status-cancelled { background: #FFEBEE; color: #C62828; }
.order-body { padding: 12px 18px; }
.order-items { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }
.order-footer { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px; border-top: 1px solid var(--border); }
.order-total { font-size: 16px; font-weight: 900; color: var(--primary); }
.btn-reorder { font-size: 12px; font-weight: 700; color: var(--primary); background: var(--primary-bg); padding: 6px 14px; border-radius: 20px; cursor: pointer; border: none; transition: var(--transition); }
.btn-reorder:hover { background: var(--primary); color: white; }

/* Points */
.points-big { text-align: center; padding: 32px; }
.points-number { font-size: 64px; font-weight: 900; color: var(--primary); line-height: 1; }
.points-label { font-size: 16px; color: var(--text-muted); margin-top: 8px; }
.rank-progress { max-width: 320px; margin: 24px auto 0; }
.rank-bar-wrap { background: var(--border); border-radius: 10px; height: 10px; margin: 10px 0 6px; overflow: hidden; }
.rank-bar { background: linear-gradient(90deg, var(--primary-light), var(--primary)); height: 100%; border-radius: 10px; transition: width 1s ease; }
.rank-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.points-history { margin-top: 20px; }
.pts-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pts-row:last-child { border-bottom: none; }
.pts-plus  { color: var(--primary); font-weight: 800; }
.pts-minus { color: var(--accent); font-weight: 800; }

/* Stats row */
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border-radius: var(--radius-md); padding: 20px; text-align: center; box-shadow: var(--shadow-sm); border: 2px solid var(--border); transition: var(--transition); }
.stat-card:hover { border-color: var(--primary-light); }
.stat-number { font-size: 32px; font-weight: 900; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 900px) {
  .profile-layout { grid-template-columns: 1fr; }
  .profile-sidebar { position: static; }
  .info-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}

/* ============================
   BACK TO TOP
   ============================ */
.back-to-top {
  position: fixed; bottom: 30px; left: 30px; z-index: 999;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary);
  color: white; font-size: 20px;
  display: none; align-items: center; justify-content: center;
  cursor: pointer; border: none;
  box-shadow: var(--shadow-md); transition: var(--transition);
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1100px) {
  .category-grid  { grid-template-columns: repeat(3, 1fr); }
  .product-grid   { grid-template-columns: repeat(3, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .cart-layout    { grid-template-columns: 1fr; }
  .promo-grid     { grid-template-columns: 1fr; }
  .testimonial-card { min-width: calc(50% - 10px); }
  .hero           { height: 360px; }
}
@media (max-width: 768px) {
  .topbar         { display: none; }
  .header-inner   { gap: 12px; flex-wrap: wrap; padding: 10px 0; }
  .search-bar     { order: 3; max-width: 100%; width: 100%; }
  .product-grid   { grid-template-columns: repeat(2, 1fr); }
  .category-grid  { grid-template-columns: repeat(3, 1fr); }
  .policy-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom  { flex-direction: column; gap: 12px; text-align: center; }
  .nav-list       { display: none; }
  .hero { height: 280px; }
  .slide-content h1 { font-size: 22px; }
}
@media (max-width: 480px) {
  .product-grid   { grid-template-columns: repeat(2, 1fr); }
  .category-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* ============================
   ANIMATIONS & UTILITIES
   ============================ */
.fade-in { animation: fadeIn 0.5s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter-tab {
  padding: 8px 20px;
  border: 2px solid var(--border);
  border-radius: 24px;
  font-size: 13px; font-weight: 700;
  cursor: pointer; background: white;
  transition: var(--transition);
}
.filter-tab:hover, .filter-tab.active {
  background: var(--primary); border-color: var(--primary); color: white;
}

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-load 1.4s infinite;
  border-radius: 6px;
}
@keyframes skeleton-load {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
