body{
    margin: 0;
    overflow-x: hidden;
}

header{
    width: 100%;
}

header .section1{
       width: 100%;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: black;
    color: white;
    font-family: sans-serif;
}

header .section1 .left{
     display: flex;
    align-items: center;
    justify-content: start;
    position: relative;
    gap: 20px;
}

header .section1 .left .center{
    width: max-content;
    display: flex;
    align-items: center;
}


/* Configuraciones Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', serif; /* Una fuente elegante para títulos */
    background-color: #fdfbf7; /* Blanco roto/crema muy suave */
    color: #333;
}

/* Sección 1: Barra de aviso superior */
.section1 {
    background-color: #f2e9e1; /* Color tierra muy suave */
    display: flex;
    justify-content: space-between;
    padding: 10px 50px;
    font-size: 0.8rem;
    letter-spacing: 1px;
}

.section1 .left img {
    width: 18px;
    margin-right: 15px;
    opacity: 1;
}

/* Sección 2: Cabecera Principal */
.headertitulo {
    background-color: #F2EFE8;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    position:sticky;
}

.section2 {
      display: flex;
    justify-content: center;
    align-items: center;
    max-width: 100px;
    margin: 0 auto;
}

.section2 h1 {
    font-size: 2.5rem;
    letter-spacing: 5px;
    font-weight: 300;
}

.section2 img {
    width: 24px;
    cursor: pointer;
}

/* Navegación */
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 20px;
}

nav ul li {
    margin: 0 20px;
    color: #F2EFE8;
    font-family: sans-serif;
}

nav ul li a {
    text-decoration: none;
    color: #555;
    font-family: sans-serif;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: 0.3s;
}

nav ul li a:hover {
    color: #d4a373; /* Dorado suave */
    font-weight: bold;
}

/* Main: Banner Principal */
main .fondo-img {
    width: 100%;
    height: 60vh;
    background-color: #ddd; /* Temporal hasta que pongas tu imagen */
    object-fit: cover;
}

/* Productos / Secciones de la Clínica */
.bestsellers {
       max-width: 1200px;
    margin: 0px auto;
    text-align: center;
    justify-content: center;
    display: flow;
    margin: 60px auto;
}

.bestsellers h1 {
    font-size: 2rem;
    margin-bottom: 40px;
    font-weight: 400;
    color: #d4a373;
    font-weight: bold;
    font-family: sans-serif;
}
.product img:hover{
    transform: scale(1.5);
    transition: 0.45s;
    cursor: pointer;
}

.products {
        display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0px;
    padding: 0 20px;
    width: 810px;
    margin: 0 auto;
}

.product {
     padding: 20px;
    border-radius: 4px;
    transition: transform 0.3s;
    justify-content: center;
    height: max-content;
    animation-name: opacidad;
    animation-duration: 1s;
    background: #80808005;
    width: 410px;
}

.product:hover {
    transform: translateY(-5px);
}

.product img {
       width: 80%;
    object-fit: contain;
    margin-bottom: 15px;
    height: 350px;
}

.product h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product span {
    font-weight: bold;
    color: #d4a373;
}

.section2 .logo{
       width: 100px;
    position: relative;
}

.bestsellers h2 {
      font-family: sans-serif;
    font-weight: bold;
    color: #d4a373;
    margin-bottom: 70px;
}

.product button {
    display: block;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #d4a373;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.product button:hover {
cursor: pointer;
background-color: transparent;
border: 1px solid #d4a373;
color: #d4a373;
}

.product .boton{
    justify-content: center;
    display: flex;
}

.product .precio{
        color: #d4a373;
    font-weight: bold;
    font-size: 20px;
    font-family: sans-serif;
}

