/**
 * Products Component Styles
 * Product grid, cards, featured section, filters, and related components
 */

/* ============================================================================
   FEATURED SECTION
   ============================================================================ */

.featured-section {
  padding: var(--mm-sp-4) 0 0;
  margin-bottom: 0;
}

.featured-section .section-title {
  display: flex;
  align-items: center;
  gap: var(--mm-sp-2);
  margin-bottom: var(--mm-sp-6);
}

.featured-section .section-title::before {
  content: '⭐';
  font-size: var(--mm-fs-xl);
}

.featured-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--mm-sp-6);
}

@media (max-width: 768px) {
  .featured-items-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   ATTRIBUTES LEGEND
   ============================================================================ */

.attributes-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mm-sp-4);
  padding: var(--mm-sp-6);
  background: var(--mm-surface);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow-xs);
  margin-bottom: var(--mm-sp-6);
}

.attributes-legend-title {
  width: 100%;
  font-size: var(--mm-fs-base);
  font-weight: 600;
  color: var(--mm-text);
  margin-bottom: var(--mm-sp-1);
  display: flex;
  align-items: center;
  gap: var(--mm-sp-2);
}

.attributes-legend-title .material-icons {
  font-size: 20px;
  color: var(--mm-text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--mm-sp-1);
  padding: var(--mm-sp-1) var(--mm-sp-4);
  background: var(--mm-bg);
  border-radius: var(--mm-radius-md);
  font-size: var(--mm-fs-sm);
  color: var(--mm-text);
}

.legend-item .material-icons {
  font-size: 18px;
}

.legend-item.vegetarian .material-icons {
  color: #4caf50;
}

.legend-item.vegan .material-icons {
  color: #8bc34a;
}

.legend-item.gluten-free .material-icons {
  color: #ff9800;
}

.legend-item.spicy .material-icons {
  color: #f44336;
}

.legend-item.seafood .material-icons {
  color: #2196f3;
}

/* ============================================================================
   FILTERS
   ============================================================================ */

.filters-section {
  padding: 0;
}

.filters-container {
  display: flex;
  gap: var(--mm-sp-2);
  overflow-x: auto;
  padding: 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--mm-sp-1);
  padding: var(--mm-sp-1) var(--mm-sp-3);
  min-height: 36px;
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius-xl);
  background: var(--mm-surface);
  color: var(--mm-text);
  font-size: var(--mm-fs-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--mm-dur-short3) var(--mm-ease-standard);
  cursor: pointer;
}

.filter-chip:hover {
  border-color: var(--mm-brand-functional);
  background: rgb(var(--mm-primary-rgb) / 0.10);
}

.filter-chip.selected {
  background: var(--mm-brand-functional);
  color: var(--mm-on-primary);
  border-color: var(--mm-brand-functional);
}

.filter-chip .material-icons {
  font-size: 16px;
}

/* ── Toolbar skeleton chips (loading state) ─────────────────────────────── */

.skel-toolbar {
  display: flex;
  gap: var(--mm-sp-2);
  padding: 0;
}

.skel-toolbar-chip {
  display: inline-block;
  width: 80px;
  height: 32px;
  border-radius: var(--mm-radius-xl);
  flex-shrink: 0;
}

.skel-toolbar-chip:nth-child(1) { width: 90px; }
.skel-toolbar-chip:nth-child(2) { width: 70px; }
.skel-toolbar-chip:nth-child(3) { width: 100px; }
.skel-toolbar-chip:nth-child(4) { width: 60px; }

.menu-loaded .skel-toolbar {
  display: none !important;
}

/* ── Section header skeleton (loading state) ────────────────────────────── */

.section-header {
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.skel-section-header {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 0;
  transition: opacity var(--mm-dur-medium2) var(--mm-ease-standard-decelerate);
}

.menu-loaded .skel-section-header {
  opacity: 0;
  pointer-events: none;
}

/* ============================================================================
   EMPTY STATES (UX Improvement)
   ============================================================================ */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xxl) var(--spacing-lg);
  text-align: center;
  min-height: 300px;
}

.empty-state .material-icons {
  font-size: 72px;
  color: var(--mm-text-tertiary);
  margin-bottom: var(--spacing-lg);
  opacity: 0.5;
}

.empty-state-title {
  font-size: var(--mm-fs-xl);
  font-weight: 600;
  color: var(--mm-text);
  margin-bottom: var(--spacing-sm);
}

