/* ==========================================================================
   MAIN.CSS — hogar.aguapurard.com
   Import order matters. Load this single file in <head>.
   ========================================================================== */

@import url('design-system.css');
@import url('reset.css');
@import url('layout.css');
@import url('components.css');

/* ==========================================================================
   PROJECT-SPECIFIC OVERRIDES
   Small rules that are too specific to belong in any base file.
   ========================================================================== */

/* Hero section top accent line */
.hero {
  border-top: 3px solid var(--color-accent);
}

/* Final CTA section — extra top padding for visual breathing room */
.section-final-cta {
  padding-block: var(--space-20);
}

@media (min-width: 1024px) {
  .section-final-cta {
    padding-block: var(--space-24);
  }
}

/* Pricing note below table */
.pricing-note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
}

/* Stages section — override light bg for better card contrast */
#como-funciona {
  background-color: var(--color-bg-surface);
}

/* WhatsApp floating button (optional — remove if not using) */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background-color: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.5);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
  width: 28px;
  height: 28px;
  color: #ffffff;
  fill: #ffffff;
}

/* ==========================================================================
   PRODUCT CARDS — pricing section grid
   Defined here (not in components.css) to bypass @import cache issues.
   ========================================================================== */

.product-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  margin-block: var(--space-10);
}

@media (max-width: 900px) {
  .product-cards {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-inline: auto;
  }
}

.product-card {
  position: relative;
  background: var(--color-bg-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 8px 32px rgba(59, 141, 196, 0.12);
  border-color: var(--color-primary);
}

.product-card--featured {
  border-color: var(--color-primary);
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(59, 141, 196, 0.15);
}

.product-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #ffffff;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 999px;
  white-space: nowrap;
}

.product-card__badge--sale {
  background: var(--color-whatsapp);
}

.product-card__header {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text-dark);
  line-height: 1.2;
}

.product-card__tag {
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 600;
}

.product-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex: 1;
}

.product-card__features li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-body);
  line-height: 1.5;
}

.product-card__features li::before {
  content: "✓";
  color: var(--color-primary);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.product-card .btn {
  width: 100%;
  text-align: center;
  margin-top: auto;
}

/* ==========================================================================
   INSTALLATION GALLERY
   ========================================================================== */

.gallery-video-solo {
  margin: var(--space-10) auto 0;
  max-width: 400px;
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  line-height: 0;
}

.gallery-video-solo video {
  width: 100%;
  display: block;
  border-radius: var(--radius-xl);
}

@media (max-width: 480px) {
  .gallery-video-solo {
    max-width: 100%;
    border-radius: var(--radius-lg);
  }
}

/* ==========================================================================
   QUICK CONTACT ROW (final CTA section)
   ========================================================================== */

.cta-quick-contacts {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-2);
}

.cta-quick-contact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.cta-quick-contact:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
}

.cta-quick-contact svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ==========================================================================
   HEADER LOGOS (dual brand)
   ========================================================================== */

.site-header__logos {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.site-header__logos img {
  height: 56px;   /* Aquapur logo */
  width: auto;
  display: block;
}

.site-header__logos a:first-child img {
  height: 34px;   /* HydroFlow logo */
}

.site-header__logo-sep {
  width: 1px;
  height: 32px;
  background: var(--color-border);
  display: block;
}

/* ==========================================================================
   PRODUCT CARD IMAGE
   ========================================================================== */

.product-card__image {
  margin: calc(-1 * var(--space-8));
  margin-bottom: var(--space-5);
  border-radius: calc(var(--radius-xl) - 2px) calc(var(--radius-xl) - 2px) 0 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--color-bg-surface);
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.product-card:hover .product-card__image img {
  transform: scale(1.04);
}

.product-card__badge {
  z-index: 2;
}

/* ==========================================================================
   BUTTON — SOLID BLUE (product cards; reserve green only for WhatsApp)
   ========================================================================== */

.btn-blue {
  background-color: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
  box-shadow: 0 4px 14px rgba(59, 141, 196, 0.30);
  font-size: var(--text-md);
  padding: var(--space-5) var(--space-10);
  border-radius: var(--radius-md);
}

.btn-blue:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(59, 141, 196, 0.45);
  transform: translateY(-1px);
}

/* ==========================================================================
   RESPONSIVE — MOBILE OVERFLOW FIXES  (v8)
   Prevents horizontal overflow on narrow phones (360–480 px wide).
   Root causes: header too wide, social-proof badge inline-flex, btn padding.
   ========================================================================== */

/* Safety net: clip any accidental overflow at the root */
html {
  overflow-x: hidden;
}

/* 1. Header: compact logos + CTA button on narrow phones */
@media (max-width: 480px) {
  .site-header__logos a:first-child img {
    height: 26px;
  }
  .site-header__logos img {
    height: 48px;
  }
  .site-header__logo-sep {
    height: 28px;
  }
  .site-header .btn-primary {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-sm);
  }
  .site-header .btn-icon {
    width: 16px;
    height: 16px;
  }
}

/* 2. Social proof badge: allow wrapping on small screens */
@media (max-width: 599px) {
  .social-proof-badge {
    display: flex;
    flex-wrap: wrap;
    row-gap: var(--space-1);
    border-radius: var(--radius-lg);
  }
}

/* 3. Hero CTA row: stack buttons vertically + stretch to full width */
@media (max-width: 599px) {
  .hero__content .flex-wrap {
    flex-direction: column;
    align-items: stretch;
  }
}

/* 4. All primary + blue CTA buttons in main: full width on mobile */
@media (max-width: 599px) {
  main .btn-primary,
  main .btn-primary--lg,
  main .btn-blue {
    width: 100%;
    white-space: normal;
  }
  .btn-primary--lg {
    padding: var(--space-4) var(--space-6);
    font-size: var(--text-base);
  }
}

/* ==========================================================================
   FOOTER BRAND LOGO  (v9)
   White pill so Aquapur logo is legible on dark footer background.
   ========================================================================== */

.site-footer__brand {
  margin-bottom: var(--space-5);
}

.site-footer__logo-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border-radius: var(--radius-full);
  padding: var(--space-2) var(--space-6);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.site-footer__logo-wrap:hover {
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
  transform: translateY(-1px);
}

.site-footer__logo-wrap img {
  height: 52px;
  width: auto;
  display: block;
}