.fondo-img-hero {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.product h3{
    font-family: sans-serif;
}

.product p{
       font-family: sans-serif;
    font-size: 14px;
    color: #555;
    max-width: 250px;
    width: 100%;
    margin: 0 auto;
}

@keyframes opacidad {
    0%{
        opacity: 0;
    }

    100%{
        opacity: 1;
    }   
}



footer {
    background-color: #F2EFE8; /* Color crema oscuro para diferenciar del fondo */
    padding: 60px 0 20px 0;
    margin-top: 100px;
    border-top: 1px solid #e9e2d7;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    background-color: #F2EFE8; /* Color tierra muy suave */
    grid-template-columns: 2fr 1fr 1.5fr; /* La primera columna es más ancha */
    gap: 50px;
    padding: 0 20px;
}

.footer-column h3 {
    font-size: 1.8rem;
    letter-spacing: 4px;
    margin-bottom: 20px;
    font-weight: 300;
}

.footer-column h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
    color: #8c7851; /* Tono bronce/tierra */
}

.footer-column p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 12px;
}

.footer-column ul li a {
    text-decoration: none;
    color: #555;
    font-size: 0.85rem;
    transition: 0.3s;
}

.footer-column ul li a:hover {
    color: #d4a373;
    padding-left: 5px;
}

/* Newsletter */
.newsletter {
    display: flex;
    margin-top: 15px;
}

.newsletter input {
    padding: 10px;
    border: 1px solid #ddd;
    background: white;
    font-family: inherit;
    flex-grow: 1;
}

.newsletter button {
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    cursor: pointer;
    transition: 0.3s;
}

.newsletter button:hover {
    background-color: #d4a373;
}

/* Socials e inferior */
.footer-socials img {
    width: 20px;
    margin-right: 15px;
    filter: grayscale(1);
    opacity: 0.6;
}

.footer-bottom {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.75rem;
    color: #999;
}


/* Contenedor de la tienda */
.tienda-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.tienda-header {
    text-align: center;
    margin-bottom: 50px;
}

.tienda-header h1 {
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.productos{
         width: 1190px;
    display: flex;
    justify-content: center;
}

/* Grid de productos responsivo */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 40px 25px; /* Espacio entre productos */
}

/* Estilo de cada tarjeta de producto */
.producto {
    text-align: center;
    transition: transform 0.3s ease;
}

.producto:hover {
    transform: translateY(-5px);
}

.producto-img-container {
    background-color: #f9f9f9;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.producto img {
    width: 100%;
    height: 350px;
    object-fit: contain; /* Hace que todas las fotos tengan el mismo tamaño sin deformarse */
    transition: scale 0.5s;
}

.producto:hover img {
    scale: 1.05;
}

.producto h3 {
    font-size: 1.1rem;
    margin: 10px 0 5px;
    font-weight: 400;
}

.producto p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.btn-ver {
    background: transparent;
    border: 1px solid #333;
    padding: 10px 20px;
    cursor: pointer;
    margin-top: 10px;
    transition: 0.3s;
}

.btn-ver:hover {
    background: #333;
    color: white;
}



.product-img-container img{
    width: 220px;
}



/* Estilos del Modal */
.modal {
    display: none; 
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
     background-color: #fdfbf7;
    margin: 190px auto;
    padding: 40px;
    width: 70%;
    max-width: 900px;
    border-radius: 15px;
    position: relative;
    animation: fadeIn 0.3s;
    height: max-content;
}

@keyframes fadeIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    right: 20px; top: 10px;
    font-size: 30px; cursor: pointer;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.modal-image img {
    width: 100%;
    border-radius: 10px;
}

/* Selección de colores */
.color-selection { margin: 20px 0; }
.colors { display: flex; gap: 10px; margin: 10px 0; }
.color-opt {
    width: 30px; height: 30px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}
