/* === PRODUCTS SECTION STYLES cu POZE MARI 2/3 RATIO === */

.products-section {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(25px) saturate(180%) brightness(120%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--border-radius-lg);
  margin-bottom: 2.5rem;
  color: var(--text-primary);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.1);
}

.products-container {
  position: relative;
}

.products-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.2rem;
  color: var(--text-primary);
}

/* === ENHANCED PRODUCTS GRID - BIGGER SPACING === */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* INCREASED from 260px */
  gap: 2rem; /* INCREASED from 1.8rem */
  margin-bottom: 1.2rem;
}

/* === ENHANCED PRODUCT CARD - OPTIMIZED HEIGHT === */
.product-card {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px) saturate(180%) brightness(120%);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--border-radius-lg);
  transition: all var(--transition-smooth);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 6px 25px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  height: 480px; /* ADJUSTED from 520px for 3/2 ratio */
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.12), transparent);
  transition: left 0.8s;
}

.product-card:hover::before {
  left: 100%;
}

.product-card:hover {
  transform: translateY(-10px) scale(1.01);
  box-shadow: 
    var(--glow-purple),
    0 18px 45px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-purple);
}

/* === PRODUCT BADGES === */
.product-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.featured-badge {
  background: linear-gradient(135deg, var(--accent-gold), #ffd700);
  color: var(--primary-dark);
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.sale-badge {
  background: linear-gradient(135deg, #ff3b30, #dc2626);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.3);
  top: 32px;
}

.low-stock-badge {
  background: linear-gradient(135deg, #ff9500, #f56500);
  color: white;
  box-shadow: 0 2px 8px rgba(255, 149, 0, 0.3);
  top: 56px;
}

.out-of-stock-badge {
  background: linear-gradient(135deg, #8e8e93, #636366);
  color: white;
  box-shadow: 0 2px 8px rgba(142, 142, 147, 0.3);
}

/* === PRODUCT IMAGE - MULT MAI MARE cu 2/3 RATIO === */
.product-image {
  width: 100%;
  height: 320px; /* INCREASED from 240px - MULT MAI MARE! */
  aspect-ratio: 2/3; /* 🔥 VERTICAL 2/3 RATIO */
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
  transition: all var(--transition-smooth);
}

.product-image:hover {
  border-color: var(--accent-electric);
  box-shadow: var(--glow-neon);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all var(--transition-smooth);
  filter: brightness(0.95) contrast(1.1);
}

.product-card:hover .product-image img {
  transform: scale(1.06);
  filter: brightness(1) contrast(1.2);
}

.product-placeholder {
  color: var(--text-secondary);
  font-size: 2.2rem;
}

/* === PRODUCT INFO === */
.product-info {
  padding: 1.2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.product-info h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-gold);
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

.product-category {
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.product-description {
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 0.8rem;
  text-align: justify;
  text-justify: inter-word;
  flex: 1;
  hyphens: auto;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* === PRODUCT PRICING === */
.product-price-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.product-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-electric);
}

.product-original-price {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.product-discount {
  background: var(--accent-electric);
  color: var(--primary-dark);
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
}

/* === PRODUCT ATTRIBUTES === */
.product-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.product-attribute {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  color: var(--text-primary);
  padding: 0.2rem 0.5rem;
  border-radius: 8px;
  font-size: 0.65rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* === PRODUCT STOCK === */
.product-stock {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-stock.in-stock {
  color: var(--accent-green);
}

.product-stock.low-stock {
  color: #ff9500;
}

.product-stock.out-of-stock {
  color: #8e8e93;
}

.stock-icon {
  font-size: 0.8rem;
}

/* === PRODUCT CTA === */
.product-cta {
  background: var(--accent-gold);
  color: var(--primary-dark);
  border: none;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
  width: 100%;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: auto;
}

.product-cta:hover:not(:disabled) {
  background: var(--accent-electric);
  box-shadow: var(--glow-neon);
  transform: translateY(-1px) scale(1.01);
}

.product-cta:disabled {
  background: #8e8e93;
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

.btn-icon {
  font-size: 0.9rem;
}

/* === PRODUCT MODAL === */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
}

.product-modal .modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
}

.product-modal .modal-container {
  position: relative;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(25px);
  border-radius: var(--border-radius-lg);
  max-width: 900px;
  max-height: 90vh;
  width: 90%;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.product-modal.active .modal-container {
  transform: scale(1);
}

.product-modal .modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-smooth);
}

.product-modal .modal-close:hover {
  background: rgba(255, 59, 48, 0.8);
  color: white;
}

/* === MODAL CONTENT === */
.modal-header {
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.product-header-modal {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.product-image-modal {
  width: 120px;
  height: 120px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.product-image-modal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info-modal h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.product-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.category-badge, .featured-badge, .sale-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
}

.category-badge {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

.product-sku {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.modal-body {
  padding: 2rem;
}

.modal-body h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 0.8rem;
}

.product-description-full {
  margin-bottom: 1.5rem;
}

.product-pricing-modal {
  margin-bottom: 1.5rem;
}

.pricing-details-modal {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.price-display {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.current-price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-electric);
}

.original-price {
  font-size: 1rem;
  color: var(--text-secondary);
  text-decoration: line-through;
}

.discount-percent {
  background: var(--accent-electric);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
}

.stock-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stock-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.stock-value.in-stock {
  color: var(--accent-green);
  font-weight: 600;
}

.stock-value.low-stock {
  color: #ff9500;
  font-weight: 600;
}

.stock-value.out-of-stock {
  color: #8e8e93;
  font-weight: 600;
}

.product-attributes-modal {
  margin-bottom: 1.5rem;
}

.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.8rem;
}

.attribute-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.attribute-label {
  font-weight: 500;
  color: var(--text-secondary);
}

.attribute-value {
  font-weight: 600;
  color: var(--primary-dark);
}

.product-tags-modal {
  margin-bottom: 1.5rem;
}

.tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background: rgba(139, 92, 246, 0.1);
  color: #8b5cf6;
  padding: 0.25rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

.product-actions-modal {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.primary-btn, .secondary-btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.primary-btn {
  background: var(--accent-green);
  color: var(--primary-dark);
  flex: 1;
}

.primary-btn:hover {
  background: var(--accent-electric);
  box-shadow: var(--glow-neon);
  transform: translateY(-1px);
}

.secondary-btn {
  background: rgba(255, 255, 255, 0.2);
  color: var(--primary-dark);
  border: 1px solid rgba(0, 0, 0, 0.2);
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: var(--accent-electric);
}

.out-of-stock-notice {
  background: rgba(142, 142, 147, 0.1);
  color: #8e8e93;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
  flex: 1;
}

.notice-icon {
  font-size: 1rem;
}

/* === NOTIFY FORM === */
.notify-form {
  margin-top: 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 500;
  color: var(--primary-dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 6px;
  font-size: 0.9rem;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-electric);
}

.product-summary {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
}

.product-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.product-summary h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  font-weight: 600;
}

.product-summary p {
  margin: 0 0 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.product-summary .product-price {
  font-weight: 700;
  color: var(--accent-electric);
}

/* === SUCCESS MESSAGE === */
.success-message {
  position: fixed;
  top: 2rem;
  right: 2rem;
  background: var(--accent-green);
  color: var(--primary-dark);
  padding: 1rem 1.5rem;
  border-radius: 8px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}

.success-message.show {
  transform: translateX(0);
}

.success-icon {
  font-size: 1.2rem;
}

/* === PRODUCTS EMPTY STATE === */
.products-empty {
  text-align: center;
  padding: 2.5rem 1.2rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(25px) saturate(180%) brightness(120%);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.08);
}

.products-empty .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 0.6rem;
}

.products-empty h3 {
  font-family: 'Orbitron', sans-serif;
  color: var(--accent-gold);
  margin-bottom: 0.6rem;
  font-size: 1.2rem;
}

/* === ENHANCED MOBILE EXPERIENCE === */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 0 1rem; /* Add padding for better mobile spacing */
  }
  
  .product-card {
    height: 420px; /* OPTIMIZED for mobile */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
  
  .product-image {
    height: 240px; /* OPTIMIZED for 3/2 ratio on mobile */
    aspect-ratio: 3/2; /* MAINTAIN 3/2 ratio */
  }

  .product-header-modal {
    flex-direction: column;
    gap: 1rem;
  }

  .product-image-modal {
    width: 100%;
    height: 150px;
  }

  .product-actions-modal {
    flex-direction: column;
  }

  .primary-btn, .secondary-btn {
    width: 100%;
    justify-content: center;
  }

  .products-section {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
  }
}

@media (max-width: 480px) {
  .products-grid {
    padding: 0 0.5rem; /* Tighter padding for small screens */
  }
  
  .product-card {
    height: 380px; /* FURTHER OPTIMIZED for small mobile */
  }
  
  .product-image {
    height: 200px; /* OPTIMIZED for small mobile */
    aspect-ratio: 3/2; /* MAINTAIN 3/2 ratio */
  }
  
  .product-info {
    padding: 1rem; /* Reduce padding */
  }

  .modal-header,
  .modal-body {
    padding: 1.5rem;
  }

  .product-modal .modal-container {
    width: 95%;
    max-height: 95vh;
  }

  .product-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
  }
}

/* === MOBILE LAYOUT FIXES === */
@media (max-width: 600px) {
  .product-card {
    margin: 0;
    width: 100%;
  }
  
  .product-image {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
  }
  
  .product-info {
    flex: 1;
    justify-content: space-between;
  }
}

/* === ACCESSIBILITY === */
@media (prefers-contrast: high) {
  .product-card {
    border-width: 3px;
    background: rgba(255, 255, 255, 0.2);
  }
  
  .product-info h3 {
    color: var(--accent-electric);
    font-weight: 700;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-card::before {
    transition: none !important;
    animation: none !important;
  }

  .product-card:hover {
    transform: none !important;
  }
}

/* === PERFORMANCE OPTIMIZATIONS === */
.product-image img {
  will-change: transform, filter;
  backface-visibility: hidden;
}

.product-card {
  will-change: transform;
  backface-visibility: hidden;
}

.product-modal {
  will-change: opacity, visibility;
}

.product-modal .modal-container {
  will-change: transform;
}