/* Estilos generales */
body {
  font-family: 'Segoe UI', sans-serif;
  background-color: #E2E2DE;
  margin: 0;
  padding: 0;
}

/* Header */
header {
  background-color: #1c1c1b;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.logo {
  max-height: 100px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.logo:hover {
  transform: scale(1.1) rotate(5deg);
  filter: drop-shadow(2px 4px 6px rgba(0,0,0,0.3));
}

.seguir-comprando {
  text-decoration: none;
  color: #FBE4D8;
  text-shadow: 2px 1px 1px #000;
  font-size: 1.2em;
  margin-top: 10px;
  font-weight: 700;
  display: inline-block;
}

/* Main */
main {
  padding: 20px;
  max-width: 1200px;
  margin: auto;
  background-color: #979086;
  border-radius: 10px;
  box-sizing: border-box;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  color: #333;                /* color del texto */
  border: 5px solid #c69391e7;  /* borde rosado */
  font-weight: 700;
  margin-top: 10px;
  padding: 20px;
}



h1 {
  text-align: center;
  font-size: 2em;
  margin-bottom: 20px;
}

/* Tabla del carrito */
#tabla-carrito {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

#tabla-carrito th,
#tabla-carrito td {
  padding: 12px;
  text-align: center;
  border: 1px solid #FBE4D8;
  font-size: 20px;
}

#tabla-carrito th {
  background-color: #FBE4D8;
  font-weight: bold;
}

#tabla-carrito img.imagen-producto {
  width: 80px;
  height: auto;
  border-radius: 5px;
}

/* Estilos para el total y botón de pago */
#total {
  font-size: 1.5em;
  font-weight: bold;
  text-align: right;
  margin-bottom: 20px;
}



/* Contenedor horizontal para botones y cantidad */
.cantidad-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

/* Estilo común para los botones */
.btn-cantidadmenos,
.btn-cantidadmas {
  background-color: #FBE4D8;
  color: #522b5b;
  border: none;
  border-radius: 50%;
  font-size: 1.2em;
  font-weight: 700;
  width: 30px;
  height: 30px;
  margin: 20px;
  padding: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Hover */
.btn-cantidadmenos:hover,
.btn-cantidadmas:hover {
  background-color: #f9f9f9;
}

/* Estilo para el número */
.cantidad-numero {
  font-size: 1.2em;
  min-width: 20px;
  text-align: center;
}









button {
  background-color: #522b5b;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 1.2em;
  display: block;
  width: 100%;
  margin-top: 10px;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #d9d3a0;
}

/* Botónes de eliminar y continuar pago */
button {
  background-color: #C69491;
  color: white;
  padding: 6px 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background-color: #FBE4D8;
  color: #522b5b;
  font-weight: 500;
}

/* 📱 Fix tabla y botones en móviles */
@media (max-width: 600px) {
  #tabla-carrito {
    display: block;
    overflow-x: auto; /* Si la tabla sigue siendo grande, permite scroll */
  }

  #tabla-carrito td, 
  #tabla-carrito th {
    font-size: 14px;   /* Texto más chico */
    padding: 8px;
    word-break: break-word; /* 🔑 evita que el contenido empuje el ancho */
  }

  button {
    font-size: 12px;
    padding: 6px 8px;
    max-width: 100%;    /* 🔑 nunca se sale del recuadro */
    box-sizing: border-box;
  }
}


/* 📱 Ajustes para móviles: tabla y botones */
@media (max-width: 600px) {
  #tabla-carrito {
    display: block;
    overflow-x: auto; /* scroll horizontal si hace falta */
    width: 100%;
  }

  #tabla-carrito th,
  #tabla-carrito td {
    font-size: 13px;       /* un poquito más chico */
    padding: 6px 8px;      /* reduce padding para más espacio */
    word-break: break-word; /* evita desbordes */
    text-align: center;
  }

  #tabla-carrito img.imagen-producto {
    width: 60px;  /* achica imagenes */
    height: auto;
  }

  button {
    font-size: 12px;
    padding: 5px 8px;
    max-width: 100%;
    box-sizing: border-box;
  }

  .cantidad-container {
    gap: 5px;          /* menos espacio entre botones de cantidad */
  }

  .btn-cantidadmenos,
  .btn-cantidadmas {
    width: 25px;
    height: 25px;
    font-size: 1em;
    padding: 0;
  }

  .cantidad-numero {
    font-size: 1em;
  }

  #total {
    font-size: 1.2em;
  }
}

