/* ============================================
   Constructora CMP SPA – Stylesheet
   Talca, Región del Maule, Chile
   ============================================ */

/* Variables */
:root {
  --primary:        #E05010;
  --primary-dark:   #B83E0C;
  --primary-light:  #FF6B35;
  --dark:           #1A1A1A;
  --dark-2:         #2D2D2D;
  --dark-3:         #3D3D3D;
  --gray:           #666;
  --gray-light:     #999;
  --border:         #E0E0E0;
  --bg-light:       #F7F7F7;
  --white:          #FFFFFF;
  --success:        #28A745;
  --font-head:      'Montserrat', sans-serif;
  --font-body:      'Open Sans', sans-serif;
  --shadow:         0 4px 20px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 40px rgba(0,0,0,0.15);
  --radius:         8px;
  --radius-lg:      16px;
  --transition:     0.3s ease;
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body { font-family: var(--font-body); color: var(--dark); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--transition); }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ============ TYPOGRAPHY ============ */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.1rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ============ LAYOUT ============ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container--sm { max-width: 800px; }
.section { padding: 80px 0; }
.section--gray { background: var(--bg-light); }
.section--dark { background: var(--dark); color: var(--white); }
.section__header { text-align: center; margin-bottom: 56px; }
.section__tag { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.section__title { color: inherit; margin-bottom: 16px; }
.section__desc { color: var(--gray); max-width: 600px; margin: 0 auto; font-size: 1.05rem; }
.section--dark .section__desc { color: var(--gray-light); }

.grid { display: grid; gap: 28px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.flex { display: flex; }
.flex--center { align-items: center; justify-content: center; }
.flex--between { align-items: center; justify-content: space-between; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius);
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.5px; transition: all var(--transition);
  white-space: nowrap;
}
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224,80,16,0.35); }
.btn--outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn--outline:hover { background: var(--white); color: var(--dark); }
.btn--dark { background: var(--dark); color: var(--white); }
.btn--dark:hover { background: var(--dark-2); }
.btn--ghost { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn--ghost:hover { background: var(--primary); color: var(--white); }
.btn--lg { padding: 18px 36px; font-size: 1rem; }
.btn--sm { padding: 10px 18px; font-size: 0.85rem; }
.btn--full { width: 100%; justify-content: center; }
.btn--whatsapp { background: #25D366; color: var(--white); }
.btn--whatsapp:hover { background: #1DAA54; transform: translateY(-2px); box-shadow: 0 6px 20px rgba(37,211,102,0.35); }

/* ============ TOPBAR ============ */
.topbar {
  background: var(--dark); color: var(--white);
  padding: 9px 0; font-size: 0.82rem;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.topbar__contact { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.topbar__item { display: flex; align-items: center; gap: 6px; opacity: 0.85; }
.topbar__item:hover { opacity: 1; }
.topbar__item svg { width: 14px; height: 14px; flex-shrink: 0; }
.topbar__social { display: flex; gap: 12px; }
.topbar__social a { opacity: 0.7; transition: opacity var(--transition); }
.topbar__social a:hover { opacity: 1; }
.topbar__social svg { width: 16px; height: 16px; }

/* ============ NAVBAR ============ */
.navbar {
  background: var(--white); position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 14px rgba(0,0,0,.08);
}
.navbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; gap: 12px;
}
.navbar__logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.navbar__logo img { height: 52px; width: auto; object-fit: contain; }
.navbar__logo-text { font-family: var(--font-head); }
.navbar__logo-title { font-weight: 800; font-size: 1.05rem; color: var(--dark); line-height: 1; }
.navbar__logo-sub { font-size: .68rem; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }

/* Menu — horizontal en desktop */
.navbar__menu { display: flex; align-items: center; gap: 0; list-style: none; margin: 0; padding: 0; }
.navbar__menu > li { position: relative; }
.navbar__link {
  display: block; padding: 9px 11px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: .86rem;
  color: var(--dark-2); transition: all var(--transition); white-space: nowrap;
}
.navbar__link:hover, .navbar__link.active { color: var(--primary); background: rgba(224,80,16,.07); }

/* Dropdown */
.navbar__item { position: relative; }
.navbar__dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.13);
  padding: 8px; min-width: 210px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: all .22s ease; z-index: 200;
  border-top: 3px solid var(--primary);
}
.navbar__item:hover .navbar__dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0); pointer-events: all;
}
.navbar__dropdown a {
  display: block; padding: 8px 14px; font-size: .84rem;
  color: var(--dark); border-radius: 6px;
  font-family: var(--font-head); font-weight: 600;
  transition: all .18s; white-space: nowrap;
}
.navbar__dropdown a:hover { background: rgba(224,80,16,.07); color: var(--primary); }
.navbar__dropdown--grid { min-width: 370px; display: grid; grid-template-columns: 1fr 1fr; }

