/* =========================
   NAVBAR – SAINT HUB
   Premium / Editorial
========================= */

:root {
    --accent: #f5c451;
}

/* =========================
   HEADER
========================= */

.saint-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #0f0f0f, #0b0b0b);
    border-bottom: 2px solid #1f1f1f;
    box-shadow: 0 20px 30px rgba(0,0,0,.35);
}

/* =========================
   TOP BAR
========================= */

.saint-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2rem 2rem;
    gap: 2rem;
}

/* =========================
   LEFT GROUP (LOGO + SEARCH)
========================= */

.nav-left {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    flex: 1;
}

/* =========================
   NAVBAR LOGO (AJUSTE FINO)
========================= */

.saint-logo {
    display: flex;
    align-items: center;
    margin-left: 13rem; /* lo separa del borde */
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

    .saint-logo img {
        height:50px; /* tamaño correcto */
        width: auto;
        object-fit: contain;
        display: block;
    }


/* SEARCH */
@media (max-width: 1199px) {

    .saint-search {
        margin-left: 0;
        max-width: 520px;
    }

    .saint-logo {
        margin-left: 0;
    }
}
@media (max-width: 992px) {

    .desktop-search {
        display: none !important;
    }
}
.saint-topbar {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
}
.saint-search {
    width: 100%;
    max-width: 520px; /* mismo tamaño visual */
    margin: 0; /* ? sin empujes */
}
@media (min-width: 1400px) {
    .saint-search {
        max-width: 600px;
    }
}


.saint-search {
    flex: 1;
    max-width: 999px;
    background: linear-gradient(180deg, #1a1a1a, #141414);
    border: 1px solid #2a2a2a;
    border-radius: 999px;
    padding: .55rem 1.2rem;
    color: #fff;
    font-size: .9rem;
    transition: border .2s ease, background .2s ease;
    margin-left: 9rem;
}
.saint-search-form {
    flex: 1;
    display: flex;
}

    .saint-search::placeholder {
        color: rgba(255,255,255,.45);
    }

    .saint-search:focus {
        outline: none;
        border-color: var(--accent);
        background: #121212;
    }

/* =========================
   RIGHT ACTIONS
========================= */

.top-right {
    display: flex;
    align-items: center;
    gap: .6rem;
}

/* NAV BUTTONS */

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .95rem;
    border-radius: 999px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.08);
    color: #eaeaea;
    font-size: .85rem;
    text-decoration: none;
    transition: background .2s ease, border .2s ease;
}

    .nav-btn i {
        font-size: .95rem;
    }

    .nav-btn:hover {
        background: rgba(255,255,255,.08);
        border-color: rgba(255,255,255,.15);
    }

    /* REGISTER (OUTLINE) */

    .nav-btn.outline {
        background: transparent;
        border: 1px solid rgba(245,196,81,.6);
        color: var(--accent);
    }

        .nav-btn.outline:hover {
            background: rgba(245,196,81,.1);
        }

    /* CART */

    .nav-btn.cart {
        position: relative;
    }

.cart-count {
    background: var(--accent);
    color: #111;
    font-size: .7rem;
    font-weight: 700;
    padding: .15rem .45rem;
    border-radius: 999px;
    margin-left: .25rem;
}

/* =========================
   CATEGORY BAR
========================= */

