/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', system-ui, sans-serif; color: #1a1a1a; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; border: none; background: none; }

:root {
  --green: #1e7e34;
  --green-light: #e8f5e9;
  --green-hover: #155d27;
  --gray: #6b7280;
  --light: #f8f9fa;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ===== TOPBAR ===== */
.topbar {
  background: var(--green);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 40px;
  font-size: 13px;
  font-weight: 500;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 40px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}
.logo-box {
  background: var(--green);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
}
.logo-box.small { font-size: 14px; padding: 6px 10px; }
.nav-links { display: flex; gap: 36px; }
.nav-links a { font-size: 15px; font-weight: 500; color: #333; transition: color .2s; }
.nav-links a:hover, .nav-links a.active { color: var(--green); }
.nav-icons { display: flex; align-items: center; gap: 16px; }
.icon-btn {
  background: none; border: none; font-size: 18px;
  color: #333; cursor: pointer; position: relative; transition: color .2s;
}
.icon-btn:hover { color: var(--green); }
.cart-btn { display: flex; align-items: center; }
.cart-count {
  position: absolute; top: -8px; right: -8px;
  background: var(--green); color: #fff;
  font-size: 10px; font-weight: 700;
  width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* ===== SEARCH BAR ===== */
.search-bar {
  display: none;
  padding: 12px 40px;
  background: var(--light);
  border-bottom: 1px solid var(--border);
  gap: 8px;
}
.search-bar.open { display: flex; }
.search-bar input {
  flex: 1; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none;
}
.search-bar input:focus { border-color: var(--green); }
.search-bar button {
  background: var(--green); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-size: 15px;
}

/* ===== HERO ===== */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 80px 40px;
  background: linear-gradient(135deg, #f0faf1 0%, #fff 60%);
  min-height: 520px;
  gap: 40px;
}
.hero-content { max-width: 520px; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--green-light); color: var(--green);
  padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.white-badge {
  background: rgba(255,255,255,0.2); color: #fff;
}
.hero-content h1 {
  font-size: 52px; font-weight: 800; line-height: 1.15;
  color: #111; margin-bottom: 20px;
}
.green { color: var(--green); }
.hero-content p { font-size: 17px; color: var(--gray); margin-bottom: 32px; line-height: 1.6; }
.hero-btns { display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary {
  background: var(--green); color: #fff;
  padding: 14px 28px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--green-hover); transform: translateY(-1px); }
.btn-outline {
  border: 2px solid #333; color: #333;
  padding: 13px 26px; border-radius: 8px;
  font-size: 15px; font-weight: 600;
  transition: border-color .2s, color .2s;
}
.btn-outline:hover { border-color: var(--green); color: var(--green); }
.hero-image img {
  width: 440px; height: 400px; object-fit: contain;
  border-radius: 20px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
}

/* ===== STATS ===== */
.stats {
  display: flex; justify-content: space-around;
  padding: 40px; background: var(--green);
}
.stat-item { text-align: center; color: #fff; }
.stat-item strong { display: block; font-size: 32px; font-weight: 800; }
.stat-item span { font-size: 14px; opacity: .85; }

/* ===== SECTION BASE ===== */
.section { padding: 60px 40px; }
.section-header {
  display: flex; justify-content: space-between;
  align-items: flex-end; margin-bottom: 36px;
}
.section-header h2 { font-size: 28px; font-weight: 700; }
.section-header p { color: var(--gray); margin-top: 4px; font-size: 15px; }
.link-green { color: var(--green); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 4px; }
.link-green:hover { text-decoration: underline; }

/* ===== CATEGORIES ===== */
.categories { background: #fff; }
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.category-card {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex; flex-direction: column;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid transparent;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(30,126,52,.15);
  border-color: var(--green);
}
.cat-icon {
  width: 52px; height: 52px; background: var(--green);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; color: #fff; font-size: 22px;
  margin-bottom: 16px;
}
.category-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.category-card span { color: var(--gray); font-size: 14px; margin-top: auto; }

/* ===== PRODUCTS ===== */
.products { background: var(--light); }
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.product-card {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,0.12); }
.product-img {
  position: relative; height: 220px; overflow: hidden;
}
.product-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.product-card:hover .product-img img { transform: scale(1.04); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 4px; letter-spacing: .5px;
}
.product-badge.red { background: #e53935; }
.product-info { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.product-brand { font-size: 11px; font-weight: 600; color: var(--gray); letter-spacing: 1px; text-transform: uppercase; }
.product-name { font-size: 15px; font-weight: 700; margin: 6px 0 8px; color: #111; }
.product-rating { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--gray); margin-bottom: 12px; }
.product-rating i { color: #f59e0b; }
.product-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.product-price { font-size: 20px; font-weight: 800; color: #111; }
.product-old-price { font-size: 13px; color: var(--gray); text-decoration: line-through; margin-left: 6px; }
.add-to-cart {
  width: 40px; height: 40px; background: var(--green-light);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: var(--green);
  font-size: 16px; transition: background .2s, color .2s;
}
.add-to-cart:hover { background: var(--green); color: #fff; }

/* ===== PROMO BANNER ===== */
.promo-banner {
  background: linear-gradient(135deg, #1e7e34 0%, #155d27 100%);
  border-radius: 20px; margin: 0 40px 60px;
  display: flex; align-items: center;
  justify-content: space-between; padding: 60px;
  overflow: hidden; position: relative;
}
.promo-banner::before {
  content: ''; position: absolute;
  width: 300px; height: 300px;
  background: rgba(255,255,255,.05);
  border-radius: 50%; right: 200px; top: -100px;
}
.promo-text { color: #fff; max-width: 440px; }
.promo-text h2 { font-size: 40px; font-weight: 800; line-height: 1.2; margin: 16px 0 12px; }
.promo-text h2 .green { color: #a5d6a7; }
.promo-text p { opacity: .85; margin-bottom: 28px; font-size: 16px; }
.promo-image img { width: 280px; height: 280px; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(0,0,0,.3)); }

/* ===== NEWSLETTER ===== */
.newsletter { background: #fff; }
.newsletter-box {
  max-width: 560px; margin: 0 auto;
  background: var(--light); border-radius: 20px;
  padding: 52px 48px; text-align: center;
  border: 1px solid var(--border);
}
.newsletter-icon { font-size: 40px; color: var(--green); margin-bottom: 16px; }
.newsletter-box h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.newsletter-box p { color: var(--gray); margin-bottom: 24px; font-size: 15px; }
.newsletter-form { display: flex; gap: 10px; }
.newsletter-form input {
  flex: 1; padding: 12px 16px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none;
}
.newsletter-form input:focus { border-color: var(--green); }
.newsletter-form button {
  background: var(--green); color: #fff;
  padding: 12px 22px; border-radius: 8px;
  font-size: 14px; font-weight: 600;
  white-space: nowrap; transition: background .2s;
}
.newsletter-form button:hover { background: var(--green-hover); }
.newsletter-success { color: var(--green); font-weight: 600; margin-top: 12px; display: none; }

/* ===== FOOTER ===== */
.footer { background: #111; color: #ccc; padding: 60px 40px 0; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .logo-box { margin-bottom: 16px; }
.footer-brand p { font-size: 14px; line-height: 1.7; color: #999; }
.footer-col h4 { color: #fff; font-size: 12px; letter-spacing: 1.5px; margin-bottom: 18px; }
.footer-col a, .footer-col p {
  display: block; font-size: 14px; color: #999;
  margin-bottom: 10px; line-height: 1.6; transition: color .2s;
}
.footer-col a:hover { color: var(--green); }
.green-icon { color: var(--green); margin-right: 8px; }
.footer-bottom {
  border-top: 1px solid #222; padding: 20px 0;
  text-align: center; font-size: 13px; color: #555;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: linear-gradient(135deg, var(--green) 0%, var(--green-hover) 100%);
  color: #fff; padding: 60px 40px; text-align: center;
}
.page-header h1 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.page-header p { opacity: .85; font-size: 16px; }

/* ===== SHOP PAGE ===== */
.shop-layout { display: flex; gap: 32px; padding: 40px; }
.sidebar { width: 240px; flex-shrink: 0; }
.sidebar-card {
  background: var(--light); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border); margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 16px; }
.filter-option { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; cursor: pointer; font-size: 14px; }
.filter-option input[type=checkbox] { accent-color: var(--green); width: 16px; height: 16px; }
.price-range { width: 100%; accent-color: var(--green); margin: 8px 0; }
.shop-main { flex: 1; }
.shop-toolbar {
  display: flex; justify-content: space-between;
  align-items: center; margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.shop-toolbar select {
  padding: 8px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 14px; outline: none;
}
.product-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* ===== CART PAGE ===== */
.cart-layout { display: flex; gap: 32px; padding: 40px; align-items: flex-start; }
.cart-items { flex: 1; }
.cart-item {
  display: flex; gap: 20px; background: var(--light);
  border-radius: var(--radius); padding: 20px;
  margin-bottom: 16px; border: 1px solid var(--border);
  align-items: center;
}
.cart-item img { width: 80px; height: 80px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex: 1; }
.cart-item-info h4 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.cart-item-info p { color: var(--gray); font-size: 13px; }
.qty-control { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.qty-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--border); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.qty-btn:hover { background: var(--green); color: #fff; }
.remove-btn { color: #e53935; font-size: 18px; cursor: pointer; padding: 4px; }
.cart-summary {
  width: 300px; background: var(--light);
  border-radius: var(--radius); padding: 28px;
  border: 1px solid var(--border); position: sticky; top: 80px;
}
.cart-summary h3 { font-size: 18px; font-weight: 700; margin-bottom: 20px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 12px; }
.summary-row.total { font-size: 18px; font-weight: 700; border-top: 1px solid var(--border); padding-top: 14px; margin-top: 4px; }
.checkout-btn { width: 100%; margin-top: 16px; text-align: center; padding: 14px; font-size: 15px; }
.empty-cart { text-align: center; padding: 80px 20px; color: var(--gray); }
.empty-cart i { font-size: 60px; margin-bottom: 16px; color: var(--border); }

/* ===== ABOUT PAGE ===== */
.about-section { padding: 60px 40px; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.about-grid img { border-radius: 20px; width: 100%; height: 400px; object-fit: cover; }
.about-text h2 { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.about-text p { color: var(--gray); line-height: 1.8; margin-bottom: 16px; }
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 40px 60px; }
.team-card { text-align: center; }
.team-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 0 auto 16px; border: 3px solid var(--green); }
.team-card h4 { font-weight: 700; margin-bottom: 4px; }
.team-card p { color: var(--gray); font-size: 14px; }

/* ===== CONTACT PAGE ===== */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 60px 40px; }
.contact-info h2 { font-size: 28px; font-weight: 700; margin-bottom: 24px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; align-items: flex-start; }
.contact-icon {
  width: 44px; height: 44px; background: var(--green-light);
  border-radius: 10px; display: flex; align-items: center;
  justify-content: center; color: var(--green); font-size: 18px; flex-shrink: 0;
}
.contact-item h4 { font-weight: 600; margin-bottom: 4px; }
.contact-item p { color: var(--gray); font-size: 14px; }
.contact-form { background: var(--light); border-radius: 20px; padding: 36px; border: 1px solid var(--border); }
.contact-form h2 { font-size: 22px; font-weight: 700; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; background: #fff;
  transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--green); }
.form-group textarea { height: 120px; resize: vertical; }
.form-success { color: var(--green); font-weight: 600; margin-top: 12px; display: none; }

/* ===== PRODUCT DETAIL ===== */
.product-detail { display: flex; gap: 48px; padding: 60px 40px; }
.detail-gallery { flex: 1; }
.detail-gallery .main-img { border-radius: 16px; overflow: hidden; }
.detail-gallery .main-img img { width: 100%; height: 420px; object-fit: cover; }
.thumb-list { display: flex; gap: 10px; margin-top: 12px; }
.thumb-list img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.thumb-list img.active { border-color: var(--green); }
.detail-info { flex: 1; }
.detail-info .product-brand { font-size: 13px; color: var(--gray); letter-spacing: 1px; }
.detail-info h1 { font-size: 30px; font-weight: 800; margin: 10px 0; }
.detail-price { font-size: 32px; font-weight: 800; color: var(--green); margin-bottom: 20px; }
.detail-old { font-size: 18px; color: var(--gray); text-decoration: line-through; margin-left: 10px; }
.detail-desc { color: var(--gray); line-height: 1.8; margin-bottom: 28px; }
.detail-specs { background: var(--light); border-radius: 12px; padding: 20px; margin-bottom: 28px; }
.spec-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-row strong { font-weight: 600; }
.detail-actions { display: flex; gap: 16px; }
.detail-actions .btn-primary { flex: 1; justify-content: center; font-size: 16px; padding: 16px; }

/* ===== BREADCRUMB ===== */
.breadcrumb { padding: 14px 40px; font-size: 13px; color: var(--gray); display: flex; gap: 6px; align-items: center; }
.breadcrumb a { color: var(--gray); }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { color: #333; font-weight: 600; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: var(--green); color: #fff;
  padding: 14px 24px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
  transform: translateY(80px); opacity: 0;
  transition: all .3s; z-index: 9999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .product-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .hero-content h1 { font-size: 38px; }
  .hero-image img { width: 320px; height: 300px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 768px) {
  .topbar { font-size: 11px; padding: 6px 16px; }
  .navbar { padding: 12px 16px; }
  .nav-links { display: none; }
  .hero { flex-direction: column; padding: 40px 16px; text-align: center; }
  .hero-btns { justify-content: center; }
  .hero-image img { width: 100%; height: 260px; }
  .section { padding: 40px 16px; }
  .category-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .stats { flex-wrap: wrap; gap: 20px; padding: 30px 16px; }
  .promo-banner { flex-direction: column; margin: 0 16px 40px; padding: 40px 24px; text-align: center; }
  .promo-text h2 { font-size: 28px; }
  .promo-image img { width: 200px; height: 200px; }
  .about-grid, .contact-layout { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .shop-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .cart-layout { flex-direction: column; }
  .cart-summary { width: 100%; }
  .product-detail { flex-direction: column; padding: 24px 16px; }
  .footer { padding: 40px 16px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .breadcrumb { padding: 12px 16px; }
}
