:root {
  --primary-blue: #007bff;
  --primary-green: #43a047;
  --primary-orange: #ff9800;
  --dark: #222d3a;
  --muted: #f7f9fc;
  --accent: #ffd600;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  color: #1b2540;
}

/* ===== HEADER ===== */
.header {
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 999;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 3em;
  font-weight: 900;
  background: linear-gradient(135deg, #ff7c00 0%, #ff9800 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  flex-shrink: 0;
}

.logo-area img {
  height: 90px;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-box {
  flex: 1;
  max-width: 500px;
}

.search-box input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1em;
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-blue);
}

.header-btns {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.social-icons {
  display: flex;
  gap: 8px;
}

.social-icons a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  transition: transform 0.2s;
}

.social-icons a:hover {
  transform: scale(1.1);
}

.social-icons a.facebook { background: #1877f3; }
.social-icons a.youtube { background: #ff0000; }
.social-icons a.instagram { background: #E4405F; }
.social-icons svg { width: 20px; height: 20px; fill: currentColor; }

.order-track-btn {
  padding: 10px 16px;
  border-radius: 6px;
  border: 2px solid var(--primary-blue);
  background: #fff;
  color: var(--primary-blue);
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95em;
}

.order-track-btn:hover {
  background: var(--primary-blue);
  color: #fff;
}

.cart-icon-btn {
  background: linear-gradient(135deg, var(--primary-blue) 60%, var(--primary-green) 100%);
  border: none;
  position: relative;
  border-radius: 8px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.cart-icon-btn:hover {
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

.cart-icon-btn svg { width: 24px; height: 24px; fill: #fff; }

.cart-count {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #e53935;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  border-radius: 50%;
  padding: 3px 5px;
  border: 2px solid #fff;
}

/* ===== MARQUEE ===== */
.marquee-area {
  background: linear-gradient(90deg, #003d7a 0%, #004da6 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1em;
  height: 45px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.marquee {
  white-space: nowrap;
  display: inline-block;
  padding-left: 100%;
  animation: marquee 40s linear infinite;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* ===== HERO SECTION ===== */
.hero-section {
  margin: 16px auto;
  max-width: 1400px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  background: #fff;
}

.hero-slide {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s;
  position: absolute;
}

.hero-slide.active { opacity: 1; }

.hero-slide-caption {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  font-weight: 700;
  z-index: 3;
}

/* ===== CATEGORY MENU ===== */
.category-menu {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 12px;
  background: #fff;
  margin: 0 auto;
  max-width: 1400px;
  border-radius: 8px;
}

.category-menu button {
  background: #f0f0f0;
  color: #333;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95em;
  white-space: nowrap;
  transition: all 0.2s;
}

.category-menu button.active {
  background: linear-gradient(135deg, var(--primary-blue) 60%, var(--primary-green) 100%);
  color: #fff;
}

.category-menu button:hover {
  background: var(--primary-blue);
  color: #fff;
}

/* ===== MAIN SECTION ===== */
.main-section {
  max-width: 1400px;
  margin: 20px auto;
  padding: 0 12px;
}

.category-section {
  margin: 24px 0;
  background: transparent;
  border-radius: 12px;
  padding: 0;
}

.category-title {
  font-size: 1.3em;
  font-weight: 900;
  margin: 0 0 18px 0;
  color: var(--dark);
  border-bottom: 4px solid var(--primary-orange);
  padding-bottom: 10px;
}

/* ===== PRODUCTS GRID ===== */
.products-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.product-card {
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  border-color: var(--primary-orange);
}

.product-card-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.discount-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff4444;
  color: #fff;
  padding: 6px 10px;
  font-size: 0.75em;
  font-weight: 800;
  border-radius: 6px;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(255, 68, 68, 0.3);
}

.product-card img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  background: #f5f5f5;
}

.product-card-content {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-card .name {
  font-size: 1.05em;
  font-weight: 700;
  color: #222;
  margin: 0 0 8px 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .desc {
  font-size: 0.8em;
  color: #888;
  margin: 0 0 10px 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card .price-section {
  margin: 10px 0;
}

.product-card .price-new {
  font-size: 1.4em;
  font-weight: 900;
  color: var(--primary-orange);
  margin: 0;
  line-height: 1;
}

.delivery-note {
  font-size: 0.85em;
  color: var(--primary-green);
  font-weight: 700;
  margin: 6px 0 0 0;
}

.buy-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, var(--primary-green) 60%, #2e7d32 100%);
  color: #fff;
  border: none;
  padding: 13px 0;
  border-radius: 6px;
  font-size: 1em;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  margin-top: auto;
  transition: all 0.3s;
  box-shadow: 0 2px 6px rgba(67, 160, 71, 0.2);
}

.buy-btn:hover {
  background: linear-gradient(135deg, var(--primary-orange) 60%, #ff9800 100%);
  box-shadow: 0 4px 10px rgba(255, 152, 0, 0.3);
  transform: translateY(-2px);
}

/* ===== FOOTER ===== */
.footer {
  background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
  color: #fff;
  padding: 40px 20px 20px;
  margin-top: 40px;
}

.footer .container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
}

.footer h4 {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
}

.footer a {
  color: #fff;
  text-decoration: none;
}

.footer a:hover {
  color: var(--accent);
}

/* ===== MOBILE FOOTER BAR ===== */
.mobile-footer-bar {
  display: none;
}

@media (max-width: 768px) {
  .mobile-footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #fff;
    border-top: 2px solid var(--primary-blue);
    display: flex;
    justify-content: space-around;
    z-index: 1000;
    padding: 8px 0;
  }

  .mobile-footer-bar a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.7em;
    color: var(--dark);
    text-decoration: none;
  }

  .mobile-footer-bar i { font-size: 20px; }
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  left: 50%;
  top: 80px;
  transform: translateX(-50%);
  background: #2e7d32;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 10000;
  display: none;
  font-weight: 600;
}

.toast.show { display: block; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
  .products-row {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }

  .hero-slider { height: 300px; }
}

@media (max-width: 768px) {
  .social-icons { display: none; }
  .order-track-btn { display: none; }
  
  .nav-container {
    flex-direction: column;
    gap: 10px;
    padding: 10px;
  }

  .logo-area {
    font-size: 2em;
    width: 100%;
  }

  .logo-area img { height: 60px; }

  .search-box {
    width: 100%;
    max-width: 100%;
  }

  .header-btns {
    width: 100%;
    justify-content: flex-end;
  }

  .hero-slider { height: 220px; }
  .main-section { padding-bottom: 80px; padding: 0 8px; }
  .footer { padding: 24px 12px; }

  .products-row {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .product-card img { height: 250px; }
  .product-card .name { font-size: 0.9em; }
  .product-card-content { padding: 10px; }
  .buy-btn { padding: 11px 0; font-size: 0.95em; }
  .price-new { font-size: 1.2em; }
}

@media (max-width: 600px) {
  .products-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card img { height: 170px; }
  .product-card .name { font-size: 0.85em; }
  .buy-btn { padding: 10px 0; font-size: 0.9em; }
  .price-new { font-size: 1.1em; }
}

@media (max-width: 480px) {
  .products-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .product-card img { height: 150px; }
  .product-card .name { font-size: 0.8em; }
  .product-card-content { padding: 8px; }
  .hero-slider { height: 180px; }
  .logo-area { font-size: 2em; }
  .logo-area img { height: 50px; }
  .buy-btn { padding: 10px 0; font-size: 0.85em; }
  .delivery-note { font-size: 0.8em; }
}

@media (max-width: 360px) {
  .products-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .product-card img { height: 130px; }
  .product-card .name { font-size: 0.75em; }
}