/** 
 * Flavor Showcase - 3D Orbital Flavor Presentation
 * Version: 4.0.0
 * 
 * A performance-optimized showcase for premium flavors
 * with fluid animations, responsive design, and accessibility features
 */

/* ========== Base Variables & Settings ========== */
.flavor-showcase {
  /* Core Variables */
  --fs-primary: var(--primary-color, #231651);
  --fs-secondary: var(--secondary-color, #D6FFF6);
  --fs-text: var(--text-color, #333);
  --fs-bg: #050520;

  /* Accent Colors */
  --fs-accent-natural: #00a0ff;
  --fs-accent-strawberry: #ff5e94;
  --fs-accent-watermelon: #40c98e;

  /* Flavor-specific Theme Variables */
  --fs-natural-primary: #0062a1;
  --fs-natural-secondary: #b4e4ff;
  --fs-natural-gradient-1: rgba(0, 98, 161, 0.4);
  --fs-natural-gradient-2: rgba(0, 160, 255, 0.15);

  --fs-strawberry-primary: #b31b54;
  --fs-strawberry-secondary: #ffd6e0;
  --fs-strawberry-gradient-1: rgba(179, 27, 84, 0.4);
  --fs-strawberry-gradient-2: rgba(255, 94, 148, 0.15);

  --fs-watermelon-primary: #198454;
  --fs-watermelon-secondary: #c2ffe0;
  --fs-watermelon-gradient-1: rgba(25, 132, 84, 0.4);
  --fs-watermelon-gradient-2: rgba(64, 201, 142, 0.15);

  /* 3D & Animation Variables */
  --fs-orbit-size: clamp(280px, 70vw, 800px);
  --fs-product-size: clamp(120px, 20vw, 220px);
  --fs-orbit-angle: 20deg;
  --fs-orbit-depth: 400px;
  --fs-transition-slow: 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  --fs-transition-medium: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  --fs-transition-fast: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Typography */
  --fs-title-size: clamp(1.75rem, 5vw, 2.5rem);
  --fs-subtitle-size: clamp(1rem, 2vw, 1.2rem);
  --fs-info-title-size: clamp(1.5rem, 3vw, 2rem);
  --fs-text-size: clamp(0.875rem, 1.5vw, 1rem);

  /* Spacing */
  --fs-spacing-xs: 0.5rem;
  --fs-spacing-sm: 1rem;
  --fs-spacing-md: 2rem;
  --fs-spacing-lg: 3rem;
  --fs-spacing-xl: 5rem;

  /* Z-Index Layers */
  --fs-z-background: 0;
  --fs-z-products: 2;
  --fs-z-controls: 3;
  --fs-z-info: 4;

  /* Base Container Styles */
  position: relative;
  min-height: 100vh;
  background: var(--fs-bg);
  color: #fff;
  overflow: hidden;
  padding: var(--fs-spacing-xl) 0;
  isolation: isolate;
  content-visibility: auto;
  transition: background-color 1.2s ease-in-out;
}

/* Dynamic Background System */
.flavor-showcase::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: radial-gradient(circle at 30% 25%, var(--fs-natural-gradient-1), transparent 30%), 
                    radial-gradient(circle at 80% 60%, var(--fs-natural-gradient-2), transparent 40%);
  background-size: 100% 100%;
  opacity: 1;
  z-index: var(--fs-z-background);
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}

.flavor-showcase[data-active-flavor="natural"]::before {
  background-image: radial-gradient(circle at 30% 25%, var(--fs-natural-gradient-1), transparent 30%), 
                    radial-gradient(circle at 80% 60%, var(--fs-natural-gradient-2), transparent 40%);
}

.flavor-showcase[data-active-flavor="strawberry"]::before {
  background-image: radial-gradient(circle at 70% 25%, var(--fs-strawberry-gradient-1), transparent 30%), 
                    radial-gradient(circle at 20% 60%, var(--fs-strawberry-gradient-2), transparent 40%);
}

.flavor-showcase[data-active-flavor="watermelon"]::before {
  background-image: radial-gradient(circle at 50% 20%, var(--fs-watermelon-gradient-1), transparent 30%), 
                    radial-gradient(circle at 30% 70%, var(--fs-watermelon-gradient-2), transparent 50%);
}

/* ========== Header Area ========== */
.flavor-showcase__header {
  text-align: center;
  margin-bottom: var(--fs-spacing-lg);
}

.flavor-showcase #flavor-showcase__title {
  font-size: var(--fs-title-size);
  background: linear-gradient(135deg, #fff, var(--fs-secondary) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0.5rem;
  position: relative;
  display: inline-block;
}

.flavor-showcase #flavor-showcase__title::after {
  content: "";
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--fs-primary), var(--fs-secondary));
  transform: translateX(-50%);
  border-radius: 3px;
  transition: width var(--fs-transition-medium);
}

