:root {
  --red: #DC143C;
  --gray: #707070;
  --black: #000000;
  --dark-gray: #1f1f1f;
  --light-gray: #f4f4f4;
  --white: #ffffff;
  --accent: #ff6b6b;
  --font-main: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Botón flotante de WhatsApp */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 999;
  animation: float 3s ease-in-out infinite;
}

.whatsapp-button:hover {
  background-color: #20ba58;
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.whatsapp-button svg {
  width: 32px;
  height: 32px;
  color: white;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Modal del formulario */
.form-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
}

.form-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s ease;
}

.form-modal-content {
  position: relative;
  background-color: var(--black);
  border: 2px solid var(--red);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideInUp 0.3s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.form-modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #999;
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.form-modal-close:hover {
  color: var(--red);
}

.form-modal-content h2 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.form-modal-subtitle {
  color: #999;
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

body {
  font-family: var(--font-main);
  background-color: var(--black);
  color: var(--white);
  line-height: 1.5;
}

/* HEADER */
.main-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 2rem;
  border-bottom: 2px solid var(--red);
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0 auto;
  flex-grow: 1;
  text-align: center;
}

.logo span:first-child {
  color: var(--red);
  font-weight: 700;
}

.logo-highlight {
  background-color: var(--gray);
  color: var(--white);
  padding: 0.2rem 0.6rem;
  margin-left: 0.5rem;
  border-radius: 3px;
  display: inline-block;
}

.main-nav a {
  color: var(--white);
  text-decoration: none;
  margin-left: 1rem;
  font-size: 0.95rem;
}

.main-nav a:hover {
  color: var(--red);
}

/* MOBILE MENU BUTTON */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--red);
  cursor: pointer;
  padding: 0.5rem 1rem;
  line-height: 1;
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: center;
  padding: 4rem 2rem;
  gap: 2rem;
  background: linear-gradient(135deg, #111111 0%, #000000 60%, #2d2d2d 100%);
}

.hero-content h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-img {
  width: 100%;
  max-width: 480px;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.hero-placeholder {
  border: 2px dashed var(--red);
  padding: 3rem 2rem;
  text-align: center;
  color: var(--accent);
}

/* SECCIONES GENERALES */
.section {
  padding: 3rem 2rem;
  background-color: var(--black);
}

.section-dark {
  background-color: var(--dark-gray);
}

.section h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  border-left: 6px solid var(--red);
  padding-left: 0.75rem;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 2rem;
}

/* SERVICIOS */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background-color: #111111;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #333333;
}

.service-card h3 {
  color: var(--red);
  margin-bottom: 0.75rem;
}

/* Misión / Visión */
.mv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.mv-card {
  background-color: #111111;
  padding: 1.5rem;
  border-radius: 6px;
  border: 1px solid #333333;
}

/* SUCURSALES */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.branch-card {
  background-color: #111111;
  padding: 0;
  border-radius: 6px;
  border: 1px solid #333333;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.branch-image {
  width: 100%;
  height: 280px;
  overflow: hidden;
  background-color: #1f1f1f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.branch-img {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

.branch-card h3,
.branch-card p {
  padding: 0.5rem 1.5rem;
}

.branch-card h3 {
  padding-top: 1rem;
  margin: 0;
  color: var(--red);
}

/* CONTACTO */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row label {
  color: var(--white);
  font-weight: 600;
  font-size: 0.95rem;
}

.form-row input,
.form-row textarea {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  border: 1.5px solid #333;
  background-color: #0a0a0a;
  color: var(--white);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: #555;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--red);
  background-color: #0f0f0f;
  box-shadow: 0 0 8px rgba(220, 20, 60, 0.2);
}

.contact-form .btn {
  padding: 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

#statusMessage {
  padding: 1rem;
  border-radius: 4px;
  font-weight: 500;
}

/* Opciones de contacto rápido */
.contact-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
  margin-top: 2rem;
}

