/* Store — Products */

/* ============================================
   FEATURED SECTION
   ============================================ */
/* .featured-section, .section-header, .section-title, .see-all-link,
   .featured-carousel — earlier definitions merged into blocks below */

.featured-section.hidden {
  display: none;
}

/* ============================================
   PRODUCTS GRID - Premium Cards
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-8);
  container-type: inline-size;
}

/* Container-query driven columns (preferred over viewport queries) */
@container (max-width: 400px) {
  .products-grid {
    grid-template-columns: 1fr;
  }
}

@container (min-width: 400px) and (max-width: 700px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@container (min-width: 700px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow), inset 0 1px 0 var(--bg-glass-strong);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid color-mix(in srgb, var(--border-color) 60%, transparent);
  content-visibility: auto;
  contain-intrinsic-size: auto 420px;
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, color-mix(in oklch, var(--primary-color) 10%, transparent) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: var(--transition);
}

@media (hover: hover) {
  .product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
  }

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

.product-card:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  box-shadow: var(--primary-focus-ring);
}

.product-image {
  height: 260px;
  width: 100%;
  background: linear-gradient(135deg, var(--bg-body) 0%, var(--bg-muted) 100%);
  position: relative;
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

@media (hover: hover) {
  .product-card:hover .product-image img {
    transform: scale(1.03);
  }
}

.product-info {
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
  line-height: var(--leading-snug);
  color: var(--text-color);
  text-wrap: balance;
}

.product-category {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: var(--space-3);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.product-category::before {
  content: '';
  width: 8px;
  height: 8px;
  background: var(--primary-color);
  border-radius: var(--radius-full);
  opacity: 0.6;
}

.product-description {
  color: var(--text-light);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
  flex-grow: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: var(--leading-relaxed);
}

.product-price {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: var(--space-6);
  letter-spacing: 0;
}

.product-actions {
  display: flex;
  flex-direction: row;
  gap: var(--space-3);
  margin-top: auto;
}

.product-actions .add-to-cart-btn {
  flex: 1;
}

.product-actions .whatsapp-order-btn {
  width: auto;
  min-width: 48px;
  padding: var(--space-4);
}


/* ============================================
   PRODUCT BADGES - Professional Labels
   ============================================ */
.product-badges {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  z-index: var(--z-above);
}

.product-badge {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  backdrop-filter: var(--overlay-blur);
  animation: badgePop 0.3s ease-out;
}

@keyframes badgePop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.badge-new {
  background: linear-gradient(135deg, var(--success-color), var(--success-dark));
  color: white;
  box-shadow: 0 4px 12px color-mix(in oklch, var(--success-color) 40%, transparent);
}

.badge-hot {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-dark));
  color: white;
  box-shadow: 0 4px 12px color-mix(in oklch, var(--warning-color) 40%, transparent);
}

.badge-hot::before {
  content: '';
  width: 0.85em;
  height: 0.85em;
  display: inline-block;
  margin-right: 0.25em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.7 2.2c.4 2.7-.5 4.5-1.7 6.1-.8-1-1.2-2.2-1.1-3.7-2.9 2.2-5 5.2-5 8.7 0 4.3 3.4 7.7 7.8 7.7s7.8-3.2 7.8-7.5c0-3.4-2.1-6.1-4.1-8.1-.2 2.1-.9 3.2-1.8 4.2.2-2.5-.4-5.1-1.9-7.4z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.7 2.2c.4 2.7-.5 4.5-1.7 6.1-.8-1-1.2-2.2-1.1-3.7-2.9 2.2-5 5.2-5 8.7 0 4.3 3.4 7.7 7.8 7.7s7.8-3.2 7.8-7.5c0-3.4-2.1-6.1-4.1-8.1-.2 2.1-.9 3.2-1.8 4.2.2-2.5-.4-5.1-1.9-7.4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.badge-sale {
  background: linear-gradient(135deg, var(--error-color), var(--error-dark));
  color: white;
  box-shadow: 0 4px 12px color-mix(in oklch, var(--error-color) 40%, transparent);
}

.badge-sold-out {
  background: color-mix(in oklch, var(--text-secondary) 90%, transparent);
  color: white;
}

.badge-low-stock {
  background: linear-gradient(135deg, var(--warning-color), var(--warning-dark));
  color: white;
  animation: pulse 2s infinite;
}

.badge-featured {
  background: linear-gradient(135deg, var(--accent-color), color-mix(in oklch, var(--accent-color) 80%, black));
  color: white;
  box-shadow: 0 4px 12px color-mix(in oklch, var(--accent-color) 40%, transparent);
}

.badge-featured::before {
  content: '';
  width: 0.85em;
  height: 0.85em;
  display: inline-block;
  margin-right: 0.25em;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 2 2.9 6 6.6.9-4.8 4.7 1.1 6.6L12 17.1l-5.8 3.1 1.1-6.6-4.8-4.7 6.6-.9L12 2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m12 2 2.9 6 6.6.9-4.8 4.7 1.1 6.6L12 17.1l-5.8 3.1 1.1-6.6-4.8-4.7 6.6-.9L12 2z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Discount Badge with Percentage */
.badge-discount {
  background: linear-gradient(135deg, var(--error-color), var(--error-dark));
  color: white;
  font-size: var(--text-xs);
  padding: var(--space-2) var(--space-4);
}

/* Stock Counter Badge */
.stock-counter {
  position: absolute;
  bottom: 12px;
  right: 12px;
  background: color-mix(in oklch, var(--bg-surface) 95%, transparent);
  backdrop-filter: var(--overlay-blur);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-color);
  box-shadow: var(--shadow-sm);
  z-index: var(--z-above);
}

.stock-counter.low {
  background: color-mix(in oklch, var(--warning-color) 10%, transparent);
  color: var(--warning-dark);
  border: 1px solid color-mix(in oklch, var(--warning-color) 30%, transparent);
}

.stock-counter i {
  margin-right: var(--space-1);
  font-size: var(--text-xs);
}


/* ============================================
   FEATURED PRODUCTS CAROUSEL
   ============================================ */
.featured-section {
  margin-bottom: var(--space-10);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-light);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-5);
  margin-bottom: var(--space-6);
}