.flavor-showcase.in-view #flavor-showcase__title::after {
  width: 60%;
}

.flavor-showcase .section-subtitle {
  max-width: 650px;
  margin: var(--fs-spacing-md) auto 0;
  font-size: var(--fs-subtitle-size);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

/* ========== 3D Orbital Environment ========== */
.flavor-showcase__orbital-container {
  position: relative;
  height: clamp(450px, 60vh, 700px);
  margin-bottom: var(--fs-spacing-lg);
  perspective: 1200px;
}

.flavor-showcase__orbit-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

/* Orbital Path Visual */
.flavor-showcase__orbital-path {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--fs-orbit-size);
  height: var(--fs-orbit-size);
  transform: translate(-50%, -50%) rotateX(var(--fs-orbit-angle));
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  /* Simplified box-shadow */
  box-shadow: 0 0 30px rgba(35, 22, 81, 0.2);
}

/* ========== Product Items ========== */
.flavor-showcase__product {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--fs-product-size);
  height: var(--fs-product-size);
  margin-top: calc(var(--fs-product-size) / -2);
  margin-left: calc(var(--fs-product-size) / -2);
  transform-style: preserve-3d;
  transition: transform var(--fs-transition-slow);
  transform-origin: center center var(--fs-orbit-depth);
  z-index: var(--fs-z-products);
  cursor: pointer;
  will-change: transform, opacity;
}

.flavor-showcase__product-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform var(--fs-transition-medium);
}

.flavor-showcase__product-media {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.flavor-showcase__product-image {
  max-width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.5s ease-in, transform 0.5s cubic-bezier(0.17, 0.67, 0.36, 1.05);
  will-change: opacity, transform;
  transform: translateY(10px);
}

.flavor-showcase__product-image.loaded {
  opacity: 1;
  transform: translateY(0);
}

.flavor-showcase__image-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  /* Replaced filter with opacity and transform for better performance */
  opacity: 0.9;
  transform: scale(1.1);
  transition: opacity 0.5s ease-out;
  z-index: -1;
}

.flavor-showcase__image-placeholder.hidden {
  opacity: 0;
}

/* Product Glows & Effects */
.flavor-showcase__product-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  transform: translate(-50%, -50%);
  border-radius: 100%;
  /* Removed filter, using opacity and transform instead */
  opacity: 0.4;
  transition: opacity var(--fs-transition-medium),
              transform var(--fs-transition-medium);
  will-change: opacity, transform;
  pointer-events: none;
  z-index: -1;
}

.flavor-showcase__product--natural .flavor-showcase__product-glow {
  background: radial-gradient(circle, var(--fs-accent-natural) 0%, rgba(0, 160, 255, 0.4) 30%, transparent 70%);
  /* Simplified box-shadow */
  box-shadow: 0 0 20px rgba(0, 160, 255, 0.3);
}

.flavor-showcase__product--strawberry .flavor-showcase__product-glow {
  background: radial-gradient(circle, var(--fs-accent-strawberry) 0%, rgba(255, 94, 148, 0.4) 30%, transparent 70%);
  /* Simplified box-shadow */
  box-shadow: 0 0 20px rgba(255, 94, 148, 0.3);
}

.flavor-showcase__product--watermelon .flavor-showcase__product-glow {
  background: radial-gradient(circle, var(--fs-accent-watermelon) 0%, rgba(64, 201, 142, 0.4) 30%, transparent 70%);
  /* Simplified box-shadow */
  box-shadow: 0 0 20px rgba(64, 201, 142, 0.3);
}

.flavor-showcase__product:hover .flavor-showcase__product-glow {
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1.4);
}

