/* ═══════════════════════════════════════════════
   OÍR MÁS — Audífonos Page Styles
   ═══════════════════════════════════════════════ */

/* ─── Page Hero ─── */
.page-hero {
  padding: calc(var(--space-4xl) + 40px) 0 var(--space-4xl);
  background: var(--color-navy);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 153, 204, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero h1 {
  color: #fff;
  margin-bottom: var(--space-md);
}

.page-hero .lead {
  color: rgba(232, 246, 252, 0.75);
  max-width: 700px;
  margin: 0 auto var(--space-2xl);
}

.breadcrumb {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.85rem;
  color: rgba(232, 246, 252, 0.5);
  margin-bottom: var(--space-xl);
}

.breadcrumb a {
  color: rgba(232, 246, 252, 0.7);
}

.breadcrumb a:hover {
  color: #fff;
}

.breadcrumb-sep {
  font-size: 0.7rem;
}

/* ─── Hero Tabs ─── */
.hero-tabs {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.hero-tab {
  padding: 0.75rem 1.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.hero-tab:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.hero-tab.active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-md);
}


/* ─── Sticky Tab Bar (shows on scroll) ─── */
.sticky-tabs {
  position: sticky;
  top: 70px; /* Below header */
  z-index: var(--z-raised);
  background: var(--color-surface-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-sm) 0;
  transform: translateY(-100%);
  opacity: 0;
  transition: all var(--transition-base);
  pointer-events: none;
}

[data-theme="dark"] .sticky-tabs {
  background: var(--color-surface-glass);
  border-bottom-color: var(--color-border);
}

.sticky-tabs.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: all;
}

.sticky-tabs-inner {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
}

.sticky-tab {
  padding: 0.5rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-light);
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
}

.sticky-tab:hover {
  color: var(--color-primary);
  background: rgba(0, 153, 204, 0.05);
}

.sticky-tab.active {
  background: var(--color-primary);
  color: #fff;
}


/* ─── Product Section Base ─── */
.product-section {
  padding: var(--space-5xl) 0;
  position: relative;
}

.product-section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto var(--space-4xl);
}

.product-section-header p {
  font-size: 1.1rem;
  line-height: 1.8;
  padding-top: 50px
}

/* AU V Specifics */
#au-v {
  background: var(--color-surface);
}

[data-theme="dark"] #au-v {
  background: var(--color-bg);
}

/* AU A Specifics */
#au-a {
  background: var(--color-surface-alt);
}

[data-theme="dark"] #au-a {
  background: var(--color-surface-alt);
}


/* ─── Category Group (RIC / BTE) ─── */
.category-group {
  margin-bottom: var(--space-4xl);
}

.category-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-2xl);
}

.category-title h3 {
  font-size: 1.5rem;
  margin: 0;
}

.category-desc {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
  max-width: 800px;
}

.category-line {
  flex: 1;
  height: 1px;
  background: var(--color-border-light);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--space-2xl);
}

/* ─── Product Card Details ─── */
.model-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  will-change: transform, opacity; /* Habilita optimización por hardware (GPU) para las animaciones */
}

.model-top-section {
  display: flex;
  gap: var(--space-md);
  align-items: stretch;
  margin-bottom: var(--space-md);
}

.model-image-container {
  flex: 1;
  height: 160px; /* Altura fija para alinear todas las cajas perfectamente */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ffffff; /* Fondo blanco para consistencia estética premium */
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  position: relative;
}

[data-theme="dark"] .model-image-container {
  background: rgba(255, 255, 255, 0.05);
}

.model-image-container img {
  max-width: 90%;
  max-height: 90%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 1; /* Valor por defecto */
  transition: transform var(--transition-smooth) ease, opacity 0.2s ease-in-out; /* Transición suave de opacidad */
}

/* Efecto hover interactivo premium para destacar el audífono */
.model-card:hover .model-image-container img {
  transform: scale(1.08);
}

.model-top-section .color-selector {
  flex: 1;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.model-bottom-section {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

@media (max-width: 480px) {
  .model-top-section {
    flex-direction: column;
  }
}

.model-header {
  margin-bottom: var(--space-md);
}

.model-name {
  font-size: 1.75rem;
  margin: var(--space-xs) 0;
}

.model-tagline {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-primary);
}

[data-theme="dark"] .model-tagline {
  color: var(--color-accent);
}

.model-desc {
  margin-bottom: var(--space-lg);
  font-size: 0.95rem;
  flex-grow: 1;
}

.model-chips-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-lg);
}

/* ─── Color Selector ─── */
.color-selector {
  margin-bottom: var(--space-lg);
  padding: var(--space-md);
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-light);
}

[data-theme="dark"] .color-selector {
  background: rgba(0, 0, 0, 0.2);
}

.color-selector-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
}

.color-name-display {
  color: var(--color-primary);
  font-family: var(--font-heading);
}

[data-theme="dark"] .color-name-display {
  color: var(--color-accent);
}

