/* =============================================
   EL CARRETÓN — Estilos principales
   ============================================= */

@font-face {
  font-family: 'TT Berlinerins';
  src: url('../fonts/TT Berlinerins Trial Grotesk.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --brown-dark:   #2C1810;
  --brown-mid:    #5C3317;
  --brown-light:  #8B5E3C;
  --brown-warm:   #C4956A;
  --cream:        #FBF6EE;
  --cream-dark:   #F0E6D3;
  --iron:         #3A3A3A;
  --iron-light:   #6B6B6B;
  --white:        #FFFFFF;
  --text:         #1A1209;
  --text-muted:   #6B5C4E;
  --wa-green:     #25D366;
  --wa-dark:      #128C7E;

  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;

  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 20px rgba(0,0,0,.12);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.16);

  --transition: .25s cubic-bezier(.4,0,.2,1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--cream); line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
address { font-style: normal; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .03em;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--brown-warm);
  color: var(--white);
  border: 2px solid var(--brown-warm);
}
.btn-primary:hover { background: var(--brown-mid); border-color: var(--brown-mid); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  color: var(--brown-mid);
  border: 2px solid var(--brown-mid);
}
.btn-outline:hover { background: var(--brown-mid); color: var(--white); transform: translateY(-1px); }

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.7);
}
.btn-outline-light:hover { background: rgba(255,255,255,.15); border-color: var(--white); }

.btn-wa-nav {
  background: var(--wa-green);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .85rem;
}
.btn-wa-nav:hover { background: var(--wa-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.btn-wa-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--wa-green);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .9rem;
  margin-top: 16px;
  transition: all var(--transition);
}
.btn-wa-contact:hover { background: var(--wa-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }

/* ── Section header ── */
.section-eyebrow {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--brown-warm);
  margin-bottom: 12px;
}
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--brown-dark);
  line-height: 1.2;
  margin-bottom: 16px;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* =============================================
   HEADER / NAV
   ============================================= */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all var(--transition);
}
#header.scrolled {
  background: rgba(255,248,238,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(44,24,16,.1);
}
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
  padding-bottom: 16px;
}
.nav-logo img {
  height: 160px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 2px 16px rgba(0,0,0,.55));
  transition: all var(--transition);
}
#header.scrolled .nav-logo img {
  height: 90px;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.2));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 500;
  color: var(--white);
  transition: all var(--transition);
}
#header.scrolled .nav-link { color: var(--brown-dark); }
.nav-link:hover { background: rgba(255,255,255,.15); }
#header.scrolled .nav-link:hover { background: var(--cream-dark); color: var(--brown-mid); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
  display: block;
}
#header.scrolled .nav-toggle span { background: var(--brown-dark); }

/* =============================================
   HERO
   ============================================= */
.hero {
  position: relative;
  height: 100svh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(28,14,6,.72) 0%,
    rgba(44,24,16,.55) 50%,
    rgba(20,10,4,.75) 100%
  );
  z-index: 1;
}
.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  padding: 24px;
  max-width: 860px;
  margin: 0 auto;
}
.hero-eyebrow {
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--brown-warm);
  margin-bottom: 20px;
  display: block;
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 7vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  margin-bottom: 24px;
  text-shadow: 0 2px 30px rgba(0,0,0,.4);
}
.hero-content h1 em {
  font-style: italic;
  color: var(--brown-warm);
  text-transform: none;
  white-space: nowrap;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
}
.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  margin-bottom: 40px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}
.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: rgba(255,255,255,.6);
  animation: bounce 2s infinite;
  transition: color var(--transition);
}
.hero-scroll-indicator:hover { color: var(--white); }
@keyframes bounce { 0%,100%{transform:translateX(-50%) translateY(0)} 50%{transform:translateX(-50%) translateY(8px)} }

/* =============================================
   VALUES BAR
   ============================================= */
.values-bar {
  background: var(--brown-dark);
  color: var(--white);
  padding: 28px 0;
}
.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.value-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 28px;
  border-right: 1px solid rgba(255,255,255,.1);
}
.value-item:last-child { border-right: none; }
.value-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  color: var(--brown-warm);
}
.value-item > div {
  display: flex;
  flex-direction: column;
}
.value-item strong {
  font-size: .9rem;
  font-weight: 600;
  display: block;
}
.value-item span {
  font-size: .78rem;
  color: rgba(255,255,255,.6);
  margin-top: 2px;
}

/* =============================================
   HISTORIA
   ============================================= */