/* Active/Focus States */
.flavor-showcase__product--active .flavor-showcase__product-image {
  transform: scale(1.15) translateZ(60px);
  /* Removed filter for performance, using simpler shadow */
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.flavor-showcase__product--active .flavor-showcase__product-glow {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.8);
}

.flavor-showcase__product:focus-visible {
  outline: none;
}

.flavor-showcase__product:focus-visible .flavor-showcase__product-inner {
  box-shadow: 0 0 0 3px rgba(214, 255, 246, 0.5);
  border-radius: 50%;
}

/* Best Seller Badge */
.flavor-showcase__badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(135deg, #ffaa00, #ff6b6b);
  padding: 0.4rem 0.8rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
  /* Simplified box-shadow */
  box-shadow: 0 4px 8px rgba(255, 107, 107, 0.3);
  transform: translateY(-50%) rotate(15deg);
  z-index: 2;
}

/* ========== Interactive Controls ========== */
.flavor-showcase__controls {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: var(--fs-z-controls);
}

.flavor-showcase__control {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  transition: all var(--fs-transition-fast);
  /* Removed backdrop-filter for performance */
}

.flavor-showcase__control:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.flavor-showcase__control:active {
  transform: translateY(0);
}

.flavor-showcase__control svg {
  width: 1.5rem;
  height: 1.5rem;
  transition: transform var(--fs-transition-fast);
}

.flavor-showcase__control:hover svg {
  transform: scale(1.2);
}

.flavor-showcase__control:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--fs-secondary);
}

/* Indicators */
.flavor-showcase__indicators {
  display: flex;
  gap: 0.75rem;
}

.flavor-showcase__indicator {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  cursor: pointer;
  border: none;
  position: relative;
  transition: transform var(--fs-transition-fast), 
              background-color var(--fs-transition-fast);
}

.flavor-showcase__indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  opacity: 0;
  z-index: -1;
}

.flavor-showcase__indicator:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.4);
}

.flavor-showcase__indicator--active {
  background: #fff;
  transform: scale(1.2);
}

.flavor-showcase__indicator:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--fs-secondary);
}

/* ========== Information Panels ========== */
.flavor-showcase__info-container {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  min-height: 350px;
}

.flavor-showcase__info-panel {
  position: absolute;
  top: 0;
  left: 0;
    width: 100%;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--fs-transition-medium),
              visibility var(--fs-transition-medium),
              transform var(--fs-transition-medium);
  transform: translateY(20px);
  z-index: var(--fs-z-info);
}

.flavor-showcase__info-panel--active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  position: relative;
}