.empty-state-message {
  font-size: var(--mm-fs-base);
  color: var(--mm-text-secondary);
  max-width: 400px;
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.empty-state .btn {
  margin-top: var(--spacing-md);
}

/* ============================================================================
   SKELETON LOADERS (Progressive Loading)
   ============================================================================ */

/* Hide all skeletons once menu is loaded */
.menu-loaded .skel-product-card {
  display: none !important;
}

/* Product card skeleton — matches .product-card dimensions */
.skel-product-card {
  background: var(--mm-surface);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow-xs);
  overflow: hidden;
}

.skel-product-image {
  width: 100%;
  height: 200px;
  border-radius: 0;
}

.skel-product-body {
  padding: var(--mm-sp-4);
}

.skel-text {
  height: 16px;
  margin-bottom: var(--mm-sp-2);
  border-radius: var(--mm-radius-xs);
}

.skel-text--title {
  width: 80%;
  height: 20px;
  margin-bottom: var(--mm-sp-4);
}

.skel-text--subtitle {
  width: 60%;
}

.skel-text--price {
  width: 40%;
  height: 18px;
  margin-top: var(--mm-sp-4);
}

.skel-text--heading {
  width: 180px;
  height: 28px;
}

/* ============================================================================
   SECTIONS
   ============================================================================ */

.section {
  padding: var(--mm-sp-2) 0 var(--mm-sp-4);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--mm-sp-6);
}

.section-title {
  font-family: var(--mm-ff-heading);
  font-size: var(--mm-fs-2xl);
  font-weight: 700;
  color: var(--mm-text);
  margin: 0;
}

/* View toggle — M3 segmented button (compact, inside sticky-toolbar) */
#view-toggle-bar {
  display: flex;
  gap: 0;
}

.view-toggle {
  display: flex;
  gap: 0;
  border: 1px solid var(--mm-border);
  border-radius: var(--mm-radius-md);
  overflow: hidden;
}

.view-button {
  width: 36px;
  height: 36px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--mm-dur-short3) var(--mm-ease-standard);
  border: none;
  border-right: 1px solid var(--mm-border);
}

.view-button:last-child {
  border-right: none;
}

.view-button:hover {
  background: rgb(var(--mm-primary-rgb) / 0.08);
}

.view-button.active {
  background: var(--mm-brand-functional);
}

.view-button.active .material-icons {
  color: var(--mm-on-primary);
}

.view-button .material-icons {
  font-size: 20px;
  color: var(--mm-text-secondary);
}

/* ============================================================================
   PRODUCTS GRID & CARDS
   ============================================================================ */

.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--mm-sp-6);
}

@media (min-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  background: var(--mm-surface);
  border-radius: var(--mm-radius-lg);
  box-shadow: var(--mm-shadow-xs);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--mm-dur-medium1) var(--mm-ease-standard);
  position: relative;
  animation: mm-mot-stagger-in var(--mm-dur-medium2) var(--mm-ease-emphasized-decelerate) both;
  display: flex;
  flex-direction: column;
}

/* Staggered animation for cards (set via JS or nth-child) */
.product-card:nth-child(1) { animation-delay: var(--mm-dur-short1); }
.product-card:nth-child(2) { animation-delay: var(--mm-dur-short2); }
.product-card:nth-child(3) { animation-delay: var(--mm-dur-short3); }
.product-card:nth-child(4) { animation-delay: var(--mm-dur-short4); }
.product-card:nth-child(5) { animation-delay: var(--mm-dur-medium1); }
.product-card:nth-child(6) { animation-delay: var(--mm-dur-medium2); }

.product-card:hover {
  box-shadow: var(--mm-shadow-md);
  transform: translateY(-2px);
}

.product-card:active {
  transform: translateY(-1px);
  box-shadow: var(--mm-shadow-sm);
}

/* Featured indicator */
.product-card.featured::before {
  content: '⭐';
  position: absolute;
  top: var(--spacing-sm);
  right: var(--spacing-sm);
  z-index: 2;
  font-size: 24px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  animation: featured-pulse 2s var(--mm-ease-standard) infinite;
}

@keyframes featured-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Out of stock overlay */
.product-card.out-of-stock::after {
  content: attr(data-unavailable-text);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: var(--font-size-lg);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 2;
}

.product-card.out-of-stock {
  opacity: 0.7;
  cursor: not-allowed;
}

.product-card.out-of-stock:hover {
  transform: none;
  box-shadow: var(--mm-shadow-xs);
}

