.hero-market {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-height: min(76vh, 760px);
    display: flex;
    align-items: center;
    padding: clamp(24px, 3vw, 38px) 0;
    overflow: hidden;
    background: #12384e;
    contain: layout paint;
    aspect-ratio: 1536 / 1024;
}

.home-page .hero-market {
    margin-top: -20px;
}

.hero-market-picture,
.hero-market-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hero-market-bg {
    object-fit: cover;
    object-position: center;
}

.hero-market::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(105deg, rgba(14, 44, 62, 0.96) 0%, rgba(47, 127, 161, 0.94) 58%, rgba(107, 184, 200, 0.78) 100%),
        linear-gradient(90deg, rgba(5, 15, 25, 0.34), rgba(5, 15, 25, 0.06));
    pointer-events: none;
}

.hero-market-wrap {
    position: relative;
    z-index: 2;
    width: min(92%, 1230px);
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(22px, 4vw, 42px);
    align-items: center;
}

.hero-copy {
    color: #ffffff;
    min-width: 0;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-bottom: 14px;
    padding: 8px 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 800;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.hero-copy h1 {
    max-width: 560px;
    margin: 0 0 12px;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 3.35rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 550px;
    margin: 0 0 20px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.02rem;
    line-height: 1.55;
}

.hero-search-box {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    width: min(100%, 520px);
    margin-bottom: 16px;
    padding: 7px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.22);
}

.hero-search-box input {
    min-width: 0;
    min-height: 44px;
    border: 0;
    outline: 0;
    padding: 0 14px;
    color: #26323b;
    font: inherit;
    background: transparent;
}

.hero-search-box button {
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: #6bb8c8;
    color: #0b2230;
    font-weight: 900;
    cursor: pointer;
    transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.hero-search-box button:hover,
.hero-search-box button:focus-visible {
    transform: translateY(-1px);
    background: #8ed0de;
    box-shadow: 0 10px 20px rgba(5, 30, 45, 0.16);
}

.hero-buttons,
.hero-benefits,
.buy-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-buttons {
    margin-bottom: 18px;
}

.btn-yellow,
.btn-white {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border-radius: 8px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease;
}

.btn-yellow {
    background: #6bb8c8;
    color: #082333;
    box-shadow: 0 16px 28px rgba(5, 30, 45, 0.18);
}

.btn-white {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.btn-yellow:hover,
.btn-yellow:focus-visible,
.btn-white:hover,
.btn-white:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(5, 30, 45, 0.2);
}

.btn-white:hover,
.btn-white:focus-visible {
    background: #ffffff;
    color: #2f7fa1;
}

.hero-benefits div {
    min-height: 44px;
    display: flex;
    align-items: center;
    flex: 1 1 140px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.11);
    color: #ffffff;
    font-size: 0.86rem;
    font-weight: 800;
}

.hero-panel {
    min-width: 0;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 52px rgba(2, 6, 23, 0.22);
    backdrop-filter: blur(14px);
}

