.portal-home {
    --home-ink: #172640;
    --home-muted: #4f6177;
    --home-border: #dce4ed;
    --home-surface: #fff;
    --home-canvas: #f5f7fa;
    --home-accent: #ff7f00;
    --home-accent-hover: #f27100;
    --home-radius: 7px;
    --home-width: 1440px;
    --home-gutter: clamp(16px, 2.5vw, 32px);
    background: var(--home-surface);
    color: var(--home-ink);
    font-family: system-ui, "Segoe UI", sans-serif;
}

.portal-home .home-catalog {
    width: 100%;
    max-width: var(--home-width);
    margin-inline: auto;
    padding: 0 var(--home-gutter) 24px;
    min-height: 40vh;
}

.portal-home #header,
.portal-home .header-mobile {
    position: relative;
    z-index: 20;
    background: var(--home-surface);
    border-bottom: 1px solid var(--home-border);
    box-shadow: 0 3px 12px rgb(23 38 64 / 5%);
}

.portal-home #header #cab > .col-12 > .container,
.portal-home .header-mobile > .container-fluid {
    max-width: var(--home-width);
    padding-inline: var(--home-gutter);
}

.portal-home #cab > .col-12 > .container > .row > .col-8 {
    display: flex;
    align-items: center;
    padding-block: 10px;
}

.portal-home #cab > .col-12 > .container > .row {
    align-items: center;
}

.portal-home #cab > .col-12 > .container > .row > .col-4 {
    position: relative;
}

.portal-home #cab > .col-12 > .container > .row > .col-4 > .row:first-child {
    position: absolute;
    inset: 100% 0 auto;
    margin: 0;
    z-index: 1;
    pointer-events: none;
}

.portal-home #cab .calculator {
    padding: 0 !important;
}

.portal-home #cab .calculator a {
    pointer-events: auto;
    font-size: .75rem;
}

.portal-home #cab > .col-12 > .container > .row:has(#calcula_ahorro:not([style])) .menu-desktop {
    margin-top: 20px;
}

.portal-home #cab > .col-12 > .container > .row > .col-4 > .row:last-child {
    align-items: center;
    justify-content: flex-end;
}

.portal-home #cab :is(.desktop-user, .desktop-basket) {
    padding-bottom: 0 !important;
}

.portal-home #header .dekstop-logo {
    flex: 0 0 135px;
    max-width: 135px;
    padding: 0 18px 0 0 !important;
}

.portal-home #header .dekstop-logo a > img {
    width: auto;
    max-height: 60px;
}

.portal-home #header #cab-center {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding-inline: 0;
}

.portal-home #header .desktop-search {
    padding: 0 !important;
}

.portal-home #form_buscador {
    position: relative;
}

.portal-home #form_buscador .input-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.portal-home #form_buscador .input-group-btn {
    display: flex;
    flex: 0 0 auto;
}

.portal-home #cab-center #buscador {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    min-height: 44px;
    padding-inline: 14px;
    color: var(--home-ink);
    background: var(--home-canvas);
    border: 1px solid var(--home-border);
    border-radius: 9px 0 0 9px;
}

.portal-home #header #capaSugerencias {
    inset: 100% 0 auto;
    width: 100%;
    border-color: var(--home-border);
    border-radius: 0 0 9px 9px;
    box-shadow: 0 8px 24px rgb(23 38 64 / 12%);
}

.portal-home #cab-center #btn_ir_buscador {
    width: auto;
    min-height: 44px;
    padding-inline: 18px;
    border-radius: 0 9px 9px 0;
    font-size: .78rem;
}

.portal-home #cab-center #btn_ir_buscador,
.portal-home .home-catalog .boton_negro_xl {
    color: #17202e;
    background: var(--home-accent);
    border-color: var(--home-accent);
    font-weight: 700;
}

.portal-home #cab-center #btn_ir_buscador:hover,
.portal-home .home-catalog .boton_negro_xl:hover {
    background: var(--home-accent-hover);
    border-color: var(--home-accent-hover);
}

.portal-home .desktop-user > a,
.portal-home .desktop-basket > a,
.portal-home .header-mobile .menu-mobile-icon > a,
.portal-home .header-mobile .search > a,
.portal-home .header-mobile .mobile-user > a,
.portal-home .header-mobile .bakset-mobile > a {
    display: inline-flex;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding-inline: 8px;
    border: 1px solid var(--home-border);
    border-radius: 9px;
    background: var(--home-surface);
    font-size: .94rem;
    font-weight: 650;
    white-space: nowrap;
}

.portal-home #header .num-productos,
.portal-home .header-mobile .num-productos {
    background: var(--home-accent);
    color: #17202e;
    border-radius: 999px;
}

