/*
 * OSTENTA Catalog Experience v0.10.4
 * Solo presentación. No modifica datos de producto.
 */

.ostenta-catalog-active .site-content {
  overflow: visible;
}

.ostenta-catalog-shell {
  display: grid;
  grid-template-columns: minmax(220px, 270px) minmax(0, 1fr);
  gap: clamp(28px, 3.2vw, 52px);
  align-items: start;
  width: 100%;
  clear: both;
}

.ostenta-catalog-main {
  min-width: 0;
}

.ostenta-catalog-main::after {
  content: "";
  display: table;
  clear: both;
}

.ostenta-catalog-sidebar {
  /* v0.8.1 — desktop usa el scroll natural de la página.
   * Evitamos una segunda barra vertical dentro del catálogo. */
  position: static;
  top: auto;
  align-self: start;
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
  padding: 0 18px 24px 0;
  scrollbar-width: auto;
  background: #fff;
  z-index: 6;
}

.ostenta-filter-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid #e8e3dd;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 13px;
}

.ostenta-filter-panel__head strong {
  font-weight: 650;
}

.ostenta-filter-close {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  color: #17130f;
  font-size: 29px;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
}

.ostenta-filter-form {
  margin: 0;
}

.ostenta-filter-scroll {
  min-width: 0;
}

.ostenta-filter-group {
  border-bottom: 1px solid #e8e3dd;
}

.ostenta-filter-group__title,
.ostenta-filter-group__future-title {
  width: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #17130f;
  font-size: 14px;
  font-weight: 560;
}

button.ostenta-filter-group__title {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.ostenta-filter-chevron {
  width: 8px;
  height: 8px;
  border-right: 1.4px solid currentColor;
  border-bottom: 1.4px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s ease;
  flex: 0 0 auto;
  opacity: .72;
}

.ostenta-filter-group:not(.ostenta-filter-group--open) .ostenta-filter-chevron {
  transform: rotate(-45deg);
}

.ostenta-filter-group__body {
  padding: 0 0 16px;
}

.ostenta-filter-group:not(.ostenta-filter-group--open) .ostenta-filter-group__body {
  display: none;
}

.ostenta-filter-group--future {
  opacity: .52;
}

.ostenta-filter-group--future .ostenta-filter-group__future-title {
  cursor: default;
}

.ostenta-filter-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 36px;
  margin: 0;
  cursor: pointer;
  color: #29241f;
  font-size: 13.5px;
}

.ostenta-filter-option input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 1px solid #a9a29b;
  border-radius: 2px;
  background: #fff;
  display: grid;
  place-content: center;
  cursor: pointer;
}

.ostenta-filter-option input[type="checkbox"]::before {
  content: "";
  width: 8px;
  height: 8px;
  transform: scale(0);
  transition: transform .12s ease-in-out;
  background: #17130f;
}

.ostenta-filter-option input[type="checkbox"]:checked {
  border-color: #17130f;
}

.ostenta-filter-option input[type="checkbox"]:checked::before {
  transform: scale(1);
}

.ostenta-filter-option__label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.ostenta-filter-option__count {
  color: #8b847d;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.ostenta-brand-search-wrap {
  position: relative;
  margin: 1px 0 10px;
}

.ostenta-brand-search {
  width: 100%;
  height: 38px;
  border: 1px solid #d7d1cb !important;
  border-radius: 2px !important;
  padding: 0 11px 0 34px !important;
  font-size: 13px !important;
  box-shadow: none !important;
  background: #fff !important;
}

.ostenta-brand-search:focus {
  border-color: #847b72 !important;
  outline: none;
}

.ostenta-brand-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 11px;
  height: 11px;
  border: 1.4px solid #7c756e;
  border-radius: 50%;
  transform: translateY(-58%);
  pointer-events: none;
}

.ostenta-brand-search-icon::after {
  content: "";
  position: absolute;
  width: 5px;
  height: 1.4px;
  background: #7c756e;
  right: -4px;
  bottom: -2px;
  transform: rotate(45deg);
  transform-origin: left center;
}

.ostenta-brand-option--extra {
  display: none;
}

.ostenta-brand-list.is-expanded .ostenta-brand-option--extra,
.ostenta-brand-list.is-searching .ostenta-brand-option--extra {
  display: grid;
}

.ostenta-brand-option.is-search-hidden {
  display: none !important;
}

