/* ============================================================
   Caballero Tech — Estilos personalizados
   Complementa Bootstrap 5; no duplica sus utilidades
   ============================================================ */

/* ── Variables ── */
:root {
  --color-primary:  #0a192f;
  --color-accent:   #e94560;
  --color-light-bg: #f8f9fa;
  --radius:         10px;
  --transition:     .2s ease;
}

/* ── Global ── */
body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  color: #212529;
}

/* ══════════════════════════════════════════════
   HERO SWIPER CAROUSEL
   ══════════════════════════════════════════════ */

/* Contenedor principal */
.hero-swiper {
  width: 100%;
  height: clamp(480px, 68vh, 680px);
  overflow: hidden;
}

/* Cada slide */
.hero-slide {
  position: relative;
  background: linear-gradient(135deg, var(--slide-from, #0d0221) 0%, var(--slide-to, #1a0545) 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Capa de fondo con textura sutil (parallax) */
.hero-slide__bg {
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(255,255,255,.03) 0%, transparent 70%),
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 40px,
      rgba(255,255,255,.015) 40px,
      rgba(255,255,255,.015) 41px
    );
  pointer-events: none;
}

/* Orbe de luz de color de acento */
.hero-slide__glow {
  position: absolute;
  right: 8%;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 40vw, 560px);
  height: clamp(280px, 40vw, 560px);
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow, #7c3aed) 0%, transparent 65%);
  opacity: .18;
  pointer-events: none;
  filter: blur(2px);
}

/* Contenido textual */
.hero-slide__content {
  position: relative;
  z-index: 2;
  color: #fff;
  max-width: 640px;
  padding-left: clamp(1.25rem, 6vw, 6rem);
  padding-right: clamp(1.25rem, 6vw, 6rem);
}

/* Posición horizontal del bloque de texto dentro del hero */
.hero-slide__content--left   { margin-left: 0;    margin-right: auto; text-align: left;   }
.hero-slide__content--center { margin-left: auto; margin-right: auto; text-align: center; }
.hero-slide__content--right  { margin-left: auto; margin-right: 0;    text-align: right;  }

/* El subtítulo tiene su propio max-width — debe moverse junto con el bloque */
.hero-slide__content--center .hero-slide__sub { margin-left: auto;  margin-right: auto; }
.hero-slide__content--right  .hero-slide__sub { margin-left: auto;  margin-right: 0;    }

/* Etiqueta de categoría */
.hero-slide__tag {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.9);
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .35rem .9rem;
  border-radius: 100px;
}

/* Título principal */
.hero-slide__title {
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
  color: #fff;
}
.hero-slide__title span:not([style]) {
  background: linear-gradient(90deg, #fff 0%, rgba(255,255,255,.6) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Subtítulo */
.hero-slide__sub {
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  color: rgba(255,255,255,.7);
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 560px;
}

/* Botón CTA */
.hero-slide__btn {
  display: inline-flex;
  align-items: center;
  background: #fff;
  color: #111;
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1.75rem;
  border-radius: 100px;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.hero-slide__btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
  background: #f0f0f0;
  color: #000;
}

/* Ícono decorativo grande (fondo) */
.hero-slide__deco {
  position: absolute;
  right: clamp(5%, 10vw, 14%);
  top: 50%;
  transform: translateY(-50%);
  font-size: clamp(120px, 22vw, 260px);
  color: rgba(255,255,255,.04);
  pointer-events: none;
  line-height: 1;
  z-index: 1;
  user-select: none;
}

/* ── Controles de navegación ── */
.hero-swiper__prev,
.hero-swiper__next {
  width: 48px !important;
  height: 48px !important;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 50%;
  color: #fff !important;
  transition: background .2s;
}
.hero-swiper__prev:hover,
.hero-swiper__next:hover {
  background: rgba(255,255,255,.25);
}
.hero-swiper__prev::after,
.hero-swiper__next::after {
  font-size: 1rem !important;
  font-weight: 700;
}

/* ── Paginación bullets ── */
.hero-swiper__pagination {
  bottom: 24px !important;
}
.hero-swiper__pagination .swiper-pagination-bullet {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255,255,255,.35);
  opacity: 1;
  transition: width .3s ease, background .3s ease;
}
.hero-swiper__pagination .swiper-pagination-bullet-active {
  width: 48px;
  background: #fff;
}

/* ── Barra de progreso de autoplay ── */
.hero-swiper__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(255,255,255,.12);
  z-index: 10;
}
.hero-swiper__progress-bar {
  height: 100%;
  width: 0%;
  background: rgba(255,255,255,.7);
  transition: width .1s linear;
}