/* Image container with overlay gradient */
.product-image-container {
  position: relative;
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--mm-border);
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

/* Gradient overlay for better text readability on badges */
.product-image-container::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.4), transparent);
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.product-card:hover .product-image-container::after {
  opacity: 1;
}

.product-card:hover .product-image {
  transform: scale(1.05);
}

/* Lazy loading image style */
.product-image[data-src] {
  opacity: 0.5;
  filter: blur(10px);
}

.product-image.loaded {
  opacity: 1;
  filter: blur(0);
  transition: opacity var(--transition-slow), filter var(--transition-slow);
}

.product-body {
  padding: var(--mm-sp-4);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.product-name {
  font-family: var(--mm-ff-heading);
  font-size: var(--mm-fs-lg);
  font-weight: 600;
  margin-bottom: var(--spacing-xs);
  color: var(--mm-text);
  line-height: 1.3;
}

.product-description {
  color: var(--mm-text-secondary);
  font-size: var(--mm-fs-sm);
  margin-bottom: var(--spacing-md);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
  margin-top: auto;
}

.product-price {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--mm-brand-functional);
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgb(var(--mm-primary-rgb) / 0.10);
  border-radius: var(--radius-md);
  transition: all var(--mm-dur-short3) var(--mm-ease-standard);
}

.product-card:hover .product-price {
  background: rgb(var(--mm-primary-rgb) / 0.20);
  transform: scale(1.05);
}

/* Dietary badges on image (positioned at top left) */
.dietary-badges {
  position: absolute;
  top: var(--spacing-sm);
  left: var(--spacing-sm);
  display: flex;
  gap: var(--spacing-xs);
  flex-wrap: wrap;
  z-index: 2;
  max-width: calc(100% - var(--spacing-xl));
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-xs);
  padding: var(--spacing-xs) var(--spacing-sm);
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  backdrop-filter: blur(4px);
  transition: transform var(--transition-fast);
}

.badge:hover {
  transform: scale(1.1);
}

.badge .material-icons {
  font-size: 14px;
}

.badge.vegan {
  background: rgba(200, 230, 201, 0.95);
  color: #2e7d32;
  border: 1px solid #4caf50;
}

.badge.vegetarian {
  background: rgba(255, 249, 196, 0.95);
  color: #f57f17;
  border: 1px solid #fbc02d;
}

.badge.gluten-free {
  background: rgba(255, 204, 188, 0.95);
  color: #d84315;
  border: 1px solid #ff7043;
}

.badge.spicy {
  background: rgba(255, 204, 188, 0.95);
  color: #d32f2f;
  border: 1px solid #f44336;
}

/* Dark theme badge adjustments */
.dark-theme .badge {
  background: rgb(var(--mm-shadow-rgb) / 0.85);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.dark-theme .badge.vegan {
  background: rgba(46, 125, 50, 0.9);
  color: #c8e6c9;
}

.dark-theme .badge.vegetarian {
  background: rgba(245, 127, 23, 0.9);
  color: #fff9c4;
}

.dark-theme .badge.gluten-free {
  background: rgba(216, 67, 21, 0.9);
  color: #ffccbc;
}

.dark-theme .badge.spicy {
  background: rgba(211, 47, 47, 0.9);
  color: #ffccbc;
}

/* List view (products + featured) */
.products-grid.list-view,
.featured-items-grid.list-view {
  grid-template-columns: 1fr;
}

.products-grid.list-view .product-card,
.featured-items-grid.list-view .product-card {
  flex-direction: row;
}

.products-grid.list-view .product-image-container,
.featured-items-grid.list-view .product-image-container {
  width: clamp(100px, 30vw, 200px);
  height: 150px;
  flex-shrink: 0;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 767px) {
  .section-title {
    font-size: var(--font-size-xl);
  }

  .product-name {
    font-size: var(--font-size-base);
  }

  .product-price {
    font-size: var(--font-size-xl);
  }
}

/* ============================================================================
   DARK THEME ADJUSTMENTS
   ============================================================================ */

.dark-theme .filter-chip:hover {
  background: rgb(var(--mm-on-dark-rgb) / 0.08);
}

/* ============================================================================
   RTL SUPPORT
   ============================================================================ */

[dir="rtl"] .filter-chip {
  flex-direction: row-reverse;
}

/* ============================================================================
   CART QUANTITY STEPPER (on product cards)
   ============================================================================ */

/* Toggle: hide stepper when qty = 0, hide quick-add when qty > 0 */
.product-card:not([data-cart-qty]) .product-cart-stepper,
.product-card[data-cart-qty="0"] .product-cart-stepper {
  display: none;
}

.product-card[data-cart-qty]:not([data-cart-qty="0"]) .quick-add-btn {
  display: none;
}

.product-cart-stepper {
  display: inline-flex;
  align-items: center;
  gap: var(--mm-sp-2);
}

.stepper-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  background: var(--mm-brand-functional);
  color: var(--mm-on-primary);
  cursor: pointer;
  border-radius: var(--mm-radius-lg);
  padding: 0;
  box-shadow: 0 4px 16px rgb(var(--mm-primary-rgb) / 0.3);
  transition: filter var(--mm-dur-short3) var(--mm-ease-standard),
              transform var(--mm-dur-short3) var(--mm-ease-standard),
              box-shadow var(--mm-dur-short3) var(--mm-ease-standard);
}

