/* Modern Reset and Variables */
    
    .product-detail-modern {
      --primary-color: #6366f1;
      --primary-dark: #4f46e5;
      --secondary-color: #10b981;
      --danger-color: #ef4444;
      --warning-color: #f59e0b;
      --dark-color: #1f2937;
      --light-color: #f9fafb;
      --gray-color: #6b7280;
      --border-color: #e5e7eb;
      --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
      --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
      --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
      --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
      --radius-sm: 0.375rem;
      --radius-md: 0.5rem;
      --radius-lg: 0.75rem;
      --radius-xl: 1rem;
    }
    
    /* Modern Card Container */
    .modern-container {
      max-width: 1280px;
      margin: 0 auto;
      padding: 2rem 1rem;
    }
    
    .modern-card {
      background: white;
      border-radius: var(--radius-xl);
      box-shadow: var(--shadow-lg);
      overflow: hidden;
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .modern-card:hover {
      box-shadow: var(--shadow-xl);
    }
    
    /* Loading Container Modern */
    .loading-container-modern {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      min-height: 500px;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: var(--radius-xl);
      position: relative;
      overflow: hidden;
    }
    
    .loading-container-modern::before {
      content: '';
      position: absolute;
      top: -50%;
      left: -50%;
      width: 200%;
      height: 200%;
      background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
      animation: rotate 20s linear infinite;
    }
    
    @keyframes rotate {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }
    
    .loading-card {
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(10px);
      border-radius: var(--radius-xl);
      padding: 3rem;
      text-align: center;
      box-shadow: var(--shadow-xl);
      z-index: 1;
      min-width: 300px;
    }
    
    .modern-spinner {
      width: 60px;
      height: 60px;
      margin: 0 auto 1.5rem;
      border: 4px solid var(--border-color);
      border-top-color: var(--primary-color);
      border-right-color: var(--secondary-color);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    .loading-text-modern {
      font-size: 1.125rem;
      color: var(--dark-color);
      font-weight: 500;
      margin-top: 1rem;
    }
    
    .loading-dots {
      display: inline-block;
      animation: dots 1.4s infinite;
    }
    
    @keyframes dots {
      0%, 20% { content: '.'; }
      40% { content: '..'; }
      60%, 100% { content: '...'; }
    }
    
    /* Error Container Modern */
    .error-container-modern {
      background: white;
      border-radius: var(--radius-xl);
      padding: 3rem;
      text-align: center;
      box-shadow: var(--shadow-lg);
    }
    
    .error-icon-modern {
      width: 120px;
      height: 120px;
      margin: 0 auto 1.5rem;
      display: flex;
      align-items: center;
      justify-content: center;
      background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
      border-radius: 50%;
      font-size: 3rem;
    }
    
    .error-icon-modern.network { background: linear-gradient(135deg, #fed7aa 0%, #ffedd5 100%); }
    .error-icon-modern.server { background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); }
    .error-icon-modern.timeout { background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%); }
    
    .error-title-modern {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--dark-color);
      margin-bottom: 0.5rem;
    }
    
    .error-message-modern {
      color: var(--gray-color);
      margin-bottom: 1rem;
    }
    
    .btn-retry-modern {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      color: white;
      border: none;
      padding: 0.75rem 2rem;
      border-radius: var(--radius-md);
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
      margin-top: 1rem;
    }
    
    .btn-retry-modern:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-md);
    }
    
    /* Empty Stock Modern */
    .empty-stock-modern {
      text-align: center;
      padding: 4rem 2rem;
      background: white;
      border-radius: var(--radius-xl);
    }
    
    .empty-stock-icon-modern {
      width: 200px;
      margin-bottom: 1.5rem;
      opacity: 0.6;
    }
    
    /* Product Gallery Modern */
    .gallery-modern {
      background: var(--light-color);
      border-radius: var(--radius-lg);
      padding: 1rem;
    }
    
    .main-image-modern {
      border-radius: var(--radius-lg);
      overflow: hidden;
      background: white;
      box-shadow: var(--shadow-sm);
    }
    
    .thumbnail-modern {
      margin-top: 1rem;
    }
    
    .thumbnail-item {
      border-radius: var(--radius-md);
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 2px solid transparent;
    }
    
    .thumbnail-item.active {
      border-color: var(--primary-color);
      box-shadow: var(--shadow-md);
    }
    
    .thumbnail-item:hover {
      transform: scale(1.05);
      box-shadow: var(--shadow-md);
    }
    
    /* Product Info Modern */
    .product-info-modern {
      padding: 1rem;
    }
    
    .product-title-modern {
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--dark-color);
      margin-bottom: 1rem;
      line-height: 1.2;
    }
    
    /* Price Card Modern */
    .price-card-modern {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      border-radius: var(--radius-lg);
      padding: 1.5rem;
      color: white;
      margin-bottom: 1.5rem;
    }
    
    .price-original {
      font-size: 0.875rem;
      text-decoration: line-through;
      opacity: 0.8;
    }
    
    .price-current {
      font-size: 2rem;
      font-weight: 700;
      margin-top: 0.5rem;
    }
    
    /* Info Grid Modern */
    .info-grid-modern {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1rem;
      margin-bottom: 1.5rem;
    }
    
    .info-item-modern {
      background: var(--light-color);
      padding: 0.75rem;
      border-radius: var(--radius-md);
      transition: all 0.3s ease;
    }
    
    .info-item-modern:hover {
      background: white;
      box-shadow: var(--shadow-sm);
      transform: translateY(-2px);
    }
    
    .info-label-modern {
      font-size: 0.75rem;
      color: var(--gray-color);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .info-value-modern {
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--dark-color);
      margin-top: 0.25rem;
    }
    
    /* Stock Table Modern */
    .stock-table-modern {
      background: white;
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }
    
    .stock-table-modern table {
      width: 100%;
      border-collapse: collapse;
    }
    
    .stock-table-modern th {
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      color: white;
      padding: 0.75rem;
      font-weight: 600;
      text-align: center;
    }
    
    .stock-table-modern td {
      padding: 0.75rem;
      text-align: center;
      border-bottom: 1px solid var(--border-color);
    }
    
    .stock-badge {
      display: inline-block;
      padding: 0.25rem 0.75rem;
      border-radius: var(--radius-sm);
      font-size: 0.875rem;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .stock-badge.available {
      background: linear-gradient(135deg, var(--secondary-color) 0%, #059669 100%);
      color: white;
    }
    
    .stock-badge.available:hover {
      transform: scale(1.05);
      box-shadow: var(--shadow-sm);
    }
    
    .stock-badge.preorder {
      background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
      color: white;
    }
    
    .stock-badge.outofstock {
      background: #e5e7eb;
      color: #9ca3af;
      cursor: not-allowed;
    }
    
    .stock-badge.selected {
      transform: scale(1.1);
      box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
    }
    
    /* Quantity Selector Modern */
    .quantity-modern {
      display: flex;
      align-items: center;
      gap: 1rem;
      margin-bottom: 1.5rem;
    }
    
    .quantity-label {
      font-weight: 600;
      color: var(--dark-color);
    }
    
    .quantity-control {
      display: flex;
      align-items: center;
      border: 2px solid var(--border-color);
      border-radius: var(--radius-md);
      overflow: hidden;
    }
    
    .quantity-btn {
      width: 40px;
      height: 40px;
      background: var(--light-color);
      border: none;
      cursor: pointer;
      font-size: 1.25rem;
      transition: all 0.2s ease;
    }
    
    .quantity-btn:hover {
      background: var(--primary-color);
      color: white;
    }
    
    .quantity-input {
      width: 60px;
      height: 40px;
      text-align: center;
      border: none;
      border-left: 1px solid var(--border-color);
      border-right: 1px solid var(--border-color);
      font-weight: 600;
    }
    
    /* Add to Cart Button Modern */
    .btn-cart-modern {
      width: 100%;
      background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
      color: white;
      border: none;
      padding: 1rem;
      border-radius: var(--radius-md);
      font-weight: 700;
      font-size: 1rem;
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
    }
    
    .btn-cart-modern::before {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      width: 0;
      height: 0;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.3);
      transform: translate(-50%, -50%);
      transition: width 0.6s, height 0.6s;
    }
    
    .btn-cart-modern:hover::before {
      width: 300px;
      height: 300px;
    }
    
    .btn-cart-modern:hover {
      transform: translateY(-2px);
      box-shadow: var(--shadow-lg);
    }
    
    .btn-cart-modern:active {
      transform: translateY(0);
    }
    
    .btn-cart-modern.disabled {
      opacity: 0.6;
      cursor: not-allowed;
    }
    
    /* Alert Modern */
    .alert-modern {
      position: fixed;
      top: 1rem;
      right: 1rem;
      z-index: 1000;
      animation: slideIn 0.3s ease-out;
    }
    
    @keyframes slideIn {
      from {
        transform: translateX(100%);
        opacity: 0;
      }
      to {
        transform: translateX(0);
        opacity: 1;
      }
    }
    
    .alert-content {
      padding: 1rem 1.5rem;
      border-radius: var(--radius-md);
      color: white;
      font-weight: 500;
      box-shadow: var(--shadow-lg);
      backdrop-filter: blur(10px);
    }
    
    .alert-content.success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
    .alert-content.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
    .alert-content.warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
    .alert-content.info { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }
    
    /* Responsive */
    @media (max-width: 768px) {
      .modern-container {
        padding: 1rem;
      }
      
      .product-title-modern {
        font-size: 1.5rem;
      }
      
      .info-grid-modern {
        grid-template-columns: 1fr;
      }
      
      .price-current {
        font-size: 1.5rem;
      }
      
      .stock-table-modern {
        overflow-x: auto;
      }
      
      .stock-table-modern table {
        min-width: 500px;
      }
    }
    
    /* Animations */
    @keyframes fadeInUp {
      from {
        opacity: 0;
        transform: translateY(20px);
      }
      to {
        opacity: 1;
        transform: translateY(0);
      }
    }
    
    .fade-in-up {
      animation: fadeInUp 0.5s ease-out;
    }
    
    /* Hover Effects */
    .hover-lift {
      transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .hover-lift:hover {
      transform: translateY(-4px);
      box-shadow: var(--shadow-lg);
    }
    
    
.modern-loader {
  text-align: center;
}

.loader-spinner {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 30px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: spin 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(1) {
  border-top-color: #fff;
  animation-delay: 0s;
}

.spinner-ring:nth-child(2) {
  border-right-color: #f093fb;
  animation-delay: 0.3s;
}

.spinner-ring:nth-child(3) {
  border-bottom-color: #f5576c;
  animation-delay: 0.6s;
}

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

.loader-content {
  margin-bottom: 20px;
}

.loader-logo {
  font-size: 48px;
  color: #fff;
  margin-bottom: 15px;
  animation: bounce 1s ease-in-out infinite;
}

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

.loader-text {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 10px;
}

.loader-text span {
  display: inline-block;
  animation: wave 1s ease-in-out infinite;
  animation-delay: calc(0.1s * var(--i));
}

.loader-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.loader-dots span {
  width: 8px;
  height: 8px;
  background: #fff;
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite;
}

.loader-dots span:nth-child(2) { animation-delay: 0.2s; }
.loader-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
  0%, 60%, 100% { transform: scale(0.8); opacity: 0.5; }
  30% { transform: scale(1.2); opacity: 1; }
}

.loader-progress {
  width: 280px;
  height: 4px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px auto 0;
}

.progress-bar-animated {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #fff, #f093fb, #f5576c);
  border-radius: 4px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
  0% { width: 0%; transform: translateX(0); }
  50% { width: 100%; transform: translateX(0); }
  100% { width: 0%; transform: translateX(100%); }
}

/* Modern Error Container */
.error-container-modern {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.error-card {
  background: white;
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  animation: slideUp 0.5s ease-out;
}

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

.error-icon-wrapper {
  margin-bottom: 30px;
}

.error-icon-animated {
  position: relative;
  display: inline-block;
  font-size: 80px;
  color: #ff6b6b;
}

.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120px;
  height: 120px;
  margin: -60px 0 0 -60px;
  border: 2px solid #ff6b6b;
  border-radius: 50%;
  animation: pulse 1.5s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

.error-title-modern {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

.error-message-modern {
  font-size: 16px;
  color: #7f8c8d;
  margin-bottom: 30px;
  line-height: 1.6;
}

.error-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-modern {
  padding: 12px 30px;
  border: none;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary-modern {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary-modern {
  background: #ecf0f1;
  color: #2c3e50;
}

.btn-secondary-modern:hover {
  background: #bdc3c7;
}

/* Modern Empty Stock Container */
.empty-stock-container-modern {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.empty-stock-card {
  background: white;
  border-radius: 20px;
  padding: 50px 40px;
  text-align: center;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.1);
  animation: slideUp 0.5s ease-out;
}

.empty-stock-icon-wrapper {
  margin-bottom: 30px;
}

.empty-icon-animated {
  position: relative;
  display: inline-block;
  font-size: 80px;
  color: #f39c12;
}

.float-particle {
  position: absolute;
  width: 8px;
  height: 8px;
  background: #f39c12;
  border-radius: 50%;
  animation: float 2s ease-in-out infinite;
}

.float-particle:nth-child(2) {
  top: -20px;
  left: 30px;
  animation-delay: 0.5s;
}

.float-particle:nth-child(3) {
  bottom: -20px;
  right: 30px;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-20px) scale(0.5); opacity: 0.5; }
}

.empty-stock-title-modern {
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
}

.empty-stock-message-modern {
  font-size: 16px;
  color: #7f8c8d;
  margin-bottom: 20px;
}

.empty-stock-suggestion {
  background: #fff3e0;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 30px;
  color: #f39c12;
  font-size: 14px;
}


.stock-selection-wrapper {
  margin-top: 20px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
}

.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}

.stock-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.scroll-hint {
  font-size: 11px;
  color: #7f8c8d;
  display: flex;
  align-items: center;
  gap: 5px;
}

.table-responsive {
  max-height: 280px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
  width: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.table-responsive::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.table-stock {
  margin-bottom: 0;
}

.table-stock th,
.table-stock td {
  vertical-align: middle;
  text-align: center;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.2s ease;
}

.stock-badge.label-primary {
  background: #3498db;
  color: white;
}

.stock-badge.label-danger {
  background: #e74c3c;
  color: white;
}

.stock-badge.label-default {
  background: #95a5a6;
  color: white;
}

.stock-badge:hover:not([style*="opacity: 0.5"]) {
  transform: scale(1.05);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.stock-badge.label-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #3498db;
  animation: pulse-select 0.3s ease;
}

@keyframes pulse-select {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

.color-cell {
  display: flex;
  align-items: center;
  gap: 6px;
}

.table-navigation button {
  transition: all 0.2s ease;
}

.table-navigation button:hover {
  opacity: 0.8;
  transform: translateY(-1px);
}