.ostenta-brand-more {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 7px 0 1px;
  color: #17130f;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.ostenta-filter-empty {
  margin: 4px 0 0;
  font-size: 12px;
  color: #8b847d;
}

.ostenta-filter-panel__footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 0 4px;
}

.ostenta-filter-apply {
  width: 100%;
  min-height: 42px;
  appearance: none;
  border: 1px solid #17130f;
  border-radius: 2px;
  background: #17130f;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.ostenta-filter-clear {
  color: #5d5650;
  text-align: center;
  font-size: 12.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ostenta-active-filters {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 0 0 18px;
  padding: 0 0 14px;
  border-bottom: 1px solid #ebe6e0;
  clear: both;
}

.ostenta-active-filters__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.ostenta-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 31px;
  padding: 5px 10px;
  border: 1px solid #cec7c0;
  border-radius: 999px;
  background: #fff;
  color: #17130f !important;
  font-size: 12.5px;
  line-height: 1;
  text-decoration: none !important;
}

.ostenta-filter-chip:hover {
  border-color: #8c837b;
}

.ostenta-active-filters__clear {
  flex: 0 0 auto;
  color: #5d5650 !important;
  font-size: 12.5px;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.ostenta-price-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 2px 0 12px;
}

.ostenta-price-field {
  display: grid;
  gap: 5px;
  margin: 0;
  color: #6f675f;
  font-size: 11.5px;
}

.ostenta-price-input-wrap {
  position: relative;
  display: block;
}

.ostenta-price-currency {
  position: absolute;
  left: 9px;
  top: 50%;
  transform: translateY(-50%);
  color: #6f675f;
  font-size: 12px;
  pointer-events: none;
}

.ostenta-price-field input[type="number"] {
  width: 100%;
  height: 39px;
  margin: 0;
  padding: 0 8px 0 24px !important;
  border: 1px solid #d7d1cb !important;
  border-radius: 2px !important;
  background: #fff !important;
  color: #17130f !important;
  font-size: 12.5px !important;
  box-shadow: none !important;
}

.ostenta-price-field input[type="number"]:focus {
  border-color: #847b72 !important;
  outline: none;
}

.ostenta-price-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 11px;
}

.ostenta-price-preset {
  appearance: none;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid #d7d1cb;
  border-radius: 999px;
  background: #fff;
  color: #4d4640;
  font-size: 11.5px;
  line-height: 1.2;
  cursor: pointer;
}

.ostenta-price-preset:hover,
.ostenta-price-preset.is-active {
  border-color: #17130f;
  color: #17130f;
}

.ostenta-price-preset.is-active {
  background: #f4f0ea;
}

.ostenta-price-apply {
  width: 100%;
  min-height: 38px;
  appearance: none;
  border: 1px solid #17130f;
  border-radius: 2px;
  background: #fff;
  color: #17130f;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.ostenta-price-apply:hover {
  background: #17130f;
  color: #fff;
}

.ostenta-catalog-mobile-toolbar {
  display: none;
}

.ostenta-catalog-backdrop {
  display: none;
}

/* El loop sigue siendo el nativo de Woo/Astra; sólo evitamos que floats viejos rompan el grid externo. */
.ostenta-catalog-main .woocommerce-result-count,
.ostenta-catalog-main .woocommerce-ordering {
  margin-bottom: 22px;
}

.ostenta-catalog-main ul.products {
  clear: both;
}


/* En desktop los filtros se aplican al marcar. El botón queda como fallback sólo en móvil. */
@media (min-width: 922px) {
  .ostenta-filter-apply {
    display: none;
  }

  .ostenta-filter-panel__footer {
    padding-top: 10px;
  }
}

.ostenta-catalog-is-filtering .ostenta-catalog-main {
  opacity: .58;
  transition: opacity .12s ease;
}

.ostenta-filter-form.is-applying {
  pointer-events: none;
}