.flavor-showcase__info-content {
  background: rgba(5, 5, 32, 0.7);
  /* Removed backdrop-filter for performance */
  border-radius: 1.5rem;
  padding: var(--fs-spacing-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  /* Simplified box-shadow */
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  transition: background 0.8s ease-in-out, 
              box-shadow 0.8s ease-in-out;
}

/* Flavor-specific info panel styling */
.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__info-content {
  background: linear-gradient(135deg, rgba(0, 98, 161, 0.2), rgba(5, 5, 32, 0.7) 60%);
  border-color: rgba(0, 160, 255, 0.2);
  /* Simplified box-shadow */
  box-shadow: 0 20px 30px rgba(0, 98, 161, 0.2);
}

.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__info-content {
  background: linear-gradient(135deg, rgba(179, 27, 84, 0.2), rgba(5, 5, 32, 0.7) 60%);
  border-color: rgba(255, 94, 148, 0.2);
  /* Simplified box-shadow */
  box-shadow: 0 20px 30px rgba(179, 27, 84, 0.2);
}

.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__info-content {
  background: linear-gradient(135deg, rgba(25, 132, 84, 0.2), rgba(5, 5, 32, 0.7) 60%);
  border-color: rgba(64, 201, 142, 0.2);
  /* Simplified box-shadow */
  box-shadow: 0 20px 30px rgba(25, 132, 84, 0.2);
}

/* Panel Title */
.flavor-showcase__info-title {
  font-size: var(--fs-info-title-size);
  margin-bottom: 0.75rem;
  text-align: center;
  background: linear-gradient(135deg, #fff, rgba(255, 255, 255, 0.7));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

/* Rating */
.flavor-showcase__rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: var(--fs-spacing-sm);
}

.flavor-showcase__stars {
  color: #ffd700;
  letter-spacing: 2px;
}

.flavor-showcase__rating-text {
  font-weight: 600;
}

.flavor-showcase__rating-count {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Description */
.flavor-showcase__description {
  text-align: center;
  max-width: 650px;
  margin: 0 auto var(--fs-spacing-md);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  font-size: var(--fs-text-size);
}

/* Flavor Features */
.flavor-showcase__features {
  margin-bottom: var(--fs-spacing-md);
}

.flavor-showcase__features-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.flavor-showcase__features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.flavor-showcase__feature {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--fs-text-size);
  transition: transform var(--fs-transition-fast);
}

.flavor-showcase__feature:hover {
  transform: translateX(5px);
}

.flavor-showcase__feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Natural flavor icon */
.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__feature-icon {
  color: var(--fs-accent-natural);
}

/* Strawberry flavor icon */
.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__feature-icon {
  color: var(--fs-accent-strawberry);
}

/* Watermelon flavor icon */
.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__feature-icon {
  color: var(--fs-accent-watermelon);
}

/* Size Selector */
.flavor-showcase__size-selector {
  margin-bottom: var(--fs-spacing-md);
}

.flavor-showcase__size-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.flavor-showcase__sizes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

.flavor-showcase__size {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  cursor: pointer;
  transition: all var(--fs-transition-fast);
  min-width: 100px;
  text-align: center;
}

.flavor-showcase__size:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.flavor-showcase__size:active {
  transform: translateY(-1px);
}

.flavor-showcase__size--active {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
  /* Simplified box-shadow */
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
}

/* Natural flavor size selector */
.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__size--active {
  /* Simplified box-shadow */
  box-shadow: 0 5px 15px rgba(0, 160, 255, 0.3);
  border-color: rgba(0, 160, 255, 0.4);
}

/* Strawberry flavor size selector */
.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__size--active {
  /* Simplified box-shadow */
  box-shadow: 0 5px 15px rgba(255, 94, 148, 0.3);
  border-color: rgba(255, 94, 148, 0.4);
}

/* Watermelon flavor size selector */
.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__size--active {
  /* Simplified box-shadow */
  box-shadow: 0 5px 15px rgba(64, 201, 142, 0.3);
  border-color: rgba(64, 201, 142, 0.4);
}

.flavor-showcase__size-value {
  font-weight: 700;
  font-size: 1.1rem;
}

.flavor-showcase__size-price {
  font-size: 0.85rem;
  margin-top: 0.25rem;
  opacity: 0.8;
}

/* Quantity Controls */
.flavor-showcase__quantity-controls {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 1rem;
  user-select: none;
}

.flavor-showcase__quantity-btn {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.flavor-showcase__quantity-btn:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.flavor-showcase__quantity-btn:active {
  transform: scale(0.95);
}

.flavor-showcase__quantity-value {
  margin: 0 0.75rem;
  font-weight: bold;
  min-width: 1.5rem;
  text-align: center;
}

/* Actions Area */
.flavor-showcase__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: var(--fs-spacing-sm);
}

.flavor-showcase__action-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Add to Cart Button */
.flavor-showcase__add-to-cart-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 0.75rem;
  color: white;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--fs-transition-fast);
  /* Simplified box-shadow */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--fs-accent-natural), var(--fs-primary));
}

.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__add-to-cart-btn {
  background: linear-gradient(135deg, var(--fs-accent-natural), var(--fs-primary));
}

.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__add-to-cart-btn {
  background: linear-gradient(135deg, var(--fs-accent-strawberry), var(--fs-primary));
}

.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__add-to-cart-btn {
  background: linear-gradient(135deg, var(--fs-accent-watermelon), var(--fs-primary));
}

.flavor-showcase__add-to-cart-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--fs-transition-fast);
  z-index: 0;
}

.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__add-to-cart-btn::before {
  background: linear-gradient(135deg, var(--fs-primary), var(--fs-accent-natural));
}

.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__add-to-cart-btn::before {
  background: linear-gradient(135deg, var(--fs-primary), var(--fs-accent-strawberry));
}