/* Acciones del lado derecho */
.navbar__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.navbar__cart-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 9px 12px; border-radius: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: .86rem;
  color: var(--dark-2); transition: all var(--transition); position: relative; cursor: pointer;
}
.navbar__cart-btn:hover { color: var(--primary); background: rgba(224,80,16,.07); }
.cart-badge {
  position: absolute; top: 3px; right: 3px;
  background: var(--primary); color: var(--white);
  font-size: .6rem; font-weight: 700;
  width: 16px; height: 16px; border-radius: 50%;
  display: none; align-items: center; justify-content: center;
}
.cart-badge.visible { display: flex; }

/* Hamburger */
.navbar__toggle {
  display: none; flex-direction: column; gap: 5px; padding: 8px;
  border-radius: 6px; cursor: pointer; transition: background var(--transition);
}
.navbar__toggle:hover { background: var(--bg-light); }
.navbar__toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--dark); border-radius: 2px; transition: all .3s ease;
}
.navbar__toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar__toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar__toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero {
  background: var(--dark);
  position: relative; overflow: hidden; padding: 100px 0 80px;
  min-height: 90vh; display: flex; align-items: center;
}
/* Foto desenfocada como fondo */
.hero::before {
  content: ''; position: absolute; inset: -30px;
  background: url('../images/hero-casa.png') no-repeat center/cover;
  filter: blur(10px);
  opacity: 0.55;
  z-index: 0;
}
/* Overlay oscuro sobre la foto */
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(15,15,15,.62);
  z-index: 1;
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 2;
}
.hero__inner { position: relative; z-index: 3; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero__content { color: var(--white); }
.hero__tag { display: inline-flex; align-items: center; gap: 8px; background: rgba(224,80,16,0.2); border: 1px solid rgba(224,80,16,0.4); color: var(--primary-light); padding: 6px 16px; border-radius: 50px; font-size: 0.8rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 24px; }
.hero__title { margin-bottom: 20px; color: var(--white); text-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.hero__title span { color: var(--primary-light); }
.hero__desc { color: rgba(255,255,255,0.8); font-size: 1.1rem; margin-bottom: 36px; max-width: 480px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 48px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.1); }
.hero__stat-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; color: var(--primary-light); }
.hero__stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.6); margin-top: 2px; }
.hero__image { position: relative; }
.hero__image-wrap {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--dark-3); aspect-ratio: 4/3;
  box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}
.hero__image-wrap img { width: 100%; height: 100%; object-fit: cover; }
.hero__image-badge {
  position: absolute; bottom: -16px; left: -16px;
  background: var(--primary); color: var(--white);
  border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow-lg);
}
.hero__image-badge strong { display: block; font-family: var(--font-head); font-size: 1.5rem; font-weight: 800; }
.hero__image-badge span { font-size: 0.78rem; opacity: 0.9; }
/* Placeholder hero image */
.hero-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, #2D2D2D 0%, #1A1A1A 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px; color: rgba(255,255,255,0.3); font-family: var(--font-head);
}
.hero-img-placeholder svg { width: 64px; height: 64px; opacity: 0.4; }

