/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Variables - Oro Bianco Theme */
  --background: hsl(0, 0%, 100%);
  --foreground: hsl(20, 14.3%, 15%);
  --muted: hsl(48, 96%, 94%);
  --muted-foreground: hsl(25, 8%, 35%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(20, 14.3%, 15%);
  --border: hsl(38, 30%, 85%);
  --input: hsl(38, 30%, 88%);
  --primary: hsl(38, 92%, 50%);
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(48, 96%, 92%);
  --secondary-foreground: hsl(24, 12%, 15%);
  --accent: hsl(48, 96%, 90%);
  --accent-foreground: hsl(24, 12%, 15%);
  --destructive: hsl(0, 84%, 55%);
  --destructive-foreground: hsl(0, 0%, 100%);
  --ring: hsl(38, 92%, 50%);
  --radius: 0.5rem;

  /* Oro Bianco Custom Colors - Enhanced */
  --amber-50: hsl(48, 100%, 97%);
  --amber-100: hsl(48, 96%, 91%);
  --amber-200: hsl(48, 97%, 80%);
  --amber-300: hsl(46, 97%, 68%);
  --amber-400: hsl(43, 96%, 58%);
  --amber-500: hsl(38, 92%, 52%);
  --amber-600: hsl(32, 95%, 46%);
  --amber-700: hsl(26, 90%, 39%);
  --amber-800: hsl(23, 83%, 33%);
  --amber-900: hsl(22, 78%, 28%);

  /* Additional Theme Colors */
  --success: hsl(142, 76%, 36%);
  --success-foreground: hsl(0, 0%, 100%);
  --warning: hsl(38, 92%, 50%);
  --warning-foreground: hsl(0, 0%, 100%);
  --info: hsl(217, 91%, 60%);
  --info-foreground: hsl(0, 0%, 100%);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: hsl(60, 4.8%, 95.9%);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Utility Classes */
.gradient-amber {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 100%);
  box-shadow: 0 2px 8px hsla(38, 92%, 50%, 0.25);
}

.gradient-amber-light {
  background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-300) 100%);
  border: 1px solid var(--amber-400);
}

.glass-effect {
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid hsla(38, 92%, 50%, 0.2);
}

.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animation Keyframes */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes fadeInUp {
  from { 
    opacity: 0; 
    transform: translateY(30px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}

@keyframes bounceIn {
  0% { 
    transform: scale(0.3); 
    opacity: 0; 
  }
  50% { 
    transform: scale(1.1); 
  }
  70% { 
    transform: scale(0.9); 
  }
  100% { 
    transform: scale(1); 
    opacity: 1; 
  }
}

@keyframes slideInRight {
  from { 
    transform: translateX(100%); 
  }
  to { 
    transform: translateX(0); 
  }
}

@keyframes slideInLeft {
  from { 
    transform: translateX(-100%); 
  }
  to { 
    transform: translateX(0); 
  }
}

@keyframes foodBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.spin { animation: spin 1s linear infinite; }
.fade-in-up { animation: fadeInUp 0.6s ease-out; }
.bounce-in { animation: bounceIn 0.8s ease-out; }
.slide-in-right { animation: slideInRight 0.3s ease-out; }

/* Button Styles */
.btn-primary {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 100%);
  color: var(--primary-foreground);
  border: 1px solid var(--amber-600);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--amber-600) 0%, var(--amber-800) 100%);
  box-shadow: 0 4px 12px hsla(38, 92%, 50%, 0.3);
  transform: translateY(-1px);
  border-color: var(--amber-700);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: 1px solid var(--amber-400);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-secondary:hover {
  background: var(--amber-100);
  border-color: var(--amber-500);
  color: var(--amber-800);
  box-shadow: 0 2px 4px hsla(38, 92%, 50%, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-outline:hover {
  background: var(--accent);
  border-color: var(--amber-500);
}

.btn-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.btn-destructive:hover {
  background: hsl(0, 84.2%, 55%);
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-icon:hover {
  background: var(--accent);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--amber-600);
  cursor: pointer;
  text-decoration: underline;
  font-size: 0.875rem;
}

.btn-link:hover {
  color: var(--amber-700);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* Initial Loader */
.initial-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-content {
  text-align: center;
  animation: fadeInUp 0.8s ease-out;
}

.loader-logo {
  position: relative;
  margin-bottom: 1.5rem;
}

.logo-img {
  height: 4rem;
  width: auto;
  object-fit: contain;
}

.logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 4rem;
  height: 4rem;
  background: var(--gradient-amber);
  border-radius: 0.75rem;
  color: white;
  margin: 0 auto;
}

.loader-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--amber-800);
  margin-bottom: 0.5rem;
}

.loader-subtitle {
  font-size: 1.125rem;
  color: var(--amber-700);
  margin-bottom: 2rem;
}

.loading-animation {
  margin-bottom: 2rem;
}

.italian-food-bounce {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.food-icon {
  font-size: 2rem;
  animation: foodBounce 1.5s ease-in-out infinite;
}

.food-icon:nth-child(1) { animation-delay: 0s; }
.food-icon:nth-child(2) { animation-delay: 0.2s; }
.food-icon:nth-child(3) { animation-delay: 0.4s; }
.food-icon:nth-child(4) { animation-delay: 0.6s; }
.food-icon:nth-child(5) { animation-delay: 0.8s; }

.loading-text {
  font-size: 1.2rem !important;
  color: var(--amber-700) !important;
  font-weight: 900 !important;
  transition: opacity 0.3s ease;
  text-align: center !important;
  margin: 1rem !important;
  line-height: 1.2 !important;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
  letter-spacing: 1px !important;
  max-width: 90% !important;
  word-wrap: break-word !important;
  display: block !important;
}

.error-state {
  text-align: center;
  padding: 2rem;
}

.error-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.error-state h3 {
  font-size: 1.5rem;
  color: var(--amber-800);
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--amber-700);
  margin-bottom: 2rem;
}

.error-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid hsla(38, 92%, 50%, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0.25rem;
  border-radius: 0.5rem;
}

.header-logo:hover {
  background: var(--amber-50);
  transform: translateY(-1px);
}

.header-logo .logo-img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
}

.header-logo .logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--gradient-amber);
  border-radius: 0.5rem;
  color: white;
}

.logo-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--foreground);
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  display: none;
}