.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__add-to-cart-btn::before {
  background: linear-gradient(135deg, var(--fs-primary), var(--fs-accent-watermelon));
}

.flavor-showcase__add-to-cart-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.3);
}

.flavor-showcase__add-to-cart-btn:hover::before {
  opacity: 1;
}

.flavor-showcase__add-to-cart-btn:active {
  transform: translateY(-1px);
}

.flavor-showcase__add-to-cart-btn span {
  position: relative;
  z-index: 1;
}

/* Cart Added Success Animation */
@keyframes cartSuccess {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.flavor-showcase__add-to-cart-btn.success i {
  animation: cartSuccess 0.5s ease-in-out;
  color: #4cff4c;
}

/* Loading state */
.flavor-showcase__add-to-cart-btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.flavor-showcase__add-to-cart-btn.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin-left: -10px;
  margin-top: -10px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: btn-spinner 0.8s linear infinite;
}

@keyframes btn-spinner {
  to { transform: rotate(360deg); }
}

/* Success state */
.flavor-showcase__add-to-cart-btn.success {
  background: linear-gradient(135deg, #00c853, #64dd17) !important;
  color: white !important;
  border-color: transparent !important;
}

.flavor-showcase__add-to-cart-btn.success::before {
  content: "✓";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2em;
  color: white;
}

/* View Details Button */
.flavor-showcase__view-details-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--fs-transition-fast);
  background: transparent;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.flavor-showcase__info-panel[data-flavor="natural"] .flavor-showcase__view-details-btn {
  color: var(--fs-accent-natural);
  border-color: var(--fs-accent-natural);
}

.flavor-showcase__info-panel[data-flavor="strawberry"] .flavor-showcase__view-details-btn {
  color: var(--fs-accent-strawberry);
  border-color: var(--fs-accent-strawberry);
}

.flavor-showcase__info-panel[data-flavor="watermelon"] .flavor-showcase__view-details-btn {
  color: var(--fs-accent-watermelon);
  border-color: var(--fs-accent-watermelon);
}

.flavor-showcase__view-details-btn:hover {
  transform: translateY(-3px);
  background-color: rgba(255, 255, 255, 0.1);
}

.flavor-showcase__view-details-btn:active {
  transform: translateY(-1px);
}

.flavor-showcase__view-details-btn span {
  position: relative;
  z-index: 1;
}

/* Social Media Sharing */
.flavor-showcase__social-share {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.flavor-showcase__social-title {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: rgba(255, 255, 255, 0.9);
}

.flavor-showcase__social-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.flavor-showcase__share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, 
              background-color 0.2s ease, 
              box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.flavor-showcase__share-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    opacity: 0;
  transition: opacity 0.2s ease;
}

.flavor-showcase__share-btn:hover {
  transform: translateY(-3px);
}

.flavor-showcase__share-btn:hover::before {
    opacity: 1;
}

.flavor-showcase__share-btn:focus-visible {
  outline: 2px solid var(--fs-accent-natural);
  outline-offset: 2px;
}

.flavor-showcase__share-btn:active {
  transform: translateY(0);
}

/* Platform-specific colors */
.flavor-showcase__share-btn--fb {
  background-color: #3b5998;
}

.flavor-showcase__share-btn--tw {
  background-color: #1da1f2;
}

.flavor-showcase__share-btn--pin {
  background-color: #e60023;
}

.flavor-showcase__share-btn--copy {
  background-color: #6b6b6b;
}

.flavor-showcase__share-btn i {
  font-size: 1rem;
}

/* Social Share Count */
.flavor-showcase__share-count {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.875rem;
}

.flavor-showcase__share-count i {
  margin-right: 0.35rem;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Toast notification styling */
.flavor-showcase__notification {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  background-color: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.9rem;
  z-index: 1000;
  /* Simplified box-shadow */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform, opacity;
  pointer-events: none;
}

.flavor-showcase__notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ========== Accessibility & Support ========== */
/* Screen reader only class */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .flavor-showcase {
    --fs-transition-slow: 0.1s ease;
    --fs-transition-medium: 0.1s ease;
    --fs-transition-fast: 0.1s ease;
  }
  
  .flavor-showcase__product,
  .flavor-showcase__product-inner,
  .flavor-showcase__product-image,
  .flavor-showcase__product-glow {
    transition: all 0.1s ease;
  }
  
  .flavor-showcase::before {
    transition: opacity 0.1s ease-in-out;
  }
  
  .flavor-showcase__bg-element {
    transition: opacity 0.1s ease-in-out;
    animation: none !important;
  }
  
  .flavor-showcase__bg-bubble,
  .flavor-showcase__bg-petal,
  .flavor-showcase__bg-slice {
    animation: none !important;
  }
}

