/* =====================================================
   REVELADO24 - HEADER EXCLUSIVO
   Archivo: /assets/css/header.css
===================================================== */

:root {
    --r24-header-dark: #2b2b2b;
    --r24-header-dark-2: #242424;
    --r24-header-gold: #d2a51b;
    --r24-header-white: #ffffff;
    --r24-header-border: #eeeeee;
    --r24-header-text: #151515;
    --r24-header-muted: #8f969e;
    --r24-header-width: 1340px;
    --r24-hover-soft: rgba(210, 165, 27, 0.14);
    --r24-hover-soft-dark: rgba(210, 165, 27, 0.18);
    --r24-hover-ring: rgba(210, 165, 27, 0.28);
}

body .r24-site-header,
body .r24-site-header * {
    box-sizing: border-box;
}

body .r24-site-header {
    position: relative;
    z-index: 50;
    width: 100%;
    margin: 0;
    padding: 0;
    font-family: inherit;
}

body .r24-site-header a {
    text-decoration: none;
}

body .r24-header-shell {
    width: min(calc(100% - 32px), var(--r24-header-width));
    margin: 0 auto;
}

body .r24-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* =========================
   Sobremesa - línea superior
========================= */

body .r24-desktop-header {
    display: block;
}

body .r24-topline {
    background: var(--r24-header-white);
    border-top: 1px solid #171717;
    border-bottom: 1px solid var(--r24-header-border);
}

body .r24-topline .r24-header-shell {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

body .r24-toplinks {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(18px, 2.2vw, 34px);
    min-width: 0;
}

body .r24-toplink {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 0;
    padding: 1px 0;
    color: var(--r24-header-text);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    border-radius: 999px;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

body .r24-toplink i {
    color: var(--r24-header-gold);
    font-size: 14px;
    line-height: 1;
}

body .r24-toplink:hover,
body .r24-toplink:focus {
    color: var(--r24-header-gold);
    background-color: var(--r24-hover-soft);
    box-shadow: 0 0 0 7px var(--r24-hover-soft);
    outline: none;
}

body .r24-top-cart {
    width: 30px;
    min-width: 30px;
    gap: 0;
}

body .r24-top-cart i {
    font-size: 16px;
}

body .cart-count {
    position: absolute;
    top: 1px;
    right: -5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--r24-header-gold);
    color: #1f1f1f;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 2px var(--r24-header-white);
}

/* =========================
   Sobremesa - línea central
========================= */

body .r24-mainline {
    background: var(--r24-header-dark);
}

body .r24-mainline .r24-header-shell {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(22px, 3.2vw, 56px);
    padding: 8px 0;
}

body .r24-logo-link {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    line-height: 0;
}

body .r24-logo-link img {
    display: block;
    width: auto;
    height: auto;
    max-width: clamp(190px, 17vw, 250px);
    max-height: 56px;
    object-fit: contain;
}

body .r24-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex: 1 1 auto;
    min-width: 0;
    gap: clamp(14px, 2vw, 34px);
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow: visible;
}

