/* CSS Variables for easy theming */
:root {
  --primary: #6B3E26;         /* warm chocolate brown */
  --accent: #E9C9B6;          /* cream/pink accent */
  --bg: #fff7f3;              /* soft background */
  --text: #2a2a2a;            /* primary text */
  --img-placeholder: #f3e7e0; /* placeholder block color that blends well */
  --card-shadow: 0 6px 18px rgba(107, 62, 38, 0.12);
  --transition: all 0.3s ease;
  --reviews-per-view: 3;
  --gap: 1rem;
}

/* Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

h1, h2 {
  font-family: 'Playfair Display', serif;
}

/* Header */
header {
  background-color: var(--primary);
  color: white;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--card-shadow);
}

header h1 {
  font-size: 2rem;
}

#cart-toggle {
  background: linear-gradient(135deg, var(--accent), var(--primary));
  color: var(--text);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

#cart-toggle:hover {
  transform: scale(1.05);
}

/* Main Content */
main {
  padding: 2rem;
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Category Sections */
.category-section {
  margin-bottom: 3rem;
}

.category-section h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem 0;
  color: var(--primary);
  text-align: center;
}

.category-section h3 {
  font-size: 1.5rem;
  margin: 1rem 0 0.5rem 0;
  color: var(--text);
  text-align: center;
}

.product-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(107, 62, 38, 0.15);
}

.product-image {
  width: 100%;
  height: 200px;
  background-color: var(--img-placeholder);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  font-size: 0.9rem;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.product-info {
  padding: 1.5rem;
}

.product-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.product-price {
  font-size: 1.1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.note-charge {
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.product-desc {
  font-size: 0.9rem;
  margin-bottom: 1rem;
  color: #666;
}

.add-to-cart {
  background: linear-gradient(135deg, var(--primary), #8B4513);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
}

.add-to-cart:hover {
  transform: scale(1.02);
}

/* Badges */
.badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--accent);
  color: var(--text);
  padding: 0.25rem 0.5rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100%;
  background: white;
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  transition: var(--transition);
  z-index: 1000;
  overflow-y: auto;
}

.cart-sidebar.open {
  right: 0;
}

.cart-sidebar h2 {
  margin-bottom: 1rem;
  color: var(--primary);
}

#cart-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--primary);
  transition: var(--transition);
}

#cart-close:hover {
  color: var(--text);
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.cart-item:last-child {
  border-bottom: none;
}

.cart-item-info h3 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.cart-item-info p {
  font-size: 0.9rem;
  color: #666;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  background: var(--accent);
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  font-weight: bold;
  transition: var(--transition);
}

.quantity-btn:hover {
  background: var(--primary);
  color: white;
}

#cart-total {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 1rem 0;
  color: var(--primary);
}

#checkout {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  transition: var(--transition);
}

#checkout:hover {
  transform: scale(1.02);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  box-shadow: var(--card-shadow);
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  z-index: 1001;
}

.toast.show {
  opacity: 1;
  visibility: visible;
}

/* Reviews Section */
#reviews {
  padding: 2rem 0;
  background-color: var(--bg);
}

#reviews h2 {
  font-size: 2rem;
  margin: 2rem 0 1rem 0;
  color: var(--primary);
  text-align: center;
}

.reviews-slider {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  padding: 0 2rem;
}

#reviews-container {
  display: flex;
  gap: var(--gap);
  transition: transform 0.5s ease-in-out;
  will-change: transform;
}

.review-card {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  flex: 0 0 calc((100% - var(--gap) * (var(--reviews-per-view) - 1)) / var(--reviews-per-view));
  transition: var(--transition);
}

.review-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(107, 62, 38, 0.15);
}

.review-stars {
  color: #ffd700;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.review-text {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.review-name {
  font-weight: 600;
  color: var(--primary);
  text-align: right;
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 700;
  opacity: 0.7;
  transition: opacity 0.3s ease;
  z-index: 10;
  user-select: none;
}

.slider-btn:hover {
  opacity: 1;
}

.prev-btn {
  left: 10px;
}

.next-btn {
  right: 10px;
}

/* Responsive Design for Reviews Slider */
@media (max-width: 768px) {
  .reviews-slider {
    padding: 0 1rem;
  }

  .slider-btn {
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
  }
}

/* Footer */
footer {
  background-color: var(--primary);
  color: white;
  text-align: center;
  padding: 1rem;
  margin-top: 2rem;
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: 400px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
  display: flex;
  overflow: hidden;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 1rem;
  font-family: 'Playfair Display', serif;
}

.hero-slider .slide {
  position: absolute;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.hero-slider .slide.active {
  opacity: 1;
  position: relative;
}

.hero-slider h2 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.4);
}

.hero-slider p {
  font-size: 1.25rem;
  font-weight: 400;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
}

/* Scroll Animation */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Checkout Styles */
#checkout {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 0;
}

#checkout h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
}

#checkout-cart {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

#checkout-cart h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.checkout-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}

.checkout-item:last-child {
  border-bottom: none;
}

.checkout-item-info h4 {
  margin-bottom: 0.25rem;
}

.checkout-item-info p {
  color: #666;
  font-size: 0.9rem;
}

.checkout-item-total {
  font-weight: 600;
  color: var(--primary);
}

#checkout-total {
  font-size: 1.25rem;
  font-weight: 700;
  margin-top: 1rem;
  color: var(--primary);
  text-align: right;
}

#checkout-form {
  background: white;
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

#checkout-form h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(107, 62, 38, 0.1);
}

#submit-order {
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  font-size: 1.1rem;
  transition: var(--transition);
}

#submit-order:hover {
  transform: scale(1.02);
}

#back-to-shop {
  background: var(--accent);
  color: var(--text);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 600;
  transition: var(--transition);
}

#back-to-shop:hover {
  background: var(--primary);
  color: white;
}

/* WhatsApp Chat Widget */
#whatsapp-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
}

#whatsapp-widget a {
  display: block;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

#whatsapp-widget a:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

#whatsapp-widget img {
  width: 30px;
  height: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-slider {
    height: 300px;
  }

  .hero-slider h2 {
    font-size: 1.8rem;
  }

  .hero-slider p {
    font-size: 1rem;
  }

  .product-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .reviews-container {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .cart-sidebar {
    width: 100%;
    right: -100%;
  }

  header {
    flex-direction: column;
    gap: 1rem;
  }

  header h1 {
    font-size: 1.5rem;
  }

  main {
    padding: 1rem;
  }

  #checkout {
    padding: 1rem 0;
  }

  .checkout-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .checkout-item-total {
    align-self: flex-end;
  }

  #whatsapp-widget {
    bottom: 15px;
    right: 15px;
  }

  #whatsapp-widget a {
    width: 50px;
    height: 50px;
  }

  #whatsapp-widget img {
    width: 25px;
    height: 25px;
  }
}
