/* =========================================================
   LA JARDINERA · CATÁLOGO UX/UI
   ========================================================= */

.catalog-ui {
    background: #fff;
    color: #131713;
}

.catalog-ui * {
    box-sizing: border-box;
}

.catalog-breadcrumb-wrap {
    padding: 22px 0 4px;
    border-top: 1px solid #f0f2ef;
}

.catalog-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #7d857f;
    font-size: 13px;
}

.catalog-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.catalog-breadcrumb a:hover {
    color: #0d5b2a;
}

.catalog-breadcrumb i {
    font-size: 8px;
    color: #b7bdb8;
}

.catalog-main-section {
    padding: 24px 0 72px;
}

.catalog-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 34px;
    align-items: start;
}

/* =========================================================
   FILTROS
   ========================================================= */

.catalog-filters {
    position: sticky;
    top: 18px;
    padding: 24px 18px 20px;
    border: 1px solid #ecefec;
    border-radius: 16px;
    background: #f7f8f6;
    box-shadow: 0 8px 30px rgba(21, 46, 29, .035);
}

.catalog-filters-mobile-head {
    display: none;
}

.catalog-filters-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
}

.catalog-filters-head h2 {
    margin: 0;
    font-size: 20px;
    line-height: 1.15;
    color: #111711;
    letter-spacing: -.02em;
}

.catalog-filters-head a,
.catalog-filter-label-row a {
    color: #626a64;
    font-size: 12px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.catalog-filter-group {
    padding: 19px 0;
    border-bottom: 1px solid #e3e7e3;
}

.catalog-filter-group > label,
.catalog-filter-title,
.catalog-filter-label-row > label {
    display: block;
    margin: 0 0 10px;
    color: #161c17;
    font-size: 14px;
    font-weight: 800;
}

.catalog-filter-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.catalog-filter-label-row > label {
    margin-bottom: 10px;
}

.catalog-select-wrap {
    position: relative;
}

.catalog-select-wrap select {
    width: 100%;
    height: 44px;
    padding: 0 38px 0 12px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #d7ddd8;
    border-radius: 9px;
    background: #fff;
    color: #444c46;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease;
}

.catalog-select-wrap select:focus {
    border-color: #0e6630;
    box-shadow: 0 0 0 3px rgba(14, 102, 48, .08);
}

.catalog-select-wrap select:disabled {
    background: #f1f3f1;
    color: #9ba19c;
    cursor: not-allowed;
}

.catalog-select-wrap > i {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #7f8781;
    font-size: 10px;
}

.catalog-price-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.catalog-price-grid > label > span {
    display: block;
    margin-bottom: 6px;
    color: #8a918c;
    font-size: 11px;
}

.catalog-price-input {
    position: relative;
}

.catalog-price-input > span {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: #68706a;
    font-size: 12px;
}

.catalog-price-input input {
    width: 100%;
    height: 44px;
    padding: 0 9px 0 24px;
    border: 1px solid #d7ddd8;
    border-radius: 9px;
    background: #fff;
    color: #3e453f;
    font-family: inherit;
    font-size: 12px;
    outline: none;
}

.catalog-price-input input:focus {
    border-color: #0e6630;
    box-shadow: 0 0 0 3px rgba(14, 102, 48, .08);
}

.catalog-price-apply {
    width: 100%;
    height: 38px;
    margin-top: 10px;
    border: 1px solid #0e6630;
    border-radius: 8px;
    background: transparent;
    color: #0e6630;
    font-family: inherit;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.catalog-price-apply:hover {
    background: #edf6ef;
}

.catalog-check-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.catalog-check {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    color: #3a423c;
    font-size: 13px;
}

.catalog-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.catalog-checkbox-ui {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #adb5ae;
    border-radius: 4px;
    background: #fff;
    transition: background .15s ease, border-color .15s ease;
}

.catalog-check input:checked + .catalog-checkbox-ui {
    border-color: #0e6630;
    background: #0e6630;
}

.catalog-check input:checked + .catalog-checkbox-ui::after {
    content: "✓";
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

.catalog-mobile-actions {
    display: none;
}

/* =========================================================
   CONTENIDO
   ========================================================= */

.catalog-content {
    min-width: 0;
    transition: opacity .15s ease;
}

.catalog-content.is-loading {
    opacity: .52;
    pointer-events: none;
}

.catalog-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 26px;
    margin-bottom: 22px;
}

.catalog-eyebrow {
    display: block;
    margin-bottom: 8px;
    color: #6b746d;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
}

.catalog-head h1 {
    margin: 0;
    color: #0f130f;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1;
    letter-spacing: -.04em;
}

.catalog-head p {
    margin: 12px 0 0;
    color: #737b75;
    font-size: 15px;
}

.catalog-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    flex-wrap: wrap;
}

.catalog-count {
    color: #667068;
    font-size: 13px;
    white-space: nowrap;
}

.catalog-sort-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.catalog-sort-form > label {
    color: #7b827d;
    font-size: 12px;
}

.catalog-sort-select {
    position: relative;
}

.catalog-sort-select select {
    height: 42px;
    min-width: 145px;
    padding: 0 34px 0 12px;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid #dfe4df;
    border-radius: 9px;
    background: #fff;
    color: #444c46;
    font-family: inherit;
    font-size: 12px;
    outline: none;
    cursor: pointer;
}

.catalog-sort-select i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7d857f;
    font-size: 9px;
    pointer-events: none;
}

