/* ======== TIPOGRAFÍA ======== */
h1, h2, h3, h4, h5 {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.2;
  word-wrap: break-word;
}

body, p, a, span, li, div {
  font-family: 'Space Mono', monospace;
  font-weight: 400;
}

/* ======== ICONOS SOL/LUNA ======== */
.theme-toggle {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 999;
  padding: 0.5rem;
  border-radius: 50%;
  transition: background 0.3s ease;
}

.theme-toggle:hover {
  background: rgba(0, 0, 0, 0.05);
}

body.dark-mode .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.icon-theme {
  width: 26px;
  height: 26px;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.icon-theme.hidden {
  opacity: 0;
  transform: scale(0.8);
}

body.light-mode .icon-theme {
  color: #000000;
  fill: #000000;
}

body.dark-mode .icon-theme {
  color: #ffffff;
  fill: #ffffff;
}

/* ======== IMAGEN SIN SOMBRA Y ZOOM ======== */
.zoom-container {
  overflow: hidden;
  display: inline-block;
  border-radius: 8px;
  max-width: 100%;
}

.zoom-image {
  transition: transform 0.3s ease, transform-origin 0.3s ease;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}

.zoom-container:hover .zoom-image {
  transform: scale(1.8);
}

/* ======== MODO OSCURO GENERAL ======== */
body.dark-mode {
  background-color: #000000;
  color: #ffffff;
}

body.light-mode {
  background-color: #ffffff;
  color: #000000;
}

/* ======== FOOTER ======== */
.main-footer {
  background-color: #f5f5f5;
  color: #111;
  padding: 3rem 2rem;
  transition: background-color 0.4s ease, color 0.4s ease;
  display: flex;
  justify-content: center;
}

body.dark-mode .main-footer {
  background-color: #000000;
  color: #ffffff;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  width: 100%;
}

.footer-logo-img {
  height: 40px;
  width: auto;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.footer-info {
  flex: 1 1 300px;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.footer-links a {
  color: inherit;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease, opacity 0.3s ease;
}

.footer-links a:hover {
  text-decoration: underline;
  opacity: 0.7;
}

/* ===== ENLACE "VOLVER A INICIO" ===== */
.breadcrumb a {
  color: #000;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

body.dark-mode .breadcrumb a {
  color: #fff;
}  

/* MODO CLARO */
body.light-mode {
  --bs-body-color: #000000;
  --bs-body-bg: #ffffff;
  --bs-secondary-color: rgba(0, 0, 0, 0.6);
  --bs-secondary-bg: #f8f9fa;
  --bs-heading-color: #000000;
}

/* MODO OSCURO */
body.dark-mode {
  --bs-body-color: #ffffff;
  --bs-body-bg: #000000;
  --bs-secondary-color: rgba(255, 255, 255, 0.7);
  --bs-secondary-bg: #111111;
  --bs-heading-color: #ffffff;
}

/* Textos genéricos */
.text-muted {
  color: var(--bs-secondary-color) !important;
  transition: color 0.3s ease;
}

/* Títulos y párrafos base */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode p,
body.dark-mode span {
  color: var(--bs-body-color);
}

body.light-mode h1,
body.light-mode h2,
body.light-mode h3,
body.light-mode h4,
body.light-mode h5,
body.light-mode p,
body.light-mode span {
  color: var(--bs-body-color);
}
#panel-oferta {
  background-color: #f8f9fa; /* Fondo claro */
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #000000;
  transition: all 0.3s ease;
}

/* MODO OSCURO */
body.dark-mode #panel-oferta {
  background-color: rgba(255, 255, 255, 0.05); /* Fondo oscuro translúcido */
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* MODO OSCURO: texto de números destacado */
body.dark-mode #panel-oferta strong,
body.dark-mode #panel-oferta span {
  color: #ffffff;
}

/* Animación suave al actualizar la oferta */
#oferta-actual.updated {
  color: #ff6200;
  font-weight: bold;
  animation: pulse 0.6s ease;
}

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

/* === CONTENEDOR FLEXBOX DEL CONTADOR === */
.countdown-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}

/* === TEXTO PRINCIPAL E INFORMATIVO === */
.countdown-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-color, #000);
  transition: color 0.3s ease;
}

