:root {
  --primary: #3CB815;
  --dark-green: #2E9E12;
  --light-green: #E9FBE5;
  --bg-color: #F5F5F5;
  --card-bg: #FFFFFF;
  --text-main: #1A1A1A;
  --text-muted: #666666;
  --border-light: #E0E0E0;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.12);
  --transition: 0.3s ease;
}

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

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  padding-top: 76px;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
header {
  background-color: var(--card-bg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo {
  font-size: 24px;
  font-weight: bold;
  color: var(--primary);
  display: flex;
  flex-direction: column;
}

.tagline {
  font-size: 10px;
  color: var(--text-muted);
}

.search-bar {
  display: flex;
  flex: 1;
  max-width: 400px;
  margin: 0 20px;
}

.search-bar input {
  width: 100%;
  padding: 10px 15px;
  border: 1px solid var(--border-light);
  border-radius: 20px 0 0 20px;
  outline: none;
}

.search-bar input:focus {
  border-color: var(--primary);
}

.search-bar button {
  padding: 10px 20px;
  background-color: var(--primary);
  color: white;
  border-radius: 0 20px 20px 0;
}

.search-bar button:hover {
  background-color: var(--dark-green);
}

/* Nav Links & Dropdown */
.nav-links {
  display: flex;
  gap: 30px;
  font-weight: 500;
}

.nav-links a {
  position: relative;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--primary);
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  top: 150%;
  background-color: var(--card-bg);
  min-width: 160px;
  box-shadow: var(--shadow-hover);
  border-radius: 8px;
  z-index: 100;
  flex-direction: column;
  overflow: hidden;
}

.dropdown:hover .dropdown-content {
  display: flex;
}

.dropdown-content a {
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  transition: var(--transition);
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: var(--light-green);
  color: var(--primary);
}

.nav-icons {
  display: flex;
  gap: 20px;
}

.icon {
  font-size: 20px;
  color: var(--text-main);
  position: relative;
}

.icon:hover {
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 10px;
}

/* Hero Carousel Section */
.carousel {
  position: relative;
  max-width: 100%;
  height: 450px;
  overflow: hidden;
  border-radius: 16px;
  margin: 20px auto 40px;
  background: var(--light-green);
}

.carousel-inner {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  width: 100%;
  flex-shrink: 0;
  height: 100%;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 20px;
}

.carousel-overlay h1 {
  font-size: 40px;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.carousel-overlay p {
  font-size: 20px;
  margin-bottom: 25px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
  z-index: 10;
}

.carousel-btn:hover {
  background: var(--primary);
}

.carousel-btn.prev {
  left: 20px;
}

.carousel-btn.next {
  right: 20px;
}

.hero {
  background: var(--light-green);
  padding: 60px 0;
  text-align: center;
  border-radius: 16px;
  margin: 20px auto;
  max-width: 1200px;
}

.hero h1 {
  font-size: 36px;
  color: var(--dark-green);
  margin-bottom: 15px;
}

.hero p {
  font-size: 18px;
  margin-bottom: 25px;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: var(--dark-green);
  transform: scale(1.03);
}

/* Sections */
.section-title {
  margin: 40px 0 20px;
  font-size: 24px;
}

/* Grids */
.categories-grid, .products-grid {
  display: grid;
  gap: 20px;
}

.categories-grid {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.products-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.category-card {
  background: var(--card-bg);
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  font-weight: 600;
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  color: var(--primary);
}

/* Product Card */
.product-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.product-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  background: var(--light-green);
  margin-bottom: 12px;
}

.product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
}

.product-brand {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-price {
  color: var(--primary);
  font-weight: bold;
  font-size: 18px;
  margin-bottom: 10px;
}

.product-actions-row {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  padding-top: 15px;
}

.add-to-cart-btn {
  width: 100%;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 10px;
}

.qty-btn {
  background: var(--bg-color);
  width: 28px;
  height: 28px;
  border-radius: 4px;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.qty-btn:hover {
  background: var(--border-light);
}

.add-to-cart-btn {
  background: var(--primary);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.add-to-cart-btn:hover {
  background: var(--dark-green);
  transform: scale(1.03);
}

/* Product Page Layout */
.product-detail {
  display: flex;
  gap: 40px;
  background: var(--card-bg);
  padding: 40px;
  border-radius: 16px;
  margin: 40px 0;
  box-shadow: var(--shadow-soft);
}

.product-gallery {
  flex: 1;
}

.main-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--light-green);
}

.product-content {
  flex: 1;
}

.product-content h1 {
  font-size: 32px;
  margin-bottom: 10px;
}

.product-content .price {
  font-size: 28px;
  color: var(--primary);
  font-weight: bold;
  margin-bottom: 20px;
}

.product-content p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* Cart Page Layout */
.cart-layout {
  display: flex;
  gap: 30px;
  margin: 30px 0;
}

.cart-items {
  flex: 2;
}

.cart-item {
  display: flex;
  align-items: center;
  padding: 15px;
  background: var(--card-bg);
  border-radius: 12px;
  margin-bottom: 15px;
  box-shadow: var(--shadow-soft);
  gap: 15px;
}

.cart-item img {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
  background: var(--light-green);
}

.cart-item-info {
  flex: 1;
}

.cart-summary {
  flex: 1;
  background: var(--card-bg);
  padding: 25px;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  height: fit-content;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.summary-total {
  font-weight: bold;
  font-size: 20px;
  border-top: 1px solid var(--border-light);
  padding-top: 15px;
  margin-top: 15px;
}

.checkout-btn {
  width: 100%;
  text-align: center;
  display: block;
  margin-top: 20px;
}

/* Forms */
.form-container {
  max-width: 500px;
  margin: 50px auto;
  background: var(--card-bg);
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus {
  border-color: var(--primary);
}

.form-submit {
  width: 100%;
  margin-top: 10px;
}

/* Footer */
footer {
  background: var(--card-bg);
  padding: 40px 0;
  text-align: center;
  margin-top: 60px;
  border-top: 1px solid var(--border-light);
}

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: white;
  color: var(--text-main);
  padding: 16px 24px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  border-left: 5px solid var(--primary);
  font-weight: 500;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.error {
  border-left-color: #e74c3c;
}

.toast i {
  font-size: 20px;
}

.toast i.success-icon { color: var(--primary); }
.toast i.error-icon { color: #e74c3c; }

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-main);
}

@media (max-width: 768px) {
  .product-detail, .cart-layout {
    flex-direction: column;
  }
  
  .search-bar {
    display: none;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 76px;
    left: -100%;
    width: 250px;
    height: calc(100vh - 76px);
    background: var(--card-bg);
    flex-direction: column;
    padding: 30px 20px;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .nav-links.active {
    left: 0;
  }
}
