/* ===================================
   CATENACCIO OFF-CANVAS MENU
   Versión optimizada y definitiva
   =================================== */

.cv-offcanvas-menu {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #111;
    padding: 0;
}

/* =========================
   MENÚ WORDPRESS (arriba)
   ========================= */

.cv-offcanvas-main-menu {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.cv-offcanvas-main-menu .elementor-nav-menu,
.cv-offcanvas-main-menu .elementor-nav-menu ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cv-offcanvas-main-menu .elementor-nav-menu li {
    margin: 0;
}

.cv-offcanvas-main-menu .elementor-item {
    display: block;
    padding: 0.5rem 0 !important;
    color: #111 !important;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.cv-offcanvas-main-menu .elementor-item:last-child {
    border-bottom: none;
}

.cv-offcanvas-main-menu .elementor-item:hover {
    color: #000 !important;
}

.cv-offcanvas-main-menu .elementor-nav-menu--dropdown a,
.cv-offcanvas-main-menu .elementor-nav-menu--dropdown .elementor-item {
    padding-left: 0 !important;
}

/* =========================
   NIVEL 1: "EXPLORAR COLECCIÓN"
   ========================= */

.cv-offcanvas-header {
    margin-bottom: 1.25rem;
    padding: 0.5rem 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cv-offcanvas-main-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111;
    margin: 0;
    text-align: center;
    white-space: nowrap;
}

/* =========================
   SECCIONES (contenedor)
   ========================= */

.cv-offcanvas-section {
    margin-bottom: 1.5rem;
}

.cv-offcanvas-section:not(:first-of-type) {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 2px solid #e5e7eb;
}

/* =========================
   NIVEL 2: Títulos de bloque
   (EQUIPOS / JUGADORES / TALLAS DISPONIBLES)
   ========================= */

.cv-offcanvas-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #111;
    margin: 0 0 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* =========================
   NIVEL 3: Listas e ítems
   ========================= */

.cv-offcanvas-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cv-offcanvas-item {
    margin: 0;
}

.cv-offcanvas-item a {
    display: block;
    padding: 0.5rem 0;
    text-decoration: none;
    color: #4b5563;
    font-size: 14px;
    font-weight: 400;
    border-bottom: 1px solid #f3f4f6;
    transition: color 0.15s ease;
}

.cv-offcanvas-item:last-child a {
    border-bottom: none;
}

.cv-offcanvas-item a:hover {
    color: #111;
}

/* "Ver todo" un poco más marcado */
.cv-item-all a {
    font-weight: 600;
    color: #111;
}

/* =========================
   ACORDEÓN (ligas / filtros)
   ========================= */

.cv-offcanvas-menu .cv-offcanvas-accordion {
    border-top: 1px solid #e5e7eb;
}

.cv-offcanvas-menu .cv-accordion-item {
    margin: 0;
    border-bottom: 1px solid #e5e7eb;
    background: transparent !important;
    border-radius: 0 !important;
}

.cv-offcanvas-menu .cv-accordion-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0 !important;
    border: none !important;
    background: transparent !important;
    color: #111 !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    box-shadow: none !important;
    border-radius: 0 !important;
    transition: color 0.15s ease;
}

.cv-offcanvas-menu .cv-accordion-toggle:hover {
    color: #000;
}

.cv-offcanvas-menu .cv-accordion-label {
    flex: 1;
}

