
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: rgb(255, 255, 255);
    background-image: linear-gradient(to right top, #249a21, #228a20, #217a1f, #1f6b1d, #1d5c1b);
}

header {
    background-image: linear-gradient(to right top, #38a935, #339930, #2d892b, #287926, #236a21);
    color: rgb(255, 255, 255);
    padding: 1.5rem;
    text-align: center;
}

.logo {
    width: 7rem;
    height: auto;
}

nav {
    background: #333;
    display: flex;
    justify-content: center;
    padding: 1rem;
}

nav a {
    color: white;
    text-decoration: none;
    margin: 0 1rem;
}

nav a:hover {
    text-decoration: underline;
}


.section-index {
    position: relative;
    height: 30vh;
    background-image: url('../assets/img/gringo\'s_foto_fachada.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Le metemos un toque de desenfoque a la imagen */
    /* filter: blur(3px); */ 
    /* Pendiente: averiguar como aplico el blur solo a la img */
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
    color: white;
    text-shadow: 1px 1px 5px black;
}

section h2 {
    font-size: 2.5rem;
    background: rgba(0, 0, 0, 0.718);
    padding: 20px 30px;
    border-radius: 8px;
    max-width: 90%;
}

/* H2 general del main, para Ofertas */
main h2 {
    font-size: 2.5rem;
    text-align: center;
    padding: 20px;
    color: white;
    text-shadow: 1px 1px 5px black;
    margin-bottom: 2rem;
}

main {
    padding: 2.5rem 1.5rem;
    max-width: 1200px;
    margin: auto;
}

.oferta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.oferta-tarjeta {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    color: #333;
}

.oferta-tarjeta img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.oferta-info {
    margin-top: 1rem;
}

.oferta-titulo {
    font-size: 1.1rem;
    margin: 0 0 5px;
    color: #333;
}

.precio {
    color: #04e72a;
    font-weight: bold;
}

.btn-comprar {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #04e72a;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 0.5rem;
    transition: background 0.3s ease;
}

.btn-comprar:hover {
    background: #236a21;

}

footer {
background: #333;
color: white;
text-align: center;
padding: 1.5rem;
margin-top: 2.5rem;
}

/* ############## */
/* Usamos Queries */
/* ############## */

@media (max-width: 768px) {  /* Para tablets */
    
    section h2 {
        font-size: 2rem;
        padding: 15px 25px;
    }
    
    .oferta-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

}


@media (max-width: 480px) {  /* Para celus */
    
    header h1 {
        font-size: 1.8rem;
    }

    nav {
        flex-direction: column;  /* Aplila los enlaces de nav */
        padding: 0.5rem;
    }

    nav a {
        margin: 0.5rem 0;  /* Esp vertical e/enlaces */
        font-size: 0.9rem;
    }

    section h2 {
        font-size: 1.5rem;
        padding: 10px 15px;
    }

    main h2 {
        font-size: 1.8rem;
    }

    .oferta-grid {
        grid-template-columns: 1fr;   /* 1 sola col para celus */
        padding: 1rem;
    }

    .oferta-tarjeta {
        width: 90%;
        margin: 0 auto;   /* Centra la tarjeta en horizontal */
    }

}




/* ############## */
/* contacto.html  */
/* ############## */

.section-formulario {
    max-width: 800px;
    margin: 3rem auto;  /* Centra la sección del margen sup/inf */
    padding: 2.5rem;
    background-color: #f8f8f8;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    color: #333;
    text-align: center;
}

.section-formulario h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #236a21;
    background: none;
    padding: 0;
    text-shadow: none;
}

.section-formulario p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
    color: #555;
}

.section-formulario form {
    display: grid;
    grid-template-columns: 1fr;  /* Por defecto una sola col */
    gap: 1.5rem;  
    text-align: left; 
}

.formulario {
    margin-bottom: 0.5rem;
}

.formulario label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #333;
}

