/**
 * Light Customization Styles
 * Bulk variant selection interface
 */

/* Wrapper */
.light-customization-wrapper {
  margin: 20px 0;
}

/* Mode Toggle */
.lc-mode-toggle {
  display: none; /* 隐藏模式切换标签 */
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.lc-mode-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  font-size: 16px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: -2px;
}

.lc-mode-btn:hover {
  color: #ff6b35;
}

.lc-mode-btn.active {
  color: #ff6b35;
  border-bottom-color: #ff6b35;
}

/* Interface */
.lc-interface {
  padding: 20px 0;
}

/* Section */
.lc-section {
  margin-bottom: 30px;
}

.lc-section-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 15px;
}

/* Power Grid */
.lc-power-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.lc-power-btn {
  padding: 12px 16px;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.lc-power-btn:hover {
  border-color: #ff6b35;
  color: #ff6b35;
}

.lc-power-btn.active {
  border-color: #ff6b35;
  background: #fff5f2;
  color: #ff6b35;
  border-width: 3px;
}

/* Color List */
.lc-color-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lc-color-item {
  display: grid;
  grid-template-columns: 80px 150px 120px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.lc-color-item:hover {
  border-color: #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.lc-color-image {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
  background: #f9fafb;
}

.lc-color-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lc-color-name {
  font-size: 15px;
  font-weight: 500;
  color: #1f2937;
}

.lc-color-price {
  font-size: 16px;
  font-weight: 600;
  color: #ff6b35;
}

/* Quantity Selector */
.lc-quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  overflow: hidden;
  width: fit-content;
}

.lc-qty-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9fafb;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #6b7280;
}

.lc-qty-btn:hover:not(:disabled) {
  background: #f3f4f6;
  color: #ff6b35;
}

.lc-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.lc-qty-input {
  width: 60px;
  height: 36px;
  border: none;
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  outline: none;
}

.lc-qty-input:focus {
  background: #f9fafb;
}

.lc-qty-input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* Warnings */
.lc-stock-warning,
.lc-moq-warning {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
}

.lc-stock-warning {
  color: #dc2626;
  background: #fef2f2;
}

.lc-moq-warning {
  color: #f59e0b;
  background: #fffbeb;
}

.lc-stock-warning i,
.lc-moq-warning i {
  font-size: 14px;
}

/* Actions - 2x2 Grid Layout with Better Spacing */
.lc-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px; /* 垂直间距18px，水平间距24px，与主产品页保持一致 */
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.lc-btn {
  padding: 0.85rem 1.5rem; /* 与主产品页按钮保持一致 */
  font-size: 15px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-height: 52px; /* 确保按钮有足够高度 */
}

.lc-btn i {
  margin-right: 8px;
}

.lc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 加入购物车 - 白底蓝边 */
.lc-btn-primary {
  background: white;
  color: #0d6efd;
  border-color: #0d6efd;
}

.lc-btn-primary:hover:not(:disabled) {
  background: #0d6efd;
  color: white;
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* 立即询价 - 黑底 */
.lc-btn-dark {
  background: #212529;
  color: white;
  border-color: #212529;
}

.lc-btn-dark:hover:not(:disabled) {
  background: #1a1e21;
  border-color: #1a1e21;
  box-shadow: 0 4px 12px rgba(33, 37, 41, 0.3);
}

/* 立即购买 - 白底橙边 */
.lc-btn-warning {
  background: white;
  color: #ff6600;
  border-color: #ff6600;
}

.lc-btn-warning:hover:not(:disabled) {
  background: #ff6600;
  color: white;
  box-shadow: 0 4px 12px rgba(255, 102, 0, 0.3);
}

/* 购买样品 - 白底红边 */
.lc-btn-danger {
  background: white;
  color: #dc3545;
  border-color: #dc3545;
}

.lc-btn-danger:hover:not(:disabled) {
  background: #dc3545;
  color: white;
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.lc-btn-secondary {
  background: #ffffff;
  color: #ff6b35;
  border: 2px solid #ff6b35;
}

.lc-btn-secondary:hover:not(:disabled) {
  background: #fff5f2;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .lc-power-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .lc-color-item {
    grid-template-columns: 60px 120px 100px 1fr auto;
    gap: 15px;
  }
}

@media (max-width: 1024px) {
  .lc-power-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
  
  .lc-color-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  
  .lc-color-image {
    margin: 0 auto;
  }
  
  .lc-color-name,
  .lc-color-price {
    text-align: center;
  }
  
  .lc-quantity-selector {
    width: 100%;
    justify-content: center;
  }
  
  .lc-actions {
    flex-direction: column;
  }
  
  .lc-btn {
    width: 100%;
  }
}

/* RTL Support for Arabic */
[dir="rtl"] .lc-mode-toggle {
  flex-direction: row-reverse;
}

[dir="rtl"] .lc-color-item {
  direction: rtl;
}

[dir="rtl"] .lc-actions {
  flex-direction: row-reverse;
}

/* Loading State */
.lc-btn .spinner-border {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

/* Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lc-interface {
  animation: fadeIn 0.3s ease;
}

/* Print Styles */
@media print {
  .lc-mode-toggle,
  .lc-actions {
    display: none;
  }
}