.historia {
  padding: 100px 0;
  background: var(--white);
}
.historia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.historia-images {
  position: relative;
}
.historia-img-main {
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  box-shadow: var(--shadow-lg);
}
.historia-img-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.historia-img-main:hover img { transform: scale(1.03); }
.historia-img-secondary {
  position: absolute;
  bottom: -32px;
  right: -32px;
  width: 200px;
  height: 200px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 6px solid var(--white);
  box-shadow: var(--shadow-md);
}
.historia-img-secondary img { width: 100%; height: 100%; object-fit: cover; }

.historia-text .section-eyebrow { margin-bottom: 16px; }
.historia-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--brown-dark);
  line-height: 1.25;
  margin-bottom: 24px;
}
.historia-text p {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 1.02rem;
}
.historia-values {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  padding: 28px 32px;
  background: var(--cream);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--brown-warm);
}
.hv-item {
  flex: 1;
  text-align: center;
}
.hv-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--brown-mid);
}
.hv-label {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-top: 4px;
}
.hv-divider {
  width: 1px;
  height: 48px;
  background: var(--cream-dark);
  flex-shrink: 0;
}

/* =============================================
   CATÁLOGO CTA (index)
   ============================================= */
.catalogo-cta {
  padding: 100px 0;
  background: var(--cream);
}
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.cta-text .section-eyebrow { margin-bottom: 16px; }
.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  color: var(--brown-dark);
  line-height: 1.25;
  margin-bottom: 20px;
}
.cta-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 32px;
}
.cta-preview { position: relative; height: 420px; }
.cta-imgs { position: relative; height: 100%; }
.cta-img {
  position: absolute;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: var(--shadow-lg);
  transition: transform .4s ease;
}
.cta-img-1 { width: 55%; height: 75%; top: 0; left: 0; z-index: 1; }
.cta-img-2 { width: 50%; height: 70%; top: 15%; right: 0; z-index: 2; }
.cta-img-3 { width: 42%; height: 50%; bottom: 0; left: 20%; z-index: 3; }
.cta-img:hover { transform: scale(1.03); z-index: 4; }

/* =============================================
   CATÁLOGO (página catalogo.html)
   ============================================= */
.catalogo {
  padding: 100px 0;
  background: var(--cream);
}
.catalogo-page-hero {
  padding: 120px 0 60px;
  background: var(--brown-dark);
  color: var(--white);
  text-align: center;
}
.catalogo-page-hero .section-eyebrow { color: var(--brown-warm); }
.catalogo-page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  margin: 12px 0 16px;
}
.catalogo-page-hero p { color: rgba(255,255,255,.7); font-size: 1.05rem; }

/* Filters */
.catalog-filters {
  margin-bottom: 40px;
  overflow: hidden;
}
.filters-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--brown-warm) transparent;
}
.filters-scroll::-webkit-scrollbar { height: 4px; }
.filters-scroll::-webkit-scrollbar-track { background: transparent; }
.filters-scroll::-webkit-scrollbar-thumb { background: var(--brown-warm); border-radius: 2px; }

.filter-btn {
  flex-shrink: 0;
  padding: 9px 18px;
  border-radius: var(--radius-xl);
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--white);
  border: 2px solid transparent;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
}
.filter-btn:hover { border-color: var(--brown-warm); color: var(--brown-mid); }
.filter-btn.active { background: var(--brown-dark); color: var(--white); border-color: var(--brown-dark); }

/* Products grid */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  border: 2px solid transparent;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.product-card.selected { border-color: var(--wa-green); box-shadow: 0 0 0 4px rgba(37,211,102,.12), var(--shadow-md); }
.product-card[data-visible="false"] { display: none; }

.product-img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--cream-dark);
  cursor: pointer;
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.05); }
.product-img-zoom {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255,255,255,.9);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
  box-shadow: var(--shadow-sm);
}
.product-card:hover .product-img-zoom { opacity: 1; }
.product-img-zoom svg { color: var(--brown-dark); }

.product-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.badge-madera { background: var(--brown-warm); color: var(--white); }
.badge-hierro { background: var(--iron); color: var(--white); }

.product-info {
  padding: 16px;
}
.product-category {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.product-name {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--brown-dark);
  line-height: 1.35;
  margin-bottom: 14px;
  min-height: 2.7em;
}
.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.product-add-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: .82rem;
  font-weight: 600;
  background: var(--wa-green);
  color: var(--white);
  transition: all var(--transition);
}
.product-add-btn:hover { background: var(--wa-dark); transform: translateY(-1px); }
.product-card.selected .product-add-btn { background: var(--wa-dark); }
.product-add-btn svg { flex-shrink: 0; }