.countdown-info {
  font-size: 0.95rem;
  color: var(--subtext-color, #555);
  max-width: 420px;
  line-height: 1.4;
  transition: color 0.3s ease;
}


/* --- MODO OSCURO --- */
body.dark-mode .btn.btn-dark {
  /* Botón "Comprar ahora" (relleno) -> blanco con texto negro */
  --bs-btn-color: #000;
  --bs-btn-bg: #fff;
  --bs-btn-border-color: #fff;

  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: rgba(255, 255, 255, 0.85);
  --bs-btn-hover-border-color: rgba(255, 255, 255, 0.85);

  --bs-btn-active-color: #000;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.75);
  --bs-btn-active-border-color: rgba(255, 255, 255, 0.75);

  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}

body.dark-mode .btn.btn-outline-dark {
  /* Botón "Hacer oferta" (outline) -> borde y texto blanco */
  --bs-btn-color: #fff;
  --bs-btn-border-color: #fff;

  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: #fff;
  --bs-btn-hover-border-color: #fff;

  --bs-btn-active-color: #000;
  --bs-btn-active-bg: rgba(255, 255, 255, 0.85);
  --bs-btn-active-border-color: rgba(255, 255, 255, 0.85);

  --bs-btn-focus-shadow-rgb: 255, 255, 255;
}

/* --- MODO CLARO (opcional, por si quieres dejarlo “bien definido”) --- */
body.light-mode .btn.btn-dark {
  /* relleno negro con texto blanco (por defecto, pero lo fijamos) */
  --bs-btn-color: #fff;
  --bs-btn-bg: #000;
  --bs-btn-border-color: #000;

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: rgba(0, 0, 0, 0.85);
  --bs-btn-hover-border-color: rgba(0, 0, 0, 0.85);

  --bs-btn-focus-shadow-rgb: 0, 0, 0;
}

body.light-mode .btn.btn-outline-dark {
  /* outline negro con texto negro */
  --bs-btn-color: #000;
  --bs-btn-border-color: #000;

  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;

  --bs-btn-focus-shadow-rgb: 0, 0, 0;
}

/* Oculta el cursor nativo SOLO en desktop */
@media (hover: hover) and (pointer: fine) {
  body {
    cursor: none;
  }
  a, button, input, textarea, select {
    cursor: none;
  }
}

/* wrapper fijo del cursor */
#custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  pointer-events: none;
  z-index: 2147483647;
}

/* bola del cursor */
#custom-cursor .cursor-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;

  /* Usa una variable que definimos según el tema */
  background: var(--cursor-color);

  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  transition: transform 0.3s ease-in-out;
  pointer-events: none;

  /* CORRECCIÓN: el !important iba mal escrito */
  mix-blend-mode: difference !important;

  /* opcional */
  unicode-bidi: isolate;
}

/* efecto hover sobre links/botones */
#custom-cursor .cursor-inner.link-hover {
  transform: translate(-50%, -50%) scale(2);
}

/* Color del cursor por tema (si usas mix-blend-mode:difference, puede ir fijo también) */
body.light-mode { --cursor-color: #000000; }
body.dark-mode  { --cursor-color: #ffffff; }

/* En móvil/tablet: cursor custom OFF */
@media (hover: none), (pointer: coarse) {
  #custom-cursor { display: none; }
  body { cursor: auto; }
}

/* ======== RESPONSIVE DESIGN ======== */

/* TABLET (<= 992px) */
@media (max-width: 992px) {
  h1, h2, h3 {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
  }

  .zoom-container {
    display: block;
    margin: 0 auto;
  }

  .main-footer {
    padding: 2.5rem 1.5rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    align-items: center;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

/* MÓVIL (<= 768px) */
@media (max-width: 768px) {
  h1, h2 {
    font-size: clamp(1.3rem, 5vw, 1.8rem);
  }

  p, a, li, span {
    font-size: clamp(0.85rem, 2.5vw, 1rem);
  }

  .zoom-container {
    border-radius: 6px;
  }

  .zoom-image {
    transform: scale(1);
    cursor: default;
  }

  .breadcrumb {
    font-size: 0.9rem;
    text-align: center;
  }

  .main-footer {
    padding: 2rem 1rem;
  }

  .footer-info {
    font-size: 0.85rem;
    line-height: 1.5;
  }
}

/* EXTRA SMALL (<= 480px) */
@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  p, li, a {
    font-size: 0.85rem;
  }

  .theme-toggle {
    top: 0.8rem;
    right: 0.8rem;
  }

  .footer-logo-img {
    height: 32px;
  }

  .main-footer {
    padding: 1.5rem 1rem;
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
  }

  .breadcrumb a {
    font-size: 0.85rem;
  }
}