.portal-home #header .menu-desktop {
    border-top: 1px solid var(--home-border);
}

.portal-home #header .menu-desktop > .navbar-nav,
.portal-home #header #bs-example-navbar-collapse-1 {
    width: 100%;
}

.portal-home #header #topnav {
    flex-wrap: wrap;
    padding-block: 5px;
}

.portal-home #header #topnav > li > .nav-link,
.portal-home .header-mobile .menu-mobile .nav-link {
    padding: 10px 12px;
    border-radius: 7px;
    font-family: inherit;
    font-size: .94rem;
    font-weight: 650;
}

.portal-home #header #topnav > li > .nav-link:hover,
.portal-home #header #topnav > li.seleccionado > .nav-link,
.portal-home .header-mobile .menu-mobile .nav-link:hover {
    color: #8b4200 !important;
    background: #fff1e2;
}

.portal-home #header #topnav > li > a::before,
.portal-home #header #topnav > li > a::after {
    border-color: transparent;
}

.portal-home #header #topnav .dropdown-menu,
.portal-home #header .desktop-user .dropdown-menu,
.portal-home #header .desktop-basket .dropdown-menu {
    border-color: var(--home-border);
    border-radius: var(--home-radius);
    box-shadow: 0 12px 28px rgb(23 38 64 / 12%);
}

.portal-home .header-mobile > .container-fluid > .row:first-child {
    align-items: center;
}

.portal-home .header-mobile #logo-image img {
    width: auto;
    max-height: 52px;
}

.portal-home .header-mobile #buscador-mobile {
    min-height: 44px;
    color: var(--home-ink);
    border-color: var(--home-border);
    border-radius: 9px;
}

.portal-home .header-mobile .search-mobile:has(#buscador-mobile.d-none) {
    margin-block: 0 !important;
}

.portal-home :is(.header-mobile, #header, .home-catalog, #footer) :focus-visible {
    outline: 2px solid var(--home-accent);
    outline-offset: 2px;
}

.portal-home #caja_wrapper:has(#slider):not(:has(#slider img)) {
    display: none;
}

.portal-home .home-banners {
    margin-inline: calc(-1 * var(--home-gutter));
    margin-bottom: 16px;
}

.portal-home .home-banners img {
    display: block;
    width: 100%;
    height: auto;
    max-height: none !important; /* El límite del carrusel de logotipos no aplica a los panoramas. */
}

.portal-home .home-banners > #home-banners-track > img + img {
    display: none;
}

.portal-home .home-banners .bx-wrapper {
    margin: 0;
}

.portal-home .home-banners .bx-viewport {
    left: 0;
    height: auto !important;
    aspect-ratio: 24 / 7;
    border: 0;
    box-shadow: none;
}

.portal-home .home-banners .bx-controls .bx-pager,
.portal-home .home-banners .bx-controls .bx-controls-auto {
    bottom: 8px;
    padding-top: 0;
}

.portal-home .home-banners .bx-controls.bx-has-pager .bx-pager {
    width: 100%;
    text-align: center;
}

.portal-home .home-banners .bx-controls-auto {
    right: 8px;
    width: 28px;
    border-radius: 4px;
    background: #fff;
}

.portal-home .home-banners .bx-pager a {
    background: #fff;
    box-shadow: 0 0 0 1px #4f6177;
}

.portal-home .home-banners .bx-pager a.active,
.portal-home .home-banners .bx-pager a:hover {
    background: var(--home-accent);
}

.portal-home #caja_wrapper .slider-wrapper {
    overflow: hidden;
    border-radius: var(--home-radius);
    background: var(--home-surface);
}

.portal-home #caja_wrapper #slider {
    margin-bottom: 0;
    box-shadow: none;
}

.portal-home #cLogos .bx-wrapper .bx-viewport {
    border-color: var(--home-surface);
    border-radius: var(--home-radius);
    box-shadow: none;
}

.portal-home #content-index {
    max-width: none;
    padding-inline: 0;
}

.portal-home #content-index #cResultados .container {
    max-width: none;
}

.portal-home #cResultados .product-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 10px !important;
    border: 0;
}

.portal-home #cResultados .home-product-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    margin-bottom: 0 !important;
    min-width: 0;
    padding: 10px;
    background: var(--home-surface);
    border: 1px solid var(--home-border);
    border-radius: var(--home-radius);
    overflow-wrap: anywhere;
}

.portal-home #cResultados .home-product-card > .product {
    margin: 0 !important;
    min-width: 0;
}

