/* estilos.css - Paleta: rojo terracota, gris y blanco */
:root {
  --rojo: #b04a2b;
  --gris: #e5e5e5;
  --blanco: #fff;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--gris);
  color: #222;
  position: relative;
  min-height: 100vh;
}
body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/fondo.png') no-repeat center center;
  background-size: cover;
  opacity: 0.95;
  z-index: -1;
  pointer-events: none;
}
.lang-selector {
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  gap: 8px;
  background: white;
  padding: 8px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.lang-btn {
  background: none;
  border: 2px solid transparent;
  font-size: 28px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
  line-height: 1;
}
.lang-btn:hover {
  transform: scale(1.1);
  background: rgba(176, 74, 43, 0.1);
}
.lang-btn.active {
  border-color: var(--rojo);
  background: rgba(176, 74, 43, 0.15);
}
header {
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 3px solid var(--rojo);
  padding: 1em 1em 0.8em 1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  backdrop-filter: blur(10px);
}
.logo-container {
  text-align: center;
  margin-bottom: 1em;
  padding: 0.5em;
}
.logo {
  height: 130px;
  width: auto;
  max-width: 100%;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.05);
}
nav {
  background: linear-gradient(135deg, var(--rojo) 0%, #8a3a20 100%);
  border-radius: 8px;
  padding: 0.6em 0;
}
nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2em;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav a {
  color: var(--blanco);
  text-decoration: none;
  font-weight: bold;
  transition: all 0.3s ease;
  padding: 0.5em 1em;
  border-radius: 4px;
  display: inline-block;
}
nav a:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
}
nav a.active {
  background: var(--blanco);
  color: var(--rojo);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
main {
  padding: 1.5em;
  min-height: 70vh;
}
main section {
  background: rgba(255, 255, 255, 0.92);
  padding: 2em;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  max-width: 900px;
  margin: 0 auto;
}
.bienvenida {
  text-align: center;
}
#formulario-contacto {
  margin-top: 2em;
}
.formulario-descripcion {
  text-align: center;
  font-size: 1.1em;
  color: #333;
  margin-bottom: 1.5em;
  font-weight: 500;
}
.oferta-item {
  background: rgba(176, 74, 43, 0.05);
  border-left: 4px solid var(--rojo);
  padding: 1.5em;
  margin: 1.5em 0;
  border-radius: 6px;
}
.oferta-item h2 {
  color: var(--rojo);
  margin-top: 0;
  margin-bottom: 0.8em;
  font-size: 1.2em;
}
.oferta-item p {
  margin: 0;
  line-height: 1.6;
  color: #333;
}
.cta {
  display: inline-block;
  background: var(--rojo);
  color: var(--blanco);
  padding: 0.75em 2em;
  border-radius: 4px;
  text-decoration: none;
  margin-top: 1em;
  font-weight: bold;
  transition: background 0.2s;
}
.cta:hover {
  background: #8a3a20;
}
footer {
  background: rgba(255, 255, 255, 0.75);
  border-top: 1px solid var(--gris);
  text-align: center;
  padding: 1em 0;
  margin-top: 2em;
  backdrop-filter: blur(10px);
}
form {
  background: rgba(255, 255, 255, 0.98);
  padding: 2em;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  max-width: 400px;
  margin: 0 auto;
}
label {
  display: block;
  margin-top: 1em;
  margin-bottom: 0.3em;
}
input, textarea, button {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 0.3em;
  border: 1px solid var(--gris);
  border-radius: 4px;
  font-size: 1em;
}
select {
  width: 100%;
  padding: 0.5em;
  margin-bottom: 0.3em;
  border: 2px solid var(--rojo);
  border-radius: 4px;
  font-size: 1em;
  background-color: white;
  color: #222;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b04a2b' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5em center;
  padding-right: 2.5em;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
}
select:hover {
  border-color: #8a3a20;
  box-shadow: 0 2px 8px rgba(176, 74, 43, 0.2);
}
select:focus {
  outline: none;
  border-color: var(--rojo);
  box-shadow: 0 0 0 3px rgba(176, 74, 43, 0.1);
  background-color: rgba(176, 74, 43, 0.02);
}
select option {
  padding: 0.5em;
  background: white;
  color: #222;
}
input::placeholder, textarea::placeholder {
  color: #999;
  font-style: italic;
}
.error-msg {
  display: block;
  color: #d32f2f;
  font-size: 0.85em;
  margin-bottom: 1em;
  min-height: 1.2em;
}
.consent-wrapper {
  margin: 1.5em 0;
  padding: 1em;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  border-left: 4px solid var(--rojo);
}
.consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5em;
  cursor: pointer;
  margin: 0;
}
.consent-label input[type="checkbox"] {
  width: auto;
  margin-top: 0.25em;
  cursor: pointer;
  flex-shrink: 0;
}
.consent-label a {
  color: var(--rojo);
  text-decoration: underline;
  font-weight: bold;
}
.consent-label a:hover {
  color: #8a3a20;
}
.privacy-content {
  max-width: 800px;
  margin: 2em auto;
  background: rgba(255, 255, 255, 0.85);
  padding: 2em;
  border-radius: 8px;
  line-height: 1.6;
  backdrop-filter: blur(10px);
}
.privacy-section h2 {
  color: var(--rojo);
  margin-top: 1.5em;
  border-bottom: 2px solid var(--gris);
  padding-bottom: 0.5em;
}
.privacy-section ul {
  margin-left: 1.5em;
}
.privacy-section hr {
  margin: 2em 0;
  border: none;
  border-top: 2px solid var(--gris);
}
button {
  background: var(--rojo);
  color: var(--blanco);
  border: none;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
button:hover:not(:disabled) {
  background: #8a3a20;
}
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #a0603d;
}
.social-links {
  display: flex;
  gap: 1em;
  align-items: center;
  margin-top: 1em;
  right: 20px;
}
.social-links a {
  color: var(--blanco);
  font-size: 1.8em;
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
  display: inline-block;
  line-height: 1;
}
.social-links a svg {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.social-links a:hover {
  transform: scale(1.2);
  opacity: 0.8;
}
.footer-container {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 2em;
  position: relative;
  width: 100%;
}
.footer-info {
  flex: 1 1 100%;
  text-align: center;
  max-width: 100%;
}
.contact-social {
  text-align: center;
  margin: 2em auto;
  padding: 2em;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 800px;
}
.contact-social h2 {
  color: var(--rojo);
  margin-bottom: 1em;
}
.contact-social p {
  margin-bottom: 1em;
  font-size: 1.1em;
  font-weight: 500;
}
.contact-social .social-links {
  justify-content: center;
  display: flex;
  gap: 1em;
  align-items: center;
}
.contact-social .social-links a {
  color: var(--rojo);
  font-size: 2.5em;
}
.contact-info-section {
  margin: 2em 0;
  padding: 1.5em;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 8px;
  border-left: 4px solid var(--rojo);
}
.contact-info-section h3 {
  color: var(--rojo);
  margin-bottom: 1em;
}
.contact-info-section p {
  margin: 0.5em 0;
  line-height: 1.6;
}
.contact-info-section a {
  color: var(--rojo);
  text-decoration: none;
  font-weight: bold;
}
.contact-info-section a:hover {
  text-decoration: underline;
}

/* Acordeones de servicios */
.servicio-item {
  margin-bottom: 1em;
  border: 2px solid var(--rojo);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.servicio-toggle {
  width: 100%;
  padding: 1.2em;
  background: var(--rojo);
  color: white;
  border: none;
  font-size: 1.2em;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  transition: background 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.servicio-toggle:hover {
  background: #9a3e25;
}
.servicio-toggle::after {
  content: '▼';
  font-size: 0.8em;
  transition: transform 0.3s ease;
}
.servicio-toggle.active::after {
  transform: rotate(180deg);
}
.servicio-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
  padding: 0 1.5em;
  background: white;
}
.servicio-content.active {
  max-height: 5000px;
  padding: 1.5em;
}
.servicio-content h3 {
  color: var(--rojo);
  margin-top: 1em;
  margin-bottom: 0.5em;
}
.servicio-content h3:first-child {
  margin-top: 0;
}
.servicio-content p {
  line-height: 1.6;
  margin-bottom: 1em;
}
.servicio-content ul {
  margin-left: 1.5em;
  margin-bottom: 1em;
  line-height: 1.8;
}

/* Galería de ventas (cajas y embalajes) y otros servicios */
.ventas-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 1000px;
  margin: 1.5em auto 0 auto;
  justify-items: center;
}

.venta-thumb {
  width: 100%;
  height: 240px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  background: #f8f8f8;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  content-visibility: auto;
  contain: layout style paint;
  will-change: transform;
}

.venta-thumb:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.venta-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: opacity;
}