@media (max-width: 921px) {
  body.ostenta-filter-drawer-open {
    overflow: hidden;
  }

  .ostenta-catalog-mobile-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0 0 12px;
    border-bottom: 1px solid #e8e3dd;
  }

  .ostenta-filter-trigger {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid #cfc8c1;
    border-radius: 2px;
    background: #fff;
    color: #17130f;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
  }

  .ostenta-filter-trigger__icon {
    width: 15px;
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .ostenta-filter-trigger__icon span {
    display: block;
    height: 1px;
    background: currentColor;
  }

  .ostenta-filter-trigger__icon span:nth-child(2) {
    width: 11px;
  }

  .ostenta-filter-trigger__count {
    display: grid;
    place-items: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: #17130f;
    color: #fff;
    font-size: 10px;
  }

  .ostenta-mobile-results {
    color: #756d66;
    font-size: 12px;
  }

  .ostenta-catalog-shell {
    display: block;
  }

  .ostenta-catalog-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(88vw, 390px);
    height: 100dvh;
    max-height: 100dvh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateX(-102%);
    transition: transform .25s ease;
    box-shadow: 18px 0 38px rgba(0, 0, 0, .14);
    background: #fff;
    z-index: 99992;
  }

  body.admin-bar .ostenta-catalog-sidebar {
    top: 32px;
    height: calc(100dvh - 32px);
    max-height: calc(100dvh - 32px);
  }

  .ostenta-catalog-sidebar.is-open {
    transform: translateX(0);
  }

  .ostenta-catalog-sidebar .ostenta-filter-panel__head {
    position: relative;
    top: auto;
    flex: 0 0 auto;
    min-height: 58px;
    padding: 0 18px;
    background: #fff;
    z-index: 3;
  }

  .ostenta-filter-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .ostenta-filter-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .ostenta-filter-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 18px 18px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .ostenta-catalog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99991;
    background: rgba(18, 15, 13, .36);
  }

  body.admin-bar .ostenta-catalog-backdrop {
    top: 32px;
  }

  .ostenta-catalog-backdrop:not([hidden]) {
    display: block;
  }

  .ostenta-active-filters {
    align-items: flex-start;
  }

  .ostenta-active-filters__clear {
    padding-top: 7px;
  }

  .ostenta-filter-panel__footer {
    position: relative;
    flex: 0 0 auto;
    background: #fff;
    margin: 0;
    padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid #e8e3dd;
    box-shadow: 0 -8px 18px rgba(255, 255, 255, .96);
    z-index: 4;
  }
}


@media (max-width: 782px) {
  body.admin-bar .ostenta-catalog-sidebar {
    top: 46px;
    height: calc(100dvh - 46px);
    max-height: calc(100dvh - 46px);
  }

  body.admin-bar .ostenta-catalog-backdrop {
    top: 46px;
  }
}

@media (max-width: 544px) {
  .ostenta-active-filters {
    flex-direction: column;
  }

  .ostenta-active-filters__clear {
    align-self: flex-start;
  }
}

/* v0.7.0 — navegación AJAX progresiva */
.ostenta-catalog-ajax-region {
  position: relative;
}

body.ostenta-catalog-is-filtering {
  cursor: progress;
}

.ostenta-catalog-ajax-region.is-loading .ostenta-catalog-main {
  opacity: .46;
  transition: opacity .16s ease;
}

.ostenta-catalog-ajax-region.is-loading .ostenta-catalog-main::before {
  content: "";
  position: absolute;
  width: 26px;
  height: 26px;
  left: 50%;
  top: 96px;
  margin-left: -13px;
  border: 2px solid rgba(23, 19, 15, .18);
  border-top-color: #17130f;
  border-radius: 50%;
  animation: ostenta-catalog-spin .7s linear infinite;
  z-index: 8;
}

@keyframes ostenta-catalog-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .ostenta-catalog-ajax-region.is-loading .ostenta-catalog-main,
  .ostenta-catalog-sidebar {
    transition: none !important;
  }
  .ostenta-catalog-ajax-region.is-loading .ostenta-catalog-main::before {
    animation-duration: 1.4s;
  }
}

/* v0.8.0 — conteos facetados dinámicos */
.ostenta-filter-option.is-disabled {
  opacity: .42;
  cursor: not-allowed;
}

.ostenta-filter-option.is-disabled input {
  cursor: not-allowed;
}

.ostenta-filter-option.is-disabled .ostenta-filter-option__count {
  opacity: .8;
}


/* v0.8.1 — refinamiento UX del sidebar desktop.
 * El drawer móvil conserva su scroll interno dentro del media query <= 921px. */
@media (min-width: 922px) {
  .ostenta-filter-scroll {
    overflow: visible;
  }
}


/* v0.9.0 — primera pasada del rediseño de tarjetas.
 * Objetivo: conservar 4 productos por fila en desktop, pero darles más presencia.
 * No cambia markup ni datos; sólo distribución y escala visual. */
