/* =======================================================
   Mobile drawer menu — independiente de pixelstrap/SmartMenus
   Vive a nivel <body> para no quedar atrapado en stacking contexts.
   ======================================================= */

@media (max-width: 1199px) {
    /* Ocultar el menu original (pixelstrap) en mobile */
    #main-nav .sm.pixelstrap.sm-horizontal {
        display: none !important;
    }
}

.mobile-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    cursor: pointer;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #fff;
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
}

.mobile-drawer.is-open {
    transform: translateX(0);
}

.mobile-drawer-overlay.is-open {
    display: block;
}

.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #2d2a25;
    border-bottom: 1px solid #1f1d1a;
}

.mobile-drawer-header img {
    max-height: 40px;
    width: auto;
}

.mobile-drawer-close {
    background: transparent;
    border: 0;
    font-size: 26px;
    color: #fff;
    line-height: 1;
    cursor: pointer;
    padding: 4px 10px;
}

.mobile-drawer-close:hover {
    color: #ddd;
}

.mobile-drawer-body {
    padding: 10px 0;
    flex: 1;
}

.mobile-drawer-body a.drawer-link {
    display: block;
    padding: 12px 20px;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 1px solid #f4f4f4;
}

.mobile-drawer-body a.drawer-link:hover {
    background: #f8f8f8;
    color: #000;
}

.mobile-drawer-section-title {
    padding: 18px 20px 8px;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-drawer-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 20px 20px;
}

.mobile-drawer-chips a {
    font-size: 13px;
    color: #555;
    padding: 6px 12px;
    background: #ebe9e9;
    border-radius: 3px;
    text-decoration: none;
}

.mobile-drawer-chips a:hover {
    background: #e0dede;
    color: #000;
}

/* En desktop nunca mostrar el drawer ni overlay */
@media (min-width: 1200px) {
    .mobile-drawer,
    .mobile-drawer-overlay {
        display: none !important;
    }
}

/* Bloquear scroll del body cuando el drawer está abierto */
body.mobile-drawer-open {
    overflow: hidden;
}

/* =======================================================
   Mobile header (<1200px) — layout propio, independiente
   del .main-menu del template.
   ======================================================= */
.mobile-header {
    background: #212529;
    color: #fff;
    padding: 10px 15px;
}

.mobile-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mobile-header-hamburger {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 24px;
    padding: 8px 10px;
    cursor: pointer;
    line-height: 1;
}

.mobile-header-logo {
    display: inline-block;
    flex: 1;
    text-align: center;
}

.mobile-header-logo img {
    max-height: 60px;
    width: auto;
}

.mobile-header-cart {
    font-size: 22px;
    color: #fff;
    min-width: 40px;
    text-align: right;
}

.mobile-header-cart a { color: #fff; }

.mobile-header-search {
    display: flex;
    justify-content: center;
    padding: 10px 0 4px;
}

.mobile-header-search .form_search {
    width: 100%;
    max-width: 320px;
}