.color-options {
  display: flex;
  gap: var(--space-sm);
}

.color-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
  position: relative;
}

.color-circle:hover {
  transform: scale(1.1);
}

.color-circle.active {
  border-color: var(--color-primary);
  transform: scale(1.1);
}

[data-theme="dark"] .color-circle.active {
  border-color: var(--color-accent);
}

.color-circle.active::after {
  content: '';
  position: absolute;
  inset: -6px;
  border: 1px solid var(--color-primary);
  border-radius: 50%;
  opacity: 0.5;
}

[data-theme="dark"] .color-circle.active::after {
  border-color: var(--color-accent);
}

/* Actual Colors AU V */
.color-p6 { background: #E0E0E0; } /* Platinum */
.color-p7 { background: #5D6063; } /* Pewter */
.color-r8 { background: #D5C1A7; } /* Sand */
.color-p4 { background: #3C2B22; } /* Espresso */

/* Actual Colors AU A (Placeholders until real data) */
.color-a1 { background: #C5B29B; }
.color-a2 { background: #8E9196; }
.color-a3 { background: #404245; }
.color-a4 { background: #222222; }

/* ─── Specs Table (AU A mostly) ─── */
.specs-table {
  width: 100%;
  font-size: 0.85rem;
  margin-bottom: var(--space-lg);
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.specs-table tr:not(:last-child) td {
  border-bottom: 1px solid var(--color-border-light);
}

.specs-table td {
  padding: 0.6rem 0.8rem;
}

.specs-table td:first-child {
  font-weight: 600;
  color: var(--color-text);
  background: var(--color-surface-alt);
  width: 40%;
}

[data-theme="dark"] .specs-table td:first-child {
  background: rgba(0, 0, 0, 0.2);
}

.specs-table td:last-child {
  color: var(--color-text-light);
}


/* ─── Model Actions ─── */
.model-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: auto;
}

/* ─── Chargers Section ─── */
.chargers-section {
  margin-top: var(--space-5xl);
  padding: var(--space-3xl);
  background: var(--color-surface-alt);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-border-light);
}

[data-theme="dark"] .chargers-section {
  background: var(--color-surface-glass);
}

.chargers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-2xl);
}

.charger-card {
  text-align: center;
  padding: var(--space-lg);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}

.charger-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-md);
}

.charger-card h4 {
  margin-bottom: var(--space-xs);
}

.charger-card p {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ─── Comparison Table ─── */
.comparison-section {
  padding: var(--space-5xl) 0;
  background: var(--color-surface);
}

[data-theme="dark"] .comparison-section {
  background: var(--color-bg);
}

.compare-table-wrapper {
  overflow-x: auto;
  margin-bottom: var(--space-3xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--color-border-light);
}

.compare-table {
  width: 100%;
  min-width: 600px;
  background: var(--color-surface);
  text-align: left;
}

.compare-table th,
.compare-table td {
  padding: 1.2rem;
  border-bottom: 1px solid var(--color-border-light);
}

.compare-table th {
  font-family: var(--font-heading);
  background: var(--color-surface-alt);
  color: var(--color-text);
  font-size: 1.1rem;
}

[data-theme="dark"] .compare-table th {
  background: var(--color-surface-glass);
}

.compare-table th:not(:first-child) {
  text-align: center;
  width: 30%;
}

.compare-table td:not(:first-child) {
  text-align: center;
  font-weight: 500;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.check-icon {
  color: var(--color-success);
  font-weight: bold;
  font-size: 1.2rem;
}

.cross-icon {
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
  
  .chargers-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-tabs {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .sticky-tabs {
    display: none; /* Hide on mobile to save space */
  }
}

/* ==========================================
   DISEÑO EXCLUSIVO PARA PRODUCTOS SIN STOCK
   ========================================== */
.model-card.out-of-stock {
  position: relative;
  border-color: var(--color-border);
  background-color: #fafbfc;
}

.model-card.out-of-stock .model-image-container img {
  filter: grayscale(100%) opacity(0.55);
}

.model-card.out-of-stock .model-name,
.model-card.out-of-stock .model-tagline,
.model-card.out-of-stock .model-desc,
.model-card.out-of-stock .tag,
.model-card.out-of-stock .specs-table {
  opacity: 0.6;
}

.out-of-stock-bar {
  position: absolute;
  top: 100px;
  left: 0;
  width: 100%;
  background-color: var(--color-primary-dark); /* Azul marino muy oscuro, "la linea mas oscura" */
  color: #ffffff;
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  padding: 0.5rem 0;
  text-transform: uppercase;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Modificación de acciones para deshabilitar consulta directa */
.model-card.out-of-stock .model-actions .btn-primary {
  background-color: var(--color-text-muted) !important;
  border-color: var(--color-text-muted) !important;
  cursor: not-allowed;
  pointer-events: none;
}

.model-card.out-of-stock .model-actions .btn-outline-white {
  opacity: 0.5;
  pointer-events: none;
}
