:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-soft: #f0f2f5;
    --text: #17191c;
    --muted: #72777f;
    --border: #e3e6ea;
    --dark: #101214;
    --dark-soft: #1a1d20;
    --accent: #d20a2e;
    --accent-dark: #ad0826;
    --success: #159447;

    --shadow:
        0 8px 30px
        rgba(0, 0, 0, 0.07);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    background: var(--bg);
    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;

    background: var(--dark);
    color: white;

    box-shadow:
        0 3px 14px
        rgba(0, 0, 0, 0.18);
}

.topbar-main {
    max-width: 1500px;

    margin: auto;
    padding: 8px 28px;

    display: grid;

    grid-template-columns:
        230px
        minmax(320px, 1fr)
        auto;

    align-items: center;

    gap: 28px;
}

.logo {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 12px;

    font-size: 24px;
    font-weight: 800;

    letter-spacing: -0.5px;
}

.logo-icon {
    width: 60px;
    height: 60px;

    flex: 0 0 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: var(--accent);

    overflow: hidden;

    font-size: 24px;
    font-weight: 900;
}

.logo-icon:has(img) {
    border-radius: 0;

    background: transparent;

    overflow: visible;
}

.logo-icon img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;
    object-position: center;

    background: transparent;
}

.logo small {
    display: block;

    margin-top: 1px;

    color: #9ba0a6;

    font-size: 11px;
    font-weight: 500;

    letter-spacing: 0.8px;
}

.search-header {
    display: flex;

    overflow: hidden;

    background: white;

    border:
        2px solid
        transparent;

    border-radius: 11px;
}

.search-header:focus-within {
    border-color: var(--accent);
}

.search-header input {
    flex: 1;

    min-width: 0;

    padding: 13px 16px;

    border: 0;
    outline: 0;

    font-size: 15px;
}

.search-header button {
    padding: 0 22px;

    border: 0;

    background: var(--accent);
    color: white;

    font-weight: 700;
}

.search-header button:hover {
    background: var(--accent-dark);
}

.account-area {
    display: flex;
    align-items: center;

    gap: 10px;
}

.icon-button {
    height: 44px;

    padding: 0 14px;

    display: flex;
    align-items: center;

    gap: 8px;

    border: 1px solid #34383d;
    border-radius: 10px;

    background: #1a1d20;
    color: white;

    font-weight: 600;
}

.icon-button:hover {
    background: #25292d;
}

.fav-count {
    min-width: 22px;
    height: 22px;

    padding: 0 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background: var(--accent);

    font-size: 11px;
    font-weight: 800;
}

.login {
    height: 44px;

    padding: 0 17px;

    border: 0;
    border-radius: 10px;

    background: white;
    color: #181a1c;

    font-weight: 700;
}

.nav {
    border-top: 1px solid #262a2e;

    background: #151719;
}

.nav-inner {
    max-width: 1500px;
    height: 47px;

    margin: auto;
    padding: 0 28px;

    display: flex;
    align-items: center;

    gap: 7px;
}

.nav button,
.nav a {
    height: 34px;

    padding: 0 14px;

    display: inline-flex;
    align-items: center;

    border: 0;
    border-radius: 8px;

    background: transparent;
    color: #c5c9ce;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;
}

.nav button:hover,
.nav a:hover,
.nav button.active {
    background: #25292d;
    color: white;
}

.hero {
    max-width: 1500px;

    margin: 30px auto 0;
    padding: 0 28px;
}

.hero-card {
    min-height: 250px;

    padding: 48px 54px;

    position: relative;

    display: flex;
    align-items: center;

    overflow: hidden;

    border-radius: 22px;

    background:
        radial-gradient(
            circle at 82% 20%,
            color-mix(
                in srgb,
                var(--accent) 45%,
                transparent
            ),
            transparent 25%
        ),
        radial-gradient(
            circle at 65% 130%,
            color-mix(
                in srgb,
                var(--accent) 25%,
                transparent
            ),
            transparent 35%
        ),
        linear-gradient(
            125deg,
            #101214 0%,
            #1c2024 58%,
            #111315 100%
        );

    color: white;
}