.stepper-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 6px 20px rgb(var(--mm-primary-rgb) / 0.4);
}

.stepper-btn:active {
  transform: scale(0.88);
}

.stepper-btn .material-icons {
  font-size: 18px;
}

.stepper-count {
  position: relative;
  overflow: hidden;
  min-width: 24px;
  height: 40px;
  text-align: center;
  font-weight: 700;
  font-size: var(--mm-fs-base);
  color: var(--mm-brand-functional);
  user-select: none;
  line-height: 40px;
}

/* Rolling number animation spans */
.stepper-num {
  display: block;
  line-height: 40px;
}

.stepper-count.rolling-up .stepper-num-old {
  animation: stepper-exit-up var(--mm-dur-short4, 200ms) var(--mm-ease-emphasized, cubic-bezier(0.2, 0, 0, 1)) forwards;
}
.stepper-count.rolling-up .stepper-num-new {
  animation: stepper-enter-up var(--mm-dur-short4, 200ms) var(--mm-ease-emphasized, cubic-bezier(0.2, 0, 0, 1)) forwards;
}

.stepper-count.rolling-down .stepper-num-old {
  animation: stepper-exit-down var(--mm-dur-short4, 200ms) var(--mm-ease-emphasized, cubic-bezier(0.2, 0, 0, 1)) forwards;
}
.stepper-count.rolling-down .stepper-num-new {
  animation: stepper-enter-down var(--mm-dur-short4, 200ms) var(--mm-ease-emphasized, cubic-bezier(0.2, 0, 0, 1)) forwards;
}

