/* ===========================================================================
   Widget Elementor "Catálogo de productos Adercol" (maqueta 3).
   Todo se puede sobrescribir desde la pestaña "Estilo" del widget.
   =========================================================================== */
.adercol-cat { font-family: "Muli", sans-serif; }

/* ---------- Selector de marca ---------- */
.adercol-cat__brands { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 26px; }
.adercol-cat__brand { display: inline-flex; width: 196px; height: 86px; padding: 12px 20px; box-sizing: border-box; align-items: center; justify-content: center; border: 1px solid #dfe9e3; border-radius: 10px; background: #fff; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease, transform .2s ease; }
.adercol-cat__brand img { display: block; width: auto; max-width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.adercol-cat__brand-name { color: #005c39; font-size: 20px; font-weight: 800; }
.adercol-cat__brand:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 62, 39, .08); }
.adercol-cat__brand:focus-visible { outline: 2px solid #00a85b; outline-offset: 3px; }
.adercol-cat__brand[aria-pressed="true"] { border-color: #00a85b; background: #f1fbf3; box-shadow: 0 0 0 1px #00a85b; }
/* Con JS activo, la marca no seleccionada se ve más tenue. */
.adercol-cat--js .adercol-cat__brand[aria-pressed="false"] img { opacity: .75; filter: saturate(.85); }

/* ---------- Barra de filtros ---------- */
.adercol-cat__filters { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; margin-bottom: 24px; padding: 18px 22px; border-radius: 14px; background: #eaf7ec; }
.adercol-cat__filter { display: flex; flex: 1 1 240px; align-items: center; gap: 14px; }
.adercol-cat__filter + .adercol-cat__filter { padding-left: 28px; border-left: 1px solid rgba(0, 92, 57, .14); }
.adercol-cat__icon { display: inline-flex; flex: 0 0 auto; width: 44px; height: 44px; align-items: center; justify-content: center; border-radius: 50%; background: #fff; color: #0b3d2c; }
.adercol-cat__icon svg { width: 24px; height: 24px; }
.adercol-cat__field { display: flex; flex: 1; flex-direction: column; gap: 6px; min-width: 0; }
.adercol-cat__label { color: #0b3d2c; font-size: 13px; font-weight: 800; }
.adercol-cat__select { width: 100%; min-height: 40px; padding: 8px 36px 8px 12px; border: 1px solid #cfe3d6; border-radius: 8px; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%230b3d2c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; background-size: 16px; color: #1d3b31; font-size: 14px; appearance: none; -webkit-appearance: none; cursor: pointer; }
.adercol-cat__select:focus-visible { outline: 2px solid #00a85b; outline-offset: 1px; }
.adercol-cat__reset { display: inline-flex; margin-left: auto; padding: 10px 20px; align-items: center; gap: 8px; border: 1px solid #00874a; border-radius: 24px; background: #fff; color: #00874a; font-size: 14px; font-weight: 800; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.adercol-cat__reset svg { width: 18px; height: 18px; }
.adercol-cat__reset:hover { background: #00874a; color: #fff; }
.adercol-cat__reset:focus-visible { outline: 2px solid #00a85b; outline-offset: 2px; }

@media (max-width: 767px) {
  .adercol-cat__filters { padding: 16px; gap: 14px; }
  .adercol-cat__filter { flex-basis: 100%; }
  .adercol-cat__filter + .adercol-cat__filter { padding-left: 0; border-left: 0; }
  .adercol-cat__reset { width: 100%; margin-left: 0; justify-content: center; }
  .adercol-cat__brand { width: calc(50% - 4px); height: 72px; }
}

/* ---------- Cuadrícula de productos ---------- */
.adercol-cat__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
@media (max-width: 1024px) { .adercol-cat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .adercol-cat__grid { grid-template-columns: 1fr; } }
.adercol-cat__item { margin: 0; }
.adercol-cat__item[hidden] { display: none; }

/* Tarjeta: imagen arriba (sin relleno) + cuerpo de texto con relleno. */
.adercol-cat__card { display: flex; height: 100%; overflow: hidden; box-sizing: border-box; flex-direction: column; border: 1px solid #edf2ee; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(0, 62, 39, .05); color: inherit; text-align: center; text-decoration: none; transition: transform .25s ease, box-shadow .25s ease; }
.adercol-cat__card:hover,
.adercol-cat__card:focus-visible { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(0, 62, 39, .1); }
.adercol-cat__card:focus-visible { outline: 2px solid #00a85b; outline-offset: 2px; }

.adercol-cat__media { position: relative; display: block; width: 100%; height: 220px; overflow: hidden; background: #f1f6f2; }
.adercol-cat__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center center; transition: transform .45s ease; }
.adercol-cat__card:hover .adercol-cat__media img { transform: scale(1.05); }

/* Opción "Imagen completa centrada": la botella entera, con aire alrededor. */
.adercol-cat--img-contain .adercol-cat__media { height: 190px; padding: 18px 20px 0; box-sizing: border-box; background: transparent; }
.adercol-cat--img-contain .adercol-cat__media img { width: auto; max-width: 100%; margin: 0 auto; object-fit: contain; }

/* Opción "proporción fija" (por defecto): ancho completo y alto según la proporción elegida.
   Si la foto tiene esa misma forma, se ve completa y sin recorte. */
.adercol-cat--img-ratio .adercol-cat__media { height: auto; aspect-ratio: 1 / 1; }

/* Opción "alto original": cada foto con su propia altura (nunca recorta, pero las tarjetas pueden no alinearse). */
.adercol-cat--img-natural .adercol-cat__media { height: auto; }
.adercol-cat--img-natural .adercol-cat__media img { height: auto; object-fit: initial; }

.adercol-cat__body { display: flex; flex: 1; flex-direction: column; align-items: center; padding: 18px 20px 22px; }

.adercol-cat__name { margin: 0; color: #1d1d1f; font-size: 16px; font-weight: 800; line-height: 1.3; }
.adercol-cat__size { margin-top: 2px; color: #1d1d1f; font-size: 15px; font-weight: 700; }
.adercol-cat__tagline { flex: 1; margin-top: 8px; color: #6e7d78; font-size: 13px; line-height: 1.45; }

.adercol-cat__button { display: inline-flex; margin-top: 16px; padding: 8px 30px; align-items: center; gap: 8px; border: 1.5px solid #00874a; border-radius: 22px; background: transparent; color: #00874a; font-size: 14px; font-weight: 800; transition: background-color .2s ease, color .2s ease, border-color .2s ease; }
.adercol-cat__card:hover .adercol-cat__button,
.adercol-cat__card:focus-visible .adercol-cat__button { background: #00874a; color: #fff; }

/* ---------- Sin resultados ---------- */
.adercol-cat__empty { padding: 40px 20px; border: 1px dashed #cfe3d6; border-radius: 12px; color: #546b69; text-align: center; }
.adercol-cat__empty[hidden] { display: none; }
.adercol-cat__empty p { margin: 0 0 12px; }
.adercol-cat__reset--inline { margin-left: 0; }

@media (prefers-reduced-motion: reduce) {
  .adercol-cat__brand, .adercol-cat__card, .adercol-cat__media img { transition: none; }
}
