/**
 * ═══════════════════════════════════════════════════════════════
 * PRODUCT DETAIL PAGE - Estilos para página de detalle del producto
 * ═══════════════════════════════════════════════════════════════
 */

/* Variables CSS */
:root {
  --product-max-width: 1400px;
  --gallery-width: 600px;
  --thumbnail-size: 80px;
}

/* ═══════════════════════════════════════════════════════════════
   CONTENEDOR PRINCIPAL
   ═══════════════════════════════════════════════════════════════ */

.product-detail-page {
  max-width: var(--product-max-width);
  margin: 0 auto;
  padding: 2rem;
  min-height: 60vh;
}

/* Loading state */
.product-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: 1.5rem;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error state */
.product-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  text-align: center;
  gap: 1rem;
}

.product-error svg {
  color: var(--error-color, #e74c3c);
  opacity: 0.5;
}

.product-error h2 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0;
}

.product-error p {
  color: var(--text-secondary);
  margin: 0;
}

.btn-back-shop {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: var(--transition-smooth);
  margin-top: 1rem;
}

.btn-back-shop:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════════
   GRID PRINCIPAL: GALERÍA + INFO
   ═══════════════════════════════════════════════════════════════ */

.product-main-grid {
  display: grid;
  grid-template-columns: var(--gallery-width) 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

/* ═══════════════════════════════════════════════════════════════
   GALERÍA DE IMÁGENES
   ═══════════════════════════════════════════════════════════════ */

.product-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 2rem;
  align-self: flex-start;
}