.catalog-filter-trigger {
    display: none;
}

/* =========================================================
   BÚSQUEDA
   ========================================================= */

.modern-search {
    margin-bottom: 24px;
}

.modern-search-box {
    position: relative;
    display: flex;
    align-items: stretch;

    width: 100%;
    max-width: 760px;

    height: 52px;

    border: 1px solid #dfe4df;
    border-radius: 12px;

    background: #fff;

    overflow: hidden;

    box-sizing: border-box;
}

.modern-search-box:focus-within {
    border-color: #0f6530;
    box-shadow: 0 0 0 3px rgba(15, 101, 48, .06);
}

.modern-search-box > i {
    position: absolute;

    left: 20px;
    top: 50%;

    transform: translateY(-50%);

    z-index: 2;

    color: #0f6530;
    font-size: 16px;

    pointer-events: none;
}

.modern-search-box input {
    flex: 1;
    min-width: 0;

    height: 100%;

    padding: 0 18px 0 50px;

    border: 0 !important;
    outline: 0 !important;

    background: transparent !important;

    color: #1d231f;

    font-family: inherit;
    font-size: 14px;

    box-shadow: none !important;
}

.modern-search-box input:focus {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
}

.modern-search-box input::placeholder {
    color: #8b928d;
}

.modern-search-box button {
    flex: 0 0 100px;

    height: 100%;

    border: 0;

    border-radius: 0;

    background: #0f6530;
    color: #fff;

    font-family: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.modern-search-box button:hover {
    background: #084c24;
}
/* =========================================================
   FILTROS ACTIVOS
   ========================================================= */

.catalog-active-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.catalog-active-filters a {
    min-height: 32px;
    padding: 0 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e0e5e0;
    border-radius: 999px;
    background: #f7f8f6;
    color: #3b433d;
    font-size: 12px;
    text-decoration: none;
}

.catalog-active-filters a:hover {
    border-color: #c9d7cc;
    background: #f1f6f2;
}

.catalog-active-filters i {
    color: #7d867f;
    font-size: 9px;
}

.catalog-active-filters .catalog-clear-all {
    border-color: transparent;
    background: transparent;
    color: #0e6630;
    font-weight: 800;
}

/* =========================================================
   GRID / CARDS
   ========================================================= */

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.catalog-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #edf0ed;
    border-radius: 14px;
    background: #fff;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.catalog-card:hover {
    transform: translateY(-2px);
    border-color: #dce3dd;
    box-shadow: 0 12px 30px rgba(18, 50, 27, .08);
}

.catalog-card-image {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #f8f9f7;
}

.catalog-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 14px;
    transition: transform .24s ease;
}

.catalog-card:hover .catalog-card-image img {
    transform: scale(1.025);
}

.catalog-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    padding: 6px 9px;
    border-radius: 6px;
    background: #0d642f;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .02em;
}

.catalog-card-body {
    padding: 13px 13px 15px;
}

.catalog-card h3 {
    margin: 0 0 6px;
    min-height: 38px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
}

.catalog-card h3 a {
    color: #161b17;
    text-decoration: none;
}

.catalog-card-meta {
    min-height: 30px;
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 5px;
    color: #8a918c;
    font-size: 11px;
    line-height: 1.35;
}

.catalog-card-price {
    margin-top: 10px;
    color: #111612;
    font-size: 16px;
    font-weight: 800;
}

.catalog-card-price > span {
    color: #0e6630;
    font-size: 14px;
}