@supports not (backdrop-filter: blur(14px)) {
    .hero-panel {
        background: rgba(7, 27, 39, 0.58);
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn-yellow,
    .btn-white,
    .hero-search-box button {
        transition: none;
    }
}

.hero-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.hero-panel-head h2 {
    margin: 0;
    color: #ffffff;
    font-size: 1.18rem;
    line-height: 1.2;
}

.hero-panel-head span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-carousel-controls {
    display: none;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.hero-carousel-controls span {
    min-width: 38px;
    text-align: center;
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    font-weight: 800;
}

.hero-carousel-btn {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

.hero-carousel-btn:hover,
.hero-carousel-btn:focus-visible {
    background: rgba(255, 255, 255, 0.24);
    transform: translateY(-1px);
    outline: 0;
}

.hero-carousel-btn:disabled {
    cursor: default;
    opacity: 0.45;
    transform: none;
}

.hero-carousel-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.category-grid-alt {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.hero-category-carousel.is-ready .cat-alt {
    display: block;
}

.hero-category-carousel.is-ready .cat-alt[hidden] {
    display: none !important;
}

.cat-alt {
    position: relative;
    min-height: 118px;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    background: #12384e;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(2, 6, 23, 0.18);
    isolation: isolate;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.hero-dynamic-cat ~ .cat-alt:not(.hero-dynamic-cat) {
    display: none;
}

.cat-alt::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(7, 18, 33, 0.06), rgba(7, 18, 33, 0.86));
}

.cat-alt img {
    width: 100%;
    height: 100%;
    min-height: 118px;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: transform 220ms ease, opacity 220ms ease;
}

.cat-alt img.is-loaded {
    opacity: 0.9;
}

.cat-alt img.is-placeholder {
    padding: 12%;
    object-fit: contain;
}

.cat-alt strong {
    position: absolute;
    left: 12px;
    right: 10px;
    bottom: 11px;
    z-index: 2;
    display: block;
    color: #ffffff;
    font-size: 0.92rem;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
}

.cat-alt small {
    display: block;
    margin-top: 3px;
    color: #aee5ef;
    font-size: 0.72rem;
    font-weight: 900;
}

.cat-alt:hover,
.cat-alt:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.28);
    outline: 0;
}

.cat-alt:hover img,
.cat-alt:focus-visible img {
    transform: scale(1.05);
    opacity: 1;
}

.buy-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.buy-option {
    padding: 13px 15px;
    border-radius: 12px;
    background: #ffffff;
    color: #26323b;
    box-shadow: 0 10px 22px rgba(2, 6, 23, 0.1);
}

.buy-option strong {
    display: block;
    margin-bottom: 5px;
    color: #12384e;
    font-size: 0.95rem;
}

.buy-option p {
    margin: 0;
    color: #53616c;
    font-size: 0.85rem;
    line-height: 1.35;
}

.search-results-panel {
    background: #f4f8fa;
    padding: clamp(28px, 5vw, 58px) 0;
}

.search-results-wrap {
    width: min(92%, 1230px);
    margin: 0 auto;
}

.search-results-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.search-results-kicker {
    display: block;
    margin-bottom: 6px;
    color: #2f7fa1;
    font-size: 0.82rem;
    font-weight: 900;
    text-transform: uppercase;
}

.search-results-head h2 {
    margin: 0;
    color: #12384e;
    font-size: clamp(1.6rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: 0;
}

.search-results-head p {
    margin: 8px 0 0;
    color: #53616c;
}

.search-catalog-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 8px;
    background: #12384e;
    color: #ffffff;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}

.search-results-layout {
    display: grid;
    grid-template-columns: minmax(230px, 280px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.search-filters {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 13px;
    padding: 16px;
    border: 1px solid #d7e5ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(18, 56, 78, 0.08);
}

.search-filters label {
    display: grid;
    gap: 6px;
    color: #26323b;
    font-size: 0.86rem;
    font-weight: 800;
}

.search-filters select,
.search-filters input[type="number"] {
    width: 100%;
    min-height: 40px;
    border: 1px solid #cddbe0;
    border-radius: 8px;
    padding: 0 10px;
    color: #26323b;
    background: #ffffff;
    font: inherit;
}

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

.search-stock-toggle {
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center;
    gap: 9px !important;
}

.search-stock-toggle input {
    width: 18px;
    height: 18px;
    accent-color: #2f7fa1;
}

.search-filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.search-filter-actions button,
.search-pagination button {
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
}

.search-filter-actions button:first-child {
    background: #2f7fa1;
    color: #ffffff;
}

.search-filter-actions button:last-child {
    background: #e8f0f3;
    color: #12384e;
}

.search-results-content {
    min-width: 0;
}

.search-products-grid {
    display: grid;
    gap: 14px;
}

.search-product-card {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 16px;
    min-height: 190px;
    padding: 14px;
    border: 1px solid #d7e5ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 26px rgba(18, 56, 78, 0.08);
}

.search-product-image {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #edf3f5;
    aspect-ratio: 1 / 1;
}

.search-product-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    padding: 10px;
}

.search-product-info {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 10px;
}

.search-breadcrumb {
    color: #5d7380;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.35;
}

.search-product-info h3 {
    margin: 0;
    color: #12384e;
    font-size: 1.1rem;
    line-height: 1.25;
    letter-spacing: 0;
}

.search-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-product-tags span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 9px;
    border-radius: 8px;
    background: #e8f5f7;
    color: #12384e;
    font-size: 0.78rem;
    font-weight: 900;
}

.search-product-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.search-product-meta strong {
    color: #12384e;
    font-size: 1.12rem;
}

.search-product-meta span {
    font-size: 0.86rem;
    font-weight: 900;
}

.search-product-meta .in-stock {
    color: #087344;
}

.search-product-meta .out-stock {
    color: #b91c1c;
}

.search-product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.search-product-actions a,
.search-product-actions button,
.search-product-actions .producto-agotado {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 13px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.btn-search-view {
    background: #12384e;
    color: #ffffff;
}

.search-product-actions .add-to-cart {
    border: 0;
    background: #6bb8c8;
    color: #0b2230;
    cursor: pointer;
}

.search-product-actions .producto-agotado {
    background: #fee2e2;
    color: #b91c1c;
}

.search-empty-state {
    padding: 30px;
    border: 1px dashed #b9cbd2;
    border-radius: 8px;
    background: #ffffff;
    text-align: center;
}

.search-empty-state h3 {
    margin: 0 0 6px;
    color: #12384e;
}

.search-empty-state p {
    margin: 0;
    color: #53616c;
}

.search-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.search-pagination button {
    padding: 0 16px;
    background: #12384e;
    color: #ffffff;
}

.search-pagination button:disabled {
    background: #cbd5da;
    color: #64727a;
    cursor: not-allowed;
}

.search-pagination span {
    color: #26323b;
    font-size: 0.9rem;
    font-weight: 900;
}

.search-results-panel.is-loading .search-results-content {
    opacity: 0.62;
}

.search-page-main {
    margin-top: 96px;
    background: #f4f8fa;
}

.search-page-hero {
    padding: clamp(28px, 5vw, 54px) 0 28px;
    background:
        linear-gradient(105deg, rgba(14, 44, 62, 0.96), rgba(47, 127, 161, 0.9)),
        url('../img/ba-1280.webp') center/cover no-repeat;
    color: #ffffff;
}

.search-page-wrap {
    width: min(92%, 1230px);
    margin: 0 auto;
}

.search-page-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.9rem;
    font-weight: 800;
}

.search-page-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.search-page-breadcrumb a::after {
    content: ">";
    margin-left: 8px;
    color: rgba(255, 255, 255, 0.7);
}

.search-page-hero h1 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    letter-spacing: 0;
}

.search-page-hero p {
    max-width: 680px;
    margin: 0 0 18px;
    color: rgba(255, 255, 255, 0.9);
}

.search-page-form {
    margin-bottom: 0;
}

.search-results-page-panel {
    padding-top: 28px;
}

@media (max-width: 1100px) {
    .hero-market {
        min-height: 0;
        padding: 30px 0;
    }

    .hero-panel-kicker {
        display: none;
    }

    .hero-carousel-controls {
        display: inline-flex;
    }

    .hero-market-wrap {
        grid-template-columns: 1fr;
    }

    .category-grid-alt {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .hero-category-carousel .cat-alt:nth-child(n+5) {
        display: none;
    }
}

@media (max-width: 920px) {
    .search-results-layout {
        grid-template-columns: 1fr;
    }

    .search-filters {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .search-stock-toggle,
    .search-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .hero-market {
        padding: 24px 0;
    }

    .hero-copy h1 {
        font-size: 2.45rem;
    }

    .hero-search-box {
        display: none;
    }

    .hero-benefits {
        display: none;
    }

    .buy-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-panel {
        display: none;
    }

    .search-results-head {
        align-items: stretch;
        flex-direction: column;
    }

    .search-catalog-link {
        width: 100%;
    }

    .search-product-card {
        grid-template-columns: 132px minmax(0, 1fr);
    }
}

@media (max-width: 520px) {
    .hero-label{
        display:none;
    }
    .hero-copy p{
        font-siza:14px;
    }
    .hero-market-wrap {
        width: min(92%, 100% - 24px);
        gap: 18px;
    }

    .hero-copy h1 {
        font-size: 2.05rem;
    }

    .hero-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .btn-yellow,
    .btn-white {
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
        font-size: 0.78rem;
        line-height: 1.15;
        text-align: center;
    }

    .buy-options {
        grid-template-columns: 1fr;
    }

    .search-results-wrap {
        width: min(92%, 100% - 24px);
    }

    .search-filters,
    .search-price-row {
        grid-template-columns: 1fr;
    }

    .search-product-card {
        grid-template-columns: 1fr;
    }

    .search-product-image {
        aspect-ratio: 16 / 10;
    }

    .search-product-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .search-product-actions a,
    .search-product-actions button,
    .search-product-actions .producto-agotado {
        width: 100%;
    }

    .search-page-main {
        margin-top: 82px;
    }
}
@media (max-width: 380px) {
    .hero-copy p{
        font-size: 14px;
    }
}