html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* html, body {
  height: 100%;
  margin: 0;
  padding: 0;
} */

/* Establecer una fuente por defecto con Google Fonts */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url(https://silicon.createx.studio/assets/img/landing/intro/hero/bg.jpg);
    background-size: 100% 100%;
    background-color: #0b0f19;
     /* height: 100vh; */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
  flex: 1;  
}

.titulo-carrito{
    color: white;
    text-align: center;
}

/* Estilo para el header */
header {
    background-color: #0b0f19;
    color: white;
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    position: sticky;
    top: -1px;
    z-index: 10;
}

header div {
    display: flex;
    gap: 3px;
}

.logo {
    height: 50px;
    transition: transform 0.3s ease;
    z-index: 2000;   
}

.logo:hover {
    transform: scale(1.1);
}

/* Checkbox oculto */
.menu-toggle {
    display: none;
}

/* Icono hamburguesa */
.menu-icon {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: absolute;
    right: 0;
    margin-right: 1rem;
    z-index: 1001;
}

.menu-icon span {
    position: absolute;
    width: 30px;
    height: 3px;
    background: #6366f1;
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* Posiciones iniciales */
.menu-icon span:nth-child(1) {
    top: 10px;
}

.menu-icon span:nth-child(2) {
    top: 18px;
}

.menu-icon span:nth-child(3) {
    top: 26px;
}

/* Al activar el checkbox: transformar a X */
.menu-toggle:checked~.menu-icon span:nth-child(1) {
    transform: rotate(45deg);
    top: 18px;
}

.menu-toggle:checked~.menu-icon span:nth-child(2) {
    opacity: 0;
}

.menu-toggle:checked~.menu-icon span:nth-child(3) {
    transform: rotate(-45deg);
    top: 18px;
}

/* Menú lateral (móvil) */
.menu {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: 250px;
    background: #111;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.3s ease;
    z-index: 1000;
}

/* Estilo para la barra de navegación */
.menu ul {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 1rem;
    padding: 0;
    margin: 0;
    padding-left: 30px;
}

nav ul li {
    display: inline-block;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 10px;
    font-size: 20px;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mostrar menú al activar checkbox */
.menu-toggle:checked~.menu {
    right: 0;
}

.icono-carrito {
    position: relative;
    display: inline-block;
    text-decoration: none;
    color: inherit;
    /* o un color específico, como #000 */
}

#contador-carrito {
    display: none;
    /* Oculto al inicio */
    position: absolute;
    top: -12px;
    right: -12px;
    background-color: white;
    font-size: 12px;
    padding: 4px;
    border-radius: 50%;
    font-weight: bold;
    line-height: 1;
    min-width: 18px;
    text-align: center;
}

.icono-carrito i {
    font-size: 30px;
}

.user-shop {
    color: #6366f1;
    font-size: 25px;
    position: absolute;
    right: 20px;
    cursor: pointer;
    gap: 20px;
    text-decoration: none;
}

.buscar {
    margin-right: 1rem;
    width: 20rem;
    color: #6366f1;
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
}

.buscar input {
    width: 100%;
    background: none;
    border: 0;
    outline: 0;
    color: #ffffff;

}

.barra {
    background-color: #6365f186;
    width: 75%;
    height: 1px;
    display: block;
    position: absolute;
    bottom: 0;
}

.producto button {
    background-color: #6365f1;
    border: none;
    border-radius: 5px;
    padding: 1rem;
    margin-top: 2rem;
    position: relative;
}


/* -------------------------------------- SECTION PRODCUTOS ------------------------------------------------ */
#productos {
    padding: 2%;
    margin: 5%;
    border-radius: 30px;
    text-align: center;
    color: white;
    background-color: #33354d;
    background: radial-gradient(116.18% 118% at 50% 100%, rgba(99, 101, 241, 0.075) 100%, rgba(218, 70, 239, 0.05) 41.83%, rgba(241, 244, 253, 0.103) 82.52%);
}

#productos h2 {
    margin: 0 0 5rem;
}

#contenedor-productos {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    /* flex-wrap: wrap; */
    gap: 2rem;
}

.tarjeta-producto {
    margin: 0px;
    padding: 10% 10% 8%;
    border-radius: 10px;
    transition: transform 0.3s ease; 
    cursor: pointer;
    background-color: #0b0f19;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: flex-start;
    /* height: 90%; Asegura altura uniforme si usas grid */
     min-height: 350px; /*Puedes ajustar este valor según tu diseño */
}

.producto strong {
    padding: 3rem 0 1rem;
    font-weight: lighter;
}

.tarjeta-producto p {
    
    margin: auto 0 1rem;
    font-weight: bold;
    font-size: 1.2rem;
}

.tarjeta-producto:hover {
    transform: scale(1.05);
}

