/* storestyles.css - Consistent with indexstyles.css */

:root {
  --purple: #f59719;
  --teal: #db3123;
  --teal-light: #00a3a3;
  --white: #F9F9F9;
  --red: #FF3333;
  --danger: #e74c3c;
  --gray: #f0f2f5;
  --gray-dark: #e0e0e0;
  --shadow: 0 4px 6px rgba(245, 151, 25, 0.1);
  --shadow-lg: 0 10px 20px rgba(245, 0, 0, 0.1);
  --transition: all 0.3s ease;
  --font-base: 'Open Sans', sans-serif;
  --font-heading: 'Lato', sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-base);
  background-color: #dce3ea;
  color: #333;
  line-height: 1.6;
  transition: var(--transition);
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 1rem;
}

/* Store-specific Header Styles */
.cart-icon-container {
  position: relative;
}

.cart-icon-container a {
  display: flex;
  align-items: center;
  position: relative;
}

.cart-count {
  background-color: var(--teal);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  position: absolute;
  top: -8px;
  right: -8px;
}

/* Store Hero */
.store-hero {
  background: linear-gradient(135deg, var(--purple) 0%, var(--teal) 100%);
  color: white;
  padding: 4rem 1rem;
  text-align: center;
  margin-top: 70px;
  border-radius: 0 0 25px 25px;
}

.store-hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: white;
}

.store-hero .lead {
  font-size: 1.3rem;
  max-width: 700px;
  margin: 0 auto 2rem;
}

.store-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.store-stats .stat {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.store-stats .stat i {
  font-size: 1.5rem;
  color: white;
}

/* Main Store Container */
.store-container {
  display: flex;
  gap: 2rem;
  padding: 2rem 1rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Store Sidebar */
.store-sidebar {
  flex: 0 0 280px;
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  height: fit-content;
}

.filter-section h3 {
  color: var(--purple);
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.filter-group {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--gray-dark);
}

.filter-group h4 {
  color: var(--teal);
  margin-bottom: 0.8rem;
  font-size: 1rem;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.filter-checkbox input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid var(--purple);
  border-radius: 3px;
  display: inline-block;
  position: relative;
}

.filter-checkbox input:checked + .checkmark {
  background-color: var(--purple);
}

.filter-checkbox input:checked + .checkmark::after {
  content: '✓';
  position: absolute;
  color: white;
  font-size: 12px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.price-range {
  padding: 0.5rem 0;
}

.price-slider {
  width: 100%;
  height: 6px;
  background: var(--gray);
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--purple);
  border-radius: 50%;
  cursor: pointer;
}

.price-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.featured-sidebar {
  margin-top: 2rem;
}

.featured-sidebar h3 {
  color: var(--purple);
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.featured-product {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background-color: var(--gray);
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.featured-product:hover {
  transform: translateX(5px);
  box-shadow: var(--shadow);
}

.featured-product img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
}

.featured-product-info h4 {
  font-size: 0.9rem;
  margin-bottom: 0.3rem;
  color: var(--teal);
}

.featured-product-info .price {
  font-weight: bold;
  color: var(--purple);
}

/* Store Main Area */
.store-main {
  flex: 1;
}

.store-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.search-bar {
  flex: 1;
  min-width: 250px;
  position: relative;
}

.search-bar i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--purple);
}

.search-bar input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.5rem;
  border: 2px solid var(--purple);
  border-radius: 8px;
  font-size: 1rem;
  transition: var(--transition);
}

.search-bar input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(245, 151, 25, 0.2);
}

.sort-options {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sort-options select {
  padding: 0.8rem;
  border: 2px solid var(--purple);
  border-radius: 8px;
  background-color: white;
  font-size: 0.95rem;
  cursor: pointer;
}

#productCount {
  font-size: 0.9rem;
  color: #666;
}

/* Special Offers */
.special-offers {
  margin-bottom: 2rem;
}

.offer-banner {
  background: linear-gradient(45deg, var(--purple), var(--teal));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.offer-link {
  margin-left: auto;
  color: white;
  text-decoration: underline;
  font-weight: bold;
}

/* Products Grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.product-card {
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background-color: var(--teal);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  z-index: 1;
}

.product-badge.prescription {
  background-color: var(--red);
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.product-info {
  padding: 1.5rem;
}

.product-category {
  color: var(--purple);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.product-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #333;
  min-height: 3rem;
}

.product-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.product-pet-type {
  display: flex;
  gap: 0.3rem;
}

.product-pet-type i {
  color: var(--purple);
}

.product-stock {
  color: #666;
}

.product-stock.in-stock {
  color: #2ecc71;
}

.product-stock.low-stock {
  color: #e67e22;
}

.product-stock.out-of-stock {
  color: var(--red);
}

.product-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.price {
  font-size: 1.4rem;
  font-weight: bold;
  color: var(--teal);
}

.price-old {
  text-decoration: line-through;
  color: #999;
  margin-left: 0.5rem;
  font-size: 1rem;
}

.product-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-add-cart {
  background-color: var(--purple);
  color: white;
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

.btn-add-cart:hover {
  background-color: var(--teal);
}

.btn-view-details {
  background-color: transparent;
  color: var(--purple);
  border: 2px solid var(--purple);
  padding: 0.6rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.btn-view-details:hover {
  background-color: var(--purple);
  color: white;
}

/* Frequently Bought Together */
.frequently-bought {
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--gray);
  border-radius: 12px;
}