.cv-offcanvas-menu .cv-accordion-icon {
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.cv-offcanvas-menu .cv-accordion-item.is-open .cv-accordion-icon {
    transform: rotate(180deg);
}

.cv-offcanvas-menu .cv-accordion-panel {
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.cv-offcanvas-menu .cv-accordion-item.is-open .cv-accordion-panel {
    max-height: 800px;
    padding-bottom: 0.5rem;
}

/* Ítems dentro del panel (equipos dentro de una liga, etc.) */
.cv-offcanvas-menu .cv-accordion-panel .cv-offcanvas-item a {
    padding-left: 1.25rem;
    font-size: 13px;
    color: #6b7280;
}

/* =========================
   TAGS DE TALLAS
   ========================= */

.cv-offcanvas-menu .cv-offcanvas-tags {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.cv-offcanvas-menu .cv-offcanvas-tag a {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    color: #111;
    background: #fff;
    transition: all 0.15s ease;
}

.cv-offcanvas-menu .cv-offcanvas-tag a:hover {
    border-color: #111;
    color: #fff;
    background: #111;
}

/* =========================
   LISTA DE JUGADORES (scroll)
   ========================= */

.cv-offcanvas-menu .cv-offcanvas-list--players {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.cv-offcanvas-menu .cv-offcanvas-list--players::-webkit-scrollbar {
    width: 5px;
}

.cv-offcanvas-menu .cv-offcanvas-list--players::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.cv-offcanvas-menu .cv-offcanvas-list--players::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.cv-offcanvas-menu .cv-offcanvas-list--players::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ===================================
   RESPONSIVE – MÓVIL
   =================================== */

/* Teléfonos hasta 768px */
@media (max-width: 768px) {

    /* TODOS LOS ITEMS AL MISMO TAMAÑO */
    .cv-offcanvas-main-menu .elementor-item,
    .cv-offcanvas-menu .cv-accordion-toggle,
    .cv-offcanvas-menu .cv-offcanvas-item a {
        font-size: 13px !important;
        font-weight: 500 !important;
        color: #111 !important;
        line-height: 1.4 !important;
        padding: 0.45rem 0 !important;
    }

    /* Subelementos dentro de acordeones */
    .cv-offcanvas-menu .cv-accordion-panel .cv-offcanvas-item a {
        font-size: 12px !important;
        color: #4b5563 !important;
        padding-left: 1rem !important;
    }

    .cv-offcanvas-main-menu {
        margin-bottom: 1.2rem;
        padding-bottom: 0.9rem;
    }

    /* EXPLORAR COLECCIÓN - Compacto en una línea */
    .cv-offcanvas-menu .cv-offcanvas-header {
        padding: 0.45rem 0.65rem !important;
        margin-bottom: 1rem !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-main-title {
        font-size: 12px !important;
        font-weight: 600 !important;
        letter-spacing: 0.06em !important;
        line-height: 1.2 !important;
    }

    /* EQUIPOS / JUGADORES / TALLAS DISPONIBLES - Más grandes, una línea */
    .cv-offcanvas-menu .cv-offcanvas-title {
        font-size: 13px !important;
        font-weight: 700 !important;
        letter-spacing: 0.08em !important;
        margin-bottom: 0.6rem !important;
        padding-bottom: 0.35rem !important;
        border-bottom: 1px solid #e5e7eb !important;
        line-height: 1.2 !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-section {
        margin-bottom: 1.3rem !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-section:not(:first-of-type) {
        margin-top: 1.3rem !important;
        padding-top: 1rem !important;
    }

    /* Tags de tallas */
    .cv-offcanvas-menu .cv-offcanvas-tag a {
        font-size: 11px !important;
        padding: 0.32rem 0.75rem !important;
    }
}

/* Teléfonos pequeños (≤ 380px) */
@media (max-width: 380px) {

    .cv-offcanvas-main-menu .elementor-item,
    .cv-offcanvas-menu .cv-accordion-toggle,
    .cv-offcanvas-menu .cv-offcanvas-item a {
        font-size: 12px !important;
        padding: 0.4rem 0 !important;
    }

    .cv-offcanvas-menu .cv-accordion-panel .cv-offcanvas-item a {
        font-size: 11px !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-main-title {
        font-size: 11px !important;
        letter-spacing: 0.05em !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-title {
        font-size: 12px !important;
        letter-spacing: 0.06em !important;
    }

    .cv-offcanvas-menu .cv-offcanvas-tag a {
        font-size: 10px !important;
        padding: 0.28rem 0.65rem !important;
    }
}