/* Header & Navigation */
.store-header {
  background-color: var(--primary-green);
  color: var(--text-light);
  padding: 1rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-light);
}

.logo-container h1 {
  font-size: 1.5rem;
  color: var(--accent-yellow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cart-toggle {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.2rem;
  cursor: pointer;
  position: relative;
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: var(--accent-coral);
  color: white;
  font-size: 0.75rem;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 50%;
}

/* Layout & Grid */
.main-container {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 1rem;
}

/* Search & Categories */
.search-bar {
  width: 100%;
  padding: 12px 20px;
  border: 1px solid #ddd;
  border-radius: 25px;
  font-size: 1rem;
  margin-bottom: 2rem;
  outline: none;
}

.search-bar:focus {
  border-color: var(--secondary-teal);
  box-shadow: 0 0 0 2px rgba(79, 111, 82, 0.2);
}

.categories-scroll {
  display: flex;
  gap: 15px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 2rem;
  scrollbar-width: thin;
}

.category-btn {
  background-color: white;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.category-btn.active, .category-btn:hover {
  background-color: var(--secondary-teal);
  color: white;
  border-color: var(--secondary-teal);
}

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  background: white;
  border-radius: var(--border-radius-md);
  padding: 15px;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--box-shadow-hover);
  transform: translateY(-2px);
}

.product-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent-coral);
  color: white;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  font-weight: bold;
}

.product-image {
  width: 100%;
  height: 150px;
  object-fit: contain;
  margin-bottom: 15px;
}

.product-title {
  font-size: 1rem;
  margin-bottom: 5px;
  color: var(--text-dark);
}

.product-variant {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 15px;
  margin-top: auto;
}

.final-price {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-green);
}

.mrp-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.stock-status {
  font-size: 0.8rem;
  color: var(--success-green);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.stock-status.out-of-stock {
  color: var(--accent-coral);
}

.btn-add-cart {
  width: 100%;
  padding: 10px;
  background-color: var(--accent-yellow);
  color: var(--text-dark);
  border: none;
  border-radius: var(--border-radius-sm);
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-cart:hover:not(:disabled) {
  background-color: #e0bc0d;
}

.btn-add-cart:disabled {
  background-color: #ddd;
  color: #888;
  cursor: not-allowed;
}

/* Cart Sidebar / Modal */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: white;
  box-shadow: -2px 0 10px 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;
  background: var(--primary-green);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.close-cart {
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px;
}

.cart-item {
  display: flex;
  gap: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.cart-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.cart-item-details {
  flex-grow: 1;
}

.cart-item-title {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.cart-qty-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 5px;
}

.qty-btn {
  background: #eee;
  border: none;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  cursor: pointer;
}

.cart-footer {
  padding: 20px;
  background: #f9f9f9;
  border-top: 1px solid #eee;
}

.cart-summary-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.cart-summary-row.total {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-green);
  border-top: 1px solid #ddd;
  padding-top: 10px;
  margin-top: 10px;
}

.btn-checkout {
  display: block;
  width: 100%;
  padding: 12px;
  background: var(--primary-green);
  color: white;
  text-align: center;
  text-decoration: none;
  border-radius: var(--border-radius-md);
  font-weight: bold;
  margin-top: 15px;
}

.admin-link {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  opacity: 0.5;
}
.admin-link:hover {
  opacity: 1;
}