.contact-option {
  text-align: center;
  padding: 1.5rem;
  background-color: var(--dark-gray);
  border-radius: 8px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.contact-option:hover {
  border-color: var(--red);
  background-color: rgba(220, 20, 60, 0.1);
  transform: translateY(-5px);
}

.option-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.contact-option h3 {
  color: var(--white);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.contact-option p {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-row label {
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.form-row input,
.form-row textarea {
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  border: 1px solid #555555;
  background-color: #111111;
  color: var(--white);
}

.form-row input:focus,
.form-row textarea:focus {
  outline: 1px solid var(--yellow);
}

/* BOTONES */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
}

.btn.primary {
  background-color: var(--red);
  color: var(--white);
}

.btn.primary:hover {
  background-color: #b81030;
}

.btn.secondary {
  background-color: transparent;
  color: var(--red);
  border: 1px solid var(--red);
}

.btn.secondary:hover {
  background-color: var(--red);
  color: var(--white);
}

/* FOOTER */
.main-footer {
  background-color: #050505;
  border-top: 1px solid #222222;
  padding: 3rem 2rem;
}

.footer-content {
  max-width: 800px;
  margin: 0 auto 2rem;
  background-color: #1f1f1f;
  padding: 2rem;
  border-radius: 4px;
  text-align: center;
}

.footer-content h2 {
  color: var(--red);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border-left: none;
  padding-left: 0;
}

.footer-content .section-intro {
  max-width: none;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.footer-content p {
  margin-bottom: 1rem;
  color: var(--white);
}

.footer-content ul {
  list-style: none;
  padding: 0;
  text-align: center;
  max-width: 400px;
  margin: 1.5rem auto;
}

.footer-content ul li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #333;
  color: var(--white);
}

.footer-content ul li:last-child {
  border-bottom: none;
}

.footer-copyright {
  text-align: center;
  font-size: 0.85rem;
  color: #999;
  margin: 0;
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .main-header {
    flex-direction: row;
    padding: 0.75rem 1rem;
  }

  .logo {
    font-size: 1rem;
  }

  .logo-highlight {
    padding: 0.15rem 0.4rem;
    margin-left: 0.25rem;
  }

  .main-nav {
    margin-left: 0;
  }

  .main-nav a {
    margin-left: 0;
    margin-right: 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 700px) {
  .main-header {
    justify-content: flex-start;
    gap: 1rem;
    padding: 0.75rem 1rem;
  }

  .mobile-menu-btn {
    display: block;
    order: -1;
  }

  .logo {
    margin: 0;
    flex-grow: 1;
    text-align: center;
    font-size: 1rem;
  }

  .main-nav {
    position: absolute;
    top: 60px;
    left: 0;
    display: none;
    flex-direction: column;
    background-color: #000;
    width: 100%;
    padding: 1rem;
    border-bottom: 1px solid var(--red);
    z-index: 99;
  }

  .main-nav.show {
    display: flex;
  }

  .main-nav a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #333;
    margin: 0;
  }

  .main-nav a:last-child {
    border-bottom: none;
  }

  .mobile-menu-btn {
    display: block;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 2rem 1rem;
  }

  .hero-content h1 {
    font-size: 1.5rem;
  }

  .hero-img {
    max-width: 100%;
  }

  .services-grid,
  .mv-grid,
  .branches-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 2rem 1rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .contact-form {
    max-width: 100%;
  }

  p {
    margin-bottom: 1rem;
  }

  h2 {
    margin-bottom: 1rem;
  }

  section {
    padding-top: 2rem;
    padding-bottom: 2rem;
  }

  .whatsapp-button {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  .whatsapp-button svg {
    width: 26px;
    height: 26px;
  }

  /* Opciones de contacto responsivas */
  .contact-options {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .contact-option {
    padding: 1rem;
  }

  .option-icon {
    font-size: 2rem;
  }

  .form-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
  }

  /* Modal responsive */
  .form-modal-content {
    padding: 1.5rem;
    width: 95%;
  }

  .form-modal-content h2 {
    font-size: 1.5rem;
  }

  .form-modal-close {
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
  }

  .form-row textarea {
    max-height: 200px;
  }

  /* Productos Grid Responsivo */
  .products-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    padding: 1rem;
  }

  .product-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .product-modal-content img {
    max-width: 100%;
    max-height: 70vh;
  }

  .product-modal-content h2 {
    font-size: 1.2rem;
    margin-top: 1rem;
  }
}

/* ===== GALERÍA DE PRODUCTOS ===== */
#productos {
  padding: 4rem 2rem;
  background-color: var(--dark-gray);
}

#productos h2 {
  font-size: 2.5rem;
  text-align: center;
  color: var(--red);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-intro {
  text-align: center;
  color: var(--gray);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
  /* Force redeploy - 3 column grid */
}

.product-card {
  background-color: #2a2a2a;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(220, 20, 60, 0.3);
}

.product-image {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background-color: #1f1f1f;
  cursor: pointer;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.1);
}

.product-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(220, 20, 60, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 1rem;
}

.product-card:hover .product-overlay {
  opacity: 1;
}

.product-card h3 {
  color: var(--red);
  font-size: 0.95rem;
  padding: 0.8rem 0.8rem 0.3rem;
  margin: 0;
}

.product-code {
  color: var(--gray);
  font-size: 0.75rem;
  padding: 0 0.8rem;
  margin: 0.2rem 0;
}

.product-price {
  color: var(--white);
  font-size: 0.9rem;
  padding: 0.3rem 0.8rem 0.8rem;
  margin: 0;
  font-weight: 600;
}

.price-value {
  color: var(--red);
  font-size: 1.2rem;
}

/* ===== MODAL DE PRODUCTO ===== */
.product-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
}