.catalog-card-footer {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.catalog-stock {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.catalog-stock i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.catalog-stock.is-available {
    color: #16823d;
}

.catalog-stock.is-available i {
    background: #2aab4b;
}

.catalog-stock.is-low {
    color: #9a6b16;
}

.catalog-stock.is-low i {
    background: #e5a325;
}

.catalog-card-action {
    width: 34px;
    height: 34px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #0d642f;
    color: #fff;
    text-decoration: none;
    transition: transform .18s ease, background .18s ease;
}

.catalog-card-action:hover {
    transform: translateX(2px);
    background: #084b23;
}

.catalog-card-action i {
    font-size: 12px;
}

/* =========================================================
   EMPTY
   ========================================================= */

.catalog-empty {
    padding: 72px 30px;
    border: 1px dashed #dce2dc;
    border-radius: 14px;
    background: #fafbf9;
    text-align: center;
}

.catalog-empty-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #edf6ef;
    color: #0e6630;
    font-size: 22px;
}

.catalog-empty h3 {
    margin: 16px 0 8px;
    font-size: 22px;
}

.catalog-empty p {
    margin: 0 0 20px;
    color: #747c76;
}

.catalog-empty > a {
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #0e6630;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

/* =========================================================
   PAGINACIÓN
   ========================================================= */

.catalog-pagination {
    margin-top: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.catalog-pagination a,
.catalog-pagination span {
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #555d57;
    font-size: 12px;
    text-decoration: none;
}

.catalog-pagination a:hover {
    background: #f1f3f1;
}

.catalog-pagination a.active {
    background: #0e6630;
    color: #fff;
    font-weight: 800;
}

.catalog-pagination .catalog-page-arrow {
    border: 1px solid #e1e6e1;
}

/* =========================================================
   MOBILE DRAWER
   ========================================================= */

.catalog-filter-overlay {
    display: none;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1200px) {
    .catalog-shell {
        grid-template-columns: 235px minmax(0, 1fr);
        gap: 24px;
    }

    .catalog-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .catalog-shell {
        display: block;
    }

    .catalog-filters {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1202;
        width: min(88vw, 350px);
        height: 100dvh;
        overflow-y: auto;
        padding: 20px 18px 24px;
        border: 0;
        border-radius: 0 18px 18px 0;
        box-shadow: 14px 0 35px rgba(0, 0, 0, .14);
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

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

    .catalog-filters-mobile-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 18px;
    }

    .catalog-filters-mobile-head strong {
        font-size: 20px;
    }

    .catalog-filters-mobile-head button {
        width: 36px;
        height: 36px;
        border: 1px solid #e1e5e1;
        border-radius: 50%;
        background: #fff;
        color: #333b35;
        cursor: pointer;
    }

    .catalog-filters-head h2 {
        display: none;
    }

    .catalog-mobile-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        margin: 18px -18px -24px;
        padding: 14px 18px calc(14px + env(safe-area-inset-bottom));
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 10px;
        border-top: 1px solid #e2e7e2;
        background: rgba(247, 248, 246, .97);
        backdrop-filter: blur(10px);
    }

    .catalog-mobile-apply {
        height: 44px;
        border: 0;
        border-radius: 8px;
        background: #0e6630;
        color: #fff;
        font-family: inherit;
        font-weight: 800;
    }

    .catalog-mobile-actions > a {
        min-width: 92px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #525b54;
        font-size: 12px;
        font-weight: 700;
        text-decoration: none;
    }

    .catalog-filter-overlay {
        position: fixed;
        inset: 0;
        z-index: 1201;
        background: rgba(8, 19, 11, .32);
        opacity: 0;
        visibility: hidden;
        transition: opacity .2s ease, visibility .2s ease;
    }

    .catalog-filter-overlay.is-visible {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    body.catalog-drawer-open {
        overflow: hidden;
    }

    .catalog-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
    }

    .catalog-head-actions {
        width: 100%;
        justify-content: space-between;
    }

    .catalog-filter-trigger {
        height: 42px;
        padding: 0 14px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: 1px solid #dbe1dc;
        border-radius: 9px;
        background: #fff;
        color: #0e6630;
        font-family: inherit;
        font-size: 12px;
        font-weight: 800;
        cursor: pointer;
    }
}

@media (max-width: 640px) {
    .catalog-breadcrumb-wrap {
        padding-top: 14px;
    }

    .catalog-main-section {
        padding-top: 16px;
    }

    .catalog-head h1 {
        font-size: 34px;
    }

    .catalog-head p {
        font-size: 14px;
    }

    .catalog-head-actions {
        align-items: stretch;
        gap: 10px;
    }

    .catalog-count {
        order: 3;
        width: 100%;
    }

    .catalog-sort-form {
        flex: 1;
        min-width: 0;
    }

    .catalog-sort-form > label {
        display: none;
    }

    .catalog-sort-select,
    .catalog-sort-select select {
        width: 100%;
    }

    .catalog-search-box input {
        min-width: 0;
        padding-right: 36px;
        font-size: 13px;
    }

    .catalog-search-box button {
        flex-basis: 82px;
    }

    .catalog-search-clear {
        right: 90px;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .catalog-card-body {
        padding: 10px;
    }

    .catalog-card h3 {
        min-height: 34px;
        font-size: 12px;
    }

    .catalog-card-meta {
        min-height: 26px;
        font-size: 10px;
    }

    .catalog-card-price {
        font-size: 14px;
    }

    .catalog-stock {
        font-size: 10px;
    }

    .catalog-card-action {
        width: 31px;
        height: 31px;
    }

    .catalog-active-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .catalog-active-filters::-webkit-scrollbar {
        display: none;
    }

    .catalog-active-filters a {
        flex: 0 0 auto;
    }

    .catalog-pagination {
        gap: 2px;
    }

    .catalog-pagination a,
    .catalog-pagination span {
        min-width: 30px;
        height: 30px;
        font-size: 11px;
    }
}
