/* Profloor Theme - Single Producto */

.producto-single {
  padding-bottom: 60px;
}

/* Breadcrumb */
.producto-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 20px 0;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.producto-breadcrumb a {
  color: var(--color-text-light);
  transition: color 0.2s ease;
}

.producto-breadcrumb a:hover {
  color: var(--color-primary);
}

.producto-breadcrumb-sep {
  color: var(--color-border);
}

.producto-breadcrumb-current {
  color: var(--color-primary);
  font-weight: 600;
}

/* Galería / Carrusel Hero */
.producto-gallery-section {
  margin-bottom: 48px;
  min-width: 0;
}

.producto-swiper {
  height: 500px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.producto-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.producto-gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}

.producto-gallery-nav .swiper-button-prev,
.producto-gallery-nav .swiper-button-next {
  position: static;
  width: 44px;
  height: 44px;
  margin: 0;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  background: var(--color-primary);
  box-shadow: 0 8px 20px rgba(14, 50, 100, 0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, background 0.25s ease;
}

.producto-gallery-nav .swiper-button-prev::after,
.producto-gallery-nav .swiper-button-next::after {
  display: none;
}

.producto-gallery-nav .swiper-button-prev svg,
.producto-gallery-nav .swiper-button-next svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.producto-gallery-nav .swiper-button-prev:hover,
.producto-gallery-nav .swiper-button-next:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 12px 26px rgba(14, 50, 100, 0.4);
  background: var(--color-secondary);
}

.producto-gallery-nav .swiper-button-prev:active,
.producto-gallery-nav .swiper-button-next:active {
  transform: translateY(-1px) scale(1.02);
}

.producto-gallery-nav .swiper-button-prev:focus-visible,
.producto-gallery-nav .swiper-button-next:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.producto-swiper .swiper-pagination-bullet-active {
  background: #fff;
}

/* Info principal */
.producto-wrapper {
  display: grid;
  gap: 40px;
  margin-bottom: 40px;
}

.producto-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.producto-term-pill {
  display: inline-block;
  background: rgba(14, 50, 100, 0.08);
  color: var(--color-primary);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
}

.producto-header h1 {
  color: var(--color-primary);
  margin-bottom: 16px;
}

.producto-excerpt {
  font-size: 1.15rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.producto-descripcion {
  line-height: 1.8;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.producto-cta {
  margin: 24px 0;
}

/* Secciones */
.producto-specs-section,
.producto-colores-section,
.producto-recursos-section,
.producto-relacionados-section {
  padding: 60px 0;
  border-top: 1px solid var(--color-border);
}

.section-container h2 {
  font-size: 32px;
  color: var(--color-primary);
  margin-bottom: 32px;
}

/* Acordeón de características */
.producto-specs-accordion {
  display: grid;
  gap: 12px;
}

.spec-item {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  overflow: hidden;
}

.spec-toggle {
  width: 100%;
  padding: 18px 22px;
  background: var(--color-bg-light);
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  transition: background 0.2s ease;
}

.spec-toggle:hover {
  background: rgba(14, 50, 100, 0.08);
}

.spec-toggle[aria-expanded="true"] {
  background: var(--color-primary);
  color: #fff;
}

.spec-label {
  font-weight: 700;
}

.spec-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
  line-height: 1;
}

.spec-toggle[aria-expanded="true"] .spec-icon {
  transform: rotate(45deg);
}

.spec-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.spec-toggle[aria-expanded="true"] + .spec-content {
  max-height: 600px;
}

.spec-content .spec-value {
  padding: 16px 22px;
  color: var(--color-text-light);
  margin: 0;
}

/* Colores */
.colores-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
}

.color-item {
  text-align: center;
  transition: transform 0.3s ease;
}

.color-item:hover {
  transform: translateY(-5px);
}

.color-image {
  width: 100%;
  padding-bottom: 100%;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--color-bg-light);
}

.color-image-trigger {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.color-image-trigger img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Modal de imagen completa */
.color-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.color-modal.is-open {
  display: flex;
}

.color-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11, 20, 34, 0.82);
}

.color-modal-content {
  position: relative;
  max-width: min(90vw, 900px);
  max-height: 90vh;
}

.color-modal-img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
}

.color-modal-close {
  position: absolute;
  top: -44px;
  right: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.color-modal-close svg {
  width: 18px;
  height: 18px;
}

.color-modal-close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.color-name {
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
}

.color-desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 4px 0 0 0;
}

/* Documentos y Recursos */
.producto-video-wrapper {
  position: relative;
  width: 100%;
  max-width: 900px;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  background: #000;
}

.producto-video-wrapper iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.producto-descargas {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.producto-descarga-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.producto-descarga-item:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.producto-descarga-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(14, 50, 100, 0.08);
  color: var(--color-primary);
  flex-shrink: 0;
}

.producto-descarga-icon svg {
  width: 22px;
  height: 22px;
}

.producto-descarga-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.producto-descarga-label {
  font-weight: 700;
  color: var(--color-text);
}

.producto-descarga-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.producto-descarga-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-primary);
  color: #fff;
  flex-shrink: 0;
}

.producto-descarga-cta svg {
  width: 16px;
  height: 16px;
}

.producto-enlaces-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.producto-enlace-item {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(14, 50, 100, 0.08);
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.producto-enlace-item:hover {
  background: rgba(14, 50, 100, 0.16);
}

.producto-recursos-empty {
  color: var(--color-text-light);
}

/* Productos relacionados */
.productos-relacionados-swiper {
  padding-bottom: 10px;
}

.producto-card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--color-bg);
}

.producto-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.producto-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.producto-card h3 {
  padding: 16px;
  font-size: 1.05rem;
  color: var(--color-text);
}

/* Responsive */
@media (min-width: 900px) {
  .producto-wrapper {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

@media (max-width: 768px) {
  .producto-swiper {
    height: 320px;
    border-radius: 20px;
  }

  .producto-header h1 {
    font-size: 1.8rem;
  }

  .section-container h2 {
    font-size: 1.6rem;
  }

  .colores-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .spec-toggle {
    padding: 14px 16px;
  }

  .producto-specs-section,
  .producto-colores-section,
  .producto-recursos-section,
  .producto-relacionados-section {
    padding: 40px 0;
  }

  .color-modal-close {
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.55);
    border-color: transparent;
  }
}

/* Grid de listado /producto/ (archive) */
.products-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.products-archive-grid .card {
  display: block;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: var(--color-bg);
}

.products-archive-grid .card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-sm);
}

.products-archive-grid .card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.products-archive-grid .card .card-body {
  padding: 16px;
}

@media (max-width: 768px) {
  .products-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .products-archive-grid .card img {
    height: 140px;
  }
}

/* Sección Videos (YouTube) */
.producto-videos-section {
  padding: 60px 0;
}

.producto-videos-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.producto-videos-header h2 {
  margin: 0;
  white-space: nowrap;
}

.producto-videos-line {
  flex: 1 1 auto;
  height: 1px;
  background: var(--color-border);
}

.producto-videos-nav {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

.producto-videos-prev,
.producto-videos-next {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-primary);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.producto-videos-prev:hover,
.producto-videos-next:hover {
  background: var(--color-primary);
  color: #fff;
}

.producto-videos-prev.swiper-button-disabled,
.producto-videos-next.swiper-button-disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.producto-videos-swiper {
  overflow: hidden;
}

.producto-videos-swiper .producto-video-wrapper {
  max-width: none;
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .producto-videos-header {
    gap: 16px;
  }

  .producto-videos-prev,
  .producto-videos-next {
    width: 36px;
    height: 36px;
  }
}