@media (min-width: 900px) {
  .ventas-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
  .venta-thumb {
    height: 240px;
  }
}

@media (max-width: 768px) {
  .ventas-gallery {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .venta-thumb {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .ventas-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .venta-thumb {
    height: 150px;
  }
}

/* Lightbox Modal - Ampliación de imágenes */
.lightbox-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
}

.lightbox-modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  cursor: pointer;
}

.lightbox-container {
  position: relative;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  max-width: 90vw;
  max-height: 90vh;
}

#lightbox-image {
  max-width: 80vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  color: #333;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-weight: bold;
  z-index: 2002;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: scale(1.1);
}

.lightbox-close {
  top: -50px;
  right: -50px;
  font-size: 32px;
  width: 50px;
  height: 50px;
}

.lightbox-prev {
  left: -60px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: -60px;
  top: 50%;
  transform: translateY(-50%);
}

@media (max-width: 768px) {
  .lightbox-container {
    gap: 10px;
  }

  #lightbox-image {
    max-width: 95vw;
    max-height: 75vh;
  }

  .lightbox-close {
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 20px;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }
}


/* Botón flotante de WhatsApp */
.whatsapp-float {
  position: fixed;
  top: 50%;
  right: 30px;
  transform: translateY(-50%);
  z-index: 999;
  background-color: #25D366;
  color: white;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}
