:root {
  --primary: #4CAF50;
  --primary-dark: #388E3C;
  --primary-light: #81C784;
  --secondary: #FF9800;
  --accent: #FFC107;
  --dark: #2E3B4E;
  --text: #333333;
  --text-light: #666666;
  --border: #E0E0E0;
  --bg-light: #F8F9FA;
  --white: #FFFFFF;
  --success: #4CAF50;
  --danger: #F44336;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
  --radius: 12px;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg-light);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}

.logo i {
  color: var(--primary);
  font-size: 2rem;
}

.logo-accent {
  color: var(--primary);
}

.nav-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.header-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.cart-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  transition: var(--transition);
}

.cart-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.cart-badge {
  background: var(--secondary);
  color: var(--white);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  position: absolute;
  top: -5px;
  right: -5px;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 4rem 0;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><path d="M30 0l30 30-30 30L0 30z" fill="rgba(255,255,255,0.05)"/></svg>');
  background-size: 60px 60px;
  opacity: 0.3;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
}

.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
  padding: 0.875rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--white);
  color: var(--primary);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.btn-add {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  justify-content: center;
}

.btn-add:hover {
  background: var(--primary-dark);
}

.btn-checkout {
  background: var(--primary);
  color: var(--white);
  width: 100%;
  justify-content: center;
  padding: 1rem;
  font-size: 1.1rem;
}

.btn-checkout:hover {
  background: var(--primary-dark);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Featured Section */
.featured-section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-light);
  font-size: 1.1rem;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.featured-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  cursor: pointer;
}

.featured-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.featured-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.featured-card:hover .featured-image img {
  transform: scale(1.1);
}

.discount-tag {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--danger);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-weight: 700;
  font-size: 0.875rem;
}

.featured-info {
  padding: 1.5rem;
}

.featured-info h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.featured-price {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.old-price {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 1rem;
}

.current-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.5rem;
}

/* Category Filter */
.category-section {
  padding: 2rem 0;
  background: var(--white);
}

.category-filter {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border);
  background: var(--white);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* Products Section */
.products-section {
  padding: 4rem 0;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.product-image {
  position: relative;
  height: 200px;
  overflow: hidden;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--danger);
  color: var(--white);
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-weight: 700;
  font-size: 0.8rem;
}

.stock-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--white);
  padding: 0.3rem 0.7rem;
  border-radius: 15px;
  font-size: 0.8rem;
}

.product-body {
  padding: 1.25rem;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
}

.product-rating i {
  color: var(--border);
}

.product-rating i.active {
  color: var(--accent);
}

.product-rating span {
  color: var(--text-light);
  margin-left: 0.25rem;
}

.product-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.product-desc {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.product-price {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.price-old {
  color: var(--text-light);
  text-decoration: line-through;
  font-size: 0.9rem;
}

.price-current {
  color: var(--primary);
  font-weight: 700;
  font-size: 1.4rem;
}

.price-unit {
  color: var(--text-light);
  font-size: 0.85rem;
}

.btn-cart {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  border: none;
  background: var(--primary);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
}

.btn-cart:hover {
  background: var(--primary-dark);
  transform: scale(1.1);
}

.btn-cart.in-cart {
  background: var(--success);
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: 1001;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  z-index: 10;
  transition: var(--transition);
}

.modal-close:hover {
  transform: rotate(90deg);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding: 2rem;
}

.modal-image img {
  width: 100%;
  border-radius: var(--radius);
}

.modal-details h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.modal-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.modal-rating i {
  color: var(--border);
}

.modal-rating i.active {
  color: var(--accent);
}

.modal-desc {
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.modal-price {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-stock {
  color: var(--success);
  margin-bottom: 2rem;
  font-weight: 600;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--white);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  padding: 1.5rem;
  background: var(--primary);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.cart-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cart-body {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
}

.cart-empty {
  text-align: center;
  padding: 3rem 0;
  color: var(--text-light);
}

.cart-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  object-fit: cover;
}

.cart-item-info {
  flex: 1;
}

.cart-item-info h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--dark);
}

.cart-item-price {
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quantity-controls button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  transition: var(--transition);
}

.quantity-controls button:hover {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.quantity-controls span {
  font-weight: 600;
  min-width: 30px;
  text-align: center;
}

.cart-item-remove {
  background: transparent;
  border: none;
  color: var(--danger);
  cursor: pointer;
  padding: 0.5rem;
  transition: var(--transition);
}

.cart-item-remove:hover {
  background: rgba(244, 67, 54, 0.1);
  border-radius: var(--radius);
}

.cart-footer {
  padding: 1.5rem;
  border-top: 2px solid var(--border);
  background: var(--bg-light);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
  font-weight: 700;
}

.total-amount {
  color: var(--primary);
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
  display: none;
}

.cart-overlay.active {
  display: block;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--white);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 300px;
  transform: translateX(400px);
  opacity: 0;
  transition: var(--transition);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-info {
  border-left: 4px solid var(--primary);
}

.toast i {
  font-size: 1.2rem;
}

.toast-success i {
  color: var(--success);
}

.toast-info i {
  color: var(--primary);
}

/* Responsive */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
  }

  .hero-image {
    order: -1;
  }

  .modal-grid {
    grid-template-columns: 1fr;
  }

  .nav-menu {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }

  .featured-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .products-grid {
    grid-template-columns: 1fr;
  }

  .category-filter {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  .modal-content {
    width: 95%;
  }

  .modal-grid {
    padding: 1rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Footer */
.footer {
  background: var(--dark);
  color: var(--white);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-logo i {
  color: var(--primary);
  font-size: 2rem;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  transition: var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-col h4 {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 0.75rem;
}

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--primary);
  transform: translateX(5px);
}

.contact-info li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.contact-info i {
  color: var(--primary);
  width: 20px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.6);
}

.payment-methods {
  display: flex;
  gap: 1rem;
  font-size: 1.5rem;
}

.payment-methods i {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}

.payment-methods i:hover {
  color: var(--primary);
}