body{
    min-height: 100vh;
    display: flex;
    justify-content: end;
    align-items: center;
    margin: 0px;
    background-color: #e9e9e9;
}

a{
    text-decoration: none;
    color: inherit;
}

.main{
    gap: 2rem;
    padding-top: 6rem;
}

.producto {
    display: grid;
    grid-template-columns: minmax(0, 600px) minmax(0, 400px);
    gap: 32px;
    background: #fff;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    font-family: "Nunito", sans-serif;
}

.img {
    display: flex;
    gap: 16px;
}

.main-img {
    flex: 1;
}

.main-img img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
}

.sub-imgs {
    width: 60px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-imgs img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.sub-imgs img:hover {
    border-color: #3483fa;
}

.opciones {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.datos h3 {
    font-size: 24px;
    margin: 0 0 16px;
    color: #0a4565;
}

.descripcion {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 24px;
}

.precio {
    font-size: 36px;
    color: #0a4565;
    margin: 0;
}

.botones {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.botones button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.botones button:first-child {
    background-color: #3483fa;
    color: white;
}

.botones button:last-child {
    background-color: #e3edfb;
    color: #3483fa;
}

.botones button:first-child:hover {
    background-color: #2968c8;
}

.botones button:last-child:hover {
    background-color: #d4e4f9;
}

.resultados-busqueda {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}
.resultados-busqueda h2{
    text-align: center;
    font-size: 3rem;
    color: #17b2c4;
    font-weight: bold;
    font-family: "Nunito", sans-serif;
    margin: 0;
}
.resultados-busqueda h3{
    text-align: center;
    font-size: 2rem;
    color: #00aff0;
    font-weight: bold;
    font-family: "Nunito", sans-serif;
    margin: 0;
}

.productos-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
    margin-top: 20px;
}

/*Cards de Productos*/

.producto-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    text-align: center;
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.producto-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.producto-card h3 {
    font-size: 1.2rem;
    margin: 10px 0 5px;
    color: #17b2c4 ;
    font-family: "Nunito", sans-serif;
}

.producto-card .precio {
    font-size: 1.1rem;
    font-weight: bold;
    color: #0a4565;
    margin: 5px 0 15px;
}

.producto-card button {
    background: #17b2c4 ;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
    font-family: "Nunito", sans-serif;
}

.producto-card button:hover {
    background: #0a4565;
}

@media (orientation: portrait) {
    .productos-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }
}
@media (max-width: 768px) {
    .producto {
        grid-template-columns: 1fr;
    }
    
    .img {
        flex-direction: column-reverse;
    }
    
    .sub-imgs {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .sub-imgs img {
        width: 60px;
    }
}

.cantidad-input {
    display: flex;
    align-items: center;
    gap: 5px;
}
.cantidad-input .cantidad-btn {
    width: 32px;
    height: 32px;
    background: #f2f2f2;
    border: 1px solid #ccc;
    font-size: 20px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.2s;
}
.cantidad-input .cantidad-btn:hover {
    background: #e0e0e0;
}
.cantidad-input .cantidad {
    width: 50px;
    text-align: center;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    height: 32px;
}