.saint-categories {
    display: flex;
    justify-content: center;
    gap: 1.6rem;
    padding: .6rem 0;
    background: linear-gradient(180deg, #121212, #0f0f0f);
    border-top: 1px solid rgba(255,255,255,.06);
}

    .saint-categories a {
        font-size: .85rem;
        color: rgba(255,255,255,.75);
        text-decoration: none;
        position: relative;
        padding-bottom: .25rem;
    }

        .saint-categories a::after {
            content: "";
            position: absolute;
            left: 0;
            bottom: 0;
            width: 0%;
            height: 1px;
            background: var(--accent);
            transition: width .2s ease;
        }

        .saint-categories a:hover {
            color: #fff;
        }

            .saint-categories a:hover::after {
                width: 100%;
            }
/* =========================
   NAVBAR – MOBILE
========================= */
@media (max-width: 900px) {

    .saint-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1.2rem;
        padding: 1.2rem 1rem;
    }

    .nav-left {
        flex: unset;
        width: 100%;
    }

    .top-right {
        justify-content: flex-end;
    }
}
@media (max-width: 900px) {

    .saint-logo {
        margin-left: 0;
        margin-right: .6rem;
        margin-top: .6rem;
        
    }
}
@media (max-width: 900px) {

    .saint-search {
        margin-left: 0;
        max-width: 100%;
        width: 100%;
    }
}
@media (max-width: 600px) {

    .nav-btn span {
        display: none;
    }

    .nav-btn {
        padding: .45rem .7rem;
    }
}
@media (max-width: 768px) {

    .saint-categories {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
        padding: .6rem 1rem;
        gap: 1.4rem;
        -webkit-overflow-scrolling: touch;
    }

        .saint-categories::-webkit-scrollbar {
            display: none;
        }
}
@media (max-width: 480px) {

    .saint-logo img {
        height: 42px;
    }

    .saint-search {
        font-size: .85rem;
        padding: .6rem 1.1rem;
    }
}
@media (max-width: 768px) {

    /* =========================
   MOBILE SEARCH BAR
========================= */
   
}

.saint-search-wrapper {
    position: relative;
    width: 420px;
}

.saint-search {
    width: 100%;
    padding: 0.7rem 1rem 0.7rem 3rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #111, #0b0b0b);
    border: 1px solid rgba(255,255,255,.08);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
}

    .saint-search::placeholder {
        color: rgba(255,255,255,.45);
    }

.saint-search-icon {
    position: absolute;
    left: 10rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: rgba(255,255,255,.6);
    pointer-events: none;
}

/* Focus premium */
.saint-search:focus {
    border-color: rgba(245,196,81,.6);
    box-shadow: 0 0 0 2px rgba(245,196,81,.15);
}
    .saint-search:focus + .saint-search-icon,
    .saint-search-wrapper:focus-within .saint-search-icon {
        color: #f5c451;
    }

/* =====================================================
   SEARCH MOBILE – DEFINITIVO
===================================================== */

.mobile-search {
    display: none;
}

