/* ====== HERO Catálogo ====== */
.catalog-hero {
  background:
    linear-gradient(rgba(255,255,255,0.64), rgba(255,255,255,0.64)),
    url("../assets/images/Flores inicio.jpg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  padding: 80px 0 60px;
  text-align: center;
}
.catalog-title {
  margin: 0;
  font-family: "DM Serif Display", serif;
  font-size: clamp(28px, 4vw, 42px);
  color: #fff;
  background: linear-gradient(90deg, #ff6aa8 0%, #c43c73 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.catalog-sub {
  color: #6b6b6b;
  margin: 10px 0 0;
}

/* ====== LAYOUT 2 COLUMNAS (filtros + resultados) ====== */
.catalog-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  align-items: start;
  margin: 24px auto 0;
}
.container.catalog-shell {
  width: min(1320px, 96%);
}
.filters-aside {
  position: sticky;
  top: 74px;
}
.results-main {
  min-width: 0;
}

/* ====== PANEL DE FILTROS ====== */
.filters-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff;
  padding: 14px;
  border-radius: 16px;
  box-shadow: var(--shadow);
}
.filters-wrap label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}
.filters-wrap input,
.filters-wrap select {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid #f4c1d6;
  border-radius: 12px;
  outline: none;
  background: #fff;
}

/* Flechas personalizadas de los SELECTs */
.filters-wrap select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 48px;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23888888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* === BOTONES de acciones === */
.f-actions {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: center;
}
.f-actions .btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  min-width: 0;
}

/* ====== TOOLBAR ====== */
.toolbar {
  display: flex;
  align-items: flex-start;   /* sube el bloque de "Ordenar por" para alinearlo con el conteo */
  justify-content: space-between;
  gap: 10px;
  color: #6b6b6b;
  margin: 0 0 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

/* Bloque izquierdo: conteo + buscador */
.toolbar-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

/* Buscador debajo del conteo */
.search-wrap {
  width: 260px;
}
.search-wrap input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #f0c4da;
  font-size: 0.9rem;
  outline: none;
  background: #fff;
}
.search-wrap input::placeholder {
  color: #b5b5b5;
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}
.sort-group select {
  padding: 10px 12px;
  border: 1px solid #eee;
  border-radius: 10px;
  background: #fff;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 48px;
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cpath fill='%23888888' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

/* ===== Ajuste solo DESKTOP para subir un poco "Ordenar por" ===== */
@media (min-width: 981px) {
  .sort-group {
    margin-top: -4px; /* si lo querés aún más arriba, probá -6px */
  }
}

/* ====== GRID ====== */
.grid {
  margin: 8px 0 60px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, 1fr);
}
.grid .card {
  min-width: 0;
}

@media (max-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 760px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 460px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Estado vacío */
.empty {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid #00000010;
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--shadow);
}

/* ====== PAGINACIÓN ====== */
.pager {
  margin: 0 0 40px;
}
.pager-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(0,0,0,.04);
  font-size: 14px;
}
.pager-btn,
.pager-page {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 6px 10px;
  min-width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  color: #444;
  transition: background .15s ease, color .15s ease, transform .05s ease;
}
.pager-btn:hover,
.pager-page:hover {
  background: #f7f1f5;
}
.pager-btn[disabled],
.pager-page[disabled] {
  opacity: .4;
  cursor: default;
}
.pager-page--current {
  background: #34495e;
  color: #fff;
  font-weight: 700;
}
.pager-ellipsis {
  padding: 0 4px;
  color: #aaa;
}

/* ====== MEDIA de la tarjeta ====== */
.card__img{
  aspect-ratio: var(--media-w,1080) / var(--media-h,1050);
  overflow: hidden;
  background: #fff;
  border-radius: 12px;
}
.card__img .card__media{
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
}

/* ====== FONDO GENERAL ====== */
body {
  background: #fff2f6;
}

/* ====== Enlace “Ver todo” ====== */
.sec-bottom{
  pointer-events: none;
}
.sec-bottom .sec-link--bottom{
  pointer-events: auto;
  display: inline !important;
  position: static !important;
  width: auto !important;
  max-width: max-content;
  padding: 0;
  margin: 0;
  flex: 0 0 auto !important;
  align-self: flex-start;
  cursor: pointer;
}
.sec-bottom .sec-link--bottom::before,
.sec-bottom .sec-link--bottom::after{
  content: none !important;
}

/* ====== RESPONSIVE (solo móvil) ====== */
@media (max-width: 980px) {
  .catalog-shell {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .filters-aside {
    position: static;
  }
  .filters-wrap {
    margin: 0;
  }

  .toolbar {
    margin-top: -4px;
    flex-wrap: nowrap;
    white-space: nowrap;
    gap: 10px;
    padding-right: 0;
  }

  /* En móvil el bloque izquierdo ocupa el ancho disponible
     y el buscador se ve debajo del conteo, a lo ancho */
  .toolbar-left {
    flex: 1;
    min-width: 0;
  }
  .search-wrap {
    width: 100%;
  }

  .sort-group {
    gap: 4px;
    margin-right: 0;
  }
  .sort-group select {
    max-width: 115px;
    padding: 6px 28px 6px 8px;
    font-size: 12px;
    line-height: 1;
    transform: scale(0.92);
    transform-origin: right center;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;

    /* mover un poco más a la izquierda */
    margin-left: -6px;
  }

  .pager-inner {
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 10px;
  }

  .card__btn{
    display:flex;
    flex-direction: row;
    align-items:center;
    justify-content:center;
    gap:8px;
    white-space: normal;
    text-align:left;
    line-height:1.15;
    font-size: 14px;
  }
  .card__btn .icon-wa{
    width:26px;
    height:26px;
    transform:none;
  }
}