#contenedor-productos img {
    border-radius: 30px;
    width: 100%;
    aspect-ratio: 345 / 345;
    object-fit: cover;
    display: block;
    border-radius: 30px;
}

#contenedor-productos button {
    align-self: center;
    /* margin-top: auto; Empuja el botón al fondo */
    padding: 0.5rem 1.2rem;
    background-color: #6366f1;
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#contenedor-productos button:hover {
    background-color: azure;
    color: #4f46e5;
}

/* Estilo para la sección de reseñas usando Grid */
#reseñas {
    padding: 2rem 0 5rem;
    background-color: #33354d;
    ;
    text-align: center;
    justify-items: center;
}

.h2reseñas {
    margin: 0 0 5rem;
    color: white;
}

.reseñas-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* gap: 2rem; */
    width: 100%;
    justify-items: center;
    align-items: stretch;
}

.card {
    width: 18rem; 
    height: 20rem;
    font-size: 90%;
    padding: 2%;
    background-color: white;
    border: 0.1rem solid #ddd;
    border-radius: 30px;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.2);
    font-style: italic;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* gap: .8rem;  */
}

.card h2,
p {
    margin: 0;
}

/* Estilo para el formulario de contacto */
#contacto {
    /* padding: 0 20px;*/
    margin: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center; 
    width: 100%; 
    height: 100vh;  
}

.form-contacto {
    background-color: #0b0f19;
    border-radius: 20px;
    padding: 3rem;
    color: white;
    width: 70%; 
    height: 80%;   /* Cambia a 80% de la altura de la ventana */  
    max-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    position: relative;
    top: -40px; 
}

.form-contacto h2 {
    margin: 0 0 1rem; 
    position: relative;
    top: -20px;    
}

form {

    background-color: #33354d28;
    background: radial-gradient(116.18% 118% at 50% 100%, rgba(99, 101, 241, 0.062) 100%, rgba(218, 70, 239, 0.05) 41.83%, rgba(241, 244, 253, 0.103) 82.52%);
    border-radius: 10px;
    padding: 2rem 0;   

    width: 100%;
    height: 100%;   
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: start; 
    /* gap: 1rem; */
    justify-content: flex-start; 
    box-sizing: border-box;
}


 .form-contacto label,
.form-contacto input,
.form-contacto textarea,
.form-contacto button {
    width: 90%;
    max-width: 1000px;
    /* min-width: 180px; */
    box-sizing: border-box;
}

.form-contacto input,
.form-contacto textarea {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc; 
    margin: .5rem 0 1.5rem;

}

/* .form-contacto textarea{
    height: 100%; 
    margin: 0;
} */

.form-contacto button {
    margin-top: auto;
    padding: 15px 10px;
    border-radius: 30px;
    background-color: #6366f1;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    width: 60%;
    max-width: 300px;
    transition: background-color 0.3s, transform 0.3s;
}

.form-contacto button:hover {
    background-color: #4044ee;
    transform: scale(1.05);
}

/* Estilo para el footer */
footer {
    background-color: #33333300;
    color: white;
    text-align: center;
    padding: 20px 0px;
    /* position: relative;
    bottom: 0; */
    width: 100%;
}

.redes {
    margin: 2rem;
}

.redes a i {
    color: #111;
    font-size: 30px;
    padding: 10px;
    transition: transform 0.3s ease;
}

.redes a i:hover {
    transform: scale(1.2);
}

/* .boton-subir {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #333333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    text-decoration: none;
    z-index: 1000;
    transition: background-color 0.3s;
    opacity: 0.3;
    transition: opacity 0.3s;

} */

.boton-subir:hover {
    background-color: #333333;
    opacity: 1;
}

.carrusel {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    height: 40vw;

}

.slides {
    display: flex;
    width: 100%;
    transition: transform 0.5s ease-in-out;
    animation: slide 15s infinite;
    height: 100%;
    object-fit: contain;
}

.slide {
    width: 100%;
    height: 100%;
    flex-shrink: 0;
    object-fit: contain;
}

.slide img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

/* Animación que recorre las imágenes */
@keyframes slide {
    0% {
        transform: translateX(0%);
    }

    25% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(-200%);
    }

    75% {
        transform: translateX(-300%);
    }

    100% {
        transform: translateX(0%)
    }
}

/* ALERTA PERZONALIZABLE */
.alerta-oculta {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #4caf50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alerta-mostrar {
    display: block;
    opacity: 1;
}

.descripción-resumen{
    display: grid;
    grid-template-columns: 3fr 1fr;
    place-items: center;
    justify-content: center;  
    align-items: flex-start;   
}

.descripcion{    
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;  
    width: 80%;  
} 
#descripcion { 
    margin: 0 0 2rem;
 }



#contenedor-carrito{
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;    
    gap: 20px;  
    width: 100%; 
}