/* Estilos para los inputs */
.formulario input, .formulario textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    color: #333;
    background-color: #fefefe;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.8);
    transition: border-color 0.3s ease;
}

.btn-submit {
    background-color: #249a21;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: auto;
    justify-self: center;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: #1d5c1b;
}

/* ############## */
/* Usamos Queries */
/* ############## */

@media (min-width: 768px) {

    .section-formulario form {
        grid-template-columns: 1fr 1fr;  /* Dos col */
    }

    .btn-submit {
        grid-template-columns: 1;
    }
    
}

@media (max-width: 600px) {
    
    .section-formulario {
        padding: 1.5rem;
        margin: 2rem 1rem;
    }
    
    .section-formulario h2 {
        font-size: 2rem;
    }
    
    .section-formulario p {
        font-size: 1rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 12px 20px;
    }
    
}


.formulario-contacto {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: #f5f5f5;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.formulario-contacto label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: #333;
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

.formulario-contacto button {
  padding: 0.8rem 1.5rem;
  background-color: #357edd;
  color: white;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.formulario-contacto button:hover {
  background-color: #245bb5;
}



/* 🌟 Estilo para la tabla del carrito */
#contenedor-carrito table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background-color: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#contenedor-carrito th,
#contenedor-carrito td {
  padding: 12px;
  text-align: center;
  border-bottom: 1px solid #ddd;
  color: #333
}

#contenedor-carrito thead {
  background-color: #f5f5f5;
  font-weight: bold;
}

#contenedor-carrito tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* 🌟 Botones de + y – */
#contenedor-carrito button.sumar,
#contenedor-carrito button.restar {
  background-color: #3498db;
  color: white;
  border: none;
  padding: 6px 12px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  margin: 0 2px;
  transition: background-color 0.3s ease;
}

#contenedor-carrito button.restar {
  background-color: #e74c3c;
}

#contenedor-carrito button.sumar:hover {
  background-color: #2980b9;
}

#contenedor-carrito button.restar:hover {
  background-color: #c0392b;
}


#btn-vaciar-carrito {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: #236a21;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.3s ease;
}

#btn-vaciar-carrito:hover {
    background: #04e72a;

}

/* Estilos del pop-up */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.7);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 1000;
            visibility: hidden; /* Oculto por defecto */
            opacity: 0;
            transition: visibility 0s, opacity 0.3s ease;
        }

        .modal-overlay.show {
            visibility: visible;
            opacity: 1;
        }

        .modal-content {
            background-color: #333;
            color: white;
            padding: 2.5rem;
            border-radius: 1rem;
            text-align: center;
            box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5);
            max-width: 90%;
            width: 350px;
        }

        .modal-message {
            font-size: 1.25rem;
            margin-bottom: 1.5rem;
        }

        .modal-button {
            background-color: #4CAF50; /* Un verde similar a tu botón de la imagen */
            color: white;
            padding: 0.75rem 2rem;
            border-radius: 0.5rem;
            font-size: 1rem;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .modal-button:hover {
            background-color: #45a049;
        }


/* 🌟 Total destacado */
#total-carrito {
  font-size: 20px;
  font-weight: bold;
  margin-top: 20px;
  display: block;
  text-align: right;
  color: beige;
}

/* 🟢 Responsive */
@media (max-width: 768px) {
  #contenedor-carrito table,
  #contenedor-carrito thead,
  #contenedor-carrito tbody,
  #contenedor-carrito th,
  #contenedor-carrito td,
  #contenedor-carrito tr {
    display: block;
    width: 100%;
  }

  #contenedor-carrito tr {
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 10px;
    background-color: white;
  }

  #contenedor-carrito td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }

  #contenedor-carrito td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    width: 45%;
    padding-right: 10px;
    font-weight: bold;
    text-align: left;
    color: #444;
  }

  #contenedor-carrito thead {
    display: none;
  }
}