/* Search Section */
.search-section {
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.search-section.sticky {
  position: fixed;
  top: 4rem;
  left: 0;
  right: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsla(38, 92%, 50%, 0.2);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0.75rem 1rem;
  margin-bottom: 0;
}

.search-section.sticky .search-input-container {
  max-width: 80rem;
  margin: 0 auto;
}

.search-input-container {
  position: relative;
  max-width: 100%;
}

.search-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--amber-300);
  border-radius: 1rem;
  background: var(--background);
  font-size: 1rem;
  transition: all 0.3s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px hsla(38, 92%, 50%, 0.1), 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: var(--amber-600);
  font-weight: 500;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--amber-600);
  width: 20px;
  height: 20px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.refresh-btn, .cart-btn {
  height: 2.5rem;
  padding: 0 0.75rem;
}

.refresh-text, .cart-text {
    display: none;
}

.cart-btn {
  position: relative;
}

.cart-badge {
  position: absolute;
  top: -0.25rem;
  right: -0.25rem;
  background: var(--destructive);
  color: var(--destructive-foreground);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Content */
.main-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  flex: 1;
}

/* Status Bar */
.status-bar {
  background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
  border: 1px solid var(--amber-400);
  border-radius: var(--radius);
  padding: 0.75rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 4px hsla(38, 92%, 50%, 0.1);
  transition: all 0.5s ease;
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
  overflow: hidden;
}

.status-bar.hidden {
  opacity: 0;
  transform: translateY(-100%);
  max-height: 0;
  margin-bottom: 0;
  padding: 0;
}

.status-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.status-info svg {
  color: var(--amber-600);
  flex-shrink: 0;
}

.status-text {
  min-width: 0;
  flex: 1;
}

