/* ==========================================================================
   Tienda (shop) — woocommerce/archive-product.php
   Enqueued on is_shop() and is_product_taxonomy() from functions.php.

   Only what the markup needs to work: the dropdown panels have to open and
   close, and the pills need a visible state. The look is yours to define.
   ========================================================================== */

/* --- Category pills --- */

#hero {
  display: flex;
  justify-content: center;
  align-items: center;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

#hero .hero-slide {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 3/4;
  padding: 2rem;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  overflow: hidden;
  color: #fff;
}

/* Fondo de video del slide */
#hero .hero-slide__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

#hero .hero-content {
  position: relative;
  z-index: 1;
  max-width: 900px;
  /* text-shadow: 0 1px 2px rgba(0,0,0,.6),0 0 2px rgba(0,0,0,.3); */
}

#hero .hero-title {
  font-size: 34px;
  font-weight: bold;
}

#hero .hero-subtitle {
  font-size: 20px;
}

#hero #hero-carousel .owl-dots {
  position: absolute;
  bottom: 1.5rem;
  width: 100%;
}

#categorias .categories-list {
  flex-wrap: wrap;
}

.category-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 1;
  min-width: 96px;
  width: 160px;
  padding: 16px;
  border: 1px solid #0000;
  border-radius: 1rem;
  background-color: #fff;
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.category-pill:hover,
.category-pill:focus-visible {
  border-color: var(--accent-color);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.category-pill.is-active {
  border-color: var(--accent-color);
}

.category-pill__icon {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.category-pill__name {
  font-size: 20px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
}

.category-pill.is-active .category-pill__name {
  color: var(--accent-color);
}

/* --- Toolbar --- */

#tienda .shop-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-bottom: 2rem;
}

#tienda .shop-toolbar__group {
  display: flex;
  align-items: center;
  gap: 24px;
}

#tienda .shop-count {
  font-size: 14px;
  white-space: nowrap;
}

.shop-dropdown {
  position: relative;
}

.shop-dropdown__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text-color);
  font-family: inherit;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.shop-dropdown__toggle i {
  font-size: 12px;
  transition: transform 0.2s ease;
}

.shop-dropdown.is-open .shop-dropdown__toggle i {
  transform: rotate(180deg);
}

.shop-dropdown__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  display: none;
  flex-direction: column;
  gap: 12px;
  min-width: 220px;
  padding: 16px;
  background-color: #fff;
  border: 1px solid var(--isabelline);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.shop-dropdown--right .shop-dropdown__panel {
  left: auto;
  right: 0;
}

.shop-dropdown.is-open .shop-dropdown__panel {
  display: flex;
}

.shop-dropdown__option {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  cursor: pointer;
}

.shop-dropdown__option input {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-color);
  cursor: pointer;
}

/* --- Listing --- */

#tienda .shop-loader {
  padding: 2rem 0;
  text-align: center;
}

#tienda #shop-ajax-container {
  transition: opacity 0.2s ease;
}

#tienda .shop-empty {
  margin-top: 2rem;
}

#preguntas-frecuentes .faqs {
  /* max-width: 90ch; */
  margin-inline: auto;
}

#preguntas-frecuentes .faqs details:not(:last-child) {
  border-bottom: solid 1px var(--eerie-black);
}

#preguntas-frecuentes .faqs details:open {
  padding-bottom: 24px;
}

#preguntas-frecuentes .faqs details summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-block: 12px;
  font-size: 20px;
  cursor: pointer;
}

#preguntas-frecuentes .faqs details:open summary {
  font-weight: bold;
}

#preguntas-frecuentes .faqs details summary i {
  font-size: 1rem;
  rotate: -180deg;
  transition: 0.3s ease-in-out;
}

#preguntas-frecuentes .faqs details:open summary i {
  rotate: 0deg;
}

#preguntas-frecuentes .faqs details .faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 1s ease;
  interpolate-size: allow-keywords;
}

#preguntas-frecuentes .faqs details:open .faq-content {
  /* Ajusta según tu contenido */
  max-height: 500px;
}

@media (max-width: 767px) {
  #tienda .shop-toolbar__group {
    width: 100%;
    gap: 16px;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  #hero .hero-slide {
    aspect-ratio: 4/3;
  }
}

@media (min-width: 992px) {
  #hero {
  }

  #hero .hero-slide {
    aspect-ratio: 21/9;
  }

  #hero .hero-title {
    font-size: 40px;
  }

  #hero .hero-subtitle {
    font-size: 20px;
  }
}
