html {
    overflow-x: hidden;
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    overflow-x: hidden;
}

.header {
    background-color: #000000;
    color: white;
    text-align: center;
}

/* Menú de navegación */
.navbar {
    background-color: #222;
    position: sticky;
    top: 0;
    height: 46px;
    z-index: 1;
    width: 100%;
}

.navbar2 {
    background-color: #222;
    top: 0;
    height: 46px;
    z-index: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.navbar a, .dropdown{
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 20px;
    text-decoration: none;
    transition: background-color 0.3s;
}

.navbar a:hover, .dropbtn:hover {
    background-color: #e74c3c;
}

.sub {
    display: flex;
    justify-content: space-around;
    background-color: #333;
    height: 46px;
    align-items: center;
}

.sub a {
    width: 100%;
    text-align: center;
}

.dropdown {
    float: left;
    overflow: hidden;
    padding: 0;
}

.dropbtn {
    font-size: 16px;  
    border: none;
    outline: none;
    color: white;
    padding: 14px 20px;
    background-color: inherit;
    font-family: inherit;
    margin: 0;
    cursor: pointer;
    width: 120px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
}

.dropdown-content a {
    float: none;
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
}

.dropdown-content a:hover {
    background-color: #ddd;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.active, .dropbtn.active {
    background-color: #e74c3c;
}

.logo {
    background-color: unset;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
}

.search-bar {
    margin: 20px 0;
    text-align: center;
}

.search-bar input {
    padding: 10px;
    width: 60%;
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.moto-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 0 20px;
}

.moto-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    width: 300px;
    padding: 15px;
    transition: transform 0.3s;
}

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

.moto-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

.moto-title {
    font-size: 1.2em;
    margin: 10px 0;
    color: #333;
}

.moto-price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 1.3em;
}

.moto-specs {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
}

.section-title {
    text-align: center;
    margin: 30px 0;
    color: #333;
}

button {
    background-color: #e74c3c;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #c0392b;
}

.slideshow-container {
    margin: 0 auto;
    position: relative;
    display: grid;
    align-items: center;
    overflow: hidden;
    grid-template-columns: 2% 96% 2%;
    justify-items: center;
    max-width: 100%;
    box-sizing: border-box;
}

.slide {
    display: none;
    text-align: center;
    padding: 20px;
    grid-column: 2;
    width: 100%;
    box-sizing: border-box;
}

.slide.on {
    display: block;
}

.image-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.slide-image {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.slideshow-controls {
    text-align: center;
    margin: 20px 0;
}

.slideshow-controls button {
    padding: 10px 20px;
    margin: 0 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.slideshow-controls button:hover {
    background: #0056b3;
}

button.pslide {
    color: #666;
    background-color: unset;
    padding: 0;
    grid-column: 1;
    grid-row: 1;
    border-right: 10px solid; 
    border-bottom: 10px solid;
    height: 30px;
    width: 30px;
    transform: rotate(135deg);
    cursor: pointer;
    z-index: 10;
    margin-left: 30px;
}

button.nslide {
    color: #666;
    background-color: unset;
    padding: 0;
    grid-column: 3;
    border-right: 10px solid; 
    border-bottom: 10px solid;
    height: 30px;
    width: 30px;
    transform: rotate(-45deg);
    cursor: pointer;
    z-index: 10;
    margin-right: 30px;
}

.pslide:hover, .nslide:hover {
    color: #333;
    transition: color 0.3s;
}

.dots-container {
    text-align: center;
    margin: 20px 0;
    grid-column: 2;
    width: 100%;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    cursor: pointer;
}

.dot.on {
    background-color: #333;
}

img {
    background-color: white;
}

.image-group img {
    max-width: 100%;
    width: auto;
    height: auto;
}
.mobile_content {
    display: none;
}

.btn_motos, .btn_otros {
    display: grid;
    grid-template-columns: 85% 15%;
}
a.always_visible {
    display: none;
}
@media (max-width: 1200px) {
    .slideshow-container {
        grid-template-columns: 5% 90% 5%;
    }
    
    .slide {
        padding: 15px;
    }
    
    .image-group {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .slideshow-container {
        grid-template-columns: 8% 84% 8%;
    }
    
    .slide {
        padding: 10px;
    }
    
    .image-group {
        gap: 10px;
    }
    
    button.pslide, button.nslide {
        height: 20px;
        width: 20px;
        border-right: 7px solid;
        border-bottom: 7px solid;
    }
    
    .dots-container {
        margin: 15px 0;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .slideshow-container {
        grid-template-columns: 0% 100% 0%;
    }
    
    .slide {
        padding: 5px;
    }
    
    .image-group {
        gap: 5px;
    }
    
    button.pslide, button.nslide {
        height: 15px;
        width: 15px;
        border-right: 5px solid;
        border-bottom: 5px solid;
    }
    
    .dots-container {
        margin: 10px 0;
        grid-row: 2;
    }
    
    .dot {
        width: 8px;
        height: 8px;
        margin: 0 3px;
    }

    button.pslide, button.nslide{
        grid-row: 2;
    }

    .sub.navbar{
        flex-direction: column;
        height: auto;
    }
    a.not_visible {
        display: none;
    }

    .container {
    display: inline-block;
    cursor: pointer;
    grid-column: 2;
    }

    .bar1, .bar2, .bar3 {
    width: 35px;
    height: 5px;
    background-color: #e74c3c;
    margin: 6px 0;
    transition: 0.4s;
    }

    .change .bar1 {
    transform: translate(0, 11px) rotate(-45deg);
    }

    .change .bar2 {opacity: 0;}

    .change .bar3 {
    transform: translate(0, -11px) rotate(45deg);
    }

    .sub_container{
        display: grid;
        grid-template-columns: 89% 11%;
        width: 100%;
    }

    a.always_visible {
        display: block;
        background-color: #333;
    }

    .submenu_a{
        background-color: black;
    }

    .mobile_content {
        display: flex;
        height: 40vh;
    }
    .mobile_content .moto-card{
        margin: auto;
        height: 230px;
        text-align-last: center;
    }
    .mobile_content .moto-img{
        height: 130px;
        width: 85%;
    }
    .navbar2 {
        justify-content: space-between;
    }
    .main_content {
        display: flex;
        flex-direction: column;
        height: 65vh;
    }
}