.status-title {
  font-weight: 600;
  color: hsl(22, 78%, 28%);
  font-size: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-time {
  font-size: 0.6875rem;
  color: hsl(26, 90%, 35%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sync-btn {
  height: 2rem;
  padding: 0 0.5rem;
  background: white;
  color: var(--amber-600);
  border-color: var(--amber-300);
  flex-shrink: 0;
}

.sync-btn:hover {
  background: var(--amber-50);
  border-color: var(--amber-500);
}

.sync-text {
  display: none;
}

/* Filters Section */
.filters-section {
  margin-bottom: 1.5rem;
}

/* Category Buttons */
.category-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.category-btn {
  background: var(--background);
  border: 1px solid var(--amber-300);
  border-radius: var(--radius);
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  color: var(--amber-800);
}

.category-btn:hover {
  background: var(--amber-50);
  border-color: var(--amber-500);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px hsla(38, 92%, 50%, 0.15);
}

.category-btn.active {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 100%);
  color: var(--primary-foreground);
  border-color: var(--amber-700);
  box-shadow: 0 4px 8px hsla(38, 92%, 50%, 0.3);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Category Section */
.category-section {
  margin-bottom: 1.5rem;
}

.form-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 2px hsla(38, 92%, 50%, 0.1);
}

/* Products Section */
.products-section {
  margin-bottom: 2rem;
}

.products-loading {
  margin-bottom: 2rem;
}

.loading-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.product-skeleton {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  height: 400px;
  animation: pulse 2s ease-in-out infinite;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Product Cards */
.product-card {
  background: var(--card);
  border: 2px solid var(--amber-300);
  border-radius: 1rem;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Ingredients and Allergens Section */
.ingredients-allergens-section {
  margin-top: 1rem;
}

.ingredients-allergens-btn {
  width: 100%;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 500;
  color: #4a5568;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.ingredients-allergens-btn:hover {
  background: linear-gradient(135deg, #edf2f7 0%, #e2e8f0 100%);
  border-color: #cbd5e0;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.ingredients-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ingredients-allergens-btn .ingredients-icon {
  font-size: 1rem;
  color: #68d391;
}

.ingredients-allergens-btn .ingredients-text {
  font-weight: 600;
  color: #2d3748;
}

.ingredients-allergens-btn .chevron-icon {
  transition: transform 0.2s;
  color: #718096;
  width: 16px;
  height: 16px;
}

.ingredients-content {
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.ingredients-content.collapsed {
  max-height: 0;
  opacity: 0;
  padding: 0;
}

.ingredients-content.expanded {
  max-height: 500px;
  opacity: 1;
  padding: 1rem;
  background: #f7fafc;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: -1px;
}

.ingredients-section {
  margin-bottom: 0.75rem;
}

.ingredients-section:last-child {
  margin-bottom: 0;
}

.ingredients-list {
  font-size: 0.875rem;
  color: #4a5568;
  line-height: 1.4;
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin: 0;
}

.allergens-section {
  margin-bottom: 0.75rem;
}

.allergens-list {
  background: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.allergen-badge {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
  color: #c53030;
  padding: 0.375rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid #fc8181;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  transition: all 0.2s;
}

.allergen-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.08);
  border-color: var(--amber-400);
}

.product-card.unavailable {
  opacity: 0.8;
  filter: grayscale(80%) brightness(1.05);
  border-color: #d1d5db !important;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%) !important;
  cursor: not-allowed;
  position: relative;
  overflow: hidden;
}

.product-card.unavailable::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(156, 163, 175, 0.25);
  border-radius: 1rem;
  pointer-events: none;
  z-index: 1;
}

.product-card.unavailable .product-image-container {
  position: relative;
  z-index: 2;
}

.product-card.unavailable .product-info {
  position: relative;
  z-index: 2;
}

.product-card.unavailable .product-highlight-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20 !important;
  opacity: 0.6;
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
}

.product-card.unavailable .origin-badge {
  z-index: 19 !important;
  opacity: 0.6;
  background: linear-gradient(135deg, #9ca3af 0%, #6b7280 100%) !important;
}

.product-card.unavailable .gallery-indicator {
  z-index: 18 !important;
  opacity: 0.5;
  background: rgba(107, 114, 128, 0.8) !important;
}

.product-card.unavailable .product-name {
  color: #4b5563 !important;
  text-decoration: line-through;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .product-description {
  color: #6b7280 !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .product-price {
  color: #6b7280 !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .quantity-info {
  color: #9ca3af !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .product-image {
  filter: grayscale(100%) brightness(0.85);
}

.product-card.unavailable .product-placeholder {
  filter: grayscale(100%) brightness(0.85);
}

.product-card.unavailable .ingredients-allergens-btn {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #9ca3af !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .quantity-btn,
.product-card.unavailable .type-btn {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #9ca3af !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .quantity-display {
  opacity: 0.5;
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  color: #9ca3af !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .add-to-cart-btn {
  background: #e5e7eb !important;
  color: #9ca3af !important;
  cursor: not-allowed;
  pointer-events: none;
  border: 1px solid #d1d5db !important;
  box-shadow: none !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .warnings-content {
  opacity: 0.5;
  background: #f3f4f6 !important;
  border-color: #d1d5db !important;
  position: relative;
  z-index: 3;
}

.product-card.unavailable .warnings-text {
  color: #9ca3af !important;
}

.product-card.unavailable:hover {
  transform: none !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  filter: grayscale(80%) brightness(1.05);
}

.product-card.highlighted {
  border: 3px solid var(--amber-600);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: linear-gradient(135deg, hsl(45, 85%, 88%) 0%, hsl(45, 85%, 93%) 100%);
}

.product-highlight-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.product-image-container {
  position: relative;
  margin-bottom: 0;
}

.product-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 0.75rem 0.75rem 0 0;
  padding: 0.5rem;
  box-sizing: border-box;
  background: linear-gradient(135deg, #fefcf9 0%, #faf8f4 100%);
}

/* Product Image Placeholder */
.product-placeholder {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f4f0 0%, #f5ebe0 100%);
  border-radius: 1rem 1rem 0 0;
  padding: 1rem;
  text-align: center;
  margin: 0.5rem;
  border-radius: 0.5rem;
}

.placeholder-emoji {
  font-size: 2.5rem;
  color: var(--amber-600);
  margin-bottom: 0.5rem;
}

.placeholder-text {
  font-size: 0.75rem;
  color: var(--amber-500);
  font-weight: 500;
}

/* Image Loading State */
.image-loading {
  width: 100%;
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f8f4f0 0%, #f5ebe0 100%);
  border-radius: 1rem 1rem 0 0;
  position: relative;
}

.loading-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--amber-200);
  border-top: 3px solid var(--amber-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 0.5rem;
}

.loading-text {
  font-size: 0.75rem;
  color: var(--amber-600);
  font-weight: 500;
}

/* Spinner Animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Image Fallback */
.image-fallback {
  background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
  border: 1px solid #fc8181;
}

.image-fallback .placeholder-emoji {
  color: #c53030;
}

.image-fallback .placeholder-text {
  color: #742a2a;
}

.origin-badge {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 1.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.3);
}

.gallery-indicator {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  cursor: pointer;
}

.product-info {
  margin-bottom: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}

.product-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(28, 45%, 35%);
  margin-bottom: 1rem;
  line-height: 1.2;
  text-align: center;
}

.product-description-container {
  margin-bottom: 1rem;
}

.product-description {
  font-size: 0.875rem;
  color: hsl(28, 25%, 45%);
  line-height: 1.6;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fefcf9 0%, #faf8f4 100%);
  padding: 1rem 1.25rem 1rem 1.5rem;
  border-left: 4px solid var(--amber-500);
  border-radius: 0.5rem;
  font-style: italic;
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.1);
  border: 1px solid rgba(237, 137, 54, 0.15);
  position: relative;
}

.product-description::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="20" cy="10" r="0.5" fill="rgba(237,137,54,0.03)"/><circle cx="60" cy="5" r="0.8" fill="rgba(237,137,54,0.02)"/><circle cx="80" cy="15" r="0.6" fill="rgba(237,137,54,0.025)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.4;
  pointer-events: none;
  border-radius: 0.5rem;
}

/* Warnings Section */
.warnings-section {
  margin: 0.75rem 0;
}

.warnings-content {
  background: #fed7d7;
  border: 1px solid #fc8181;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  box-shadow: 0 1px 4px rgba(252, 129, 129, 0.2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.warnings-icon {
  font-size: 0.875rem;
  color: #c53030;
  flex-shrink: 0;
}

.warnings-text {
  font-size: 0.75rem;
  color: #742a2a;
  line-height: 1.4;
  font-weight: 500;
  flex: 1;
}

.product-price-section {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: hsl(28, 55%, 45%);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  text-align: left;
  background: transparent;
  padding: 0;
  border: none;
  margin-bottom: 0;
  flex-shrink: 0;
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 640px) {
  .product-price {
    font-size: 1.1rem;
    line-height: 1.1;
  }
}

.quantity-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
  flex-shrink: 0;
  max-width: 140px;
}

.quantity-min-label,
.quantity-single-label {
  font-size: 0.7rem;
  color: hsl(28, 25%, 50%);
  font-weight: 500;
  line-height: 1.1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (max-width: 640px) {
  .quantity-info {
    max-width: 110px;
  }

  .quantity-min-label,
  .quantity-single-label {
    font-size: 0.625rem;
    line-height: 1.0;
  }
}

.product-description.expanded {
  display: block;
}

.product-description.collapsed {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.expand-btn {
  color: var(--amber-600);
  background: transparent;
  border: 1px solid var(--amber-300);
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  transition: all 0.2s;
  width: 100%;
}

.expand-btn:hover {
  background: var(--amber-100);
  border-color: var(--amber-500);
  color: var(--amber-700);
}

.expand-icon {
  transition: transform 0.2s ease;
}

.product-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.badge {
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}



.badge-unavailable {
  background: hsl(0, 0%, 75%);
  color: hsl(0, 0%, 25%);
  font-weight: 500;
}

.product-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.type-selector {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: flex-start;
}

.type-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: hsl(28, 25%, 45%);
  min-width: 50px;
  display: flex;
  align-items: flex-start;
  padding-top: 0.75rem;
  flex-shrink: 0;
}

.type-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex: 1;
}

.type-btn {
  flex: 1;
  min-width: fit-content;
  max-width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--amber-300);
  background: white;
  border-radius: 1.5rem;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.3s;
  color: hsl(28, 45%, 35%);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Gestione specifica per 2 bottoni */
.type-buttons:has(.type-btn:nth-child(2):last-child) .type-btn {
  flex-basis: calc(50% - 0.25rem);
}

/* Gestione per 3 o più bottoni */
.type-buttons:has(.type-btn:nth-child(3)) .type-btn {
  flex-basis: calc(50% - 0.25rem);
}

/* Se il testo è troppo lungo, forza il wrap su nuova riga */
.type-btn:nth-child(3) {
  flex-basis: 100%;
}

/* Per bottoni con testo molto lungo */
@media (max-width: 400px) {
  .type-btn {
    flex-basis: 100% !important;
    font-size: 0.8rem;
    padding: 0.6rem 0.8rem;
  }
}

.type-btn:hover {
  border-color: var(--amber-500);
  background: var(--amber-50);
  transform: translateY(-1px);
}

.type-btn.active {
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  border-color: #dd6b20;
  color: white;
  box-shadow: 0 4px 12px rgba(237, 137, 54, 0.3);
}

.quantity-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.quantity-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(28, 25%, 45%);
  min-width: 100px;
  flex-shrink: 0;
}

.quantity-controls-inner {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  flex: 1;
}

.quantity-btn {
  width: 1.75rem;
  height: 1.75rem;
  border: 1px solid var(--amber-400);
  background: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--amber-600);
  flex-shrink: 0;
}

