/* Shop Styles */
:root {
  --shop-primary: #6b8e69;
  --shop-secondary: #f0f3ef;
  --shop-accent: #2e5046;
  --shop-light: #ffffff;
  --shop-border: #e0e0e0;
  --shop-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Shop Hero */
.shop-hero {
  background: linear-gradient(135deg, var(--sage-50) 0%, var(--cream) 100%);
  padding: 60px 0;
  text-align: center;
}

.shop-hero-content h1 {
  font-size: clamp(32px, 4vw, 48px);
  color: var(--brown-600);
  margin: 0 0 16px;
  font-family: 'Alegreya', Georgia, serif;
}

.shop-hero-content p {
  font-size: 18px;
  color: var(--sage-600);
  margin: 0;
  max-width: 600px;
  margin: 0 auto;
}

/* Cart Icon */
.cart-icon {
  position: relative;
  cursor: pointer;
  font-size: 24px;
  margin-left: 20px;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s;
}

.cart-icon:hover {
  background-color: var(--sage-50);
}

.cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--shop-primary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

/* Shop Filters */
.shop-filters {
  background: var(--shop-light);
  border-bottom: 1px solid var(--shop-border);
  padding: 20px 0;
  position: sticky;
  top: 70px;
  z-index: 50;
}

.filters-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

.category-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 8px 16px;
  border: 1px solid var(--shop-border);
  background: var(--shop-light);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--shop-primary);
  color: white;
  border-color: var(--shop-primary);
}

.search-filter input {
  padding: 8px 16px;
  border: 1px solid var(--shop-border);
  border-radius: 20px;
  width: 250px;
  font-size: 14px;
}

.search-filter input:focus {
  outline: none;
  border-color: var(--shop-primary);
  box-shadow: 0 0 0 2px rgba(107, 142, 105, 0.2);
}

/* Products Grid */
.shop-products {
  padding: 40px 0;
  background: var(--shop-secondary);
  min-height: 60vh;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--shop-light);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shop-shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: var(--shop-primary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 8px;
}

.product-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--shop-accent);
  margin: 0 0 8px;
  font-family: 'Alegreya', Georgia, serif;
}

.product-description {
  font-size: 14px;
  color: #666;
  margin: 0 0 16px;
  line-height: 1.4;
}

.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--shop-primary);
  margin: 0 0 16px;
}

.add-to-cart-btn {
  width: 100%;
  padding: 12px;
  background: var(--shop-primary);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s;
}

.add-to-cart-btn:hover {
  background: var(--shop-accent);
}

/* Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--shop-light);
  box-shadow: -2px 0 8px rgba(0,0,0,0.1);
  transition: right 0.3s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.open {
  right: 0;
}

.cart-header {
  padding: 20px;
  border-bottom: 1px solid var(--shop-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-header h3 {
  margin: 0;
  color: var(--shop-accent);
}

.close-cart {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--shop-border);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
}

.cart-item-info {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin: 0 0 4px;
  font-size: 14px;
}

.cart-item-price {
  color: var(--shop-primary);
  font-weight: 600;
  margin: 0 0 8px;
}

.cart-item-quantity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quantity-btn {
  width: 24px;
  height: 24px;
  border: 1px solid var(--shop-border);
  background: var(--shop-light);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: var(--shop-secondary);
}

.cart-footer {
  padding: 20px;
  border-top: 1px solid var(--shop-border);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--shop-accent);
}

.checkout-btn {
  width: 100%;
  padding: 14px;
  background: var(--shop-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.checkout-btn:hover {
  background: var(--shop-accent);
}

/* Product Modal */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.product-modal.open {
  display: flex;
}

.product-modal-content {
  background: var(--shop-light);
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 10;
}

.product-modal-body {
  padding: 40px;
}

.modal-product-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 24px;
}

.modal-product-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--shop-accent);
  margin: 0 0 8px;
  font-family: 'Alegreya', Georgia, serif;
}

.modal-product-category {
  font-size: 14px;
  color: var(--shop-primary);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-product-description {
  font-size: 16px;
  line-height: 1.6;
  color: #666;
  margin: 0 0 24px;
}

.modal-product-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--shop-primary);
  margin: 0 0 24px;
}

.modal-add-to-cart {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--shop-border);
  border-radius: 8px;
  padding: 8px;
}

.quantity-selector button {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--shop-secondary);
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

.quantity-selector span {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
}

.modal-add-btn {
  flex: 1;
  padding: 12px 24px;
  background: var(--shop-primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-add-btn:hover {
  background: var(--shop-accent);
}

/* Responsive */
@media (max-width: 768px) {
  .filters-content {
    flex-direction: column;
    align-items: stretch;
  }
  
  .category-filters {
    justify-content: center;
  }
  
  .search-filter input {
    width: 100%;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }
  
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .product-modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .product-modal-body {
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .shop-hero {
    padding: 40px 0;
  }
  
  .shop-hero-content h1 {
    font-size: 28px;
  }
}
