/* Shop Page Styles */
.shop-section {
  background-color: #f8f9fa;
  min-height: 100vh;
  padding: 2rem 0;
}

/* Search Bar */
.search-container {
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.search-container .form-control {
  border: none;
  box-shadow: none;
  padding: 0.5rem 0;
}

.search-container .input-group-text {
  background: transparent;
  border: none;
  color: #6c757d;
}

/* Categories Sidebar */
.list-group-item {
  border: none;
  padding: 0.75rem 1.25rem;
  color: #495057;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.list-group-item:hover, 
.list-group-item.active {
  background-color: #f8f9fa;
  color: #b31a29;
  border-left-color: #b31a29;
}

.list-group-item.active {
  font-weight: 600;
}

/* Product Card */
.product-card {
  border: none;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  background: white;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

.product-card .card-img-top {
  transition: transform 0.5s ease;
}

.product-card:hover .card-img-top {
  transform: scale(1.05);
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-card .card-body {
  padding: 1.25rem;
}

.product-card .card-title {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: #2c3e50;
}

.product-card .text-muted {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.product-card .btn-outline-primary {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.product-card .btn-outline-primary:hover {
  background-color: #b31a29;
  border-color: #b31a29;
}

/* Price */
.text-primary {
  color: #b31a29 !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .shop-section {
    padding: 1rem 0;
  }
  
  .search-container {
    margin-bottom: 1rem;
  }
  
  .list-group {
    margin-bottom: 1.5rem;
  }
}

/* Animation for add to cart */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.bounce {
  animation: bounce 0.6s;
}

/* Checkout Modal */
#checkoutModal .modal-content {
  border: none;
  border-radius: 10px;
  overflow: hidden;
}

#checkoutModal .modal-header {
  background: #b31a29;
  color: white;
  border-bottom: none;
  padding: 15px 20px;
}

#checkoutModal .modal-header .btn-close {
  filter: brightness(0) invert(1);
  opacity: 0.8;
}

#checkoutModal .modal-body {
  padding: 25px;
}

#checkoutModal .form-label {
  font-weight: 500;
  color: #495057;
  margin-bottom: 5px;
}

#checkoutModal .form-control,
#checkoutModal .form-select {
  padding: 10px 15px;
  border-radius: 6px;
  border: 1px solid #dee2e6;
  margin-bottom: 15px;
}

#checkoutModal .form-control:focus,
#checkoutModal .form-select:focus {
  border-color: #b31a29;
  box-shadow: 0 0 0 0.25rem rgba(179, 26, 41, 0.25);
}

#payButton {
  background: #b31a29;
  border: none;
  padding: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

#payButton:hover {
  background: #8f1523;
  transform: translateY(-2px);
}

#payButton:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .shop-page .page-title {
    padding: 80px 0 40px;
  }
  
  .shop-page .page-title h1 {
    font-size: 2rem;
  }
  
  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
  }
}

/* Animation for product items */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-item {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
}

.product-item:nth-child(2) { animation-delay: 0.1s; }
.product-item:nth-child(3) { animation-delay: 0.2s; }
.product-item:nth-child(4) { animation-delay: 0.3s; }
.product-item:nth-child(5) { animation-delay: 0.4s; }
.product-item:nth-child(6) { animation-delay: 0.5s; }

/* Shop brand color overrides */
.bg-brand {
  background-color: var(--accent-color) !important;
  color: var(--contrast-color) !important;
}

/* Buttons aligned to brand */
.btn-primary {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--contrast-color);
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: color-mix(in srgb, var(--accent-color), black 12%);
  border-color: color-mix(in srgb, var(--accent-color), black 12%);
}

.btn-outline-primary {
  color: var(--accent-color);
  border-color: var(--accent-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--accent-color);
  color: var(--contrast-color);
  border-color: var(--accent-color);
}

/* Product image sizing for consistent cards */
#productsContainer .card-img-top {
  height: 280px;
  object-fit: contain;
  background-color: #fff;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Scoped card polish for shop grid */
#productsContainer .card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 10px;
}

#productsContainer .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12) !important;
}

#productsContainer .product-image-wrap {
  position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent-color), white 92%), #fff);
}

#productsContainer .product-image-wrap img {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

#productsContainer .product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent-color);
  color: var(--contrast-color);
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

#productsContainer .price-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent-color), white 85%);
  color: var(--accent-color);
  border: 1px solid color-mix(in srgb, var(--accent-color), transparent 70%);
  font-weight: 600;
}

#productsContainer .card .card-title {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

#productsContainer .product-price {
  font-weight: 600;
}

/* Variant selects styling */
#productsContainer .variant-selects {
  margin-top: 0.25rem;
}

#productsContainer .variant-selects .form-select {
  border-color: color-mix(in srgb, var(--accent-color), transparent 75%);
  color: var(--heading-color);
}

#productsContainer .variant-selects .form-select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(179, 26, 41, 0.15);
}

#productsContainer .variant-selects .form-select-sm {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
  border-radius: 6px;
}

/* Circular icon-only add button */
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Muted brand background for subtle success state */
.bg-muted-brand {
  background-color: color-mix(in srgb, var(--default-color), transparent 85%) !important; /* light gray from theme */
  color: var(--heading-color) !important;
  border-color: color-mix(in srgb, var(--default-color), transparent 85%) !important;
}
