/* ========== css/style.css ========== */
/* Global Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: #fafafc;
  color: #1a1e2b;
  line-height: 1.5;
  overflow-x: hidden;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========== HEADER ========== */
.main-header {
  background: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(0px);
  border-bottom: 1px solid #edeef2;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.logo {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  cursor: default;
}

.logo-icon {
  margin-right: 4px;
}

.logo span:first-of-type {
  color: #111;
}

.logo span:last-child {
  color: #2c6e49;
}

.desktop-nav {
  display: flex;
  gap: 32px;
}

.nav-link {
  text-decoration: none;
  font-weight: 500;
  color: #2d3a3f;
  transition: color 0.2s;
  font-size: 1rem;
}

.nav-link:hover,
.nav-link.active {
  color: #2c6e49;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.currency-selector {
  padding: 8px 12px;
  border: 1px solid #edeef2;
  border-radius: 6px;
  background: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  color: #2d3a3f;
  cursor: pointer;
  transition: border-color 0.2s;
}

.currency-selector:focus {
  outline: none;
  border-color: #2c6e49;
}

.cart-icon-wrapper {
  position: relative;
}

.cart-btn {
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  padding: 8px;
  border-radius: 40px;
  transition: background 0.2s;
}

.cart-btn:hover {
  background: #f1f3f5;
}

.cart-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #c44536;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 30px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* ========== PAGE SECTIONS ========== */
.page-section {
  display: none;
  opacity: 0;
  animation: fadeIn 0.35s ease forwards;
}

.page-section.active-section {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px);}
  to { opacity: 1; transform: translateY(0);}
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #eef2f3 0%, #e0e7e9 100%);
  padding: 70px 0 80px;
  border-radius: 0 0 32px 32px;
  margin-bottom: 48px;
}

.hero-content {
  text-align: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  color: #1c2e2a;
}

.hero-content p {
  font-size: 1.2rem;
  color: #2c423e;
  max-width: 550px;
  margin: 0 auto 28px;
}

.btn-primary {
  background: #1f3b2c;
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.btn-primary:hover {
  background: #2c6e49;
  transform: scale(0.98);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin: 48px 0 24px 0;
  letter-spacing: -0.3px;
  color: #1f2a2e;
}

.featured-grid .section-title:first-of-type {
  margin-top: 0;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
  margin: 20px 0 40px;
}

.feature-card {
  background: white;
  padding: 16px 24px;
  border-radius: 60px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  border: 1px solid #e9ecef;
  flex: 1;
  text-align: center;
  min-width: 160px;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 32px;
  margin: 32px 0 48px;
}

.product-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  transition: 0.25s ease;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.03);
  border: 1px solid #edeef2;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 28px -12px rgba(0, 0, 0, 0.12);
}

.product-img {
  background: #f5f7f9;
  height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  border-bottom: 1px solid #f0f2f4;
}

.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.product-info {
  padding: 18px 16px 20px;
}

.product-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.product-category {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6c7a7f;
  margin-bottom: 10px;
}

.product-price {
  font-weight: 700;
  font-size: 1.3rem;
  color: #2c6e49;
  margin: 8px 0;
}

.add-to-cart {
  background: #f0f4f1;
  border: none;
  width: 100%;
  padding: 12px;
  border-radius: 40px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: 0.2s;
  margin-top: 12px;
  color: #1f3b2c;
}

.add-to-cart:hover {
  background: #2c6e49;
  color: white;
}

/* Filters */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 20px 0 24px;
}

.filter-btn {
  background: white;
  border: 1px solid #dee2e6;
  padding: 8px 20px;
  border-radius: 40px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn.active-filter,
.filter-btn:hover {
  background: #1f3b2c;
  border-color: #1f3b2c;
  color: white;
}

/* About page */
.about-card {
  background: white;
  border-radius: 32px;
  padding: 40px;
  margin: 20px 0 60px;
  box-shadow: 0 12px 24px -12px rgba(0,0,0,0.05);
  text-align: center;
}

.about-card p {
  font-size: 1.05rem;
  margin: 20px 0;
  color: #2d3e3a;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stats div {
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 2rem;
  color: #2c6e49;
}

/* ========== CART SIDEBAR ========== */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -420px;
  width: 380px;
  max-width: 90vw;
  height: 100%;
  background: white;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
  z-index: 1000;
  transition: right 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
  display: flex;
  flex-direction: column;
  padding: 20px 0 20px 0;
}

.cart-sidebar.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(2px);
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transition: 0.2s;
}

.cart-overlay.active {
  visibility: visible;
  opacity: 1;
}

.cart-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px 16px;
  border-bottom: 1px solid #edf2f7;
}

.cart-sidebar-header h3 {
  font-size: 1.5rem;
}

.close-cart {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.cart-items-list {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f0f0;
  padding: 14px 0;
}

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

.cart-item-title {
  font-weight: 600;
}

.cart-item-price {
  font-size: 0.85rem;
  color: #2c6e49;
}

.cart-item-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-qty-btn {
  background: #eef2f0;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 30px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.cart-item-qty {
  min-width: 24px;
  text-align: center;
}

.remove-item {
  background: transparent;
  border: none;
  color: #b91c1c;
  cursor: pointer;
  margin-left: 10px;
  font-size: 1.1rem;
}

.cart-footer {
  border-top: 1px solid #e9ecef;
  padding: 20px;
}

.cart-total {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.btn-checkout {
  width: 100%;
  background: #1f3b2c;
  border: none;
  padding: 14px;
  border-radius: 44px;
  color: white;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.btn-checkout:hover {
  background: #2c6e49;
}

.empty-cart-msg {
  text-align: center;
  padding: 40px 0;
  color: #7f8c8d;
}

/* Toast message */
.toast-message {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: #1e2a2e;
  color: white;
  padding: 10px 24px;
  border-radius: 100px;
  font-weight: 500;
  z-index: 1100;
  opacity: 0;
  transition: 0.2s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.toast-message.show {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Responsive */
@media (max-width: 700px) {
  .hero-content h1 {
    font-size: 2.2rem;
  }
  .desktop-nav {
    gap: 20px;
  }
  .features {
    flex-direction: column;
  }
  .stats {
    gap: 28px;
  }
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
}