/* ==========================================================================
   Layout Principal del Catálogo (2 Columnas)
   ========================================================================== */
.catalog-main-content {
    background-color: #f4f6f9;
    padding: 40px 0 80px 0;
}

.catalog-layout-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 50px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

/* ==========================================================================
   SIDEBAR - ESTRICTO PARA ESCRITORIO (PC)
   ========================================================================== */
@media screen and (min-width: 992px) {
    /* 1. Destruimos cualquier rastro del menú móvil */
    .mobile-sidebar-trigger,
    .sidebar-overlay,
    .mobile-sidebar-header {
        display: none !important;
    }

    /* 2. Aseguramos que el título de PC sí se vea */
    .desktop-only {
        display: block !important;
    }

    /* 3. Fijamos el sidebar a la izquierda como columna */
    .catalog-sidebar {
        width: 280px !important;
        flex-shrink: 0;
        position: relative !important;
        left: auto !important;
        height: auto !important;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        z-index: 1 !important;
        transition: none !important;
    }
}

/* ==========================================================================
   INTERIORES DEL SIDEBAR (Compartido entre PC y Móvil)
   ========================================================================== */
.sidebar-main-title {
    font-size: 28px;
    font-weight: 700;
    color: #111;
    margin: 0 0 20px 0;
    letter-spacing: -0.5px;
}

.sidebar-box {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.accordion-item { border-bottom: 1px solid #f0f0f0; }
.accordion-item:last-of-type { border-bottom: none; }

.accordion-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    text-align: left;
    transition: color 0.3s;
}
.accordion-header:hover { color: #111; }
.accordion-icon { font-size: 18px; color: #999; }
.accordion-body { padding: 5px 25px 20px 25px; }

/* Radio Buttons */
.custom-radio {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    user-select: none;
}
.custom-radio input { position: absolute; opacity: 0; cursor: pointer; }
.radio-mark {
    position: absolute; top: 50%; left: 0; transform: translateY(-50%);
    height: 18px; width: 18px; background-color: #fff; border: 2px solid #ccc;
    border-radius: 50%; transition: all 0.2s ease;
}
.custom-radio:hover input ~ .radio-mark,
.custom-radio input:checked ~ .radio-mark { border-color: #00b912; }
.radio-mark:after {
    content: ""; position: absolute; display: none; top: 50%; left: 50%;
    transform: translate(-50%, -50%); width: 8px; height: 8px;
    border-radius: 50%; background: #00b912;
}
.custom-radio input:checked ~ .radio-mark:after { display: block; }
.custom-radio input:checked ~ .radio-text { color: #333; }

.sidebar-simple-link {
    display: block; padding: 15px 25px; font-size: 15px; font-weight: 600;
    color: #555; text-decoration: none; transition: color 0.3s;
}
.sidebar-simple-link:hover { color: #00b912; }

/* ==========================================================================
   SIDEBAR - ESTRICTO PARA MÓVIL (Menú Deslizable)
   ========================================================================== */
@media screen and (max-width: 991px) {
    .catalog-layout-container {
        flex-direction: column;
        padding: 0 20px;
    }

    /* 1. Ocultar título original de PC */
    .desktop-only {
        display: none !important;
    }

    /* 2. Mostrar el botón disparador ("Categorías >") */
    .mobile-sidebar-trigger {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        background: #ffffff;
        border: none;
        border-radius: 30px;
        padding: 12px 25px;
        font-size: 16px;
        font-weight: 600;
        color: #111;
        margin-bottom: 25px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.03);
        cursor: pointer;
    }
    .mobile-sidebar-trigger i { font-size: 20px; color: #666; }

    /* 3. Capa oscura de fondo */
    .sidebar-overlay {
        display: block !important;
        position: fixed;
        top: 0; left: 0; width: 100vw; height: 100vh;
        background: rgba(0,0,0,0.6);
        z-index: 9998;
        opacity: 0; pointer-events: none;
        transition: opacity 0.3s ease;
    }
    .sidebar-overlay.is-active { opacity: 1; pointer-events: auto; }

    /* 4. Panel Lateral Deslizable */
    .catalog-sidebar {
        position: fixed !important;
        top: 0; left: -100%;
        width: 85% !important; max-width: 320px; height: 100vh !important;
        background: #f4f6f9 !important;
        z-index: 9999 !important;
        padding: 20px !important;
        overflow-y: auto;
        transition: left 0.3s ease !important;
        box-shadow: 5px 0 20px rgba(0,0,0,0.1) !important;
    }
    .catalog-sidebar.is-active { left: 0 !important; }

    /* 5. Cabecera móvil con la X */
    .mobile-sidebar-header {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 25px;
    }
    .close-sidebar-btn {
        background: none; border: none; font-size: 20px;
        color: #111; cursor: pointer; padding: 5px;
    }
}