@media (min-width: 922px) {
  /* Astra limita bastante el ancho del archivo. Sólo ampliamos el área de contenido
   * del catálogo, sin tocar header/footer ni otras páginas. */
  .ostenta-catalog-active #content > .ast-container {
    width: calc(100% - 48px);
    max-width: 1420px;
    padding-left: 0;
    padding-right: 0;
  }

  /* Sidebar un poco más compacto para entregar más ancho real al producto. */
  .ostenta-catalog-shell {
    grid-template-columns: minmax(220px, 242px) minmax(0, 1fr);
    gap: clamp(30px, 2.6vw, 42px);
  }

  /* Cuatro columnas reales, independientemente de los anchos/float de Astra. */
  .ostenta-catalog-main ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    column-gap: clamp(16px, 1.55vw, 24px) !important;
    row-gap: clamp(34px, 3vw, 46px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ostenta-catalog-main ul.products li.product {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    float: none !important;
    clear: none !important;
  }

  /* Imagen protagonista, cuadrada y consistente. */
  .ostenta-catalog-main ul.products li.product a img,
  .ostenta-catalog-main ul.products li.product .astra-shop-thumbnail-wrap img {
    width: 100% !important;
    max-width: none !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 12px !important;
  }

  /* Un poco más de aire y jerarquía sin cambiar todavía la información de la tarjeta. */
  .ostenta-catalog-main ul.products li.product .ast-woo-product-category,
  .ostenta-catalog-main ul.products li.product .ast-woo-product-category a {
    font-size: 12.5px !important;
    line-height: 1.35;
  }

  .ostenta-catalog-main ul.products li.product .woocommerce-loop-product__title {
    font-size: 15px !important;
    line-height: 1.35 !important;
    margin-top: 3px !important;
    margin-bottom: 6px !important;
  }

  .ostenta-catalog-main ul.products li.product .price {
    font-size: 15px !important;
    line-height: 1.35 !important;
    margin-bottom: 12px !important;
  }

  .ostenta-catalog-main ul.products li.product .button,
  .ostenta-catalog-main ul.products li.product .added_to_cart {
    width: 100%;
    min-height: 43px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
}

/* Mantener el comportamiento ya validado en tablet/móvil: 3 y 2 columnas según Astra.
 * El rediseño profundo móvil se hará después de validar esta escala desktop. */


/* v0.9.1 — paginación legible.
 * Astra puede heredar el mismo color de texto que el fondo del elemento activo.
 * Fijamos contraste sólo dentro del catálogo OSTENTA. */
.ostenta-catalog-main nav.woocommerce-pagination ul.page-numbers li .page-numbers.current,
.ostenta-catalog-main .woocommerce-pagination .page-numbers.current {
  background: #111 !important;
  border-color: #111 !important;
  color: #fff !important;
}

.ostenta-catalog-main nav.woocommerce-pagination ul.page-numbers li a.page-numbers,
.ostenta-catalog-main .woocommerce-pagination a.page-numbers {
  color: #111 !important;
}

.ostenta-catalog-main nav.woocommerce-pagination ul.page-numbers li a.page-numbers:hover,
.ostenta-catalog-main .woocommerce-pagination a.page-numbers:hover {
  background: #f4f1eb !important;
  color: #111 !important;
}

/* v0.10.0 — tarjetas OSTENTA: jerarquía premium y altura uniforme.
 * Reglas clave: marca en lugar de género/categoría, metadatos útiles,
 * precio variable "Desde", Precio Club y botones siempre alineados. */
.ostenta-catalog-main ul.products li.product {
  position: relative;
  display: flex !important;
  flex-direction: column;
}

/* La categoría nativa de Astra (Hombre/Mujer/Unisex) deja de ocupar la cabecera. */
.ostenta-catalog-main ul.products li.product .ast-woo-product-category,
.ostenta-catalog-main ul.products li.product .ast-woo-product-category a,
.ostenta-catalog-main ul.products li.product .product-category {
  display: none !important;
}

/* Evita duplicar el precio nativo: OSTENTA renderiza su propio bloque controlado. */
.ostenta-catalog-main ul.products li.product .price:not(.ostenta-card-price) {
  display: none !important;
}

/* Astra agrupa la información textual dentro de este contenedor.
 * Una altura fija garantiza que TODAS las tarjetas terminen igual,
 * independientemente de títulos, metadatos o Precio Club. */
.ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
  display: flex !important;
  flex: 0 0 auto;
  flex-direction: column;
  height: 208px;
  min-height: 208px;
  max-height: 208px;
  overflow: hidden;
}