.product-remove-btn {
  padding: 9px;
  border-radius: var(--radius-sm);
  background: #FEE2E2;
  color: #DC2626;
  display: none;
  transition: all var(--transition);
}
.product-remove-btn:hover { background: #FECACA; }
.product-card.selected .product-remove-btn { display: flex; align-items: center; }

/* =============================================
   GALERÍA
   ============================================= */
.galeria {
  padding: 100px 0;
  background: var(--white);
}
.gallery-grid {
  columns: 4;
  column-gap: 16px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .gallery-overlay {
  position: absolute;
  inset: 0;
  background: rgba(44,24,16,0);
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-item:hover .gallery-overlay { background: rgba(44,24,16,.3); }
.gallery-overlay-icon {
  opacity: 0;
  color: white;
  transition: opacity var(--transition);
}
.gallery-item:hover .gallery-overlay-icon { opacity: 1; }

.gallery-item[data-visible="false"] { display: none; }

.gallery-footer {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-top: 40px;
}

/* =============================================
   CONTACTO
   ============================================= */
.contacto {
  padding: 100px 0;
  background: var(--cream);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
}
.contact-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}
.contact-card:hover { box-shadow: var(--shadow-md); }
.contact-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.contact-icon-wrap svg { width: 28px; height: 28px; color: var(--brown-mid); }
.contact-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--brown-dark);
  margin-bottom: 12px;
}
.contact-card address {
  color: var(--text-muted);
  font-size: .95rem;
  margin-bottom: 8px;
  line-height: 1.5;
}
.contact-phone {
  display: block;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brown-mid);
  margin: 12px 0 8px;
}
.contact-hours {
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}
.contact-note {
  font-size: .78rem;
  color: var(--iron-light);
  font-style: italic;
}

.contact-social-card {
  background: var(--brown-dark);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  color: var(--white);
}
.contact-social-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 28px;
}
.social-links { display: flex; flex-direction: column; gap: 16px; }
.social-link-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  transition: all var(--transition);
}
.social-link-item:hover { background: rgba(255,255,255,.15); color: var(--white); transform: translateX(4px); }
.social-link-item svg { flex-shrink: 0; color: var(--brown-warm); }

/* =============================================
   FOOTER
   ============================================= */
.footer {
  background: var(--brown-dark);
  color: rgba(255,255,255,.75);
}
.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  padding-top: 64px;
  padding-bottom: 48px;
}
.footer-logo {
  height: 72px;
  width: auto;
  object-fit: contain;
  margin-bottom: 16px;
  opacity: .9;
}
.footer-brand p {
  font-size: .9rem;
  line-height: 1.7;
  color: rgba(255,255,255,.5);
}
.footer-links h4, .footer-contact h4 {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brown-warm);
  margin-bottom: 20px;
}
.footer-links ul { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }
.footer-contact p {
  font-size: .88rem;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
  margin-bottom: 4px;
}
.footer-contact a { color: rgba(255,255,255,.55); transition: color var(--transition); }
.footer-contact a:hover { color: var(--white); }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.6);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--brown-warm); color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  padding: 20px 24px;
  font-size: .8rem;
  color: rgba(255,255,255,.35);
}

/* =============================================
   WHATSAPP CART (COTIZADOR)
   ============================================= */
.wa-cart {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}

.wa-fab {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--wa-green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 24px rgba(37,211,102,.5);
  transition: all var(--transition);
  position: relative;
  margin-left: auto;
}
.wa-fab:hover { background: var(--wa-dark); transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.6); }

.wa-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  background: #EF4444;
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--cream);
  animation: pop .2s ease;
}
@keyframes pop { 0%{transform:scale(.6)} 60%{transform:scale(1.15)} 100%{transform:scale(1)} }