/* Slider principal */
.gallery-main {
  position: relative;
  background: var(--secondary-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* aspect-ratio: 1 / 1; */
}

.gallery-slider {
  width: 100%;
  height: 100%;
  display: flex;
  overflow: hidden;
  position: relative;
}

.gallery-slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.gallery-slide:hover img {
  transform: scale(1.05);
}

/* Navegación del slider */
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-nav:hover {
  background: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-prev {
  left: 1rem;
}

.gallery-next {
  right: 1rem;
}

.gallery-nav svg {
  color: var(--text-primary);
}

/* Hint de zoom */
.gallery-zoom-hint {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-main:hover .gallery-zoom-hint {
  opacity: 1;
}

.gallery-zoom-hint svg {
  width: 16px;
  height: 16px;
}

/* Thumbnails */
.gallery-thumbnails {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.gallery-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
  background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 3px;
}

.gallery-thumbnail {
  flex-shrink: 0;
  width: var(--thumbnail-size);
  height: var(--thumbnail-size);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition-smooth);
  background: var(--secondary-bg);
}

.gallery-thumbnail:hover {
  border-color: var(--primary-color);
}

.gallery-thumbnail.active {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color-light, rgba(74, 144, 226, 0.2));
}

.gallery-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ═══════════════════════════════════════════════════════════════
   INFORMACIÓN DEL PRODUCTO
   ═══════════════════════════════════════════════════════════════ */

.product-info {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Header */
.product-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.product-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  line-height: 1.3;
}

.product-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.product-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

/* Badges */
.product-badges {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.badge {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-event {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
}

.badge-discount {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  color: white;
}

.badge-stock-high {
  background: var(--success-bg, #d4edda);
  color: var(--success-color, #155724);
}

.badge-stock-low {
  background: var(--warning-bg, #fff3cd);
  color: var(--warning-color, #856404);
}

.badge-out-stock {
  background: var(--error-bg, #f8d7da);
  color: var(--error-color, #721c24);
}

/* Precio */
.product-pricing {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.price-original {
  font-size: 1.125rem;
  color: var(--text-tertiary);
  text-decoration: line-through;
}

.price-final {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-final .currency {
  font-size: 1.5rem;
  font-weight: 600;
}

.price-savings {
  font-size: 1rem;
  color: var(--success-color, #27ae60);
  font-weight: 600;
}

/* Stock */
.product-stock {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
}

.stock-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.stock-indicator.high {
  background: var(--success-color, #27ae60);
  box-shadow: 0 0 8px rgba(39, 174, 96, 0.4);
}

.stock-indicator.low {
  background: var(--warning-color, #f39c12);
  box-shadow: 0 0 8px rgba(243, 156, 18, 0.4);
}

.stock-indicator.out {
  background: var(--error-color, #e74c3c);
}

.stock-text {
  font-weight: 500;
  color: var(--text-primary);
}

/* Selector de cantidad */
.product-quantity {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.product-quantity label {
  font-weight: 600;
  color: var(--text-primary);
}

.quantity-selector {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: var(--secondary-bg);
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qty-btn:hover:not(:disabled) {
  background: var(--hover-bg);
}

.qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qty-input {
  width: 60px;
  height: 40px;
  border: none;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: white;
}

.qty-input:focus {
  outline: none;
  background: var(--secondary-bg);
}

/* Remove spinner arrows from number input */
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qty-input[type=number] {
  -moz-appearance: textfield;
}

/* Botones de acción */
.product-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.btn-add-to-cart,
.btn-buy-now {
  flex: 1;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.btn-add-to-cart {
  background: var(--primary-color);
  color: white;
}

.btn-add-to-cart:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--primary-rgb, 74, 144, 226), 0.3);
}

.btn-buy-now {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border: 2px solid var(--border-color);
}

.btn-buy-now:hover:not(:disabled) {
  background: var(--hover-bg);
  border-color: var(--primary-color);
}

.btn-add-to-cart:disabled,
.btn-buy-now:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Info adicional */
.product-extra-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--secondary-bg);
  border-radius: var(--radius-md);
  margin-top: 0.5rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.info-item svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   TABS DE INFORMACIÓN
   ═══════════════════════════════════════════════════════════════ */

.product-tabs {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: white;
}

.tabs-header {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  background: var(--secondary-bg);
}

.tab-btn {
  flex: 1;
  padding: 1rem 1.5rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--hover-bg);
}

.tab-btn.active {
  color: var(--primary-color);
  background: white;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-color);
}

.tabs-content {
  padding: 2rem;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* Tab: Descripción */
.tab-description p {
  line-height: 1.8;
  color: var(--text-secondary);
  margin: 0;
}

/* Tab: Especificaciones */
.specs-table {
  width: 100%;
  border-collapse: collapse;
}

.specs-table tr {
  border-bottom: 1px solid var(--border-color);
}

.specs-table tr:last-child {
  border-bottom: none;
}

.specs-table td {
  padding: 1rem 0;
  color: var(--text-secondary);
}

.specs-table td:first-child {
  width: 200px;
  color: var(--text-primary);
}

/* Tab: Envío */
/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   TAB: ENVÍO Y GARANTÍA
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Header de garantía con icono */
.warranty-header {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a5490 100%);
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  color: white;
}

.warranty-icon {
  flex-shrink: 0;
}

.warranty-icon svg {
  width: 48px;
  height: 48px;
  stroke: white;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.warranty-header-text h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.5rem;
  color: white;
}

.warranty-brand {
  font-size: 1rem;
  margin: 0 0 1rem 0 !important;
  color: rgba(255, 255, 255, 0.95);
}

.warranty-header-text p {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
}

/* Grid de dos columnas: Cobertura y Exclusiones */
.warranty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.warranty-section {
  background: var(--secondary-bg);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px solid var(--border-color);
}

.warranty-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--border-color);
}

.warranty-section-header svg {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.warranty-coverage .warranty-section-header svg {
  stroke: #10b981;
}

.warranty-exclusions .warranty-section-header svg {
  stroke: #ef4444;
}

.warranty-section-header h4 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--text-primary);
}

.warranty-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.warranty-list li {
  padding: 0.75rem 0;
  padding-left: 1.75rem;
  color: var(--text-secondary);
  line-height: 1.6;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.warranty-list li:last-child {
  border-bottom: none;
}

.warranty-coverage .warranty-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #10b981;
  font-weight: bold;
  font-size: 1.125rem;
}

.warranty-exclusions .warranty-list li::before {
  content: '×';
  position: absolute;
  left: 0;
  color: #ef4444;
  font-weight: bold;
  font-size: 1.25rem;
}

/* Certificado de garantía */
.warranty-certificate {
  background: #fef3c7;
  border: 2px solid #fbbf24;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.warranty-certificate svg {
  flex-shrink: 0;
  stroke: #d97706;
}

.warranty-certificate p {
  flex: 1;
  margin: 0;
  color: #92400e;
  font-weight: 500;
}

.btn-certificate {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: #d97706;
  color: white;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-certificate:hover {
  background: #b45309;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
}

.btn-certificate svg {
  width: 20px;
  height: 20px;
  stroke: white;
}

/* Proceso de garantía */
.warranty-process {
  background: var(--secondary-bg);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border-color);
}

.warranty-process h4 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.warranty-process h4 svg {
  stroke: var(--primary-color);
}

.warranty-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}

.warranty-steps li {
  display: flex;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border-color);
}

.warranty-steps li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-number {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.step-text {
  flex: 1;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-top: 0.25rem;
}

/* ═══════════════════════════════════════════════════════════════
   PRODUCTOS RELACIONADOS
   ═══════════════════════════════════════════════════════════════ */

.related-products {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border-color);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 2rem 0;
}

.related-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   MODAL DE ZOOM
   ═══════════════════════════════════════════════════════════════ */

.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.zoom-modal.active {
  display: flex;
}

.zoom-content {
  position: relative;
  width: 90vw;
  height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.zoom-content img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.1s ease-out;
  transform-origin: center center;
}

.zoom-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10001;
}

.zoom-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.zoom-close svg {
  color: white;
}

.zoom-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  z-index: 10001;
}

.zoom-nav:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.2);
}

.zoom-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.zoom-nav svg {
  color: white;
}

.zoom-nav.zoom-prev {
  left: 2rem;
}

.zoom-nav.zoom-next {
  right: 2rem;
}

.zoom-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  z-index: 10001;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ZOOM AVANZADO - Controles e indicadores
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.zoom-controls {
  position: absolute;
  top: 2rem;
  right: 2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(0, 0, 0, 0.7);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  z-index: 10002;
}

.zoom-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.zoom-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1);
}

.zoom-btn:active {
  transform: scale(0.95);
}

.zoom-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.zoom-btn:disabled:hover {
  background: transparent;
  transform: scale(1);
}

.zoom-level {
  color: white;
  font-size: 0.875rem;
  font-weight: 600;
  min-width: 2rem;
  text-align: center;
}

.zoom-indicator {
  position: absolute;
  top: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  z-index: 10001;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.zoom-indicator.visible {
  opacity: 1;
}

/* Estados del cursor según modo de zoom */
.zoom-content[data-zoom-level="1"] {
  cursor: zoom-in;
}

.zoom-content[data-zoom-mode="hover"] {
  cursor: crosshair;
}

.zoom-content[data-zoom-mode="fixed"] {
  cursor: grab;
}

.zoom-content[data-zoom-mode="fixed"].dragging {
  cursor: grabbing;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  :root {
    --gallery-width: 500px;
  }

  .product-main-grid { 
    grid-template-columns: var(--gallery-width) 1fr; 
  }
}


@media (max-width: 992px) {
  :root {
    --gallery-width: 500px;
  }

  .product-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .product-gallery {
    position: static;
  }

  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

@media (max-width: 768px) {


  
  .product-detail-page {
    padding: 1rem;
  }

  .product-title {
    font-size: 1.5rem;
  }

  .price-final {
    font-size: 2rem;
  }

  .product-actions {
    flex-direction: column;
  }

  .tabs-header {
    overflow-x: auto;
  }

  .tab-btn {
    white-space: nowrap;
    padding: 1rem;
  }

  .tabs-content {
    padding: 1.5rem;
  }

  /* Garantía responsive */
  .warranty-header {
    flex-direction: column;
    padding: 1.5rem;
  }

  .warranty-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .warranty-certificate {
    flex-direction: column;
    text-align: center;
  }

  .btn-certificate {
    width: 100%;
    justify-content: center;
  }

  .warranty-process {
    padding: 1.5rem;
  }

  .warranty-steps li {
    flex-direction: column;
    gap: 0.75rem;
  }

  .step-number {
    align-self: flex-start;
  }

  .related-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .zoom-close,
  .zoom-nav {
    width: 40px;
    height: 40px;
  }

  .zoom-close {
    top: 1rem;
    right: 1rem;
  }

  .zoom-nav.zoom-prev {
    left: 1rem;
  }

  .zoom-nav.zoom-next {
    right: 1rem;
  }

  .zoom-counter {
    bottom: 1rem;
  }

  .zoom-controls {
    top: 1rem;
    right: 1rem;
  }

  .zoom-indicator {
    top: 1rem;
    font-size: 0.75rem;
    padding: 0.4rem 0.8rem;
  }
}