@keyframes stepper-exit-up {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(-100%); opacity: 0; }
}
@keyframes stepper-enter-up {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}
@keyframes stepper-exit-down {
  from { transform: translateY(0); opacity: 1; }
  to   { transform: translateY(100%); opacity: 0; }
}
@keyframes stepper-enter-down {
  from { transform: translateY(-100%); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Quick Add Button — uses DS .mm-btn--fab-sm with icon-morph SVG */
.quick-add-btn {
  transition: transform var(--mm-dur-medium1) var(--mm-ease-standard),
              background var(--mm-dur-medium1) var(--mm-ease-standard),
              box-shadow var(--mm-dur-medium1) var(--mm-ease-standard);
}

.quick-add-btn:hover {
  transform: scale(1.1);
}

.quick-add-btn:active {
  transform: scale(0.95);
}

/* Icon morph SVG */
.quick-add-btn .mm-icon-morph {
  width: 24px;
  height: 24px;
  overflow: visible;
}

.quick-add-btn .mm-plus path,
.quick-add-btn .mm-minus path,
.quick-add-btn .mm-check {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Plus / Minus — default visible */
.quick-add-btn .mm-plus,
.quick-add-btn .mm-minus {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Check — hidden by default */
.quick-add-btn .mm-check {
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  opacity: 0;
}

/* Done state — forward-fill animations */
.quick-add-btn[data-state="done"] .mm-plus,
.quick-add-btn[data-state="done"] .mm-minus {
  animation: mm-mot-plus-out 280ms cubic-bezier(.2,0,0,1) forwards;
}

.quick-add-btn[data-state="done"] .mm-check {
  animation: mm-mot-check-in 280ms cubic-bezier(.2,0,0,1) 60ms forwards;
}

/* Reverting state — reverse animations back to idle */
.quick-add-btn[data-state="reverting"] .mm-plus,
.quick-add-btn[data-state="reverting"] .mm-minus {
  animation: mm-mot-plus-in 200ms cubic-bezier(.2,0,0,1) forwards;
}

.quick-add-btn[data-state="reverting"] .mm-check {
  animation: mm-mot-check-out 150ms cubic-bezier(.2,0,0,1) forwards;
}

/* ============================================================================
   FAB → STEPPER MORPH ANIMATION
   ============================================================================ */

@keyframes mm-mot-fab-shrink {
  from { transform: scale(1); opacity: 1; }
  to   { transform: scale(0); opacity: 0; }
}

@keyframes mm-mot-stepper-expand {
  from { transform: scale(0.8); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* Shared grid overlap layout for both morph directions.
   auto auto + space-between mirrors the flex layout so the price doesn't shift. */
.product-card.morphing-to-stepper .product-footer,
.product-card.morphing-to-fab .product-footer {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: space-between;
  align-items: center;
  gap: var(--spacing-sm);
}

.product-card.morphing-to-stepper .product-footer > .product-price,
.product-card.morphing-to-fab .product-footer > .product-price {
  grid-area: 1 / 1;
}

.product-card.morphing-to-stepper .product-footer > .quick-add-btn,
.product-card.morphing-to-stepper .product-footer > .product-cart-stepper,
.product-card.morphing-to-fab .product-footer > .quick-add-btn,
.product-card.morphing-to-fab .product-footer > .product-cart-stepper {
  grid-area: 1 / 2;
  justify-self: end;
}

/* Forward morph: FAB shrinks out, stepper scales in (0→1) */
.product-card.morphing-to-stepper .quick-add-btn {
  display: flex !important;
  animation: mm-mot-fab-shrink 200ms cubic-bezier(.2,0,0,1) forwards;
  pointer-events: none;
}

.product-card.morphing-to-stepper .product-cart-stepper {
  display: inline-flex !important;
  animation: mm-mot-stepper-expand 250ms cubic-bezier(.2,0,0,1) 50ms both;
}

/* Reverse morph: stepper shrinks out, FAB scales in (1→0) */
.product-card.morphing-to-fab .product-cart-stepper {
  display: inline-flex !important;
  animation: mm-mot-fab-shrink 200ms cubic-bezier(.2,0,0,1) forwards;
  pointer-events: none;
}

.product-card.morphing-to-fab .quick-add-btn {
  display: flex !important;
  animation: mm-mot-stepper-expand 250ms cubic-bezier(.2,0,0,1) 50ms both;
}

/* ============================================================================
   REDUCED MOTION
   ============================================================================ */

@media (prefers-reduced-motion: reduce) {
  .product-card {
    animation: none;
  }

  .quick-add-btn .mm-plus,
  .quick-add-btn .mm-minus,
  .quick-add-btn .mm-check {
    animation: none !important;
  }
  .quick-add-btn[data-state="done"] .mm-plus,
  .quick-add-btn[data-state="done"] .mm-minus { opacity: 0; }
  .quick-add-btn[data-state="done"] .mm-check { opacity: 1; stroke-dashoffset: 0; }

  .product-card.morphing-to-stepper .quick-add-btn,
  .product-card.morphing-to-stepper .product-cart-stepper,
  .product-card.morphing-to-fab .quick-add-btn,
  .product-card.morphing-to-fab .product-cart-stepper {
    animation: none !important;
  }
  /* Instant swap: hide outgoing, show incoming */
  .product-card.morphing-to-stepper .quick-add-btn { opacity: 0; }
  .product-card.morphing-to-stepper .product-cart-stepper { opacity: 1; transform: none; }
  .product-card.morphing-to-fab .product-cart-stepper { opacity: 0; }
  .product-card.morphing-to-fab .quick-add-btn { opacity: 1; transform: none; }

  .stepper-btn {
    transition: none;
  }

  .stepper-count.rolling-up .stepper-num-old,
  .stepper-count.rolling-up .stepper-num-new,
  .stepper-count.rolling-down .stepper-num-old,
  .stepper-count.rolling-down .stepper-num-new {
    animation: none !important;
  }
}

/* ============================================================================
   FORCED COLORS (Windows High Contrast Mode)
   ============================================================================ */

@media (forced-colors: active) {
  .product-card {
    border: 1px solid ButtonText;
  }

  .badge {
    border: 1px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    forced-color-adjust: none;
  }

  .filter-chip {
    border: 1px solid ButtonText;
  }

  .filter-chip.selected {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }

  .product-card.out-of-stock::after {
    background: Canvas;
    color: GrayText;
    border: 2px solid GrayText;
  }

  .view-button.active {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
}