.portal-home #cResultados .home-product-card > :is(.product-mobile-add-to-cart-wrapper, .btn-consultar-producto, .btn-add-cesta) {
    margin-top: auto;
    padding-top: 8px;
}

.portal-home #cResultados .product-data {
    min-width: 0;
    margin: 8px 0 4px !important;
}

.portal-home #cResultados .product-info {
    min-width: 0;
}

.portal-home #cResultados .product-mobile-add-to-cart-wrapper {
    margin-inline: 0 !important;
    align-items: center;
    justify-content: flex-start !important;
    gap: 4px;
}

.portal-home #cResultados .product-mobile-add-to-cart-wrapper .btn-add-cesta {
    margin: 0 !important;
    width: auto;
}

.portal-home #contenedor-resultados .home-product-card .btn-add-cesta .btn-add-cesta-input {
    width: 38px;
}

.portal-home #contenedor-resultados .home-product-card .btn-add-cesta .quantity-input {
    height: 34px;
    font-size: .9rem;
}

.portal-home #cResultados .product-data-name a {
    font: 650 .9rem/1.3 system-ui, sans-serif !important;
    color: var(--home-ink);
}

.portal-home #cResultados .product-data-price {
    font: 750 1.08rem/1.3 system-ui, sans-serif !important;
    margin-bottom: 3px;
}

.portal-home #cResultados .producto-price-details,
.portal-home #cResultados .product-data-ref,
.portal-home #cResultados .product-data-prov {
    color: var(--home-muted) !important;
}

.portal-home #cResultados .imagen-content {
    height: 134px;
    display: grid;
    place-items: center;
}

.portal-home #cResultados .imagen-content img {
    max-height: 130px !important;
    max-width: 100%;
    object-fit: contain;
}

.portal-home #cResultados .btn-add-cesta-controls-controls,
.portal-home #cResultados .btn-add-cesta-input {
    width: auto;
}

.portal-home #cResultados :is(.btn_sumar, .btn_restar, .quantity-input) {
    box-sizing: border-box;
    height: 34px;
    border-radius: 4px;
}

.portal-home #cResultados .quantity-input {
    width: 38px;
}

.portal-home #cResultados :is(.btn_sumar, .btn_restar) {
    line-height: 30px;
}

.portal-home #cResultados :is(.product-actions .fa-heart, .button-basket, .anadir_cesta) {
    height: 34px;
    min-height: 34px;
    padding: 0 9px;
    border-radius: 5px;
    line-height: 34px;
}

.portal-home #cResultados .btn-add-cesta-controls-btn .anadir_cesta {
    background: var(--home-accent);
    color: #fff;
    margin-left: 0;
}

.portal-home #cResultados .product-actions .fa-heart {
    background: #e9edf2;
    color: var(--home-ink);
}

.portal-home #cResultados .product-actions button:hover .fa-heart,
.portal-home #cResultados .product-actions button:focus-visible .fa-heart {
    background: #d8e0e9;
}

.portal-home #cResultados .btn-add-cesta-controls-btn .anadir_cesta:hover {
    background: var(--home-accent-hover);
}

.portal-home #cResultados .button-basket .fa-shopping-basket {
    font-size: 1rem;
}

.portal-home .home-catalog input.boton_negro_xl {
    min-height: 36px;
    border-radius: 8px;
}

.portal-home #footer {
    padding: 24px var(--home-gutter);
    border-top: 1px solid var(--home-border);
    background: var(--home-surface);
    box-shadow: none;
    color: var(--home-muted);
    font-size: .85rem;
    line-height: 1.7;
}

.portal-home #footer p {
    margin: 0;
    overflow-wrap: anywhere;
}

.portal-home #footer a {
    color: var(--home-ink);
    font-weight: 650;
    text-decoration: underline;
    text-underline-offset: 3px;
}

@media (min-width: 576px) and (max-width: 991.98px) {
    .portal-home #cResultados .product-box {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575.98px) {
    .portal-home #cResultados .product-box {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .portal-home #cResultados .home-product-card > .product {
        align-items: flex-start;
        gap: 10px;
    }

    .portal-home #cResultados .imagen-content {
        height: auto;
        min-height: 72px;
    }

    .portal-home .header-mobile > .container-fluid > .row:first-child > div {
        padding-inline: 4px;
    }

    .portal-home .header-mobile .bakset-mobile {
        white-space: nowrap;
    }

    .portal-home .header-mobile .bakset-mobile > a {
        min-width: 32px;
        padding-inline: 4px;
    }

    .portal-home .header-mobile .bakset-mobile .num-productos {
        position: relative;
        left: -9px;
        vertical-align: top;
    }
}

/* El carrusel de portada se maqueta en assets/css/portal-revision4.css. */