.producto-carrito{ /* TARJETA DE PRODUCTO */
    background-color: #0b0f19;
    border-radius: 10px;
    padding: 1%;
    width: 100%; 
    /* height: 10rem;   */ 
    box-sizing: border-box;

    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    align-items: center;
    justify-content: space-around;
    gap: 40px;
}

.producto-carrito img{
    width: 100%; 
    /* height: 100%;  */
    /* object-fit: contain;     */ 
}

.titulo-producto{
    font-size: 1rem; 
    font-weight: bold;
    text-align: left;
    margin: 0; 
}  


.precio-producto{
    font-size: 1rem;
    font-weight: bold;
}

.btn-eliminar{
    background-color: #6365f11a;
    color: white;
    border: none;    
    border-radius: 10px;
    width: 100%;
    padding: 10px; 
    cursor: pointer;
    position: relative;
    left: -10px;
}

.btn-eliminar:hover{
    background-color: white;
    color: #0b0f19;
}

#resumen-carrito{
    background-color: floralwhite;
    color: #0b0f19;
    padding: 5%;
    border-radius: 10px;
    width: 80%;  
    height: 20rem;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    left: -3rem;  
}

#acciones-carrito{
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;    
}

.btn-vaciar{    
    color: #0b0f19;
    background-color: whitesmoke;    
}

.btn-finalizar{
    background-color: #6366f1;
    color: white;
    font-weight: bold;
}

.btn-finalizar:hover{
    background-color: #0b0f19;
    color: white;
}

#acciones-carrito button{    
    border: none;
    padding: 5%;
    border-radius: 13px;
    cursor: pointer;    
}

.cant-productos{
    display: flex;
    justify-content: space-between;
}

.total-resumen{
    display: flex;
    justify-content: space-between;
    font-size: 25px;
    font-weight: bold;
}

#seccion-principal{
    margin-bottom: 7rem;  
}


/* -------------------------------------- MEDIAS QUERYS PARA ADAPTABILIDAD ------------------------------------------------ */
/* === MEDIA QUERY: Pantallas mayores a 1024px === */
@media (min-width: 1024px) {
    header {
        flex-wrap: wrap;
    }

    /* Ocultar ícono hamburguesa */
    .menu-icon {
        display: none;
    }

    /* Menú horizontal dentro del header */
    .menu {
        position: static;
        display: block;
        height: auto;
        width: auto;
        background: transparent;
    }

    .menu ul {
        display: flex;
        gap: 30px;
    }

    .menu a {
        font-size: 16px;
    }
}

@media (max-width: 1350px) {
     .reseñas-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
        
    }

    #reseñas{
        padding: 3% 10%;
    }

    .card{
        width: 95%;
        /* height: 100%; */
    }


}

/* Media Queries para adaptabilidad en tablets */
@media (max-width: 1023px) {

    .menu-icon {
        display: flex;
    }

    .menu {
        display: flex;
        justify-content: flex-start; 
        width: 100%; 

    }

    .menu ul {
        display: flex;
        flex-direction: column;
        align-items: flex-start; 
        margin-top: 6rem;
        margin-left: 6rem;  
        gap: 3rem;
        width: 100%;
        z-index: 0;   
    }

    #user {
        color: #0b0f19;
    }

    .material-icons {
        color: white;
    }

    .productos-container {
        flex-direction: column;
    }

    .form-contacto {
        width: 85%;
    }
}


/* CELULAR */
@media (max-width: 768px) {

    .buscar {
        display: none;
    }

    .boton-subir {
        display: none;
    }

    #productos {
        padding: 1rem 1rem 2rem;
    }

    #productos h2 {
        margin-bottom: 2rem;
    }

    .productos-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        row-gap: 1rem;
    }

    .producto {
        font-size: 0.5rem;
        padding: 1rem;
        border-radius: 10px;
        flex: 1 0 auto;
    }


    .producto img {
        border-radius: 5px;
    }

    .producto strong {
        padding: 1rem 0 0.5rem;
        font-size: x-small;
    }

    .precio {
        font-size: medium;
    }

    .producto button {
        font-size: 8px;
        padding: 0.4rem 1rem;
        width: 100%;
        border-radius: 8px;
        transition: background-color 0.3s ease;
    }

    .h2reseñas {
        margin-bottom: 10%;
    }

    .reseñas-container {
        width: 90%;
        justify-content: space-between;
        display: flex;
        flex-wrap: nowrap;
        overflow: scroll;
        gap: 0;
    }

    .card {
        flex: 1 0 auto;
        margin: 1.5rem;
        justify-content: space-around;
    }

    form button {
        min-width: 40%;
        width: 90%;
    }

    .redes {
        margin: 0.5rem;
    }

    .redes a i {
        font-size: 25px;
        padding: 5px;
    }
}

@media (min-width: 2000px) { 
    #seccion-principal{
        margin: 0 10% 7rem;  
    }
}