.color-opt:hover { transform: scale(1.2); }
.color-opt.active { border: 2px solid #333; transform: scale(1.1); }

.btn-buy {
    width: 100%;
    padding: 15px;
    background: #333;
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.perfil{
    position: z;
    z-index: 1;
    display: flex;
    position: relative;
    scale: 0.7;
    position: relative;
}

.iconos{
     width: 100%;
    height: 20px;
    justify-content: end;
    display: flex;
    margin-left: -40px;
}

.carrito{
      position: z;
    z-index: 1;
    display: flex;
    position: relative;
    scale: 0.7;
    position: relative;
    margin-left: 10px;
}


.producto img{
    object-fit: contain;
    width: 250px;
}



  /* Estilos específicos para la tienda que no estén en tu index.css */
        .tienda-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
        .tienda-header { text-align: center; margin-bottom: 50px; }
        
        .products-grid { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
            gap: 40px 25px; 
        }

        .producto { text-align: center; transition: 0.3s; padding: 15px; border-radius: 10px; }
        .producto:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.05); transform: translateY(-5px); }
        
        .product-img-container {
    transform: translateY(-5px);
    padding: 20px 20px; }
        .product-img-container img { width: 250px; height: 300px; object-fit: contain; }

        .btn-ver { 
            background: #333; color: white; border: none; padding: 10px 25px; 
            cursor: pointer; margin-top: 10px; border-radius: 5px; transition: 0.3s;
        }
        .btn-ver:hover { background: #555; }

        /* Ajuste Modal Responsivo */
        @media (max-width: 768px) {
            .modal-body { grid-template-columns: 1fr !important; }
            .modal-content { width: 95% !important; margin: 5% auto; }
            .modal-image img { height: 250px !important; }
        }


        .registro-container{
                margin: 300px auto;
    display: block;
    max-width: 300px;
        }

        .registro-container form{
       flex-direction: column;
    padding: 20px 0px;
    text-align: center;
        }

        .registro-container h2{
        font-family: sans-serif;
        text-align: center;
        width: 100%;
        }

        .registro-container form input{
    padding: 10px 10px;
    margin: 5px 0px;
    text-align: center;
    margin-bottom: 15px;
    border: none;
    background-color: rgba(128, 128, 128, 0.103);
    border-radius: 4px;
}

.registro-container form button{
    padding: 10px 15px;
    background-color: #d4a373;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 5px;
}


.bienvenidatexto{
    font-family: sans-serif;
    width: max-content;
    display: inline;
}

.useremail{
    font-family: sans-serif;
    width: max-content;
    display: inline;
    float: right;
}

.opciones{
    font-family: sans-serif;
    width: max-content;
    display: block;
    margin-top: 20px;
}


.listaadmin{
    list-style: none;
    display: block;
    margin-top: 20px;
}

.listaadmin li{
    margin-bottom: 10px;
}

.listaadmin li button{
    padding: 10px 15px;
    background-color: #d4a373;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    border-radius: 5px;
}

#btn-logout {
    align-items: center;
    display: flex;
    color: #1f3252ff;
}

#btn-logout:hover {
    color: white;
    background-color: red;
}

.logoutimg{
    width: 20px;
    margin-right: 10px;
    filter: grayscale(1);
    opacity: 1;
}

 .productos{
       flex-direction: row;
    gap: 20px;
    margin: 0 auto;
    }




/*MOVILES*/

@media (max-width: 400px) {
    
    body{
        overflow-x: hidden;
    }

    .section1{
            width: 100%;
    height: 70px;
    font-size: 12px;
    text-align: center;
    }

    .headertitulo nav ul{
         flex-direction: column;
    text-align: center;
    font-size: 20px;
    display: flex;
    gap: 10px;
    }

    ul li a{
        font-size: 40px;
    }

    .products{
            display: flex;
    flex-direction: column;
    width: 370px;
    justify-content: center;
    }
    .product{
        width: 100%;
    }
    .bestsellers h2{
        margin-bottom: 0px;
    }
    .product img{
            scale: 1.1;
    margin-right: 30px;
    }
    .product:hover{
        scale: 1;
    }
    .footer-container{
            max-width: 330px;
    display: flex;
    flex-direction: column;
    text-align: center;
    }

    .perfil{
        z-index: 1;
    display: flex;
    scale: 0.7;
    position: absolute;
    width: max-content;
    left: 270px;
    top: 23px;
    }
    .carrito{
            z-index: 1;
    display: flex;
    scale: 0.7;
    position: absolute;
    right: 60px;
    top: 24px;
    }

    .iconos{
    width: 100%;
    height: 20px;
    justify-content: center;
    display: flex;
    }


    .productos{
    flex-direction: column;
    width: 100%;
    gap: 20px;
    }
}