.frequently-bought h2 {
  color: var(--purple);
  margin-bottom: 1.5rem;
  text-align: center;
}

.bundle-container {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
}

.bundle-card {
  background-color: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 300px;
}

.bundle-products {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1rem 0;
}

.bundle-product {
  text-align: center;
}

.bundle-product img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.bundle-savings {
  color: var(--teal);
  font-weight: bold;
  margin: 1rem 0;
}

/* Prescription Notice */
.prescription-notice {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.prescription-notice i {
  color: #e67e22;
  font-size: 1.5rem;
  margin-top: 0.2rem;
}

/* Shopping Cart Sidebar */
.cart-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 380px;
  height: 100vh;
  background-color: white;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
}

.cart-sidebar.active {
  right: 0;
}

.cart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--gray-dark);
}

.cart-header h3 {
  color: var(--purple);
  margin: 0;
}

.close-cart {
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  color: #666;
}

.close-cart:hover {
  color: var(--teal);
}

.cart-items {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.empty-cart {
  text-align: center;
  color: #999;
  padding: 3rem 0;
}

.empty-cart i {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--gray-dark);
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--gray-dark);
}

.cart-item-image {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

.cart-item-details {
  flex: 1;
}

.cart-item-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: var(--teal);
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.quantity-btn {
  width: 30px;
  height: 30px;
  background-color: var(--gray);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background-color: var(--purple);
  color: white;
}

.cart-item-quantity {
  min-width: 40px;
  text-align: center;
}

.remove-item {
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  margin-left: auto;
  padding: 0.5rem;
}

.remove-item:hover {
  color: var(--red);
}

.cart-summary {
  padding: 1.5rem;
  border-top: 1px solid var(--gray-dark);
}

.cart-totals {
  margin-bottom: 1.5rem;
}

.total-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.grand-total {
  font-size: 1.2rem;
  font-weight: bold;
  border-top: 2px solid var(--gray-dark);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.delivery-info-cart {
  background-color: var(--gray);
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.delivery-info-cart p {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.checkout-btn {
  width: 100%;
  padding: 1rem;
  margin-bottom: 1rem;
}

.checkout-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.payment-methods {
  display: flex;
  justify-content: center;
  gap: 1rem;
  padding: 1rem 0;
}

.payment-methods img {
  height: 30px;
}

/* Delivery Section */
.delivery-section {
  padding: 3rem 1rem;
  background-color: white;
}

.delivery-section h2 {
  text-align: center;
  color: var(--purple);
  margin-bottom: 2rem;
}

.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.delivery-card {
  text-align: center;
  padding: 2rem;
  background-color: var(--gray);
  border-radius: 12px;
  transition: var(--transition);
}

.delivery-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.delivery-card i {
  font-size: 3rem;
  color: var(--purple);
  margin-bottom: 1rem;
}

.delivery-card h3 {
  color: var(--teal);
  margin-bottom: 0.5rem;
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  z-index: 1002;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background-color: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.close-modal {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.modal-content h3 {
  color: var(--purple);
  margin-bottom: 1rem;
}

.modal-content ul {
  margin: 1rem 0 1rem 1.5rem;
}

.modal-content button {
  margin-top: 1rem;
  margin-right: 0.5rem;
}

/* Stripe Checkout Button */
.stripe-button {
  background: #635bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s;
}

.stripe-button:hover {
  background: #7a73ff;
}

.stripe-button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Payment status indicators */
.payment-status {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.payment-status.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.payment-status.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.payment-status.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Payment methods display */
.payment-methods {
  display: flex;
  gap: 10px;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.payment-methods img {
  height: 25px;
  width: auto;
}

/* Responsive Design */
@media (max-width: 992px) {
  .store-container {
    flex-direction: column;
  }
  
  .store-sidebar {
    flex: none;
    width: 100%;
  }
  
  .cart-sidebar {
    width: 100%;
    right: -100%;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  
  .ad-sidebar-floating,
  .toggle-ad-panel {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .store-hero h1 {
    font-size: 2rem;
  }
  
  .store-controls {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-bar {
    min-width: 100%;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  
  .cart-sidebar {
    width: 100%;
  }
  
  .store-stats {
    flex-direction: column;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
  
  .product-actions {
    flex-direction: column;
  }
  
  .delivery-grid {
    grid-template-columns: 1fr;
  }
}

/* Animation for cart count */
@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.3); }
}

.cart-count.update {
  animation: bounce 0.3s ease;
}

/* Loader */
.loader {
  display: flex;
  justify-content: center;
  padding: 2rem;
}

.loader:after {
  content: " ";
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 4px solid var(--purple);
  border-color: var(--purple) transparent var(--purple) transparent;
  animation: loader 1.2s linear infinite;
}

@keyframes loader {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}