.ostenta-card-brand {
  height: 18px;
  min-height: 18px;
  margin: 0 0 4px;
  overflow: hidden;
  color: #716a63;
  font-size: 11px;
  font-weight: 650;
  line-height: 18px;
  letter-spacing: .095em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.ostenta-catalog-main ul.products li.product .woocommerce-loop-product__title {
  display: -webkit-box !important;
  height: 41px !important;
  min-height: 41px !important;
  max-height: 41px !important;
  margin: 0 0 5px !important;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  text-overflow: ellipsis;
}

.ostenta-card-meta {
  height: 19px;
  min-height: 19px;
  max-height: 19px;
  margin: 0 0 7px;
  overflow: hidden;
  color: #817970;
  font-size: 12px;
  line-height: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ostenta-card-price {
  display: flex !important;
  flex: 0 0 48px;
  flex-direction: column;
  justify-content: flex-start;
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  margin: 0 0 10px !important;
  overflow: hidden;
  line-height: 1.25 !important;
}

.ostenta-card-price__standard {
  min-height: 22px;
  color: #17130f;
  font-size: 15px;
  font-weight: 650;
  line-height: 22px;
  white-space: nowrap;
}

.ostenta-card-price__standard del {
  opacity: .52;
  font-weight: 450;
}

.ostenta-card-price__standard ins {
  text-decoration: none;
}

.ostenta-card-price__from {
  color: #665f58;
  font-size: 11.5px;
  font-weight: 500;
}

.ostenta-card-price__club {
  min-height: 20px;
  overflow: hidden;
  color: #9a762f;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ostenta-card-price__club > span:first-child {
  margin-right: 5px;
  font-size: 10.5px;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.ostenta-card-price__club--placeholder {
  visibility: hidden;
}

.ostenta-card-club-badge {
  position: absolute;
  top: 11px;
  right: 11px;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border: 1px solid rgba(156, 119, 48, .55);
  border-radius: 999px;
  background: rgba(255, 253, 248, .94);
  color: #8f6b28;
  box-shadow: 0 2px 8px rgba(20, 16, 10, .06);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .07em;
  line-height: 1;
  text-transform: uppercase;
  pointer-events: none;
}

/* Si algún producto trae estrellas del tema/plugins, no permitimos que rompan
 * la altura uniforme de la tarjeta en esta primera versión. */
.ostenta-catalog-main ul.products li.product .star-rating {
  display: none !important;
}

.ostenta-catalog-main ul.products li.product .button,
.ostenta-catalog-main ul.products li.product .added_to_cart {
  flex: 0 0 43px;
  min-height: 43px !important;
  max-height: 43px;
  margin-top: auto !important;
  overflow: hidden;
}

/* Hover sobrio: la foto gana un poco de presencia sin convertir la tarjeta
 * en un bloque con sombras o movimientos fuertes. */
@media (hover: hover) and (pointer: fine) {
  .ostenta-catalog-main ul.products li.product .astra-shop-thumbnail-wrap {
    overflow: hidden;
  }

  .ostenta-catalog-main ul.products li.product .astra-shop-thumbnail-wrap img,
  .ostenta-catalog-main ul.products li.product > a img {
    transition: transform .24s ease;
  }

  .ostenta-catalog-main ul.products li.product:hover .astra-shop-thumbnail-wrap img,
  .ostenta-catalog-main ul.products li.product:hover > a img {
    transform: scale(1.018);
  }
}

/* En pantallas angostas mantenemos la misma regla de igualdad de altura,
 * con una zona textual algo mayor para títulos de dos líneas. */
@media (max-width: 921px) {
  .ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
    height: 204px;
    min-height: 204px;
    max-height: 204px;
  }

  .ostenta-card-brand {
    font-size: 10px;
  }

  .ostenta-card-meta {
    font-size: 11px;
  }

  .ostenta-card-price__standard {
    font-size: 14px;
  }
}

/* v0.10.1 — refinamiento de jerarquía y compactación de tarjeta.
 * 1) Elimina el botón/icono flotante moderno de Astra sobre la fotografía.
 * 2) Fuerza el orden visual Marca → Nombre → Meta → Precio.
 * 3) Reduce la zona textual reservada para acercar el botón dorado sin perder
 *    la regla de altura uniforme entre tarjetas. */
.ostenta-catalog-main ul.products li.product .ast-on-card-button.ast-select-options-trigger {
  display: none !important;
}

.ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
  height: 156px;
  min-height: 156px;
  max-height: 156px;
}

.ostenta-card-brand {
  order: 1;
}

.ostenta-catalog-main ul.products li.product .woocommerce-loop-product__title {
  order: 2;
}

.ostenta-card-meta {
  order: 3;
}

.ostenta-card-price {
  order: 4;
  margin-bottom: 4px !important;
}

/* El CTA continúa alineado en todas las tarjetas, pero ya no queda separado
 * por un bloque de aire innecesario. */
.ostenta-catalog-main ul.products li.product .button,
.ostenta-catalog-main ul.products li.product .added_to_cart {
  margin-top: 8px !important;
}

@media (max-width: 921px) {
  .ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
    height: 160px;
    min-height: 160px;
    max-height: 160px;
  }
}