.hero-content {
    max-width: 650px;

    position: relative;
    z-index: 2;
}

.hero-label {
    margin-bottom: 14px;

    color:
        color-mix(
            in srgb,
            var(--accent) 60%,
            white
        );

    font-size: 12px;
    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: 1.4px;
}

.hero h1 {
    margin: 0;

    font-size:
        clamp(
            34px,
            4vw,
            54px
        );

    line-height: 1.05;

    letter-spacing: -1.8px;
}

.hero p {
    max-width: 550px;

    margin: 18px 0 0;

    color: #c6cbd0;

    font-size: 17px;
    line-height: 1.6;
}

.hero-decoration {
    position: absolute;

    right: 70px;

    font-size: 170px;

    opacity: 0.08;

    transform: rotate(-12deg);

    user-select: none;
}

.content {
    max-width: 1500px;

    margin: auto;

    padding:
        34px
        28px
        60px;
}

.section-header {
    margin-bottom: 22px;

    display: flex;
    justify-content: space-between;
    align-items: end;

    gap: 20px;
}

.section-header h2 {
    margin: 0 0 6px;

    font-size: 27px;

    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--muted);

    font-size: 14px;
}

.view-switch {
    padding: 4px;

    display: flex;

    background: #e9ebee;

    border-radius: 10px;
}

.view-switch button {
    padding: 9px 14px;

    border: 0;
    border-radius: 7px;

    background: transparent;
    color: #62676e;

    font-size: 13px;
    font-weight: 700;
}

.view-switch button.active {
    background: white;
    color: var(--text);

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.06);
}

.grid {
    display: grid;

    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );

    gap: 20px;
}

.card {
    min-width: 0;

    position: relative;

    overflow: hidden;

    background: var(--surface);

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        border-color 0.16s ease;
}

.card:hover {
    transform:
        translateY(-4px);

    border-color: #d5d8dd;

    box-shadow: var(--shadow);
}

.product-image {
    height: 190px;

    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            145deg,
            #f7f8fa,
            #eceff2
        );

    color: #b0b5ba;
}

.product-image-placeholder {
    width: 86px;
    height: 86px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        #e3e6e9;

    border-radius: 18px;

    background: white;

    font-size: 38px;

    box-shadow:
        0 7px 18px
        rgba(0, 0, 0, 0.04);
}

.stock-badge {
    position: absolute;

    left: 12px;
    top: 12px;

    padding: 6px 9px;

    border-radius: 7px;

    background:
        rgba(
            255,
            255,
            255,
            0.92
        );

    color: var(--success);

    font-size: 11px;
    font-weight: 800;

    box-shadow:
        0 2px 8px
        rgba(0, 0, 0, 0.06);
}

.stock-badge.sin-stock {
    color: #a52222;
}