/* ============ SERVICES ============ */
.service-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 32px;
  box-shadow: var(--shadow); border: 1px solid var(--border);
  transition: all var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--primary); transform: scaleX(0); transition: transform var(--transition);
  transform-origin: left;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon {
  width: 60px; height: 60px; border-radius: 12px;
  background: rgba(224,80,16,0.08); display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; transition: background var(--transition);
}
.service-card:hover .service-card__icon { background: var(--primary); }
.service-card__icon svg { width: 28px; height: 28px; color: var(--primary); transition: color var(--transition); }
.service-card:hover .service-card__icon svg { color: var(--white); }
.service-card__title { margin-bottom: 10px; }
.service-card__desc { color: var(--gray); font-size: 0.92rem; }

/* ============ ABOUT ============ */
.about__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.about__image-wrap { position: relative; }
.about__image {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-light); aspect-ratio: 3/4;
}
.about__image img { width: 100%; height: 100%; object-fit: cover; }
.about__badge {
  position: absolute; bottom: 24px; right: -20px;
  background: var(--primary); color: var(--white);
  border-radius: var(--radius); padding: 20px 24px;
  box-shadow: var(--shadow-lg); text-align: center;
}
.about__badge-num { display: block; font-family: var(--font-head); font-size: 2.4rem; font-weight: 800; line-height: 1; }
.about__badge-txt { font-size: 0.75rem; opacity: 0.9; margin-top: 4px; }
.about__content .section__tag { text-align: left; }
.about__title { margin-bottom: 20px; }
.about__desc { color: var(--gray); margin-bottom: 28px; font-size: 1rem; }
.about__features { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 36px; }
.about__feature { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9rem; }
.about__feature svg { width: 18px; height: 18px; color: var(--primary); flex-shrink: 0; }
.about__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 24px; background: var(--bg-light); border-radius: var(--radius); }
.about__stat { text-align: center; }
.about__stat-num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.about__stat-label { font-size: 0.78rem; color: var(--gray); }

/* Placeholder about image */
.about-img-placeholder {
  width: 100%; height: 100%; min-height: 400px;
  background: linear-gradient(160deg, #e8e8e8 0%, #d0d0d0 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; color: #aaa;
}
.about-img-placeholder svg { width: 56px; height: 56px; opacity: 0.4; }

/* ============ PROJECTS ============ */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.project-card {
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); transition: all var(--transition); position: relative;
}
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.project-card__image { aspect-ratio: 4/3; overflow: hidden; }
.project-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .project-card__image img { transform: scale(1.05); }
.project-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; font-size: 0.85rem; color: var(--white); font-family: var(--font-head);
}
.project-card__body { padding: 20px; background: var(--white); }
.project-card__tag { font-size: 0.72rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: 6px; }
.project-card__title { font-size: 1.05rem; margin-bottom: 6px; }
.project-card__location { font-size: 0.82rem; color: var(--gray); display: flex; align-items: center; gap: 4px; }
.project-card__location svg { width: 12px; height: 12px; }