.section-title {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xl);
  font-weight: 800;
  color: var(--text-color);
  margin: 0;
}

.section-title i {
  color: var(--primary-color);
  font-size: var(--text-2xl);
}

.store-svg-icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex: 0 0 auto;
}

.section-title .store-svg-icon--flame {
  color: var(--primary-color);
  animation: fireFlicker 1s ease-in-out infinite;
}

@keyframes fireFlicker {

  0%,
  100% {
    transform: scale(1) rotate(-5deg);
  }

  50% {
    transform: scale(1.1) rotate(5deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .section-title .store-svg-icon--flame,
  .badge-low-stock {
    animation: none;
  }
}

.see-all-link {
  color: var(--primary-color);
  font-weight: 600;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  transition: var(--transition);
}

@media (hover: hover) {
  .see-all-link:hover {
    color: var(--primary-dark);
    gap: var(--space-3);
  }
}

.featured-carousel {
  display: flex;
  gap: var(--space-5);
  overflow-x: auto;
  padding: var(--space-2) var(--space-1);
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.featured-carousel::-webkit-scrollbar {
  display: none;
}

.featured-card {
  flex: 0 0 280px;
  scroll-snap-align: start;
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
}

@media (hover: hover) {
  .featured-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
  }
}

.featured-card .product-image {
  height: 180px;
  position: relative;
}

.featured-card .featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 60px var(--space-4) var(--space-4);
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
}

.featured-card .featured-overlay h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-1);
}

.featured-card .featured-overlay .price {
  font-size: var(--text-xl);
  font-weight: 800;
}

.featured-card .quick-add-btn {
  position: absolute;
  bottom: var(--space-4);
  right: var(--space-4);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary-gradient);
  color: white;
  font-size: var(--text-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--primary-shadow-sm);
  transition: var(--transition-bounce);
  z-index: var(--z-above);
}

@media (hover: hover) {
  .featured-card .quick-add-btn:hover {
    transform: scale(1.15);
    box-shadow: var(--primary-shadow-lg);
  }
}

.featured-card .quick-add-btn:active {
  transform: scale(0.95);
}


/* ============================================
   ENHANCED PRODUCT CARD - Premium Design
   ============================================ */
.product-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

/* Product Image Overlay Actions */
.product-image-actions {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: color-mix(in oklch, var(--dark-surface-solid) 40%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  opacity: 0;
  transition: var(--transition);
  z-index: var(--z-float);
}

@media (hover: hover) {
  .product-card:hover .product-image-actions {
    opacity: 1;
  }
}

.image-action-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-surface);
  color: var(--text-color);
  font-size: var(--text-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-bounce);
  transform: translateY(20px);
  opacity: 0;
}

@media (hover: hover) {
  .product-card:hover .image-action-btn {
    transform: translateY(0);
    opacity: 1;
  }

  .product-card:hover .image-action-btn:nth-child(2) {
    transition-delay: 0.1s;
  }

  .product-card:hover .image-action-btn:nth-child(3) {
    transition-delay: 0.2s;
  }
}

@media (hover: hover) {
  .image-action-btn:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.1);
  }
}

/* Quick Add Button on Product Card */
.quick-add-floating {
  position: absolute;
  bottom: -20px;
  right: 16px;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--primary-gradient);
  color: white;
  font-size: var(--text-xl);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg), var(--primary-shadow-sm);
  transition: var(--transition-bounce);
  z-index: var(--z-float);
  transform: translateY(100%);
  opacity: 0;
}