.wa-panel {
  position: absolute;
  bottom: 72px;
  right: 0;
  width: 340px;
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform-origin: bottom right;
  transition: all .3s cubic-bezier(.4,0,.2,1);
  transform: scale(.85) translateY(10px);
  opacity: 0;
  pointer-events: none;
}
.wa-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: all;
}
.wa-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--cream-dark);
  background: var(--brown-dark);
  color: var(--white);
}
.wa-panel-header h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.wa-panel-subtitle {
  font-size: .75rem;
  color: rgba(255,255,255,.6);
  display: block;
  margin-top: 2px;
}
.wa-panel-close {
  color: rgba(255,255,255,.7);
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.wa-panel-close:hover { color: var(--white); background: rgba(255,255,255,.1); }

.wa-panel-items {
  max-height: 300px;
  overflow-y: auto;
  padding: 12px 16px;
}
.wa-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: .88rem;
  padding: 20px 0;
  line-height: 1.7;
}
.wa-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.wa-item:hover { background: var(--cream); }
.wa-item img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
}
.wa-item-info { flex: 1; min-width: 0; }
.wa-item-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wa-item-cat {
  font-size: .72rem;
  color: var(--text-muted);
}
.wa-item-remove {
  color: var(--iron-light);
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all var(--transition);
}
.wa-item-remove:hover { color: #DC2626; background: #FEE2E2; }

/* Medidas dentro de item */
.wa-item-medidas {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.medida-input {
  width: 76px;
  padding: 5px 8px;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-size: .78rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s;
}
.medida-cant {
  width: 50px;
  padding: 5px 8px;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-size: .78rem;
  font-family: var(--font-body);
  outline: none;
}
.medida-input:focus, .medida-cant:focus { border-color: var(--brown-warm); }
.wa-item-medidas span { font-size: .75rem; color: var(--text-muted); }
.obs-input {
  width: 100%;
  margin-top: 4px;
  padding: 5px 8px;
  border: 1px solid var(--cream-dark);
  border-radius: 6px;
  font-size: .78rem;
  font-family: var(--font-body);
  outline: none;
}
.obs-input:focus { border-color: var(--brown-warm); }

/* Panel steps */
.panel-step { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.panel-step[hidden] { display: none; }

/* Contact form */
.contact-form-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.form-hint { font-size: .82rem; color: var(--text-muted); margin-bottom: 4px; }
.form-group { display: flex; flex-direction: column; gap: 4px; }
.form-group label { font-size: .78rem; font-weight: 600; color: var(--brown-dark); }
.form-group input, .form-group textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--cream-dark);
  border-radius: 8px;
  font-size: .88rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color .2s;
  resize: vertical;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--brown-warm); }
.form-error { font-size: .8rem; color: #dc2626; }

/* Success step */
.success-body {
  flex: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.success-icon {
  width: 56px;
  height: 56px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #16a34a;
  font-weight: 700;
  margin-bottom: 4px;
}
.success-body h4 { font-size: 1.1rem; font-weight: 700; color: var(--brown-dark); }
.success-numero { font-size: .85rem; font-weight: 600; color: var(--brown-mid); background: var(--cream); padding: 6px 12px; border-radius: 6px; }
.success-text { font-size: .85rem; color: var(--text-muted); line-height: 1.6; }

.wa-panel-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--cream-dark);
  display: flex;
  flex-direction: row;
  gap: 8px;
}
.wa-panel-footer .btn-clear-cart { width: auto; flex-shrink: 0; }
.wa-panel-footer .btn-wa-send { flex: 1; }
.btn-wa-send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  background: var(--wa-green);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: .92rem;
  transition: all var(--transition);
}
.btn-wa-send:hover { background: var(--wa-dark); }
.btn-clear-cart {
  width: 100%;
  padding: 10px;
  color: var(--text-muted);
  font-size: .82rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.btn-clear-cart:hover { color: #DC2626; background: #FEF2F2; }

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10,5,2,.9);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  backdrop-filter: blur(4px);
}
.lightbox-backdrop.open { opacity: 1; pointer-events: all; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-content {
  max-width: 880px;
  width: 100%;
  text-align: center;
}
.lightbox-content img {
  max-height: 80vh;
  max-width: 100%;
  border-radius: var(--radius-md);
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}
#lightbox-caption {
  color: rgba(255,255,255,.7);
  font-size: .88rem;
  margin-top: 16px;
  font-family: var(--font-display);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: fixed;
  background: rgba(255,255,255,.12);
  color: var(--white);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  backdrop-filter: blur(4px);
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.25); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* =============================================
   ANIMATIONS (Intersection Observer)
   ============================================= */
.fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }
.fade-up:nth-child(2) { transition-delay: .1s; }
.fade-up:nth-child(3) { transition-delay: .2s; }
.fade-up:nth-child(4) { transition-delay: .3s; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .contact-social-card { grid-column: span 2; }
  .footer-content { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 900px) {
  .historia-grid { grid-template-columns: 1fr; gap: 48px; }
  .historia-images { max-width: 500px; margin: 0 auto; }
  .historia-img-secondary { right: 0; }
  .gallery-grid { columns: 3; }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .value-item:nth-child(2) { border-right: none; }
  .value-item:nth-child(3) { border-right: 1px solid rgba(255,255,255,.1); }
  .value-item:nth-child(3), .value-item:nth-child(4) { border-top: 1px solid rgba(255,255,255,.1); }
}

@media (max-width: 768px) {
  /* Nav mobile */
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(320px, 85vw);
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 24px 32px;
    gap: 4px;
    box-shadow: var(--shadow-lg);
    transition: right .3s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
    z-index: 999;
  }
  .nav-links.open { right: 0; }
  .nav-link { color: var(--brown-dark) !important; width: 100%; padding: 12px 16px; font-size: 1rem; }
  .nav-link:hover { background: var(--cream) !important; }
  .nav-links li:last-child { width: 100%; margin-top: 8px; }
  .btn-wa-nav { width: 100%; justify-content: center; }

  /* Sections */
  .historia, .catalogo, .galeria, .contacto { padding: 72px 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-social-card { grid-column: span 1; }
  .gallery-grid { columns: 2; }
  .footer-content { grid-template-columns: 1fr; gap: 32px; padding-top: 48px; }
  .footer-brand { grid-column: span 1; }
  .hero-cta { flex-direction: column; align-items: center; }
  .wa-panel { width: calc(100vw - 48px); right: 0; }

  /* CTA section — mobile: single column, images in a simple row */
  .catalogo-cta { padding: 72px 0; }
  .cta-grid { grid-template-columns: 1fr; gap: 40px; }
  .cta-preview { height: auto; }
  .cta-imgs {
    position: static;
    height: auto;
    display: flex;
    gap: 10px;
    align-items: stretch;
  }
  .cta-img {
    position: static;
    width: 33.33%;
    height: 220px;
    flex-shrink: 0;
    flex-grow: 1;
  }
  .cta-img:hover { transform: none; }

  /* Logo on mobile */
  .nav-logo img { height: 80px; }
  #header.scrolled .nav-logo img { height: 60px; }
}

@media (max-width: 540px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .values-grid { grid-template-columns: 1fr 1fr; gap: 0; }
  .value-item { padding: 12px 16px; }
  .gallery-grid { columns: 2; column-gap: 8px; }
  .gallery-item { margin-bottom: 8px; }
  .historia-img-secondary { width: 140px; height: 140px; right: 8px; bottom: -20px; }
  .historia-values { padding: 20px; }
  .hv-number { font-size: 1.7rem; }
  .lightbox-prev { left: 4px; }
  .lightbox-next { right: 4px; }
  .cta-img { height: 160px; }
  .nav-logo img { height: 80px; }
  #header.scrolled .nav-logo img { height: 60px; }
}

@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Carpintería en Obra ──────────────────────── */
.carpinteria {
  padding: 100px 0;
  background: var(--cream);
}
.carp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 28px;
  margin-top: 48px;
}
.carp-card {
  background: var(--white);
  border-radius: 18px;
  padding: 36px 32px;
  box-shadow: 0 4px 24px rgba(44,24,16,.07);
  border: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.carp-card-cta {
  background: var(--brown-dark);
  border-color: var(--brown-dark);
  color: var(--white);
  justify-content: center;
  align-items: flex-start;
  text-align: left;
}
.carp-card-cta h3 { color: var(--white); }
.carp-card-cta p { color: rgba(255,255,255,.75); line-height: 1.7; }
.carp-icon {
  width: 64px;
  height: 64px;
  background: var(--cream);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown-warm);
  flex-shrink: 0;
}
.carp-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brown-dark);
}
.carp-card p {
  font-size: .93rem;
  color: var(--text-light);
  line-height: 1.75;
}
.carp-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}
.carp-list li {
  font-size: .88rem;
  color: var(--brown-mid);
  font-weight: 500;
  padding-left: 18px;
  position: relative;
}
.carp-list li::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--brown-warm);
  font-weight: 700;
}
/* Mosaico carpintería */
.carp-mosaic {
  margin-top: 52px;
}
.carp-mosaic-inner {
  columns: 5;
  column-gap: 10px;
}
.carp-mosaic-inner img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 10px;
  border-radius: 10px;
  object-fit: cover;
  break-inside: avoid;
  transition: transform .2s, opacity .2s;
}
.carp-mosaic-inner img:hover {
  transform: scale(1.02);
  opacity: .92;
}

@media (max-width: 960px) {
  .carp-grid { grid-template-columns: 1fr 1fr; }
  .carp-card-cta { grid-column: span 2; }
  .carp-mosaic-inner { columns: 4; }
}
@media (max-width: 600px) {
  .carp-grid { grid-template-columns: 1fr; }
  .carp-card-cta { grid-column: span 1; }
  .carpinteria { padding: 72px 0; }
  .carp-mosaic-inner { columns: 2; column-gap: 6px; }
  .carp-mosaic-inner img { margin-bottom: 6px; border-radius: 6px; }
}