.whatsapp-float:hover {
  background-color: #128C7E;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}
.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

/* Toast Notification Success */
.toast-notification {
  position: fixed;
  top: 30px;
  right: 30px;
  background: white;
  border-left: 5px solid var(--rojo);
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  gap: 15px;
  min-width: 300px;
  max-width: 450px;
  opacity: 0;
  transform: translateX(400px);
  pointer-events: none;
}

.toast-notification.show {
  animation: slideInToast 0.4s ease forwards;
  opacity: 1;
  pointer-events: auto;
}

.toast-notification.hide {
  animation: slideOutToast 0.4s ease forwards;
  opacity: 0;
  pointer-events: none;
}

.toast-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  background: var(--rojo);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: bold;
}

.toast-content h3 {
  color: var(--rojo);
  margin: 0 0 5px 0;
  font-size: 18px;
}

.toast-content p {
  color: #666;
  margin: 0;
  font-size: 14px;
}

.toast-close {
  background: none;
  border: none;
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  margin-left: auto;
  min-width: 30px;
}

.toast-close:hover {
  color: var(--rojo);
}

@keyframes slideInToast {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOutToast {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

@media (max-width: 700px) {
  header {
    padding: 1em 1em 0.8em 1em;
  }
  .logo {
    height: 85px;
  }
  nav ul {
    gap: 0.8em;
    flex-direction: column;
    align-items: center;
  }
  nav a {
    display: block;
    width: 200px;
    text-align: center;
  }
  main {
    padding: 1em;
  }
  form {
    padding: 1em;
  }
  .footer-container {
    flex-direction: column;
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }
  .contact-social .social-links a {
    font-size: 2em;
  }
  .whatsapp-float {
    right: 20px;
    width: 55px;
    height: 55px;
  }
  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
  
  /* Toast responsive */
  .toast-notification {
    top: 20px;
    right: 20px;
    left: 20px;
    min-width: auto;
    max-width: none;
  }
}