@media (max-width: 991.98px) {

    /* Ocultar search desktop */
    .desktop-search {
        display: none !important;
    }

    /* Mostrar search mobile */
    .mobile-search {
        display: flex;
        position: sticky;
        top: 64px;
        z-index: 3000;
        width: 100%;
        height: 64px;
        align-items: center;
        padding: 0 1rem;
        background: linear-gradient(180deg, #0f0f0f, #0b0b0b);
    }

        .mobile-search .saint-search {
            flex: 1;
            height: 44px;
            padding: 0 1rem 0 3rem;
            border-radius: 999px;
            background: rgba(255,255,255,.08);
            border: 1px solid rgba(255,255,255,.15);
            color: #fff;
        }

        .mobile-search .search-icon {
            position: absolute;
            left: 1.8rem;
            color: rgba(255,255,255,.6);
            pointer-events: none;
        }
}
/* =========================
   MOBILE MENU OPEN – HIDE SEARCH
========================= */

.mobile-menu.open ~ .mobile-search {
    display: none !important;
}

/* =========================
   CART – MOBILE OVERRIDE (FINAL)
========================= */
@media (max-width: 768px) {

    /* RESET TOTAL */
    .cart-grid,
    .cart-item.premium {
        all: unset;
    }

    /* WRAPPER */
    .cart-wrapper {
        display: block;
        margin: 1.2rem auto 4rem;
        padding: 0 1rem;
    }

    /* HEADER */
    .cart-header h1 {
        font-size: 1.5rem;
    }

    .cart-header p {
        font-size: .9rem;
        opacity: .7;
    }

    /* ITEM CARD */
    .cart-item.premium {
        display: flex;
        flex-direction: column;
        gap: .9rem;
        padding: 1.1rem;
        border-radius: 18px;
        background: rgba(255,255,255,.03);
        border: 1px solid rgba(255,255,255,.08);
    }

    /* IMAGE */
    .cart-img {
        width: 100%;
        height: 180px;
        object-fit: cover;
        border-radius: 14px;
    }

    /* INFO */
    .cart-info {
        display: flex;
        flex-direction: column;
        gap: .25rem;
    }

        .cart-info strong {
            font-size: 1rem;
            line-height: 1.3;
        }

        .cart-info small {
            font-size: .85rem;
            opacity: .7;
        }

        .cart-info .price {
            font-size: 1.05rem;
            font-weight: 700;
            color: var(--accent);
            margin-top: .3rem;
        }

    /* CONTROLS */
    .cart-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: .6rem;
    }

    .cart-qty {
        display: flex;
        align-items: center;
        gap: .7rem;
    }

    .qty-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }

    .qty {
        min-width: 26px;
        text-align: center;
        font-size: 1rem;
    }

    .remove-btn {
        font-size: 1.2rem;
        color: #ff6b6b;
    }

    /* SUBTOTAL */
    .cart-subtotal {
        font-size: .95rem;
        font-weight: 600;
        text-align: right;
        margin-top: .4rem;
    }

    /* SUMMARY */
    .cart-summary.premium {
        margin-top: 2rem;
        padding: 1.2rem;
        border-radius: 18px;
        background: rgba(255,255,255,.04);
        border: 1px solid rgba(255,255,255,.1);
    }

    .cart-total {
        font-size: 1.05rem;
    }

    /* ACTIONS */
    .cart-actions {
        display: flex;
        flex-direction: column;
        gap: .7rem;
        margin-top: 1rem;
    }

        .cart-actions .btn-saint {
            width: 100%;
            height: 46px;
            font-size: .95rem;
        }
}
/* =========================
   CART – MOBILE CLEAN FIX
========================= */
@media (max-width: 768px) {

    /* ? ELIMINAR PRECIO DUPLICADO */
    .cart-subtotal {
        display: none !important;
    }

    /* CONTENEDOR ITEM */
    .cart-item.premium {
        position: relative;
    }

    /* ? BOTÓN ELIMINAR — ESQUINA SUPERIOR */
    .remove-btn {
        position: absolute;
        top: 12px;
        right: 12px;
        font-size: 1.25rem;
        background: none;
        border: none;
        color: #ff6b6b;
        opacity: .85;
    }

        .remove-btn:hover {
            opacity: 1;
        }

    /* CONTROLES ABAJO */
    .cart-controls {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: .8rem;
    }

    /* PRECIO PRINCIPAL */
    .cart-info .price {
        font-size: 1.05rem;
        font-weight: 700;
        color: var(--accent);
    }
}




/* =========================
   SEARCH – OVERRIDE DEFINITIVO
========================= */
@media (max-width: 1200px) {

    .topbar .nav-left form.saint-search-form.desktop-search {
        flex: 1 !important;
        width: 100% !important;
        max-width: none !important;
        min-width: 0 !important;
        display: flex !important;
    }

    .topbar .nav-left .saint-search-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .topbar .nav-left input.saint-search {
        width: 100% !important;
    }
}

/* =========================
   CATEGORY DROPDOWN
========================= */

.saint-categories {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.category-item {
    position: relative;
    padding-bottom: 1px; /* ?? CREA PUENTE DE HOVER */
}


    .category-item > a {
        text-transform: uppercase;
        font-size: .95rem;
        letter-spacing: .15em;
        color: #ddd;
        padding: .75rem 0;
        display: inline-block;
    }

/* Dropdown */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: #0b0b0b;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform-origin: top;
    transition: all .25s ease;
    z-index: 2000;
}
    .category-dropdown::before {
        content: "";
        position: absolute;
        top: -12px;
        left: 0;
        width: 100%;
        height: 12px;
    }

    /* Links */
    .category-dropdown a {
        padding: .75rem 1rem;
        font-size: .75rem;
        text-transform: uppercase;
        letter-spacing: .12em;
        color: #eee;
    }

        .category-dropdown a:hover {
            background: rgba(255,255,255,.05);
            color: var(--gold);
        }

/* Hover */
.category-item:hover .category-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(6px);
}