.product-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  cursor: pointer;
  animation: fadeIn 0.3s ease;
}

.product-modal-content {
  position: relative;
  background-color: #2a2a2a;
  padding: 2rem;
  border-radius: 12px;
  max-width: 90vw;
  max-height: 90vh;
  width: 900px;
  text-align: center;
  box-shadow: 0 8px 32px rgba(220, 20, 60, 0.3);
  animation: slideIn 0.3s ease;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
}

.product-modal-content img {
  width: 100%;
  height: auto;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.product-modal-content h2 {
  color: var(--red);
  font-size: 1.5rem;
  margin: 0;
  font-weight: 700;
}

.product-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--red);
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-modal-close:hover {
  color: var(--white);
  transform: scale(1.2);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive para tablet (máx 768px) */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  #productos h2 {
    font-size: 2rem;
  }

  .product-image {
    height: 200px;
  }

  .product-modal-content {
    width: 90vw;
    max-width: 90vw;
    max-height: 90vh;
    padding: 1.5rem;
  }

  .product-modal-content img {
    max-height: 75vh;
  }
}

/* Responsive para móvil (máx 480px) */
@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  #productos {
    padding: 2rem 1rem;
  }

  #productos h2 {
    font-size: 1.5rem;
  }

  .section-intro {
    font-size: 0.9rem;
    margin-bottom: 2rem;
  }

  .product-image {
    height: 150px;
  }

  .product-card h3 {
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem 0.2rem;
  }

  .product-code {
    font-size: 0.7rem;
    padding: 0 0.8rem;
    margin: 0.1rem 0;
  }

  .product-price {
    font-size: 0.85rem;
    padding: 0.2rem 0.8rem 0.6rem;
  }

  .product-modal-content {
    padding: 1rem;
    max-width: 95vw;
    width: 95vw;
    max-height: 95vh;
  }

  .product-modal-content img {
    max-height: 70vh;
    margin-bottom: 1rem;
  }

  .product-modal-content h2 {
    font-size: 1.2rem;
  }

  .product-modal-close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
  }
}