.quantity-btn:hover {
  background: var(--amber-100);
  border-color: var(--amber-500);
  transform: scale(1.05);
}

.quantity-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.quantity-display {
  flex: 1;
  text-align: center;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.375rem 0.5rem;
  background: var(--amber-50);
  border: 1px solid var(--amber-300);
  border-radius: 0.5rem;
  color: hsl(28, 45%, 35%);
  min-width: 0;
}



.add-to-cart-btn {
  width: 100%;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
  border: none;
  color: white;
  box-shadow: 0 4px 15px rgba(237, 137, 54, 0.4);
  position: relative;
  overflow: hidden;
  display: flex !important;
  align-items: center;
  cursor: pointer;
  margin-top: auto;
  margin-bottom: 0;
  flex-shrink: 0;
}

.add-to-cart-btn:hover {
  background: linear-gradient(135deg, #dd6b20 0%, #c05621 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(237, 137, 54, 0.5);
}

.add-to-cart-btn:disabled {
  background: var(--muted);
  color: var(--muted-foreground);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.cart-btn-text {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-btn-price {
  font-size: 1.25rem;
  font-weight: 800;
}

.no-products {
  text-align: center;
  padding: 4rem 2rem;
}

.no-products-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.no-products h3 {
  font-size: 1.5rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.no-products p {
  color: var(--muted-foreground);
}

/* Footer */
.footer {
  background: linear-gradient(135deg, hsl(28, 45%, 12%) 0%, hsl(32, 50%, 20%) 50%, hsl(28, 45%, 15%) 100%);
  border-top: 3px solid var(--amber-500);
  padding: 2.5rem 0 1.5rem 0;
  margin-top: 3rem;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 20"><defs><pattern id="grain" width="100" height="20" patternUnits="userSpaceOnUse"><circle cx="15" cy="8" r="0.8" fill="rgba(255,255,255,0.02)"/><circle cx="55" cy="5" r="1" fill="rgba(255,255,255,0.025)"/><circle cx="90" cy="10" r="0.6" fill="rgba(255,255,255,0.015)"/></pattern></defs><rect width="100" height="20" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.3;
  pointer-events: none;
}

.footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--amber-400), transparent);
  opacity: 0.5;
}

.footer-content {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 2rem;
  position: relative;
  z-index: 1;
}

.footer-brand {
  text-align: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.footer-logo img {
  height: 2.5rem;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-logo .logo-fallback {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: white;
}

.footer-brand h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amber-300);
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.footer-brand .tagline {
  font-size: 0.9rem;
  color: var(--amber-200);
  font-style: italic;
  margin-bottom: 0.75rem;
  font-weight: 400;
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  line-height: 1.4;
  font-weight: 400;
}

.footer-info, .footer-how-it-works {
  background: rgba(255, 255, 255, 0.02);
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-info h4, .footer-how-it-works h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-200);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-info h4::before {
  content: 'ℹ️';
  font-size: 0.9rem;
}

.footer-how-it-works h4::before {
  content: '🔄';
  font-size: 0.9rem;
}

.footer-info ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-info li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  padding-left: 1rem;
  position: relative;
}

.footer-info li::before {
  content: '▶';
  color: var(--amber-400);
  position: absolute;
  left: 0;
  font-size: 0.6rem;
  top: 0.1rem;
}

.footer-how-it-works ol {
  padding-left: 1rem;
  margin: 0;
}

.footer-how-it-works li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
  margin-bottom: 0.5rem;
  line-height: 1.4;
  padding-left: 0.25rem;
}

.footer-how-it-works li::marker {
  color: var(--amber-400);
  font-weight: bold;
  font-size: 0.7rem;
}

.footer-bottom {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.75rem;
  margin: 0;
  font-style: italic;
  line-height: 1.3;
}

.footer-highlight {
  color: var(--amber-300);
  font-weight: 600;
}

/* Responsive Footer */
@media (max-width: 1024px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 2rem 0 1rem 0;
    margin-top: 2rem;
  }

  .footer-content {
    gap: 1.25rem;
  }

  .footer-brand, .footer-info, .footer-how-it-works {
    padding: 0.75rem;
  }

  .footer-brand h3 {
    font-size: 1.25rem;
  }

  .footer-brand .tagline {
    font-size: 0.8rem;
  }

  .footer-brand p {
    font-size: 0.75rem;
  }

  .footer-info h4, .footer-how-it-works h4 {
    font-size: 0.9rem;
  }

  .footer-info li, .footer-how-it-works li {
    font-size: 0.7rem;
    margin-bottom: 0.4rem;
  }

  .footer-bottom {
    margin-top: 1rem;
    padding-top: 0.75rem;
  }

  .footer-bottom p {
    font-size: 0.7rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 480px) {
  .footer {
    padding: 1.5rem 0 0.75rem 0;
    margin-top: 1.5rem;
  }

  .footer-content {
    gap: 1rem;
    padding: 0 0.75rem;
  }

  .footer-brand, .footer-info, .footer-how-it-works {
    padding: 0.6rem;
  }

  .footer-logo {
    gap: 0.5rem;
    margin-bottom: 0.75rem;
  }

  .footer-logo img {
    height: 2rem;
  }

  .footer-brand h3 {
    font-size: 1.125rem;
  }

  .footer-brand .tagline {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }

  .footer-brand p {
    font-size: 0.7rem;
  }

  .footer-info h4, .footer-how-it-works h4 {
    font-size: 0.85rem;
    gap: 0.375rem;
    margin-bottom: 0.5rem;
  }

  .footer-info li, .footer-how-it-works li {
    font-size: 0.65rem;
    line-height: 1.3;
    margin-bottom: 0.35rem;
  }

  .footer-bottom {
    margin-top: 0.75rem;
    padding-top: 0.5rem;
  }

  .footer-bottom p {
    font-size: 0.65rem;
    line-height: 1.2;
  }
}

/* Cart Sidebar */.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  transform: translateX(100%);
  transition: transform 0.3s ease-out;
}

.cart-sidebar.open {
  transform: translateX(0);
}

.cart-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.cart-content {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: var(--background);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.3s ease-out;
}

