/* Estilos generales */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
}

/* Contenedor principal del producto */
.producto-container {
    display: flex;
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

/* Contenedor de imágenes pequeñas */
.imagenes-pequeñas {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-right: 20px;
}

/* Estilos para cada imagen pequeña */
.imagen-pequeña-container {
    width: 80px;
    height: 80px;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.imagen-pequeña-container:hover {
    transform: scale(1.1);
    border-color: #007bff;
}

.imagen-pequeña-container.selected {
    transform: scale(1.1);
    border-color: #007bff;
}

.imagenes-pequeñas img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Imagen grande */
.imagen-grande {
    flex: 1;
    margin-right: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.imagen-grande img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.imagen-grande:hover img {
    transform: scale(1.05);
}

/* Informacin del producto */
.info-producto {
    flex: 1;
    padding-left: 20px;
}

.info-producto h1 {
    font-size: 28px;
    margin-bottom: 15px;
    color: #007bff;
}

.info-producto .descripcion {
    font-size: 16px;
    color: #555;
    line-height: 1.6;
    margin-bottom: 20px;
}

.info-producto .precio {
    font-size: 24px;
    font-weight: bold;
    color: #28a745;
    margin-bottom: 20px;
}

/* Botón de compra */
.btn-comprar {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-comprar:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-comprar:active {
    transform: translateY(0);
}

/* Media Query para pantallas medianas (menores a 900px) */
@media (max-width: 900px) {
    .producto-container {
        flex-direction: column;
        align-items: center;
    }

    .imagenes-pequeñas {
        flex-direction: row;
        margin-right: 0;
        margin-top: 20px;
        justify-content: center;
        order: 2; /* Las imágenes pequeñas pasan debajo */
    }

    .imagen-pequeña-container {
        width: 70px;
        height: 70px;
    }

    .imagen-grande {
        margin-right: 0;
        order: 1; /* Imagen grande queda arriba */
        max-width: 500px;
        width: 100%;
    }

    .info-producto {
        order: 3; /* Información queda al final */
        padding-left: 0;
        text-align: center;
        margin-top: 20px;
    }

    .btn-comprar {
        margin: 0 auto;
        display: block;
    }
}

/* Media Query para pantallas pequeñas (menores a 600px) */
@media (max-width: 600px) {
    .producto-container {
        margin: 20px;
        padding: 15px;
    }

    .imagen-pequeña-container {
        width: 60px;
        height: 60px;
    }

    .info-producto h1 {
        font-size: 24px;
    }

    .info-producto .descripcion {
        font-size: 14px;
    }

    .info-producto .precio {
        font-size: 20px;
    }

    .btn-comprar {
        padding: 10px 20px;
        font-size: 14px;
    }
}