/* ── Responsive ── */
@media (max-width: 576px) {
  .hero-swiper { height: clamp(420px, 72vh, 520px); }
  .hero-slide__deco { display: none; }
  .hero-swiper__prev,
  .hero-swiper__next { display: none !important; }
}

/* ── Tarjetas de producto ── */
.pcard {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 14px;
  overflow: hidden;
  transition: transform .28s ease, box-shadow .28s ease;
}
.pcard:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 36px rgba(10,25,47,.13);
}

.pcard-img-wrap {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f5f5f5;
}
.pcard-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.pcard:hover .pcard-img {
  transform: scale(1.07);
}

.pcard-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pcbadge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: .67rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pcbadge-star     { background: rgba(255,248,220,.92); color: #b8860b; }
.pcbadge-sale     { background: rgba(233,69,96,.90);   color: #fff; }
.pcbadge-variants { background: rgba(10,25,47,.80);    color: #fff; }

.pcard-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.pcard-cat {
  font-size: .67rem;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: #aaa;
  margin-bottom: 5px;
}
.pcard-name {
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-name a {
  color: #111;
  text-decoration: none;
  transition: color .15s;
}
.pcard-name a:hover { color: var(--color-primary); }

.pcard-desc {
  font-size: .77rem;
  color: #888;
  line-height: 1.45;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pcard-footer { margin-top: auto; }

.pcard-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 11px;
}
.pcard-price-from  { font-size: .72rem; color: #999; text-transform: uppercase; letter-spacing: .05em; }
.pcard-price-main  { font-size: 1.08rem; font-weight: 800; color: #111; }
.pcard-price-sale  { font-size: 1.08rem; font-weight: 800; color: var(--color-accent); }
.pcard-price-old   { font-size: .8rem;   color: #bbb; text-decoration: line-through; }

.pcard-stock {
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pcard-stock--ok  { color: #2e7d32; }
.pcard-stock--low { color: #e65100; }
.pcard-stock--out { color: #bbb; }

.pcard-btn {
  display: block;
  width: 100%;
  padding: 9px 12px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background .2s ease, opacity .2s;
}
.pcard-btn:hover { background: #1b5e20; }
.pcard-btn--disabled {
  background: #e8e8e8;
  color: #aaa;
  cursor: default;
}
.pcard-btn--disabled:hover { background: #e8e8e8; }

/* ── Tarjetas de categoría ── */
.category-card .card {
  transition: transform var(--transition), border-color var(--transition);
  border: 2px solid transparent !important;
}
.category-card .card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary) !important;
}

/* ── Navbar ── */
.navbar-brand {
  letter-spacing: -.5px;
}

/* ── Botón primario oscuro ── */
.btn-dark:hover {
  background-color: #343a40;
}

/* ── Tabla de specs ── */
.table th {
  font-weight: 400;
  width: 180px;
}

/* ── Admin sidebar ── */
@media (max-width: 768px) {
  .admin-sidebar {
    width: 100% !important;
    min-height: auto !important;
    flex-direction: row !important;
  }
}

/* ── Paginación ── */
.page-item.active .page-link {
  background-color: var(--color-primary);
  border-color:     var(--color-primary);
}
.page-link {
  color: var(--color-primary);
}

/* ── Flash messages ── */
.alert {
  border-radius: 0;
  border-left: 4px solid currentColor;
}

/* ── Formularios ── */
.form-control:focus,
.form-select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 .2rem rgba(26,26,46,.15);
}

/* ── Badges de oferta ── */
.badge.bg-danger  { font-size: .7rem; }
.badge.bg-warning { font-size: .7rem; }

/* ══════════════════════════════════════════════
   AUTH — Login + Registro (mecanismo CodePen YzyaRPN)
   Switch panel deslizante con is-txr / is-txl / is-gx
   ══════════════════════════════════════════════ */

.auth-wrapper {
  min-height: calc(100vh - 72px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-light-bg);
  overflow: hidden;
  padding: 2rem 0;
}

/* Tarjeta principal — dimensiones fijas como en el CodePen */
.auth-main {
  position: relative;
  width: 1000px;
  min-width: 1000px;
  height: 600px;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0,0,0,.15);
}

/* Sin transición en la carga inicial (previene animación de página) */
.auth-main.no-transition,
.auth-main.no-transition * {
  transition: none !important;
  animation: none !important;
}

/* ── Contenedores de formulario ── */
/* Ambos posicionados en el lado derecho (superposición); el z-index decide cuál se ve */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: absolute;
  top: 0;
  width: 600px;
  height: 100%;
  padding: 2.25rem 3.25rem;
  background: #fff;
  transition: 1.25s;
}

/* a-container = LOGIN — visible por defecto (z-index alto) */
.a-container {
  z-index: 100;
  left: calc(100% - 600px);
}

/* b-container = REGISTRO — oculto por defecto (z-index bajo) */
.b-container {
  left: calc(100% - 600px);
  z-index: 0;
}

/* ── Panel switch (toggle deslizante) ── */
.auth-switch {
  display: flex;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 400px;
  padding: 3rem;
  z-index: 200;
  transition: 1.25s;
  background: var(--color-primary);
  overflow: hidden;
}

/* Círculos decorativos dentro del switch */
.switch__circle {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  bottom: -60%;
  left: -60%;
  transition: 1.25s;
}
.switch__circle--t {
  top: -30%;
  left: 60%;
  width: 300px;
  height: 300px;
}

/* Contenedores de texto dentro del switch */
.switch__container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  position: absolute;
  width: 400px;
  padding: 3rem 3.5rem;
  text-align: center;
  color: #fff;
  transition: 1.25s;
}

.switch__title {
  font-size: 1.9rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .6rem;
}

.switch__description {
  font-size: .8125rem;
  line-height: 1.65;
  opacity: .78;
  margin-bottom: 0;
}

.switch__button {
  width: 175px;
  height: 46px;
  border-radius: 100px;
  border: 2px solid rgba(255,255,255,.65);
  background: transparent;
  color: #fff;
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 2rem;
  transition: background .25s, border-color .25s, transform .25s;
}
.switch__button:hover {
  background: rgba(255,255,255,.15);
  border-color: #fff;
  transform: scale(.985);
}
.switch__button:active {
  transform: scale(.97);
}

/* ── Ícono decorativo del switch ── */
.switch__icon {
  font-size: 2.25rem;
  opacity: .6;
  margin-bottom: 1rem;
}

/* ── Clases de estado (mismas que el CodePen) ── */
.is-txr {
  left: calc(100% - 400px); /* switch: mueve al lado derecho */
  transition: 1.25s;
}
.is-txl {
  left: 0; /* containers: mueve al lado izquierdo */
  transition: 1.25s;
}
.is-z200 {
  z-index: 200;
  transition: 1.25s;
}
.is-hidden {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  transition: 1.25s;
}
.is-gx {
  animation: is-gx 1.25s;
}
@keyframes is-gx {
  0%, 10%, 100% { width: 400px; }
  30%, 50%      { width: 500px; }
}

/* ── Estilos de formulario ── */
.auth-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.auth-form-title {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--color-primary);
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 0;
}
.auth-form-title::after {
  content: '';
  display: block;
  width: 36px;
  height: 3px;
  background: var(--color-accent);
  border-radius: 2px;
  margin: .4rem auto .6rem;
}

.auth-form-subtitle {
  font-size: .8rem;
  color: #6c757d;
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-input {
  width: 340px;
  height: 42px;
  margin: 4px 0;
  padding: 0 18px;
  font-size: .875rem;
  border: 1.5px solid #e9ecef;
  border-radius: 8px;
  outline: none;
  background: #f8f9fa;
  transition: border-color .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.auth-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,26,46,.08);
  background: #fff;
}

.auth-input-row {
  display: flex;
  gap: 8px;
}
.auth-input-row .auth-input {
  width: calc(50% - 4px);
}

.auth-terms {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 340px;
  margin: 6px 0;
  font-size: .775rem;
  color: #6c757d;
  line-height: 1.4;
}
.auth-terms input[type="checkbox"] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.auth-terms a { color: var(--color-primary); }

.auth-submit {
  width: 175px;
  height: 46px;
  border-radius: 100px;
  border: none;
  background: var(--color-primary);
  color: #fff;
  font-weight: 700;
  font-size: .8125rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: 1.5rem;
  transition: background .2s, transform .2s, box-shadow .2s;
  font-family: inherit;
}
.auth-submit:hover {
  background: #060f1e;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(10,25,47,.45);
}

/* ── Responsive: escalar en pantallas medianas ── */
@media (max-width: 1100px) { .auth-main { transform: scale(.9);  margin: -30px auto; } }
@media (max-width: 940px)  { .auth-main { transform: scale(.76); margin: -72px auto; } }
@media (max-width: 780px)  { .auth-main { transform: scale(.63); margin: -111px auto; } }

/* ── Mobile: layout apilado ── */
@media (max-width: 620px) {
  .auth-wrapper { padding: 0; align-items: flex-start; overflow-y: auto; }
  .auth-main {
    width: 100%; min-width: 0; height: auto;
    transform: none; margin: 0;
    border-radius: 0; box-shadow: none;
  }
  .auth-switch {
    position: static; width: 100%; height: auto;
    min-height: 130px; padding: 1.75rem 1.5rem;
    border-radius: 0;
  }
  .auth-switch.is-txr { left: auto; }
  .switch__circle    { display: none; }
  .switch__container {
    position: static; width: 100%; padding: 0;
  }
  .switch__container.is-hidden { display: none; visibility: visible; opacity: 1; position: static; }
  .auth-container {
    position: static; width: 100%; height: auto;
    left: auto !important; z-index: auto !important;
    padding: 1.75rem 1.25rem;
  }
  .auth-input, .auth-terms { width: 100%; }
  .auth-input-row .auth-input { width: calc(50% - 4px); }
  /* Mostrar solo el container activo en mobile */
  .auth-main:not(.auth-mob-reg) .b-container { display: none; }
  .auth-main.auth-mob-reg      .a-container  { display: none; }
}


/* ══════════════════════════════════════════════
   PÁGINA DE DETALLE DE PRODUCTO
   ══════════════════════════════════════════════ */

/* Galería */
.pd-gallery { display: flex; flex-direction: column; gap: 12px; }

.pd-img-main {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #f5f5f5;
  border-radius: 16px;
  overflow: hidden;
}
.pd-img-main img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: opacity .2s;
}
.pd-badge {
  position: absolute;
  top: 14px; left: 14px;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.pd-badge-star { background: rgba(255,248,220,.95); color: #b8860b; }
.pd-badge-sale { background: var(--color-accent);   color: #fff; }

.pd-thumbs-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pd-thumbs-viewport {
  flex: 1;
  overflow: hidden;
}
.pd-thumbs-track {
  display: flex;
  gap: 8px;
  transition: transform .3s ease;
  will-change: transform;
}
.pd-thumb { flex-shrink: 0; }
.pd-thumb-arrow {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 1.5px solid #e0e0e0;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #555;
  padding: 0;
  transition: border-color .2s, color .2s;
}
.pd-thumb-arrow:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pd-thumb-arrow[hidden] { display: none; }
.pd-thumb {
  width: 68px; height: 68px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
  padding: 0;
  cursor: pointer;
  transition: border-color .2s;
}
.pd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pd-thumb.active,
.pd-thumb:hover { border-color: var(--color-primary); }

/* Info panel */
.pd-info { position: sticky; top: 80px; }

.pd-meta-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pd-brand {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-primary);
  background: #eef2f8;
  padding: 3px 8px;
  border-radius: 4px;
}
.pd-cat-link {
  font-size: .78rem;
  color: #999;
  text-decoration: none;
}
.pd-cat-link:hover { color: var(--color-primary); }

.pd-name {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0d0d0d;
  margin-bottom: 10px;
}

.pd-short-desc {
  font-size: .88rem;
  color: #666;
  line-height: 1.55;
  margin-bottom: 18px;
}

/* Precio */
.pd-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 20px;
}
.pd-price-main { font-size: 1.75rem; font-weight: 800; color: #111; }
.pd-price-sale  { font-size: 1.75rem; font-weight: 800; color: var(--color-accent); }
.pd-price-old   { font-size: 1rem;    color: #bbb; text-decoration: line-through; }

/* Variantes */
.pd-variants { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }

.pd-attr-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #555;
  margin-bottom: 8px;
}
.pd-attr-selected { font-weight: 400; color: #111; text-transform: none; letter-spacing: 0; }

.pd-attr-options { display: flex; flex-wrap: wrap; gap: 8px; }

.pd-opt-btn {
  padding: 7px 16px;
  border: 1.5px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.pd-opt-btn:hover  { border-color: var(--color-primary); color: var(--color-primary); }
.pd-opt-btn.active {
  border-color: var(--color-primary);
  background: var(--color-primary);
  color: #fff;
}

/* Stock */
.pd-stock-wrap { margin-bottom: 20px; }
.pd-stock {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
}
.pd-stock-ok      { color: #2e7d32; }
.pd-stock-low     { color: #e65100; }
.pd-stock-out     { color: #c62828; }
.pd-stock-neutral { color: #999; }

/* Acciones */
.pd-form { margin-bottom: 24px; }
.pd-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.pd-qty-stepper {
  display: flex;
  align-items: center;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}
.pd-qty-btn {
  width: 38px; height: 44px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #555;
  cursor: pointer;
  transition: background .15s;
}
.pd-qty-btn:hover { background: #f0f0f0; }
.pd-qty-input {
  width: 50px;
  height: 44px;
  border: none;
  text-align: center;
  font-size: .95rem;
  font-weight: 700;
  color: #111;
  outline: none;
  -moz-appearance: textfield;
}
.pd-qty-input::-webkit-outer-spin-button,
.pd-qty-input::-webkit-inner-spin-button { -webkit-appearance: none; }

.pd-btn-cart {
  flex: 1;
  min-width: 180px;
  padding: 12px 24px;
  background: #2e7d32;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.pd-btn-cart:hover:not(:disabled) { background: #1b5e20; }
.pd-btn-cart:disabled {
  background: #e0e0e0;
  color: #aaa;
  cursor: default;
}

/* Meta list */
.pd-meta-list {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  font-size: .78rem;
  border-top: 1px solid #f0f0f0;
  padding-top: 16px;
  margin-top: 4px;
}
.pd-meta-list dt { color: #aaa; font-weight: 500; }
.pd-meta-list dd { color: #333; margin: 0; }

/* Tabs */
.pd-tabs-section { border-top: 1px solid #ececec; padding-top: 40px; }

.pd-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid #ececec;
  margin-bottom: 28px;
  padding-bottom: 0;
}
.pd-tab {
  padding: 10px 22px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: .88rem;
  font-weight: 600;
  color: #999;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.pd-tab:hover  { color: #333; }
.pd-tab.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.pd-cover { position: relative; width: 100%; }

.pd-description {
  font-size: .93rem;
  line-height: 1.7;
  color: #444;
}
.pd-description img   { max-width: 100%; height: auto; border-radius: 8px; }
.pd-description h2,
.pd-description h3    { font-weight: 700; margin-top: 1.5em; }
.pd-description table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-bottom: 1rem;
  border: none !important;
}
.pd-description th {
  padding: 9px 14px;
  text-align: left;
  font-weight: 600;
  background: #0a192f;
  color: #fff;
  white-space: nowrap;
  border: none !important;
}
.pd-description td {
  padding: 8px 14px;
  vertical-align: top;
  border: none !important;
}
.pd-description table,
.pd-description th,
.pd-description td,
.pd-description tr    { border: none !important; outline: none !important; }

.pd-specs-table { width: 100%; max-width: 600px; border-collapse: collapse; }
.pd-specs-table th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
  color: #888;
  width: 40%;
  border-bottom: 1px solid #ececec;
}
.pd-specs-table td {
  padding: 10px 16px;
  font-weight: 600;
  color: #222;
  border-bottom: 1px solid #ececec;
}

/* Versión móvil de tablas (generada por JS): oculta por defecto */
.pd-table-mobile-view { display: none; }
.pd-row-mobile        { margin-bottom: .5rem; }
.pd-col-mobile        { margin-bottom: 1.5rem; }
.pd-cell-mobile       { padding: 8px 14px; }

@media (max-width: 767px) {
  /* Tablas de descripción: mostrar divs, ocultar tabla original */
  .pd-table-desktop-view { display: none !important; }
  .pd-table-mobile-view  { display: block; }
  .pd-col-mobile              { display: block; }
  .pd-col-mobile .pd-cell-mobile { text-align: center; }

  /* Galería */
  .pd-img-main { border-radius: 10px; }
  .pd-thumb { width: 58px; height: 58px; }

  /* Info */
  .pd-info { position: static; }
  .pd-name { font-size: 1.25rem; }

  /* Precio */
  .pd-price-main,
  .pd-price-sale { font-size: 1.45rem; }

  /* Variantes */
  .pd-opt-btn { padding: 6px 13px; font-size: .8rem; }

  /* Acciones: stepper arriba full-width, botón abajo full-width */
  .pd-actions { flex-direction: column; gap: 8px; }
  .pd-qty-stepper { width: 100%; justify-content: center; }
  .pd-qty-input   { flex: 1; }
  .pd-btn-cart    { min-width: 0; width: 100%; padding: 13px; }

  /* Meta list */
  .pd-meta-list { grid-template-columns: auto 1fr; }

  /* Tabs */
  .pd-tabs { gap: 0; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .pd-tabs::-webkit-scrollbar { display: none; }
  .pd-tab { white-space: nowrap; padding: 10px 16px; font-size: .82rem; }

  /* Portada: imagen de producto anclada a la derecha en móvil */
  .pd-cover-product {
    left: auto !important;
    right: 0 !important;
    transform: translateY(-50%) !important;
    width: 65vw !important;
    max-width: 65vw !important;
    height: auto !important;
  }

  /* Specs */
  .pd-specs-table { max-width: 100%; font-size: .82rem; }

  /* Tablas convertidas a Bootstrap grid: cada col ocupa ancho completo en móvil */
  .pd-description .bs-table-grid .col-12 { padding: 0; }

  /* Solo tablas de 3 columnas: apilar celdas una sobre otra */
  .pd-row-mobile:has(> .pd-cell-mobile:nth-child(3):last-child) > .pd-cell-mobile {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

}


/* ══════════════════════════════════════════════
   SVG MARKER / SUBRAYADO ANIMADO
   Uso en descripciones TinyMCE:
   <span class="animated-marker" style="--marker-color:#00e3ff">
     Texto <svg class="svg-marker svg-marker--style1" ...>...</svg>
   </span>
   ══════════════════════════════════════════════ */

.animated-marker {
  position: relative;
  display: inline;
  --marker-color: currentColor;
  z-index: 0;
}

.svg-marker {
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 14px;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}

.svg-marker path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: none;
}

.animated-marker.is-visible .svg-marker path {
  animation: draw-svg-marker .65s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes draw-svg-marker {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* ── Botón comparar ───────────────────────────────────────────────────── */
.btn-compare {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 6px; border: 1.5px solid #ddd;
  background: #fff; color: #555; font-size: .75rem; font-weight: 600;
  cursor: pointer; transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.btn-compare:hover { border-color: #0a192f; color: #0a192f; }
.btn-compare--active { border-color: #0a192f; background: #0a192f; color: #fff; }
.btn-compare--active:hover { border-color: #dc3545; background: #dc3545; color: #fff; }
