/*
Theme Name: Mercadisa Panama
Theme URI: https://mercadisapanama.com
Author: Mercadisa
Description: Tema personalizado para Mercadisa Panamá - replica exacta del diseño original en Wix.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: mercadisa
*/

/* ==========================================
   VARIABLES Y RESET
   ========================================== */
:root {
  --navy:      #3A3F80;
  --green:     #6AB241;
  --gray-bg:   #f0f0f0;
  --footer-bg: #9E9FBB;
  --white:     #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--navy);
  background: #fff;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

/* ==========================================
   HEADER / NAVEGACIÓN
   ========================================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07);
  transition: box-shadow 0.3s;
}
#site-header.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 60px;
  max-width: 1400px;
  margin: 0 auto;
}

.site-logo img {
  height: 64px;
  width: auto;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 12px;
  align-items: center;
}
.main-nav a {
  font-family: 'Montserrat', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #222;
  padding: 6px 14px;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
}
.main-nav a:hover { color: var(--navy); }

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ==========================================
   HERO SECTION
   ========================================== */
#inicio {
  padding-top: 80px;
  min-height: 100vh;
  background: #fff;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 60px 120px;
}

.hero-text {
  flex: 0 0 50%;
  max-width: 50%;
  text-align: center;
  padding-right: 20px;
}
.hero-text h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 56px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 28px;
  letter-spacing: -0.5px;
}
.hero-text p {
  font-size: 16px;
  color: var(--navy);
  line-height: 1.85;
  text-align: center;
}
.hero-text p strong { font-weight: 700; }

.hero-image {
  flex: 0 0 50%;
  max-width: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-image img {
  max-height: 580px;
  width: 100%;
  object-fit: contain;
}

/* Watercolor brush stroke separator */
.hero-brush {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 55px;
  overflow: hidden;
  line-height: 0;
}
.hero-brush svg {
  width: 100%;
  height: 100%;
}

/* ==========================================
   SECCIÓN NOSOTROS
   ========================================== */
#nosotros {
  padding: 90px 0 80px;
  background: #fff;
}
.nosotros-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}
.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-line {
  display: block;
  width: 2px;
  height: 60px;
  background: var(--green);
  margin: 0 auto 20px;
}
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 40px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.section-subtitle {
  font-size: 16px;
  color: var(--navy);
  margin-top: 16px;
  line-height: 1.8;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.nosotros-content {
  display: flex;
  align-items: center;
  gap: 60px;
}
.nosotros-image {
  flex: 0 0 48%;
  max-width: 48%;
}
.nosotros-image img {
  width: 100%;
  height: auto;
}
.nosotros-text {
  flex: 0 0 48%;
  max-width: 48%;
}
.nosotros-text p {
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--navy);
  margin-bottom: 18px;
  text-align: justify;
}
.btn-primary {
  display: inline-block;
  background: var(--navy);
  color: #fff;
  padding: 13px 45px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  margin-top: 15px;
  transition: background 0.2s;
}
.btn-primary:hover { background: #2d3166; color: #fff; }

/* ==========================================
   SECCIÓN NUESTRAS MARCAS
   ========================================== */
#marcas {
  padding: 80px 0 0;
  background: #fff;
}
.marcas-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}

.brand-logos {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 50px;
  margin-bottom: 70px;
  padding: 0 20px;
}
.brand-logos img {
  max-height: 65px;
  max-width: 180px;
  width: auto;
  object-fit: contain;
  filter: grayscale(0%);
  transition: transform 0.25s, opacity 0.25s;
  opacity: 0.85;
}
.brand-logos img:hover { transform: scale(1.06); opacity: 1; }

/* ---- CARRUSEL DE MARCAS ---- */
.brand-carousel-section {
  position: relative;
  overflow: hidden;
  width: 100%;
}
.brand-carousel-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(.4,0,.2,1);
}
.brand-slide {
  min-width: 100%;
  max-height: 520px;
  overflow: hidden;
  position: relative;
}
.brand-slide img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  object-position: center top;
}

/* Prev/Next arrows */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.25);
  border: 2px solid rgba(255,255,255,0.6);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.2s;
}
.carousel-btn:hover { background: rgba(255,255,255,0.45); }
.carousel-prev { left: 20px; }
.carousel-next { right: 20px; }

/* Dots */
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}
.carousel-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  padding: 0;
}
.carousel-dot.active { background: #fff; }

/* ==========================================
   SECCIÓN SERVICIOS
   ========================================== */
#servicios {
  padding: 80px 0;
  background: var(--gray-bg);
}
.servicios-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px;
}
.servicios-intro {
  font-size: 16px;
  color: var(--navy);
  line-height: 1.85;
  text-align: center;
  max-width: 780px;
  margin: 0 auto 60px;
}