.cart-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cart-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.cart-close-btn {
  background: var(--destructive);
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.cart-close-btn:hover {
  background: hsl(0, 84%, 45%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.close-text {
  display: none;
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  transition: all 0.3s ease;
}

.cart-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.cart-item-image {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--amber-300);
  background: var(--amber-50);
}

.cart-product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-product-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
}

.cart-product-emoji {
  font-size: 1.5rem;
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  color: var(--foreground);
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  line-height: 1.3;
}

.cart-item-type {
  font-size: 0.7rem;
  color: var(--amber-700);
  font-weight: 500;
  font-style: italic;
  display: block;
  margin-top: 0.125rem;
}

.cart-item-details {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.cart-item-quantity {
  color: var(--muted-foreground);
  font-weight: 500;
}

.cart-item-price {
  font-weight: 700;
  color: var(--amber-600);
  font-size: 1rem;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.75rem;
}

.cart-quantity-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cart-quantity-btn {
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid var(--border);
  background: var(--background);
  border-radius: var(--radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.cart-quantity-btn:hover {
  background: var(--accent);
  border-color: var(--amber-500);
}

.cart-quantity-display {
  font-weight: 600;
  font-size: 0.875rem;
  min-width: 2rem;
  text-align: center;
}

.remove-item-btn {
  background: transparent;
  border: none;
  color: var(--destructive);
  cursor: pointer;
  padding: 0.25rem;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.remove-item-btn:hover {
  background: var(--destructive);
  color: var(--destructive-foreground);
}

.empty-cart {
  text-align: center;
  padding: 2rem;
}

.empty-cart-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.empty-cart h3 {
  font-size: 1.25rem;
  color: var(--foreground);
  margin-bottom: 0.5rem;
}

.empty-cart p {
  color: var(--muted-foreground);
}

.cart-footer {
  border-top: 1px solid var(--border);
  padding: 1rem;
}

.cart-summary {
  margin-bottom: 1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.summary-row.total {
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

.pickup-info {
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  border: 1px solid var(--amber-300);
  border-radius: 0.75rem;
  padding: 0.875rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.1);
  text-align: center;
  transition: all 0.2s ease;
}

.pickup-info:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(237, 137, 54, 0.15);
}

.pickup-date {
  font-size: 0.8125rem;
  color: var(--amber-800);
  line-height: 1.3;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-items: center;
}

.pickup-date strong {
  display: block;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--amber-700);
  margin-bottom: 0.125rem;
}

.pickup-date span {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--amber-900);
  text-transform: capitalize;
}

.order-form {
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.order-form[style*="display: flex"] {
  display: flex !important;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Modals */
.product-modal, .gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.product-modal.open, .gallery-modal.open {
  display: flex;
}

.modal-overlay, .gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.modal-content {
  position: relative;
  background: var(--background);
  border-radius: var(--radius);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease-out;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
}

.modal-body {
  padding: 1rem;
}

.modal-image-container img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

.modal-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Gallery Modal */
.gallery-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 0.3s ease-out;
}

.gallery-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  z-index: 10;
}

.gallery-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.gallery-image {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius);
}

.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  padding: 1rem;
  cursor: pointer;
  border-radius: var(--radius);
  transition: all 0.2s;
}

.gallery-nav:hover {
  background: rgba(0, 0, 0, 0.9);
}

.gallery-prev {
  left: 1rem;
}

.gallery-next {
  right: 1rem;
}

.gallery-indicators {
  display: flex;
  gap: 0.5rem;
}

.gallery-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.2s;
}

.gallery-dot.active {
  background: white;
}

/* Order Success/Failure Modals - Compact Version */
.order-success-modal, .order-failure-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.order-success-modal.show {
  opacity: 1;
  visibility: visible;
}

.order-success-modal.closing {
  opacity: 0;
  transform: scale(0.95);
}

.order-success-overlay, .order-failure-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.order-success-content, .order-failure-content {
  position: relative;
  background: linear-gradient(135deg, var(--background) 0%, var(--amber-50) 100%);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  max-width: 420px;
  width: 100%;
  max-height: 95vh;
  overflow-y: auto;
  animation: fadeInUp 0.3s ease-out;
  border: 2px solid var(--amber-300);
}

.success-header, .failure-header {
  text-align: center;
  padding: 1.25rem 1.5rem 1rem 1.5rem;
  background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
  border-radius: 1rem 1rem 0 0;
  border-bottom: 1px solid var(--amber-300);
  position: relative;
}

.success-icon-container {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.success-icon {
  font-size: 2.5rem;
  animation: bounceIn 0.6s ease-out;
  position: relative;
  z-index: 2;
}

.success-sparkles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.sparkle {
  position: absolute;
  font-size: 1rem;
  animation: sparkleFloat 3s ease-in-out infinite;
}

.sparkle:nth-child(1) {
  top: -15px;
  left: -20px;
  animation-delay: 0s;
}

.sparkle:nth-child(2) {
  top: -8px;
  right: -18px;
  animation-delay: 1s;
}

.sparkle:nth-child(3) {
  bottom: -12px;
  left: -15px;
  animation-delay: 2s;
}

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.7; }
  50% { transform: translateY(-8px) rotate(180deg); opacity: 1; }
}

.success-header h2, .failure-header h2 {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--amber-800);
  margin: 0 0 0.375rem 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.success-subtitle {
  color: var(--amber-700);
  font-size: 0.875rem;
  font-weight: 500;
  margin: 0;
}

.success-body, .failure-body {
  padding: 1.25rem 1.5rem;
}

.order-summary-card {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--amber-300);
  box-shadow: 0 2px 8px rgba(237, 137, 54, 0.1);
}

.summary-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--amber-200);
}

.summary-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-700);
  margin: 0;
}

.order-badge {
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 100%);
  color: white;
  padding: 0.125rem 0.5rem;
  border-radius: 0.75rem;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: monospace;
}

.summary-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  font-size: 0.875rem;
}

.detail-row.total-row {
  border-top: 1px solid var(--amber-200);
  padding-top: 0.75rem;
  margin-top: 0.375rem;
  font-weight: 700;
  font-size: 1rem;
}

.detail-label {
  color: var(--amber-700);
  font-weight: 500;
}

.detail-value {
  color: var(--foreground);
  font-weight: 600;
}

.pickup-card {
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1rem;
  border: 1px solid var(--amber-300);
  text-align: center;
}

.pickup-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-700);
  margin: 0 0 0.5rem 0;
}

.pickup-date {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--amber-800);
  margin-bottom: 0.375rem;
  text-transform: capitalize;
}

.pickup-note {
  color: var(--amber-700);
  font-size: 0.8125rem;
  margin: 0;
  font-style: italic;
}

.verification-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 0.75rem;
  color: var(--success);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.verification-badge svg {
  color: var(--success);
  width: 16px;
  height: 16px;
}

.warning-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  animation: bounceIn 0.6s ease-out;
}

.problem-explanation {
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  border: 1px solid #f59e0b;
  border-radius: 0.75rem;
  padding: 1rem;
  margin-bottom: 1.25rem;
}

.problem-explanation p {
  margin-bottom: 0.5rem;
  color: #92400e;
  line-height: 1.4;
  font-size: 0.875rem;
}