/* ============ PRODUCTS / STORE ============ */
.product-card {
  background: var(--white); border-radius: var(--radius-lg);
  box-shadow: var(--shadow); border: 1px solid var(--border);
  overflow: hidden; transition: all var(--transition); display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.product-card__image { aspect-ratio: 4/3; overflow: hidden; background: var(--bg-light); position: relative; }
.product-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-card__image img { transform: scale(1.04); }
.product-card__badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: var(--white);
  padding: 4px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700;
}
.product-card__body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card__cat { font-size: 0.75rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: var(--primary); margin-bottom: 8px; }
.product-card__title { font-size: 1.05rem; margin-bottom: 8px; }
.product-card__desc { font-size: 0.88rem; color: var(--gray); margin-bottom: 16px; flex: 1; }
.product-card__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.product-card__meta span { font-size: 0.75rem; background: var(--bg-light); color: var(--dark-2); padding: 4px 10px; border-radius: 50px; font-weight: 600; }
.product-card__price { margin-bottom: 16px; }
.product-card__price-value { font-family: var(--font-head); font-size: 1.4rem; font-weight: 800; color: var(--dark); }
.product-card__price-unit { font-size: 0.8rem; color: var(--gray); }
.product-card__price-bulk { font-size: 0.82rem; color: var(--success); font-weight: 600; margin-top: 2px; }
.product-card__actions { display: flex; gap: 10px; }
.qty-wrap { display: flex; align-items: center; gap: 0; border: 1.5px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.qty-btn { width: 36px; height: 40px; display: flex; align-items: center; justify-content: center; background: var(--bg-light); font-size: 1.1rem; font-weight: 700; transition: background var(--transition); }
.qty-btn:hover { background: var(--border); }
.qty-input { width: 44px; height: 40px; text-align: center; border: none; border-left: 1.5px solid var(--border); border-right: 1.5px solid var(--border); font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; outline: none; }

/* Product Detail */
.product-detail { padding: 60px 0; }
.product-detail__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.product-detail__gallery { position: sticky; top: 100px; }
.product-detail__main-img { border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-light); aspect-ratio: 4/3; margin-bottom: 12px; }
.product-detail__main-img img { width: 100%; height: 100%; object-fit: cover; }
.product-detail__cat { font-size: 0.78rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.product-detail__title { margin-bottom: 12px; }
.product-detail__price-box { background: var(--bg-light); border-radius: var(--radius); padding: 20px; margin: 20px 0; }
.product-detail__price { font-family: var(--font-head); font-size: 2rem; font-weight: 800; color: var(--dark); }
.product-detail__price-unit { font-size: 0.85rem; color: var(--gray); }
.product-detail__price-bulk { color: var(--success); font-weight: 700; margin-top: 8px; font-size: 0.9rem; }
.product-detail__specs { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.spec-row { display: flex; border-bottom: 1px solid var(--border); }
.spec-row:last-child { border-bottom: none; }
.spec-label { width: 140px; padding: 12px 16px; background: var(--bg-light); font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.spec-value { padding: 12px 16px; font-size: 0.88rem; color: var(--gray); flex: 1; }
.product-detail__qty-wrap { display: flex; align-items: center; gap: 16px; margin: 20px 0; }
.product-detail__qty-wrap label { font-weight: 700; font-size: 0.9rem; }
.product-detail__actions { display: flex; flex-direction: column; gap: 12px; }
.product-detail__features { margin-top: 24px; }
.product-detail__features h4 { margin-bottom: 12px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.feature-list li svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; }

/* ============ CART ============ */
.cart-drawer {
  position: fixed; top: 0; right: -420px; width: 420px; height: 100vh;
  background: var(--white); box-shadow: -8px 0 40px rgba(0,0,0,0.15);
  z-index: 9999; transition: right 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { right: 0; }
.cart-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 9998; opacity: 0; visibility: hidden; transition: all 0.35s ease;
}
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.cart-drawer__title { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; }
.cart-close { width: 36px; height: 36px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; transition: background var(--transition); }
.cart-close:hover { background: var(--border); }
.cart-close svg { width: 18px; height: 18px; }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty { text-align: center; padding: 48px 0; color: var(--gray); }
.cart-empty svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.3; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item__img { width: 72px; height: 72px; border-radius: var(--radius); overflow: hidden; background: var(--bg-light); flex-shrink: 0; }
.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item__info { flex: 1; }
.cart-item__name { font-weight: 700; font-size: 0.9rem; margin-bottom: 4px; }
.cart-item__price { font-size: 0.85rem; color: var(--gray); }
.cart-item__qty { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.cart-item__qty-btn { width: 26px; height: 26px; border-radius: 50%; background: var(--bg-light); display: flex; align-items: center; justify-content: center; font-size: 1rem; font-weight: 700; transition: background var(--transition); }
.cart-item__qty-btn:hover { background: var(--border); }
.cart-item__qty-num { font-weight: 700; font-size: 0.9rem; min-width: 24px; text-align: center; }
.cart-item__remove { margin-left: auto; align-self: flex-start; color: var(--gray); transition: color var(--transition); }
.cart-item__remove:hover { color: #e00; }
.cart-item__remove svg { width: 16px; height: 16px; }
.cart-drawer__footer { padding: 16px 24px; border-top: 1px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.cart-total__label { font-weight: 700; }
.cart-total__value { font-family: var(--font-head); font-size: 1.3rem; font-weight: 800; color: var(--dark); }

/* ============ COMMUNES GRID ============ */
.communes-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.commune-card {
  background: var(--white); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 20px 16px;
  text-align: center; transition: all var(--transition); cursor: pointer;
}
.commune-card:hover { border-color: var(--primary); background: rgba(224,80,16,0.03); transform: translateY(-3px); box-shadow: var(--shadow); }
.commune-card svg { width: 24px; height: 24px; color: var(--primary); margin: 0 auto 8px; }
.commune-card__name { font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; margin-bottom: 3px; }
.commune-card__sub { font-size: 0.72rem; color: var(--gray); }

/* ============ TESTIMONIALS ============ */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial-card {
  background: var(--white); border-radius: var(--radius-lg); padding: 28px;
  box-shadow: var(--shadow); border: 1px solid var(--border); position: relative;
}
.testimonial-card::before { content: '\201C'; position: absolute; top: 16px; right: 20px; font-size: 5rem; color: var(--primary); opacity: 0.12; font-family: Georgia, serif; line-height: 1; }
.testimonial-stars { display: flex; gap: 3px; margin-bottom: 14px; color: #FFB800; }
.testimonial-stars svg { width: 18px; height: 18px; fill: currentColor; }
.testimonial-text { color: var(--gray); font-size: 0.92rem; margin-bottom: 20px; }
.testimonial-author { display: flex; align-items: center; gap: 12px; }
.testimonial-avatar {
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-family: var(--font-head); font-weight: 700; font-size: 1.1rem;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: 0.9rem; }
.testimonial-location { font-size: 0.78rem; color: var(--gray); }

/* ============ CTA SECTION ============ */
.cta-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white); text-align: center; padding: 80px 0;
}
.cta-section h2 { color: var(--white); margin-bottom: 16px; }
.cta-section p { color: rgba(255,255,255,0.85); font-size: 1.1rem; margin-bottom: 36px; max-width: 500px; margin-left: auto; margin-right: auto; }
.cta-section .btn--outline { border-color: rgba(255,255,255,0.6); }
.cta-section .btn--outline:hover { background: var(--white); color: var(--primary); }

/* ============ CONTACT ============ */
.contact__inner { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.contact__info-title { margin-bottom: 16px; }
.contact__info-desc { color: var(--gray); margin-bottom: 32px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-item__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(224,80,16,0.08); display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.contact-item__icon svg { width: 22px; height: 22px; color: var(--primary); }
.contact-item__label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); margin-bottom: 4px; }
.contact-item__value { font-weight: 600; color: var(--dark); }
.contact-item__value a:hover { color: var(--primary); }
.contact-form { background: var(--white); border-radius: var(--radius-lg); padding: 40px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 700; font-size: 0.85rem; margin-bottom: 8px; }
.form-group label span { color: var(--primary); }
.form-control {
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border);
  border-radius: var(--radius); font-family: var(--font-body); font-size: 0.95rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none; background: var(--white);
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(224,80,16,0.12); }
textarea.form-control { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-msg { padding: 12px 16px; border-radius: var(--radius); font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; display: none; }
.form-msg.success { background: rgba(40,167,69,0.1); color: var(--success); border: 1px solid rgba(40,167,69,0.3); display: block; }
.form-msg.error { background: rgba(220,53,69,0.1); color: #dc3545; border: 1px solid rgba(220,53,69,0.3); display: block; }

/* ============ FOOTER ============ */
.footer { background: var(--dark); color: var(--white); padding: 72px 0 0; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 48px; margin-bottom: 48px; }
.footer__logo { height: 52px; width: auto; margin-bottom: 16px; filter: brightness(1.2); }
.footer__brand-desc { color: rgba(255,255,255,0.6); font-size: 0.88rem; margin-bottom: 24px; max-width: 280px; }
.footer__social { display: flex; gap: 10px; }
.footer__social-link {
  width: 38px; height: 38px; border-radius: 8px;
  background: rgba(255,255,255,0.06); display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.footer__social-link:hover { background: var(--primary); }
.footer__social-link svg { width: 18px; height: 18px; }
.footer__col-title { font-family: var(--font-head); font-weight: 700; font-size: 0.9rem; letter-spacing: 0.5px; color: var(--white); margin-bottom: 20px; text-transform: uppercase; }
.footer__links { display: flex; flex-direction: column; gap: 10px; }
.footer__link { color: rgba(255,255,255,0.6); font-size: 0.88rem; transition: color var(--transition); display: flex; align-items: center; gap: 6px; }
.footer__link::before { content: '›'; color: var(--primary); font-size: 1rem; }
.footer__link:hover { color: var(--primary-light); }
.footer__contact-item { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; }
.footer__contact-item svg { width: 16px; height: 16px; color: var(--primary); flex-shrink: 0; margin-top: 3px; }
.footer__contact-text { color: rgba(255,255,255,0.65); font-size: 0.85rem; line-height: 1.5; }
.footer__contact-text a { color: rgba(255,255,255,0.65); }
.footer__contact-text a:hover { color: var(--primary-light); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.footer__copy { color: rgba(255,255,255,0.45); font-size: 0.82rem; }
.footer__bottom-links { display: flex; gap: 20px; }
.footer__bottom-links a { color: rgba(255,255,255,0.45); font-size: 0.82rem; transition: color var(--transition); }
.footer__bottom-links a:hover { color: rgba(255,255,255,0.8); }

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-float {
  position: fixed; bottom: 28px; right: 28px; z-index: 9000;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: var(--white);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.45);
  transition: all var(--transition); animation: waPulse 2s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 8px 28px rgba(37,211,102,0.6); }
.whatsapp-float svg { width: 30px; height: 30px; }
@keyframes waPulse { 0%,100% { box-shadow: 0 4px 20px rgba(37,211,102,0.45); } 50% { box-shadow: 0 4px 32px rgba(37,211,102,0.7), 0 0 0 8px rgba(37,211,102,0.1); } }

/* ============ BREADCRUMB ============ */
.breadcrumb { padding: 14px 0; font-size: 0.85rem; color: var(--gray); }
.breadcrumb a { color: var(--primary); }
.breadcrumb span { margin: 0 6px; color: var(--border); }
.page-hero { background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%); color: var(--white); padding: 60px 0 50px; }
.page-hero__title { margin-bottom: 10px; }
.page-hero__desc { color: rgba(255,255,255,0.75); font-size: 1.05rem; }

/* ============ LOCAL PAGE ============ */
.local-content h2 { color: var(--dark); margin: 36px 0 14px; }
.local-content h3 { color: var(--dark-2); margin: 28px 0 10px; }
.local-content p { color: var(--gray); margin-bottom: 14px; }
.local-content ul { padding-left: 20px; margin-bottom: 16px; }
.local-content ul li { color: var(--gray); margin-bottom: 6px; list-style: disc; }
.faq { margin-top: 40px; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.faq-q {
  padding: 18px 20px; font-weight: 700; font-size: 0.95rem; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition);
}
.faq-q:hover { background: var(--bg-light); }
.faq-q svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform var(--transition); color: var(--primary); }
.faq-item.open .faq-q svg { transform: rotate(180deg); }
.faq-a { padding: 0 20px; max-height: 0; overflow: hidden; transition: all 0.3s ease; color: var(--gray); font-size: 0.92rem; }
.faq-item.open .faq-a { padding: 0 20px 16px; max-height: 300px; }

/* ============ PÁGINAS DE COMUNAS ============ */
.page-hero--img { color: #fff; }
.page-hero--img .page-hero__title { color: #fff; }
.page-hero--img .page-hero__desc { color: rgba(255,255,255,.85); }

/* Layout 2 columnas con sidebar */
.comuna-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 48px;
  align-items: start;
}
.local-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 20px; }
.local-sidebar__cta {
  background: var(--primary); color: #fff;
  border-radius: var(--radius-lg); padding: 28px; text-align: center;
}
.local-sidebar__cta h3 { color: #fff; margin-bottom: 8px; font-size: 1.1rem; }
.local-sidebar__cta p { color: rgba(255,255,255,.85); font-size: .88rem; margin-bottom: 18px; }
.local-sidebar__box {
  background: var(--bg-light); border-radius: var(--radius-lg); padding: 24px;
}
.local-sidebar__box h4 { margin-bottom: 14px; font-size: .92rem; }
.local-sidebar__contact-item {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .88rem; margin-bottom: 10px;
  color: var(--dark); transition: color var(--transition);
}
.local-sidebar__contact-item:hover { color: var(--primary); }
.local-sidebar__commune-link {
  font-size: .85rem; color: var(--dark); font-weight: 600;
  display: flex; align-items: center; gap: 6px;
  transition: color var(--transition);
}
.local-sidebar__commune-link:hover { color: var(--primary); }

/* Servicios list */
.local-services-list { display: flex; flex-direction: column; gap: 10px; margin: 16px 0; padding: 0; }
.local-services-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .92rem; color: var(--dark-2); }

/* Galería proyectos */
.local-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.local-gallery__item { border-radius: var(--radius-lg); overflow: hidden; position: relative; aspect-ratio: 4/3; box-shadow: var(--shadow); }
.local-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; display: block; }
.local-gallery__item:hover img { transform: scale(1.05); }
.local-gallery__cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 10px 14px;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent);
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
}

/* Productos sin precio */
.local-products { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0; }
.local-product-card { display: block; border-radius: var(--radius-lg); overflow: hidden; border: 1.5px solid var(--border); transition: border-color var(--transition); background: var(--white); }
.local-product-card:hover { border-color: var(--primary); }
.local-product-card__img { display: flex; align-items: center; justify-content: center; padding: 20px; aspect-ratio: 3/1; }
.local-product-card__body { padding: 16px; }

/* Responsive comunas */
@media (max-width: 900px) {
  .comuna-layout { grid-template-columns: 1fr; gap: 36px; }
  .local-sidebar { position: static; }
  .local-gallery { grid-template-columns: 1fr 1fr; }
  .local-products { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .local-gallery { grid-template-columns: 1fr; }
  .local-products { grid-template-columns: 1fr; }
}

/* ============ SERVICIOS PAGE ============ */
.services-list { display: flex; flex-direction: column; gap: 80px; }
.service-row {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.service-row--flip .service-row__img { order: 2; }
.service-row--flip .service-row__body { order: 1; }
.service-row__img {
  border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4/3; box-shadow: var(--shadow-lg);
}
.service-row__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.service-row__body h2 { margin-bottom: 14px; }
.service-row__items {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 10px; padding: 0;
}
.service-row__items li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: .88rem; font-weight: 600; color: var(--dark-2);
}
@media (max-width: 860px) {
  .service-row { grid-template-columns: 1fr; gap: 28px; }
  .service-row--flip .service-row__img { order: 0; }
  .service-row--flip .service-row__body { order: 0; }
  .service-row__items { grid-template-columns: 1fr; }
  .services-list { gap: 56px; }
}

/* ============ STORE PAGE ============ */
.store__filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 36px; }
.filter-btn { padding: 8px 18px; border-radius: 50px; border: 1.5px solid var(--border); font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; transition: all var(--transition); color: var(--dark); }
.filter-btn:hover, .filter-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ============ UTILITIES ============ */
.text-center { text-align: center; }
.text-orange { color: var(--primary); }
.text-gray { color: var(--gray); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.fw-bold { font-weight: 700; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.5px; }
.badge--primary { background: rgba(224,80,16,0.1); color: var(--primary); }
.badge--success { background: rgba(40,167,69,0.1); color: var(--success); }
.divider { height: 1px; background: var(--border); margin: 32px 0; }
.icon-orange { color: var(--primary); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.loading { opacity: 0.6; pointer-events: none; }

/* Notification toast */
.toast {
  position: fixed; bottom: 100px; right: 28px; z-index: 9999;
  background: var(--dark); color: var(--white);
  padding: 14px 20px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: 0.88rem; font-weight: 600;
  transform: translateX(120%); transition: transform 0.3s ease;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(0); }
.toast svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__image { display: none; }
  .hero { min-height: auto; padding: 80px 0; }
  .about__inner { grid-template-columns: 1fr; }
  .about__image-wrap { display: none; }
  .contact__inner { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .product-detail__inner { grid-template-columns: 1fr; }
  .product-detail__gallery { position: static; }
}

/* Navbar mobile — breakpoint donde el menú deja de caber */
@media (max-width: 960px) {
  .navbar__menu {
    display: none; flex-direction: column; align-items: stretch;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--white); box-shadow: 0 8px 32px rgba(0,0,0,.12);
    padding: 10px 16px 20px; gap: 2px; z-index: 999;
  }
  .navbar__menu.open { display: flex; }
  .navbar__menu > li { position: static; }
  .navbar__link { padding: 11px 14px; font-size: .92rem; }
  .navbar__dropdown {
    position: static !important; transform: none !important;
    opacity: 1 !important; visibility: visible !important;
    box-shadow: none !important; border-top: none !important;
    pointer-events: all !important; background: var(--bg-light);
    padding: 4px; border-radius: 8px; margin: 2px 0 4px 10px;
    display: none; min-width: 0; width: 100%;
  }
  /* ⚠️ Resetear grid del dropdown de Zonas para que no desborde */
  .navbar__dropdown--grid { display: block; min-width: 0; grid-template-columns: 1fr; width: 100%; }
  .navbar__item.mob-open > .navbar__dropdown { display: block; }
  .navbar__toggle { display: flex; }
  .navbar__inner { position: relative; }
  .navbar__cta { display: none; }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  .topbar { display: none; }
  .hero__stats { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
  .cart-drawer { width: 100%; right: -100%; }
  .about__stats { grid-template-columns: repeat(3, 1fr); }
  .feature-list { grid-template-columns: 1fr; }
  .product-detail__actions .btn { padding: 14px 20px; }
  .communes-grid { grid-template-columns: repeat(2, 1fr); }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  /* Botones que podrían desbordar en mobile */
  .btn { white-space: normal; text-align: center; }
  .btn--lg { padding: 14px 20px; font-size: .92rem; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  .btn--lg { padding: 14px 24px; }
  .hero__stats { grid-template-columns: 1fr; gap: 12px; }
  .communes-grid { grid-template-columns: repeat(2, 1fr); }
  .about__stats { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
}