/* ========== Media Queries ========== */
/* Tablet and small devices */
@media (max-width: 768px) {
  .flavor-showcase {
    --fs-orbit-size: clamp(240px, 90vw, 500px);
    --fs-product-size: clamp(100px, 35vw, 160px);
    min-height: auto;
    padding: var(--fs-spacing-md) 0;
  }
  
  .flavor-showcase__orbital-container {
    height: clamp(400px, 70vh, 600px);
  }
  
  .flavor-showcase__orbit-scene {
    transform: scale(0.8);
  }
  
  .flavor-showcase__product-glow {
    width: 120%;
    height: 120%;
  }
  
  .flavor-showcase__info-content {
    padding: 1rem;
  }
  
  .flavor-showcase__info-panel {
    max-height: 80vh;
    overflow-y: auto;
  }
  
  .flavor-showcase__actions {
    flex-direction: column;
    align-items: stretch;
  }
  
  .flavor-showcase__quantity-controls {
    justify-content: center;
  }
  
  .flavor-showcase__action-buttons {
    width: 100%;
  }
  
  .flavor-showcase__add-to-cart-btn,
  .flavor-showcase__view-details-btn {
    width: 100%;
    padding: 0.75rem 1rem;
  }
  
  .flavor-showcase__social-buttons {
    gap: 0.5rem;
  }
  
  .flavor-showcase__share-btn {
    width: 2.25rem;
    height: 2.25rem;
  }
}

/* Mobile devices */
@media (max-width: 480px) {
  .flavor-showcase__action-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .flavor-showcase__add-to-cart-btn,
  .flavor-showcase__view-details-btn {
    width: 100%;
  }
  
  .flavor-showcase__social-share {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
  }
  
  .flavor-showcase__social-buttons {
    justify-content: center;
  }
}

/* Dark Mode Adaptations */
@media (prefers-color-scheme: dark) {
  .flavor-showcase {
    --fs-bg: #030312;
    /* Brighter accents for dark mode */
    --fs-accent-natural: #00b8ff;
    --fs-accent-strawberry: #ff79a7;
    --fs-accent-watermelon: #50e5a5;
  }
  
  .flavor-showcase__info-content {
    background-color: rgba(10, 10, 25, 0.85);
  }
  
  .flavor-showcase__product-glow {
    opacity: 0.35;
  }
  
  .flavor-showcase__quantity-controls {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .flavor-showcase__quantity-btn {
    background: rgba(255, 255, 255, 0.1);
  }
  
  .flavor-showcase__quantity-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }
  
  .flavor-showcase__notification {
    background-color: rgba(15, 15, 25, 0.9);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  }
  
  .flavor-showcase__social-share {
    border-color: rgba(255, 255, 255, 0.05);
  }
  
  .flavor-showcase__share-btn:not([class*="--"]) {
    background-color: rgba(255, 255, 255, 0.15);
  }
}

/* Print Media Support */
@media print {
  .flavor-showcase {
    background: white !important;
    color: black !important;
    min-height: auto;
    padding: 1rem 0;
  }
  
  .flavor-showcase::before,
  .flavor-showcase__bg-scene,
  .flavor-showcase__product-glow,
  .flavor-showcase__controls {
    display: none !important;
  }
  
  .flavor-showcase__product {
    position: static !important;
    display: inline-block;
    margin: 1rem;
    transform: none !important;
    opacity: 1 !important;
  }
  
  .flavor-showcase__info-panel {
    position: static !important;
    opacity: 1;
    visibility: visible;
    transform: none;
    color: black;
    page-break-inside: avoid;
  }
  
  .flavor-showcase__info-content {
    background: none;
    box-shadow: none;
    border: 1px solid #ddd;
    color: black;
  }
}