.problem-explanation p:last-child {
  margin-bottom: 0;
  font-weight: 600;
}

.contact-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  border: 1px solid var(--amber-300);
  border-radius: 0.5rem;
  transition: all 0.2s;
  font-size: 0.875rem;
}

.contact-method:hover {
  background: linear-gradient(135deg, var(--amber-100) 0%, var(--amber-200) 100%);
  border-color: var(--amber-400);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(237, 137, 54, 0.15);
}

.contact-icon {
  font-size: 1.25rem;
  width: 2rem;
  text-align: center;
  flex-shrink: 0;
}

.contact-details {
  flex: 1;
}

.contact-details strong {
  display: block;
  color: var(--amber-800);
  margin-bottom: 0.125rem;
  font-size: 0.8125rem;
}

.contact-details a {
  color: var(--amber-700);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
  font-size: 0.875rem;
}

.contact-details a:hover {
  color: var(--amber-800);
  text-decoration: underline;
}

.order-summary {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
}

.order-summary p {
  margin-bottom: 0.375rem;
  color: var(--foreground);
  font-size: 0.8125rem;
}

.order-summary p:last-child {
  margin-bottom: 0;
}

.success-footer, .failure-footer {
  padding: 1rem 1.5rem 1.25rem 1.5rem;
  border-top: 1px solid var(--amber-200);
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  background: linear-gradient(135deg, var(--amber-50) 0%, var(--amber-100) 100%);
  border-radius: 0 0 1rem 1rem;
}

.close-success-btn, .close-failure-btn {
  min-width: 120px;
  padding: 0.75rem 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.close-success-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(237, 137, 54, 0.3);
}

.copy-order-details-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
}

/* Products list styling for compact modal */
.products-list {
  margin: 0.75rem 0 !important;
  padding: 0.75rem !important;
  background: #f8f9fa !important;
  border-radius: 0.5rem !important;
  border: 1px solid #e9ecef !important;
}

.products-list h4 {
  margin: 0 0 0.5rem 0 !important;
  color: #495057 !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}

.products-list > div {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  padding: 0.375rem 0 !important;
  border-bottom: 1px solid #dee2e6 !important;
  font-size: 0.8125rem !important;
}

.products-list > div:last-child {
  border-bottom: none !important;
}

.products-list > div > div:first-child {
  flex: 1 !important;
}

.products-list > div > div:first-child > div:first-child {
  font-weight: 500 !important;
  color: #212529 !important;
  font-size: 0.8125rem !important;
  line-height: 1.2 !important;
}

.products-list > div > div:first-child > div:last-child {
  font-size: 0.75rem !important;
  color: #6c757d !important;
  font-style: italic !important;
}

.products-list > div > div:last-child {
  text-align: right !important;
  margin-left: 0.75rem !important;
}

.products-list > div > div:last-child > div:first-child {
  font-size: 0.75rem !important;
  color: #6c757d !important;
}

.products-list > div > div:last-child > div:last-child {
  font-weight: 600 !important;
  color: #28a745 !important;
  font-size: 0.8125rem !important;
}

/* Responsive per modali ordine - Versione compatta */
@media (max-width: 480px) {
  .order-success-modal, .order-failure-modal {
    padding: 0.5rem;
  }

  .order-success-content, .order-failure-content {
    max-width: 100%;
    max-height: 98vh;
    border-radius: 0.75rem;
    border-width: 1px;
  }

  .success-header, .failure-header {
    padding: 1rem 1.25rem 0.75rem 1.25rem;
    border-radius: 0.75rem 0.75rem 0 0;
  }

  .success-header h2, .failure-header h2 {
    font-size: 1.25rem;
  }

  .success-icon, .warning-icon {
    font-size: 2.25rem;
  }

  .success-body, .failure-body {
    padding: 1rem 1.25rem;
  }

  .order-summary-card, .pickup-card {
    padding: 0.875rem;
    margin-bottom: 0.875rem;
  }

  .summary-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
  }

  .summary-header h3 {
    font-size: 0.9375rem;
  }

  .order-badge {
    align-self: flex-end;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
  }

  .pickup-date {
    font-size: 1rem;
  }

  .pickup-note {
    font-size: 0.75rem;
  }

  .verification-badge {
    padding: 0.625rem;
    font-size: 0.8125rem;
    gap: 0.375rem;
  }

  .contact-methods {
    gap: 0.625rem;
  }

  .contact-method {
    padding: 0.625rem;
    flex-direction: column;
    text-align: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
  }

  .contact-icon {
    font-size: 1.125rem;
    width: auto;
  }

  .contact-details strong {
    font-size: 0.75rem;
  }

  .contact-details a {
    font-size: 0.8125rem;
  }

  .success-footer, .failure-footer {
    padding: 0.875rem 1.25rem 1rem 1.25rem;
    border-radius: 0 0 0.75rem 0.75rem;
    flex-direction: column;
    gap: 0.5rem;
  }

  .close-success-btn, .close-failure-btn {
    min-width: auto;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
  }

  .copy-order-details-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.75rem;
  }

  .sparkle {
    font-size: 0.875rem;
  }

  .problem-explanation {
    padding: 0.875rem;
    margin-bottom: 1rem;
  }

  .problem-explanation p {
    font-size: 0.8125rem;
    margin-bottom: 0.375rem;
  }

  .products-list {
    margin: 0.5rem 0 !important;
    padding: 0.625rem !important;
  }

  .products-list h4 {
    font-size: 0.75rem !important;
    margin: 0 0 0.375rem 0 !important;
  }

  .products-list > div {
    padding: 0.25rem 0 !important;
    font-size: 0.75rem !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.25rem !important;
  }

  .products-list > div > div:first-child > div:first-child {
    font-size: 0.75rem !important;
  }

  .products-list > div > div:first-child > div:last-child {
    font-size: 0.6875rem !important;
  }

  .products-list > div > div:last-child {
    text-align: left !important;
    margin-left: 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .products-list > div > div:last-child > div:first-child {
    font-size: 0.6875rem !important;
  }

  .products-list > div > div:last-child > div:last-child {
    font-size: 0.75rem !important;
  }
}

@media (max-width: 375px) {
  .order-success-content, .order-failure-content {
    border-radius: 0.5rem;
  }

  .success-header, .failure-header {
    padding: 0.875rem 1rem 0.625rem 1rem;
    border-radius: 0.5rem 0.5rem 0 0;
  }

  .success-header h2, .failure-header h2 {
    font-size: 1.125rem;
  }

  .success-icon, .warning-icon {
    font-size: 2rem;
  }

  .success-body, .failure-body {
    padding: 0.875rem 1rem;
  }

  .summary-header h3 {
    font-size: 0.875rem;
  }

  .detail-row {
    font-size: 0.8125rem;
  }

  .detail-row.total-row {
    font-size: 0.9375rem;
  }
}