.servicios-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.servicio-item {
  padding: 50px 70px;
  text-align: center;
  background: var(--gray-bg);
}
.servicio-item:first-child {
  border-right: 1px solid #d8d8d8;
}
.servicio-icon {
  width: 130px;
  height: 130px;
  margin: 0 auto 28px;
}
.servicio-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.servicio-item h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 2.5px;
  margin-bottom: 20px;
  text-transform: uppercase;
}
.servicio-item p {
  font-size: 15px;
  color: var(--navy);
  line-height: 1.85;
  text-align: center;
}

/* ==========================================
   SECCIÓN CONTACTO
   ========================================== */
#contacto {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.contacto-bg-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
}
.contacto-inner {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 60px;
  display: flex;
  gap: 60px;
  align-items: flex-start;
  width: 100%;
}

/* Info lado izquierdo */
.contacto-info { flex: 0 0 38%; max-width: 38%; }
.contacto-info h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 50px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 40px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 28px;
}
.contact-icon {
  color: var(--navy);
  font-size: 22px;
  min-width: 26px;
  margin-top: 2px;
}
.contact-item p {
  font-size: 15.5px;
  color: var(--navy);
  line-height: 1.65;
}
.contact-item a { color: var(--navy); }
.contact-item a:hover { text-decoration: underline; }

/* Formulario lado derecho */
.contacto-form-wrap {
  flex: 1;
  background: rgba(255,255,255,0.88);
  padding: 40px 44px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.08);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block;
  font-family: 'Montserrat', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-group label .req { color: var(--navy); }
.form-group input,
.form-group textarea {
  width: 100%;
  border: 1.5px solid var(--navy);
  padding: 10px 13px;
  font-size: 14px;
  font-family: 'Open Sans', sans-serif;
  color: var(--navy);
  background: transparent;
  outline: none;
  transition: border-color 0.2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--green); }
.form-group textarea {
  height: 105px;
  resize: vertical;
}
.form-submit { text-align: right; margin-top: 6px; }
.btn-submit {
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 13px 55px;
  font-family: 'Montserrat', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-submit:hover { background: #2d3166; }

.form-notice {
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  display: none;
  border-radius: 2px;
}
.form-notice.success { background: #d4edda; color: #155724; display: block; }
.form-notice.error   { background: #f8d7da; color: #721c24; display: block; }

/* ==========================================
   FOOTER
   ========================================== */
#site-footer {
  background: var(--footer-bg);
  padding: 28px 60px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 50px;
  flex-wrap: wrap;
}
.footer-logo img {
  height: 70px;
  filter: brightness(0) invert(1);
}
.footer-divider {
  width: 1px;
  height: 65px;
  background: rgba(255,255,255,0.4);
}
.footer-col p {
  font-size: 14px;
  color: #fff;
  line-height: 1.75;
}
.footer-col a { color: #fff; }
.footer-col a:hover { text-decoration: underline; }

/* ==========================================
   RESPONSIVE — TABLET
   ========================================== */
@media (max-width: 1024px) {
  .header-inner, .hero-inner, .nosotros-inner,
  .marcas-inner, .servicios-inner, .contacto-inner, #site-footer { padding-left: 30px; padding-right: 30px; }
  .hero-text h1 { font-size: 44px; }
}

/* ==========================================
   RESPONSIVE — MÓVIL
   ========================================== */
@media (max-width: 768px) {
  /* Nav mobile */
  .main-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
  }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 10px 0; }
  .main-nav a { display: block; padding: 13px 30px; border-radius: 0; }
  .menu-toggle { display: flex; }

  /* Hero */
  .hero-inner { flex-direction: column; padding: 40px 20px 80px; }
  .hero-text, .hero-image { flex: none; max-width: 100%; width: 100%; padding: 0; }
  .hero-text { margin-bottom: 30px; }
  .hero-text h1 { font-size: 34px; }

  /* Nosotros */
  .nosotros-content { flex-direction: column; }
  .nosotros-image, .nosotros-text { flex: none; max-width: 100%; width: 100%; }

  /* Brand logos */
  .brand-logos img { max-height: 45px; }

  /* Servicios */
  .servicios-grid { grid-template-columns: 1fr; }
  .servicio-item:first-child { border-right: none; border-bottom: 1px solid #d8d8d8; }
  .servicio-item { padding: 40px 30px; }

  /* Contacto */
  .contacto-inner { flex-direction: column; padding: 40px 20px; }
  .contacto-info, .contacto-form-wrap { flex: none; max-width: 100%; width: 100%; }
  .contacto-info h2 { font-size: 36px; }
  .contacto-form-wrap { padding: 28px 22px; }
  .form-row-2 { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { gap: 20px; }
  .footer-divider { width: 80px; height: 1px; }
  #site-footer { padding: 28px 20px; }

  /* Section titles */
  .section-title { font-size: 28px; }
  .nosotros-inner, .marcas-inner, .servicios-inner { padding: 0 20px; }
}