body .r24-desktop-nav a {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    padding: 3px 0;
    color: var(--r24-header-white);
    font-size: clamp(12px, 0.82vw, 15px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.01em;
    white-space: nowrap;
    border-radius: 999px;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

body .r24-desktop-nav a:hover,
body .r24-desktop-nav a:focus {
    color: var(--r24-header-gold);
    background-color: var(--r24-hover-soft-dark);
    box-shadow: 0 0 0 8px var(--r24-hover-soft-dark);
    outline: none;
}

body .r24-desktop-nav a:focus-visible,
body .r24-toplink:focus-visible,
body .r24-mobile-icon:focus-visible,
body .r24-mobile-menu-toggle:focus-visible,
body .r24-mobile-panel a:focus-visible {
    outline: 2px solid var(--r24-header-gold);
    outline-offset: 3px;
}

/* Ajuste progresivo: el menú no baja de línea, reduce tamaños y espacios. */
@media (max-width: 1180px) {
    body .r24-header-shell {
        width: min(calc(100% - 24px), var(--r24-header-width));
    }

    body .r24-mainline .r24-header-shell {
        gap: 18px;
        min-height: 68px;
    }

    body .r24-logo-link img {
        max-width: 185px;
        max-height: 50px;
    }

    body .r24-desktop-nav {
        gap: 12px;
    }

    body .r24-desktop-nav a {
        font-size: 12px;
        letter-spacing: -0.025em;
    }
}

@media (max-width: 1020px) {
    body .r24-mainline .r24-header-shell {
        gap: 14px;
    }

    body .r24-logo-link img {
        max-width: 165px;
        max-height: 46px;
    }

    body .r24-desktop-nav {
        gap: 10px;
    }

    body .r24-desktop-nav a {
        font-size: 11.4px;
    }
}

/* =========================
   Móvil
========================= */

body .r24-mobile-header {
    display: none;
}

@media (max-width: 900px) {
    body .r24-desktop-header {
        display: none;
    }

    body .r24-mobile-header {
        position: relative;
        z-index: 80;
        display: block;
        width: 100%;
        background: var(--r24-header-dark);
    }

    body .r24-mobile-bar {
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 7px 14px;
        background: var(--r24-header-dark);
    }

    body .r24-mobile-logo {
        display: inline-flex;
        align-items: center;
        min-width: 0;
        line-height: 0;
    }

    body .r24-mobile-logo img {
        display: block;
        width: auto;
        height: auto;
        max-width: min(178px, 48vw);
        max-height: 44px;
        object-fit: contain;
    }

    body .r24-mobile-actions {
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        flex: 0 0 auto;
        gap: 8px;
    }

    body .r24-mobile-icon,
    body .r24-mobile-menu-toggle {
        position: relative;
        width: 38px;
        height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--r24-header-white);
        cursor: pointer;
        line-height: 1;
        transition: background-color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    }

    body .r24-mobile-icon i {
        color: var(--r24-header-gold);
        font-size: 15px;
        line-height: 1;
    }

    body .r24-mobile-icon:hover,
    body .r24-mobile-icon:focus,
    body .r24-mobile-menu-toggle:hover,
    body .r24-mobile-menu-toggle:focus {
        background: rgba(210, 165, 27, 0.16);
        border-color: rgba(210, 165, 27, 0.42);
        box-shadow: 0 0 0 4px rgba(210, 165, 27, 0.12);
        outline: none;
    }

    body .r24-mobile-cart .cart-count {
        top: -4px;
        right: -4px;
        box-shadow: 0 0 0 2px var(--r24-header-dark);
    }

    body .r24-mobile-menu {
        position: static;
        display: inline-flex;
        align-items: center;
    }

    body .r24-mobile-menu summary {
        list-style: none;
    }

    body .r24-mobile-menu summary::-webkit-details-marker {
        display: none;
    }

    body .r24-mobile-menu-toggle::before {
        content: "\f0c9";
        color: var(--r24-header-gold);
        font-family: "Font Awesome 5 Free";
        font-size: 17px;
        font-weight: 900;
        line-height: 1;
    }

    body .r24-mobile-menu[open] .r24-mobile-menu-toggle::before {
        content: "\f00d";
    }

    body .r24-mobile-panel {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 10px 14px 16px;
        background: var(--r24-header-dark-2);
        border-top: 1px solid rgba(210, 165, 27, 0.45);
        box-shadow: 0 18px 35px rgba(0, 0, 0, 0.24);
    }

    body .r24-mobile-categories,
    body .r24-mobile-secondary {
        width: min(100%, 520px);
        margin: 0 auto;
    }

    body .r24-mobile-categories {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
    }

    body .r24-mobile-categories a {
        display: flex;
        align-items: center;
        min-height: 42px;
        padding: 10px 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        color: var(--r24-header-white);
        font-size: 14.5px;
        font-weight: 800;
        line-height: 1.15;
        transition: color 0.18s ease, background-color 0.18s ease;
    }

    body .r24-mobile-categories a:hover,
    body .r24-mobile-categories a:focus {
        color: var(--r24-header-gold);
        background-color: rgba(210, 165, 27, 0.12);
        outline: none;
    }

    body .r24-mobile-secondary {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        padding-top: 12px;
    }

    body .r24-mobile-secondary a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 38px;
        padding: 9px 10px;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.06);
        color: var(--r24-header-white);
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
    }

    body .r24-mobile-secondary i {
        color: var(--r24-header-gold);
        font-size: 13px;
        line-height: 1;
    }

    body .r24-mobile-secondary a:hover,
    body .r24-mobile-secondary a:focus {
        color: var(--r24-header-gold);
        background-color: rgba(210, 165, 27, 0.13);
        box-shadow: 0 0 0 3px rgba(210, 165, 27, 0.10);
        outline: none;
    }
}

@media (max-width: 390px) {
    body .r24-mobile-bar {
        gap: 10px;
        padding-right: 10px;
        padding-left: 10px;
    }

    body .r24-mobile-logo img {
        max-width: 150px;
        max-height: 40px;
    }

    body .r24-mobile-actions {
        gap: 6px;
    }

    body .r24-mobile-icon,
    body .r24-mobile-menu-toggle {
        width: 36px;
        height: 36px;
    }
}

/* =========================
   Línea inferior / breadcrumbs
   Se mantiene la estructura actual: Home / Productos / ...
========================= */

body .r24-breadcrumb-wrap {
    width: 100%;
    background: var(--r24-header-white);
    border-bottom: 1px solid #f3f3f3;
}

body .r24-breadcrumb {
    width: min(calc(100% - 32px), 1140px);
    margin: 0 auto;
    padding: 18px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--r24-header-muted);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.25;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

body .r24-breadcrumb a {
    color: var(--r24-header-muted);
    text-decoration: none;
    border-radius: 999px;
    transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

body .r24-breadcrumb a:hover,
body .r24-breadcrumb a:focus {
    color: var(--r24-header-gold);
    background-color: var(--r24-hover-soft);
    box-shadow: 0 0 0 5px var(--r24-hover-soft);
    outline: none;
}

body .r24-breadcrumb span {
    color: #c7ccd2;
}

body .r24-breadcrumb strong {
    color: #2f3438;
    font-weight: 500;
}

@media (max-width: 900px) {
    body .r24-breadcrumb {
        width: min(calc(100% - 28px), 1140px);
        padding: 13px 0;
        font-size: 12px;
        gap: 8px;
    }
}
