/* ─── Agrogana Category View v4 ─────────────────────────────────────── */

/* ── Barra de título + filtros ──────────────────────────────────────── */
.agro-header-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin: 0 0 28px 0;
    padding: 0;
}

/* TÍTULO — forzar tamaño grande que el tema no sobreescriba */
.agro-header-bar .agro-cat-title,
h2.agro-cat-title {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 !important;
    padding: 0 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    white-space: nowrap;
    font-family: inherit !important;
    line-height: 1.2 !important;
    border: none !important;
}

/* ── Grupo de filtros ───────────────────────────────────────────────── */
.agro-header-filters {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* ── Botón de filtro — rosado, estilo web agrogana ──────────────────── */
.agro-header-filters .agro-filter-btn,
a.agro-filter-btn,
button.agro-filter-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: 7px !important;
    padding: 11px 22px !important;
    border: none !important;
    border-radius: 999px !important;
    background: #da0075 !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em !important;
    cursor: pointer !important;
    text-decoration: none !important;
    transition: background 0.18s ease !important;
    white-space: nowrap;
    font-family: inherit !important;
    box-shadow: none !important;
    line-height: 1 !important;
}

.agro-header-filters .agro-filter-btn:hover,
a.agro-filter-btn:hover,
button.agro-filter-btn:hover {
    background: #b8005f !important;
    color: #fff !important;
    text-decoration: none !important;
}

.agro-arrow {
    font-size: 0.72rem;
    transition: transform 0.18s ease;
    display: inline-block;
}

/* ── Show All — activo (en shop, no en categoría) ───────────────────── */
a.agro-show-all.active {
    background: #fff !important;
    color: #da0075 !important;
    box-shadow: inset 0 0 0 2px #da0075 !important;
}
a.agro-show-all.active:hover {
    background: #fff0f8 !important;
}

/* ── Dropdown wrapper ───────────────────────────────────────────────── */
.agro-dropdown {
    position: relative;
}

.agro-dropdown.open .agro-arrow {
    transform: rotate(180deg);
}

/* ── Menú desplegable ───────────────────────────────────────────────── */
.agro-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    max-height: 340px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #f0d0e8;
    border-radius: 14px;
    box-shadow: 0 10px 36px rgba(218, 0, 117, 0.13);
    z-index: 99999;
    padding: 8px 0;
}

.agro-dropdown.open .agro-dropdown-menu {
    display: block;
}

.agro-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.95rem !important;
    color: #333;
    text-decoration: none;
    transition: background 0.14s ease;
    gap: 10px;
    font-family: inherit;
}

.agro-dropdown-item:hover,
.agro-dropdown-item.active {
    background: #fff0f8;
    color: #da0075;
    text-decoration: none;
}

.agro-item-count {
    font-size: 0.8rem;
    color: #bbb;
    font-weight: 500;
}

/* ── Círculo de color ───────────────────────────────────────────────── */
.agro-color-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.12);
    flex-shrink: 0;
    display: inline-block;
}

.agro-dropdown-item.agro-color-item {
    justify-content: flex-start;
    gap: 10px;
}

.agro-color-name {
    flex: 1;
}

/* ── Grid de tarjetas ───────────────────────────────────────────────── */
.agro-cat-section {
    width: 100%;
    margin: 0 0 44px 0;
}

.agro-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
}

.agro-cat-card {
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    text-decoration: none !important;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    border: 2px solid transparent;
}

.agro-cat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(218, 0, 117, 0.16);
    text-decoration: none !important;
    border-color: #da0075;
}

.agro-cat-card.agro-cat-active {
    border-color: #da0075;
    box-shadow: 0 6px 20px rgba(218, 0, 117, 0.22);
}

.agro-cat-img-wrap {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f5f0f3;
}

.agro-cat-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.agro-cat-card:hover .agro-cat-img-wrap img {
    transform: scale(1.07);
}

.agro-cat-no-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    background: #fdf0f8;
}

.agro-cat-info {
    display: flex;
    flex-direction: column;
    padding: 11px 13px 13px;
    gap: 3px;
    border-top: 2px solid #fce8f4;
}

.agro-cat-name {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    text-transform: uppercase !important;
    letter-spacing: 0.04em !important;
    line-height: 1.3 !important;
    font-family: inherit !important;
}

.agro-cat-count {
    font-size: 0.8rem !important;
    color: #da0075 !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

/* ── Anchor + label activo ───────────────────────────────────────────── */
.agro-products-anchor {
    margin-bottom: 20px;
}

.agro-active-label {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #fff0f8;
    border: 1.5px solid #f0a0d0;
    border-radius: 999px;
    padding: 12px 22px;
    font-size: 1.05rem !important;
    font-weight: 500;
    color: #333;
    font-family: inherit;
}

.agro-active-label strong {
    color: #da0075;
    font-weight: 700;
    font-size: 1.05rem !important;
}

.agro-clear-filter {
    color: #da0075;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    background: #ffd8ef;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}

.agro-clear-filter:hover {
    background: #da0075;
    color: #fff;
    text-decoration: none;
}

/* ── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .agro-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .agro-header-bar .agro-cat-title,
    h2.agro-cat-title {
        font-size: 1.4rem !important;
    }
}

@media (max-width: 600px) {
    .agro-cat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .agro-header-filters {
        gap: 8px;
    }
    .agro-header-bar .agro-cat-title,
    h2.agro-cat-title {
        font-size: 1.2rem !important;
    }
    .agro-header-filters .agro-filter-btn,
    a.agro-filter-btn,
    button.agro-filter-btn {
        padding: 10px 16px !important;
        font-size: 0.9rem !important;
    }
}