@media (hover: hover) {
  .product-card:hover .quick-add-floating {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (hover: hover) {
  .quick-add-floating:hover {
    transform: translateY(0) scale(1.1);
    box-shadow: var(--shadow-xl), var(--primary-shadow-lg);
  }
}

.quick-add-floating:active {
  transform: scale(0.9);
}

.quick-add-floating.added {
  background: linear-gradient(135deg, var(--success-color), var(--success-dark));
}

.quick-add-floating.added i {
  animation: checkPop 0.3s ease-out;
}


/* Price Display Enhancement */
.price-container {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.product-price {
  font-size: var(--text-2xl);
  font-weight: 800;
  color: var(--text-color);
  letter-spacing: 0;
}

.product-price.has-discount {
  color: var(--error-color);
}

.original-price {
  font-size: var(--text-base);
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 500;
}

.discount-amount {
  font-size: var(--text-xs);
  color: white;
  background: var(--error-color);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Product Rating Stars */
.product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.rating-stars {
  display: flex;
  gap: var(--space-1);
  color: var(--accent-amber);
  font-size: var(--text-sm);
}

.rating-stars i.empty {
  color: var(--text-muted);
}

.rating-count {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ============================================
   LIST VIEW MODE
   ============================================ */
/* .products-grid.list-view and sub-selectors — earlier definitions merged into blocks below */


/* Empty/Search Results State */
.empty-state,
.no-results-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px var(--space-6);
  text-align: center;
}

.empty-state i,
.no-results-state i {
  font-size: var(--text-5xl);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.empty-state h2,
.no-results-state h2 {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-color);
  margin-bottom: var(--space-3);
}

.empty-state p,
.no-results-state p {
  font-size: var(--text-base);
  color: var(--text-light);
  max-width: 300px;
  line-height: var(--leading-relaxed);
}


/* Improved loading state animation */

.skeleton {
  background: linear-gradient(90deg,
      var(--border-light) 25%,
      var(--background-color) 50%,
      var(--border-light) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* Product card on sale / badge styling */
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: var(--z-float);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0;
}

.badge-sale {
  background: linear-gradient(135deg, var(--error-color) 0%, var(--error-dark) 100%);
  color: white;
  box-shadow: 0 2px 10px color-mix(in oklch, var(--error-color) 40%, transparent);
}

.badge-new {
  background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
  color: white;
  box-shadow: 0 2px 10px color-mix(in oklch, var(--secondary-color) 40%, transparent);
}

.badge-popular {
  background: linear-gradient(135deg, var(--warning-color) 0%, var(--warning-dark) 100%);
  color: white;
  box-shadow: 0 2px 10px color-mix(in oklch, var(--warning-color) 40%, transparent);
}

/* Quick action buttons on product cards */
.product-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: var(--z-float);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  opacity: 0;
  transform: translateX(10px);
  transition: var(--transition);
}

@media (hover: hover) {
  .product-card:hover .product-actions {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (hover: none) {
  .product-actions {
    opacity: 1;
    transform: translateX(0);
  }
}

.product-action-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-light);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

@media (hover: hover) {
  .product-action-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
  }
}

/* List view alternative for products (merged) */
.products-grid.list-view {
  display: flex;
  flex-direction: column;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}

.products-grid.list-view .product-card {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0;
  flex-direction: row;
  height: auto;
  border-radius: var(--radius);
}

.products-grid.list-view .product-image {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
  border-radius: var(--radius) 0 0 var(--radius);
}

.products-grid.list-view .product-info {
  padding: var(--space-4) var(--space-5);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.products-grid.list-view .product-name {
  font-size: var(--text-lg);
  margin-bottom: var(--space-1);
}

.products-grid.list-view .product-description {
  -webkit-line-clamp: 2;
  line-clamp: 2;
  margin-bottom: var(--space-3);
}

.products-grid.list-view .product-price {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
}

.products-grid.list-view .product-actions {
  flex-direction: row;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.products-grid.list-view .product-actions .btn {
  flex: 1;
  min-width: 120px;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
}

.products-grid.list-view .quick-add-floating {
  position: relative;
  bottom: auto;
  right: auto;
  width: auto;
  height: auto;
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-5);
  font-size: var(--text-sm);
  transform: none;
  opacity: 1;
}

.products-grid.list-view .quick-add-floating i {
  margin-right: var(--space-2);
}

@media (max-width: 480px) {
  .products-grid.list-view .product-image {
    width: 100px;
    height: 100px;
  }

  .products-grid.list-view .product-info {
    padding: var(--space-3);
  }

  .products-grid.list-view .product-name {
    font-size: var(--text-base);
  }
}

/* ============================================
   INVENTORY / STOCK LABELS
   ============================================ */
.product-stock-label {
  font-size: var(--text-xs);
  font-weight: 600;
  margin-top: var(--space-1);
}

.stock-out {
  color: var(--error-color);
}

.stock-low {
  color: var(--warning-color);
}

.product-card .btn-disabled,
.product-card button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  background: var(--border-color);
}