/* Toast Notifications */
/* ===========================================
   VERIFICATION SYSTEM STYLES
   =========================================== */
.verification-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    margin: 1rem 0;
}

.verification-badge.success {
    background: hsl(142, 71%, 45%);
    color: white;
}

.verification-badge.partial {
    background: hsl(38, 92%, 50%);
    color: white;
}

.verification-badge.error {
    background: hsl(0, 65%, 51%);
    color: white;
}

.order-id {
    font-family: 'Courier New', monospace;
    background: hsl(210, 40%, 95%);
    padding: 0.5rem;
    border-radius: 0.25rem;
    border-left: 3px solid hsl(38, 92%, 50%);
    margin: 0.5rem 0;
}

.order-id code {
    background: transparent;
    font-weight: bold;
    color: hsl(38, 92%, 40%);
}

.partial-verification-status {
    background: hsl(48, 96%, 95%);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid hsl(38, 92%, 50%);
    margin-bottom: 1.5rem;
}

.recommended-action {
    background: hsl(210, 40%, 98%);
    padding: 1rem;
    border-radius: 0.5rem;
    border-left: 4px solid hsl(217, 19%, 40%);
    margin: 1.5rem 0;
}

.action-box {
    background: white;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    border: 1px solid hsl(210, 40%, 90%);
}

.action-box ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.25rem;
}

.action-box li {
    margin: 0.25rem 0;
    color: hsl(217, 19%, 35%);
}

.contact-method.primary {
    background: hsl(142, 71%, 95%);
    border: 2px solid hsl(142, 71%, 45%);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: hsl(142, 71%, 45%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-whatsapp:hover {
    background: hsl(142, 71%, 40%);
    color: white;
    text-decoration: none;
}

.success-subtitle {
    color: hsl(217, 19%, 55%);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-weight: normal;
}

.pickup-note {
    font-size: 0.85rem;
    color: hsl(217, 19%, 55%);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Loading button states */
.btn-primary .spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===========================================
   TOAST NOTIFICATIONS
   =========================================== */
.toast-container {
    position: fixed;
    bottom: 1rem;
    left: 1rem;
    z-index: 10001;
    max-width: 400px;
}

.toast {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 1rem;
  max-width: 400px;
  animation: slideInLeft 0.3s ease-out;
}

.toast.success {
  border-color: var(--amber-500);
  background: var(--amber-50);
}

.toast.error {
  border-color: var(--destructive);
  background: hsl(0, 84.2%, 95%);
}

.toast-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.toast-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(135deg, var(--amber-500) 0%, var(--amber-700) 100%);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(237, 137, 54, 0.4);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  backdrop-filter: blur(8px);
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, var(--amber-600) 0%, var(--amber-800) 100%);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px rgba(237, 137, 54, 0.6);
}

.scroll-to-top:active {
  transform: translateY(-1px) scale(0.95);
}

.scroll-to-top svg {
  width: 1.5rem;
  height: 1.5rem;
  stroke-width: 2.5;
}

/* Responsive per il pulsante scroll-to-top */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 3rem;
    height: 3rem;
  }

  .scroll-to-top svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 2.75rem;
    height: 2.75rem;
  }

  .scroll-to-top svg {
    width: 1.125rem;
    height: 1.125rem;
  }
}

/* Responsive Design */
/* Stili per dispositivi molto piccoli */
@media (max-width: 375px) {
  .status-bar {
    padding: 0.5rem;
    margin-bottom: 1rem;
  }

  .status-info {
    gap: 0.5rem;
  }

  .status-info svg {
    width: 14px;
    height: 14px;
  }

  .status-title {
    font-size: 0.6875rem;
    font-weight: 500;
  }

  .status-time {
    font-size: 0.625rem;
  }

  .sync-btn {
    padding: 0 0.375rem;
    height: 1.75rem;
  }

  .sync-btn svg {
    width: 12px;
    height: 12px;
  }
}

@media (max-width: 480px) {
  .status-bar {
    padding: 0.625rem;
  }

  .status-title {
    font-size: 0.75rem;
  }

  .status-time {
    font-size: 0.6875rem;
  }

  .sync-btn {
    height: 1.875rem;
    padding: 0 0.5rem;
  }

  .search-section.sticky {
    top: 3.5rem;
    padding: 0.5rem;
  }
}

@media (min-width: 640px) {
  .header-container {
    height: 4rem;
    padding: 0 1.5rem;
  }

  .header-logo .logo-img {
    height: 2.5rem;
  }

  .logo-text p {
    display: block;
  }

  .refresh-text, .cart-text {
    display: inline;
    margin-left: 0.5rem;
  }

  .sync-text {
    display: inline;
    margin-left: 0.5rem;
  }

  .cart-btn {
    width: auto;
    padding: 0 0.75rem;
  }

  .status-title {
    white-space: normal;
    font-size: 0.875rem;
  }

  .status-time {
    white-space: normal;
    font-size: 0.75rem;
  }

  .status-bar {
    padding: 1rem;
  }

  .close-text {
    display: inline;
  }

  .search-section {
    max-width: 100%;
    margin: 0 auto 1.5rem auto;
  }

  .search-section.sticky {
    top: 4rem;
    padding: 1rem 1.5rem;
  }

  .search-section.sticky .search-input-container {
    max-width: 80rem;
  }

  .search-input {
    font-size: 0.875rem;
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
  }

  .search-icon {
    width: 18px;
    height: 18px;
    left: 0.75rem;
  }
}

@media (min-width: 768px) {
  .main-content {
    padding: 2rem 1.5rem;
  }

  .filters-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }

  .cart-content {
    max-width: 450px;
  }
}

@media (min-width: 1024px) {
  .main-content {
    padding: 2rem 2rem;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* Print Styles */
@media print {
  .header, .cart-sidebar, .product-modal, .gallery-modal, .toast-container {
    display: none !important;
  }

  .main-content {
    max-width: none;
    padding: 0;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }


/* Stati di Caricamento e Connessione Avanzati */
.loading-state-advanced {
  position: relative;
  overflow: hidden;
}

.loading-state-advanced::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber-500), transparent);
  animation: loadingSlide 2s infinite;
  z-index: 1000;
}

@keyframes loadingSlide {
  0% { left: -100%; }
  100% { left: 100%; }
}

.connection-status {
  position: fixed;
  top: 70px;
  right: 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 999;
  font-size: 0.875rem;
  transition: all 0.3s ease;
  transform: translateX(120%);
}

.connection-status.visible {
  transform: translateX(0);
}