/* v0.10.2 — orden REAL dentro del summary de Astra.
 * v0.10.1 intentaba ordenar nodos provenientes de hooks WooCommerce, pero
 * Astra construye su tarjeta desde astra_woo_woocommerce_shop_product_content().
 * Ahora PHP inserta Marca antes del título y Meta después del título usando
 * hooks Astra, y esta capa sólo fija proporciones/altura. */
.ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
  height: 186px;
  min-height: 186px;
  max-height: 186px;
  overflow: hidden;
}

/* El orden lo determina el DOM de Astra; neutralizamos los order heredados
 * de v0.10.1 para no mover la marca o el precio alrededor del enlace del título. */
.ostenta-card-brand,
.ostenta-catalog-main ul.products li.product .ast-loop-product__link,
.ostenta-catalog-main ul.products li.product .woocommerce-loop-product__title,
.ostenta-card-meta,
.ostenta-card-price,
.ostenta-catalog-main ul.products li.product .button,
.ostenta-catalog-main ul.products li.product .added_to_cart {
  order: initial !important;
}

.ostenta-card-brand {
  height: 17px;
  min-height: 17px;
  max-height: 17px;
  margin-bottom: 3px;
  line-height: 17px;
}

/* Astra envuelve el título en .ast-loop-product__link. Reservamos dos líneas
 * dentro de ese bloque para que los cards sigan teniendo idéntica altura. */
.ostenta-catalog-main ul.products li.product .ast-loop-product__link {
  display: block;
  flex: 0 0 40px;
  height: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0 0 4px;
  overflow: hidden;
}

.ostenta-catalog-main ul.products li.product .woocommerce-loop-product__title {
  height: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  margin: 0 !important;
}

.ostenta-card-meta {
  height: 18px;
  min-height: 18px;
  max-height: 18px;
  margin: 0 0 5px;
  line-height: 18px;
}

.ostenta-card-price {
  flex: 0 0 44px;
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  margin: 0 0 4px !important;
}

.ostenta-catalog-main ul.products li.product .button,
.ostenta-catalog-main ul.products li.product .added_to_cart {
  flex: 0 0 43px;
  min-height: 43px !important;
  max-height: 43px;
  margin-top: 8px !important;
}

@media (max-width: 921px) {
  .ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
    height: 186px;
    min-height: 186px;
    max-height: 186px;
  }
}

/* v0.10.3 — corrección del recorte vertical del CTA.
 * Astra añade métricas propias al botón y el wrapper de 186px quedaba demasiado
 * justo. Reservamos unos píxeles reales adicionales y fijamos el botón con
 * box-sizing + flex centrado para que nunca se corte, manteniendo todas las
 * tarjetas exactamente de la misma altura. */
.ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
  height: 198px;
  min-height: 198px;
  max-height: 198px;
}

.ostenta-catalog-main ul.products li.product .button,
.ostenta-catalog-main ul.products li.product .added_to_cart {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  padding: 0 16px !important;
  line-height: 1.2 !important;
  overflow: visible !important;
}

@media (max-width: 921px) {
  .ostenta-catalog-main ul.products li.product .astra-shop-summary-wrap {
    height: 198px;
    min-height: 198px;
    max-height: 198px;
  }
}