.heart {
    width: 39px;
    height: 39px;

    position: absolute;

    right: 12px;
    top: 12px;

    z-index: 4;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid
        #e0e3e6;

    border-radius: 50%;

    background:
        rgba(
            255,
            255,
            255,
            0.95
        );

    color: #7a7f85;

    font-size: 21px;

    box-shadow:
        0 3px 10px
        rgba(0, 0, 0, 0.06);

    transition:
        transform 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.heart:hover {
    color: var(--accent);

    transform: scale(1.07);
}

.heart.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.card-body {
    padding: 17px 18px 19px;
}

.card-topline {
    margin-bottom: 8px;

    display: flex;
    justify-content: space-between;

    gap: 10px;
}

.brand {
    overflow: hidden;

    color: var(--accent);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 0.7px;

    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.code {
    color: #a0a5aa;

    font-size: 11px;

    white-space: nowrap;
}

.description {
    min-height: 43px;

    margin-bottom: 11px;

    display: -webkit-box;

    overflow: hidden;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.4;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.category {
    padding-bottom: 16px;

    overflow: hidden;

    border-bottom:
        1px solid
        #eef0f2;

    color: var(--muted);

    font-size: 12px;

    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-footer {
    margin-top: 15px;

    display: flex;
    align-items: end;
    justify-content: space-between;

    gap: 12px;
}

.price-label {
    margin-bottom: 3px;

    color: var(--muted);

    font-size: 11px;
}

.price {
    font-size: 22px;
    font-weight: 800;

    line-height: 1;

    letter-spacing: -0.5px;
}

.stock {
    color: var(--muted);

    font-size: 11px;

    text-align: right;
}

.empty {
    grid-column: 1 / -1;

    padding: 80px 25px;

    border:
        1px solid
        var(--border);

    border-radius: 16px;

    background: white;

    color: var(--muted);

    text-align: center;
}

.empty-icon {
    margin-bottom: 12px;

    font-size: 46px;
}

.loading {
    grid-column: 1 / -1;

    padding: 60px;

    color: var(--muted);

    text-align: center;
}

.pagination {
    margin-top: 34px;

    display: flex;
    align-items: flex-start;
    justify-content: center;

    gap: 12px;
}

.pagination > button {
    min-width: 42px;
    height: 42px;

    flex-shrink: 0;

    padding: 0 14px;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: white;
    color: var(--text);

    font-weight: 700;
}

.pagination > button:hover:not(:disabled) {
    border-color: #b9bec4;

    background: #fafafa;
}

.pagination > button:disabled {
    opacity: 0.35;
}

.page-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 11px;
}

.pagination-pages {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 6px;
}

.pagination-pages
.pagination-number {
    width: 42px;
    height: 42px;

    padding: 0;

    border:
        1px solid
        var(--border);

    border-radius: 9px;

    background: white;
    color: var(--text);

    font-weight: 700;

    transition:
        border-color 0.15s ease,
        background 0.15s ease,
        color 0.15s ease;
}

.pagination-pages
.pagination-number:hover {
    border-color: var(--accent);

    color: var(--accent);
}

.pagination-pages
.pagination-number.active {
    border-color: var(--accent);

    background: var(--accent);
    color: white;
}

.pagination-pages
.pagination-number.active:hover {
    color: white;
}

.pagination-ellipsis {
    width: 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: var(--muted);

    font-size: 16px;
    font-weight: 700;

    user-select: none;
}

.pagination-lower {
    min-height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: wrap;

    gap: 14px;
}

.pagination-summary {
    color: var(--muted);

    font-size: 13px;

    white-space: nowrap;
}

.pagination-jump {
    display: flex;
    align-items: center;

    gap: 6px;
}

.pagination-jump label {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--muted);

    font-size: 12px;
}

.pagination-jump input {
    width: 68px;
    height: 34px;

    padding: 0 8px;

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    outline: none;

    background: white;
    color: var(--text);

    font-size: 13px;

    text-align: center;
}

.pagination-jump input:focus {
    border-color: var(--accent);

    box-shadow:
        0 0 0 2px
        color-mix(
            in srgb,
            var(--accent) 14%,
            transparent
        );
}

.pagination-jump
.pagination-go {
    height: 34px;

    padding: 0 12px;

    border:
        1px solid
        var(--border);

    border-radius: 8px;

    background: white;
    color: var(--text);

    font-size: 12px;
    font-weight: 700;
}

.pagination-jump
.pagination-go:hover {
    border-color: var(--accent);

    color: var(--accent);
}

footer {
    padding: 34px 28px;

    background: var(--dark);
    color: #8d9399;

    font-size: 13px;
}

.footer-inner {
    max-width: 1500px;

    margin: auto;

    display: flex;
    justify-content: space-between;

    gap: 20px;
}

.footer-marca {
    color: white;
}

@media (max-width: 1150px) {

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

    .topbar-main {
        grid-template-columns:
            auto 1fr;
    }

    .search-header {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

@media (max-width: 820px) {

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

    .hero-decoration {
        display: none;
    }

    .hero-card {
        padding: 38px 30px;
    }

    .pagination {
        align-items: center;
    }

    .pagination > button {
        padding: 0 10px;
    }
}

@media (max-width: 570px) {

    .topbar-main {
        padding: 8px 16px;

        gap: 12px;
    }

    .logo-icon {
        width: 52px;
        height: 52px;

        flex-basis: 52px;
    }

    .logo small {
        display: none;
    }

    .login {
        padding: 0 11px;

        font-size: 12px;
    }

    .account-area {
        grid-column: 1 / -1;
        grid-row: 2;
        flex-wrap: wrap;
        justify-content: center;
        min-width: 0;
    }

    .search-header {
        grid-row: 3;
    }

    .account-area
    .icon-button
    span.label {
        display: none;
    }

    .nav-inner,
    .hero,
    .content {
        padding-left: 16px;
        padding-right: 16px;
    }

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

    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination {
        position: relative;

        padding-bottom: 54px;

        align-items: flex-start;

        gap: 7px;
    }

    .pagination > button {
        min-width: 40px;

        padding: 0 9px;

        font-size: 12px;
    }

    .pagination-pages
    .pagination-number {
        width: 38px;
        height: 38px;
    }

    .pagination-pages {
        gap: 4px;
    }

    .pagination-ellipsis {
        width: 18px;
    }

    .pagination-lower {
        width: 100%;

        position: absolute;
        left: 0;
        bottom: 0;

        gap: 8px;
    }

    .footer-inner {
        flex-direction: column;
    }
}


/* FIREWEB_LOGO_ENLACE_GLOBAL */

.product-logo-link,
.product-logo-link:link,
.product-logo-link:visited,
.product-logo-link:hover,
.product-logo-link:active,
.product-logo-link:focus {
    color: inherit;

    text-decoration: none !important;
}

.product-logo-link *,
.product-logo-link:hover *,
.product-logo-link:focus * {
    text-decoration: none !important;
}

.product-logo-link {
    cursor: pointer;
}


/* FIREWEB_TRANSICION_ENTRE_PAGINAS */

/* Transicion automatica entre paginas deshabilitada.
   Evita el error InvalidStateError de ViewTransition. */

::view-transition-old(root) {
    animation:
        fireweb-salida-pagina
        0.16s
        ease
        both;
}

::view-transition-new(root) {
    animation:
        fireweb-entrada-pagina
        0.20s
        ease
        both;
}

@keyframes fireweb-salida-pagina {
    from {
        opacity: 1;
    }

    to {
        opacity: 0.72;
    }
}

@keyframes fireweb-entrada-pagina {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (prefers-reduced-motion: reduce) {

    ::view-transition-old(root),
    ::view-transition-new(root) {
        animation: none;
    }
}


/* FIREWEB_CABECERA_MOVIL_COMPACTA */
@media (max-width: 570px) {

    .topbar.fireweb-mobile-compact .topbar-main {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        padding: 8px 12px;
    }

    .topbar.fireweb-mobile-compact .topbar-main > .logo,
    .topbar.fireweb-mobile-compact .topbar-main > .account-area,
    .topbar.fireweb-mobile-compact > .nav {
        display: none;
    }

    .topbar.fireweb-mobile-compact .topbar-main > .search-header {
        grid-column: 1 / -1;
        grid-row: 1;
        width: 100%;
        margin: 0;
    }
}


/* FIREWEB_OCULTAR_HERO_MOVIL */
@media (max-width: 570px) {
    #heroCatalogo {
        display: none;
    }
}
