/* === MEGA MENU === */

.has-mega-menu {
    position: static !important;
    display: flex !important;
    align-items: center !important;
}

.has-mega-menu > a {
    display: flex !important;
    align-items: center !important;
}

.has-mega-menu > .sub-menu {
    display: none !important;
}

/* position:fixed set by JS so it spans full viewport */
.mega-box {
    position: fixed;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,0.14);
    z-index: 99999;
    display: none;
}

.has-mega-menu.is-open .mega-box {
    display: block;
}

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

.mega-cat-bar {
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
}

.mega-cat-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0 32px;
    overflow-x: auto;
}

.mega-cat-item {
    flex-shrink: 0;
    padding: 15px 22px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
    transition: color 0.15s;
    line-height: 1.4;
    text-align: center;
}

.mega-cat-item:hover,
.mega-cat-item.is-active {
    color: #e60012;
}

/* === PANELS === */

.mega-panel-area {
    padding: 28px 36px 0;
}

.mega-panel {
    display: none;
}

.mega-panel.is-active {
    display: block;
}

/* === MOTO GRID === */

.mega-moto-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 1300px) {
    .mega-moto-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1100px) {
    .mega-moto-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .mega-moto-grid { grid-template-columns: repeat(3, 1fr); }
}

.mega-moto-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.mega-moto-card:hover {
    transform: translateY(-3px);
}

.mega-moto-img-wrap {
    position: relative;
    width: 100%;
    height: 140px;
    margin-bottom: 6px;
}

.mega-moto-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.mega-moto-tag {
    position: absolute;
    top: 5px;
    left: 6px;
    background: #2054ac;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.6;
    z-index: 1;
}

.mega-moto-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #2054ac;
    line-height: 1.3;
    margin-bottom: 2px;
    transition: color 0.15s;
    text-transform: uppercase;
}

.mega-moto-card:hover .mega-moto-name {
    color: #286692;
}

.mega-moto-price {
    font-size: 13px;
    color: #777;
    font-weight: 300;
}

/* === MOBILE DRAWER === */

.mobile-drawer {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 999999;
    flex-direction: column;
    overflow: hidden;
}

.mobile-drawer.is-open {
    display: flex;
}

.mobile-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.mobile-drawer-logo .site-logo {
    width: auto;
}

.mobile-drawer-logo img {
    height: 3.5rem;
    width: auto;
    object-fit: contain;
}

.mobile-drawer-close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #212121;
    padding: 4px;
    line-height: 1;
}

.mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #e5e5e5;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #212121;
    letter-spacing: 0.5px;
    user-select: none;
}

.mobile-nav-arrow {
    font-size: 18px;
    color: #2054ac;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.mobile-nav-item.is-open > .mobile-nav-header .mobile-nav-arrow {
    transform: rotate(90deg);
}

.mobile-nav-link {
    display: block;
    padding: 18px 20px;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: #212121;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.mobile-nav-body {
    display: none;
    background: #f7f7f7;
}

.mobile-cat-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-cat-item {
    border-top: 1px solid #e5e5e5;
}

.mobile-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    font-family: Poppins, sans-serif;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.6px;
    user-select: none;
}

.mobile-cat-arrow {
    font-size: 16px;
    color: #2054ac;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.mobile-cat-item.is-open > .mobile-cat-header .mobile-cat-arrow {
    transform: rotate(90deg);
}

.mobile-cat-body {
    display: none;
    padding: 16px;
    background: #fff;
}

.mobile-cat-body .mega-moto-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 0;
}

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

.site-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    padding: 0.5rem 0 !important;
    background: #fff !important;
    z-index: 99999 !important;
    border-bottom: 1px solid #e5e5e5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* Logo */
.site-logo {
    width: 320px;
    flex-shrink: 0;
}

.site-logo a {
    display: flex;
    align-items: center;
}

.site-logo img {
    height: 2rem;
    width: auto;
    object-fit: contain;
}

.site-name {
    font-size: 2rem;
    font-weight: 700;
    color: #2054ac;
    text-decoration: none;
}

/* Nav principal */
.site-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-list > li {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 !important;
}

.nav-list > li > a {
    display: flex;
    align-items: center;
    padding: 0 1.6rem;
    font-family: Poppins, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    color: #212121;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
    position: relative;
}

.nav-list > li.menu-item-has-children > a::after {
    content: ' \25BE';
    font-size: 0.75rem;
    margin-left: 4px;
    vertical-align: middle;
}

.nav-list > li:hover > a,
.nav-list > li.current-menu-item > a,
.nav-list > li.current-menu-ancestor > a {
    color: #e60012;
}

/* Submenú estándar (Financiación, Servicio al cliente) */
.nav-list > li > .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    z-index: 99999;
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.nav-list > li:hover > .sub-menu {
    display: block;
}

.nav-list > li > .sub-menu li a {
    display: block;
    padding: 10px 20px;
    font-family: Poppins, sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #212121;
    text-decoration: none;
    transition: color 0.15s, background 0.15s;
}

.nav-list > li > .sub-menu li a:hover {
    color: #2054ac;
    background: #f5f5f5;
}

/* Hamburger mobile */
.nav-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 3rem;
    height: 2.2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: #303030;
    border-radius: 2px;
    transition: 0.3s;
}

/* Espacio para que el contenido no quede bajo el header */
body {
    padding-top: 6rem !important;
}

@media (max-width: 960px) {
    .site-nav { display: none; }
    .nav-hamburger { display: flex; }
    body { padding-top: 5rem !important; }
    .site-header { height: 5rem !important; }
    .site-logo img { height: 3rem; }
    .nav-list > li > .sub-menu { top: 5rem; }
}