.connection-status.online {
  border-color: var(--success);
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  color: var(--success);
}

.connection-status.offline {
  border-color: var(--destructive);
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
  color: var(--destructive);
}

.connection-status.retry {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: var(--warning);
}

.sync-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: transparent;
  z-index: 1001;
  overflow: hidden;
}

.sync-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--amber-500), var(--amber-700), var(--amber-500));
  background-size: 200% 100%;
  animation: syncProgress 2s ease-in-out infinite;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.sync-progress.active .sync-progress-bar {
  transform: translateX(0);
}

@keyframes syncProgress {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.retry-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #fef3c7 0%, #fed7aa 100%);
  color: #92400e;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  border: 1px solid #f59e0b;
  font-size: 0.875rem;
  font-weight: 500;
}

.retry-spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid #fed7aa;
  border-top: 2px solid #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Toast personalizzati per stati di connessione */
.toast.info {
  border-color: var(--info);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.toast.info .toast-title {
  color: var(--info);
}

.toast.warning {
  border-color: var(--warning);
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.toast.warning .toast-title {
  color: #92400e;
}

/* Toast responsive per dispositivi mobili */
/* Responsive per la pickup card */
@media (max-width: 640px) {
  .pickup-info {
    padding: 0.75rem;
    margin-bottom: 0.875rem;
    border-radius: 0.5rem;
  }

  .pickup-date {
    font-size: 0.75rem;
    gap: 0.125rem;
  }

  .pickup-date strong {
    font-size: 0.6875rem;
  }

  .pickup-date span {
    font-size: 0.8125rem;
  }

  .toast-container {
    bottom: 1rem;
    left: 1rem;
    right: 1rem;
    width: auto;
  }

  .toast {
    max-width: 100%;
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .toast-title {
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
  }

  .toast-description {
    font-size: 0.75rem;
    line-height: 1.3;
  }
}

/* Indicatori di performance */
.performance-indicator {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 0.75rem;
  z-index: 998;
  display: none;
}

.performance-indicator.show {
  display: block;
}

.performance-metric {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
}

.performance-metric:last-child {
  margin-bottom: 0;
}

/* Animazioni per feedback utente */
.cache-cleared {
  animation: cacheCleared 0.5s ease-out;
}

@keyframes cacheCleared {
  0% {
    transform: scale(1);
    background: var(--background);
  }
  50% {
    transform: scale(1.05);
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  }
  100% {
    transform: scale(1);
    background: var(--background);
  }
}

.data-refreshed {
  animation: dataRefreshed 1s ease-out;
}

@keyframes dataRefreshed {
  0% { opacity: 0.5; transform: translateY(10px); }
  50% { opacity: 1; transform: translateY(-5px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Responsive per indicatori */
@media (max-width: 640px) {
  .connection-status {
    right: 0.5rem;
    top: 60px;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

  .performance-indicator {
    bottom: 0.5rem;
    left: 0.5rem;
    font-size: 0.625rem;
    padding: 0.375rem;
  }

  .cart-content {
    max-width: 100%;
    width: 100%;
  }

  .cart-header {
    padding: 1rem 0.75rem;
  }

  .cart-header h2 {
    font-size: 1.125rem;
  }

  .cart-close-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
  }

  .cart-close-btn svg {
    width: 20px;
    height: 20px;
  }

  .cart-body {
    padding: 0.75rem;
  }

  .cart-item {
    padding: 0.75rem;
  }

  .cart-item-content {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }

  .cart-item-image {
    width: 2.5rem;
    height: 2.5rem;
  }

  .cart-product-emoji {
    font-size: 1.25rem;
  }

  .cart-item-name {
    font-size: 0.85rem;
    line-height: 1.2;
  }

  .cart-item-type {
    font-size: 0.65rem;
    margin-top: 0.1rem;
  }

  .cart-item-details {
    font-size: 0.8rem;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
  }

  .cart-item-price {
    font-size: 0.9rem;
  }

  .cart-item-controls {
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
  }

  .cart-quantity-controls {
    justify-content: center;
  }

  .cart-footer {
    padding: 0.75rem;
  }
}

}

/* Focus Styles */
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 2px;
}

/* Order Summary Modal */
.order-summary-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.order-summary-modal.show {
  opacity: 1;
  visibility: visible;
}

.summary-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.summary-content {
  position: relative;
  background: var(--background);
  border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.order-summary-modal.show .summary-content {
  transform: translateY(0);
}

.summary-header {
  text-align: center;
  padding: 2rem 2rem 1rem 2rem;
  background: var(--gradient-amber-light);
  border-radius: 1.5rem 1.5rem 0 0;
  border-bottom: 1px solid var(--border);
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: bounceIn 0.6s ease-out;
}

.summary-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--amber-800);
  margin-bottom: 0.5rem;
}

.summary-subtitle {
  color: var(--amber-700);
  font-size: 0.875rem;
}

.summary-body {
  padding: 1.5rem 2rem;
}

.summary-section {
  margin-bottom: 1.5rem;
}

.summary-section h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--amber-800);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.summary-details {
  background: var(--accent);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--border);
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: var(--muted-foreground);
  font-size: 0.875rem;
}

.detail-value {
  font-weight: 500;
  color: var(--foreground);
}

.detail-value.total {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--amber-700);
}

.verification-status {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.verification-status.success {
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.05) 100%);
  border-color: rgba(34, 197, 94, 0.3);
}

.status-icon {
  font-size: 1.5rem;
}

.status-text strong {
  display: block;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.status-text p {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin: 0;
}

.next-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--accent);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--amber-500);
  color: white;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.step-text {
  color: var(--foreground);
  font-size: 0.875rem;
}

.summary-actions {
  display: flex;
  gap: 0.75rem;
  padding: 1.5rem 2rem 2rem 2rem;
  border-top: 1px solid var(--border);
}

.summary-actions .btn-primary,
.summary-actions .btn-secondary {
  flex: 1;
  justify-content: center;
}

@keyframes bounceIn {
  0% {
    transform: scale(0.3);
    opacity: 0;
  }
  50% {
    transform: scale(1.05);
  }
  70% {
    transform: scale(0.9);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive per summary modal */
@media (max-width: 640px) {
  .summary-content {
    margin: 0.5rem;
    max-width: none;
  }

  .summary-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
  }

  .summary-body {
    padding: 1rem 1.5rem;
  }

  .summary-actions {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    flex-direction: column;
  }

  .summary-header h2 {
    font-size: 1.25rem;
  }

  .success-icon {
    font-size: 2.5rem;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  :root {
    --border: hsl(0, 0%, 50%);
    --muted: hsl(0, 0%, 90%);
  }
}