/* ===== Logo general ===== */
.logo {
  max-height: 100px;
  width: auto;
  display: block;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

/* ===== Móviles portrait ===== */
@media (max-width: 600px) and (orientation: portrait) {
  .logo {
    max-height: 50px;
  }

  nav {
    padding: 10px 15px;
  }

  #menu-desplegable {
    font-size: 18px;
    padding: 10px 0;
  }

  .nav-comp li a {
    font-size: 16px;
    padding: 8px 10px;
  }
}

/* ===== Móviles landscape ===== */
@media (max-width: 600px) and (orientation: landscape) {
  .logo {
    max-height: 40px;
  }

  nav {
    padding: 5px 10px;
  }

  #menu-desplegable {
    font-size: 20px;
    padding: 8px 20px;
  }

  .nav-comp li a {
    font-size: 14px;
    padding: 8px 10px;
  }

  .nav-links {
    gap: 5px;
  }
}

/* ===== Tablets ===== */
@media (min-width: 601px) and (max-width: 1024px) {
  #menu-desplegable {
    font-size: 22px;
    padding: 12px 0;
  }

  .nav-comp li a {
    font-size: 17px;
  }
}

@media (min-width: 601px) and (max-width: 1024px) and (orientation: landscape) {
  .logo {
    max-height: 60px;
  }

  nav {
    padding: 10px 20px;
  }

  #menu-desplegable {
    font-size: 22px;
    padding: 10px 50px;
  }
}


/*  AQUI COMIENZA EL CSS DEL MODAL de pago     */

/* Modal */
#modal-pago {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  overflow: auto;
  padding: 20px;
}

.modal-content {
  background: #fff;
  padding: 30px;
  max-width: 600px;
  margin: auto;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow-y: auto;
  height: 80%; /* Limitar altura para asegurar visibilidad del contenido */
}

h2 {
  font-size: 26px;
  color: #333;
  margin-bottom: 20px;
  text-align: center;
}

h3 {
  font-size: 20px;
  color: #444;
  margin-top: 20px;
}

.form-group {
  margin-bottom: 20px;
}

label {
  font-size: 16px;
  color: #555;
  display: block;
  margin-bottom: 5px;
}

input[type="text"], select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-bottom: 2px solid #ccc;
  border-radius: 0;
  background-color: #f9f9f9;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus, select:focus {
  border-bottom-color: #854f6c;
  outline: none;
}

input[type="text"]:focus::placeholder, select:focus::placeholder {
  color: #854f6c;
}

input[type="text"]::placeholder {
  color: #aaa;
}

textarea {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: 2px solid #ccc;
  border-radius: 5px;
  margin-bottom: 15px;
}

textarea:focus {
  border-color: #854f6c;
  outline: none;
}

#resumen-pedido {
  padding-left: 20px;
  font-size: 16px;
  color: #333;
}

#resumen-total, #resumen-envio {
  font-weight: bold;
  font-size: 18px;
  color: #333;
  margin-top: 10px;
}

.form-actions {
  display: flex;
  justify-content: space-between;
}

.btn-submit, .btn-cancelar {
  width: 48%;
  padding: 12px;
  font-size: 16px;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.btn-submit {
  background-color: #28a745;
}

.btn-cancelar {
  background-color: #dc3545;
}

.btn-submit:hover, .btn-cancelar:hover {
  opacity: 0.8;
}


.close-btn {
  all: unset; /* Elimina toda herencia de estilos */
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 18px;
  color: #333;
  background-color: #6a5d52;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background-color 0.3s ease, color 0.3s ease;
  z-index: 1001;
}

.close-btn:hover {
  background-color: #d9d3a0;
  color: #fff;
}


/* Estilos para input tipo texto, email y select */
input[type="text"], input[type="email"], select {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  border: none;
  border-bottom: 2px solid #854f6c;
  border-radius: 0;
  background-color: #f9f9f9;
  margin-bottom: 15px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, select:focus {
  border-bottom-color: #854f6c;
  outline: none;
}

input[type="text"]:focus::placeholder, input[type="email"]:focus::placeholder, select:focus::placeholder {
  color: #854f6c;
}

input[type="text"]::placeholder, input[type="email"]::placeholder {
  color: #aaa;
}