/* ============================================================
   PERUINTERCOM | Hoja de estilos principal
   Editar variables en :root para cambios globales.
   Componentes: cabecera, hero, marcas, nosotros, catálogo,
   contacto y pie de página.
   ============================================================ */

/* 01. VARIABLES */
:root {
    --navy: #12395c;
    --blue: #17639c;
    --red: #bc2331;
    --ink: #1b2938;
    --muted: #5d6b78;
    --pale: #f3f7fb;
    --line: #dce5ee;
    --white: #fff;
    --whatsapp: #12b63b;
    --whatsapp-hover: #127a1b;
    --radius: 14px;
    --shadow-card: 0 5px 20px rgb(0 0 0 / 6%);
}

/* 02. BASE Y TIPOGRAFÍA */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; font-family: Arial, Helvetica, sans-serif; color: var(--ink); line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; }
.container { width: min(1140px, calc(100% - 40px)); margin-inline: auto; }
.section { padding-block: 85px; }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 13px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
h1, h2, h3 { line-height: 1.2; }
h1 { margin: 0 0 20px; color: var(--navy); font-size: clamp(36px, 4.3vw, 58px); letter-spacing: -1.8px; }
h2 { margin: 0 0 18px; color: var(--navy); font-size: clamp(27px, 3vw, 36px); }
h3 { margin: 10px 0; font-size: 19px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* 03. ENCABEZADO Y NAVEGACIÓN */
.topline { padding: 8px 12px; background: var(--navy); color: var(--white); text-align: center; font-size: 13px; }
.header { position: sticky; top: 0; z-index: 10; background: var(--white); box-shadow: 0 2px 14px #122b4512; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 86px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { max-width: 75px; max-height: 64px; object-fit: contain; }
.brand strong { display: block; color: var(--red); font-size: 23px; letter-spacing: -.7px; }
.brand strong span { color: var(--navy); }
.brand small { display: block; color: var(--muted); font-size: 12px; }
.menu { display: flex; align-items: center; gap: 27px; }
.menu > a { font-size: 14px; font-weight: 600; text-decoration: none; }
.menu > a:hover { color: var(--blue); }
.menu-toggle { display: none; padding: 6px; background: none; border: 0; font-size: 26px; cursor: pointer; }

/* 04. BOTONES GENERALES */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 22px; border: 1px solid var(--blue); border-radius: 8px; background: var(--blue); color: var(--white) !important; font-size: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--navy); }
.btn-small { min-height: 38px; padding: 8px 15px; }
.btn-outline { background: transparent; color: var(--blue) !important; }
.btn-outline:hover { color: var(--white) !important; }

/* 05. HERO Y LOGOTIPO PRINCIPAL */
.hero { padding-block: 82px; background: linear-gradient(115deg, #edf5fc 0%, #f9fbfe 70%); }
.hero-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: 65px; align-items: center; }
.lead { max-width: 600px; color: #435668; font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 26px; color: var(--muted); font-size: 13px; }
.hero-panel { padding: 36px; border: 1px solid #e5edf5; border-radius: 18px; background: var(--white); box-shadow: 0 16px 45px #12395c15; }
.hero-panel h2 { font-size: 25px; }
.panel-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 14px; background: #e8f2fa; color: var(--blue); font-size: 40px; }
.stat { display: flex; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.stat strong { color: var(--red); font-size: 37px; }
.stat span { color: var(--muted); }
.hero-logo { display: flex; align-items: center; justify-content: center; width: 100%; min-width: 0; padding: 15px; }
.hero-logo-img { display: block; width: 100%; max-width: 560px; height: auto; object-fit: contain; border-radius: 12px; }

/* 06. MARCAS */
.brands { padding-block: 24px; border-bottom: 1px solid var(--line); }
.brand-list { display: flex; align-items: center; justify-content: space-around; flex-wrap: wrap; gap: 15px; }
.brand-list span { color: #3e5266; font-size: 18px; font-weight: 900; letter-spacing: .5px; }
.brand-list span:nth-child(2) { color: #26a679; }
.brand-list span:nth-child(5) { color: var(--red); }

/* 07. NOSOTROS */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 65px; }
.about p { color: #4d5b68; }

/* 08. CATÁLOGO DE PRODUCTOS */
.products { background: var(--pale); }
.section-head { margin-bottom: 34px; }
.section-head p { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 25px; align-items: stretch; }
.product-card { display: flex; flex-direction: column; min-width: 0; height: auto; overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: var(--white); box-shadow: var(--shadow-card); }
.product-media { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 260px; min-height: 260px; padding: 15px; overflow: hidden; border-bottom: 1px solid var(--line); background: var(--white); }
.product-media img { display: block; width: 100%; height: 100%; max-width: 100%; max-height: 100%; object-fit: contain; object-position: center; }
/* Respeta el atributo HTML hidden usado por onerror. */
.product-media img[hidden], .product-media .image-fallback[hidden] { display: none; }
.image-fallback { color: #8797a6; font-size: 13px; }
.product-body { display: flex; flex: 1; flex-direction: column; min-width: 0; height: auto; padding: 22px; }
.tag { color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.product-body h3 { margin: 12px 0; font-size: 19px; line-height: 1.4; overflow-wrap: anywhere; }
.product-body .model { margin: 3px 0 10px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.product-body .desc { display: block; height: auto; min-height: 0; max-height: none; margin: 3px 0 18px; overflow: visible; color: var(--muted); font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.product-body .price { margin: auto 0 15px; padding-top: 15px; color: var(--navy); font-size: 21px; font-weight: 700; }
.product-link { display: block; width: 100%; padding: 13px 10px; border-radius: 8px; background: var(--whatsapp); color: var(--white); font-size: 13px; font-weight: 600; line-height: 1.4; text-align: center; text-decoration: none; }
.product-link:hover { background: var(--whatsapp-hover); color: var(--white); }
.fine-print { margin-top: 25px; color: var(--muted); font-size: 12px; }

/* 09. CONTACTO Y FORMULARIO */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; }
.contact-details { margin-top: 25px; }
.contact-details a { color: var(--blue); overflow-wrap: anywhere; }
.contact-form { display: grid; gap: 8px; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px #12395c0a; }
.contact-form label { font-size: 13px; font-weight: 700; }
.contact-form input, .contact-form textarea { width: 100%; min-width: 0; margin-bottom: 10px; padding: 12px 13px; border: 1px solid #bfcdd9; border-radius: 7px; font: inherit; }
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid #92c3e7; outline-offset: 1px; }
.form-note { margin: 0; color: var(--muted); font-size: 12px; }

/* 10. PIE DE PÁGINA */
.footer { padding-block: 38px; background: var(--navy); color: var(--white); }
.footer-inner { display: flex; justify-content: space-between; gap: 25px; }
.footer p { margin: 4px 0; color: #d5e5f1; font-size: 13px; }

/* 11. RESPONSIVE: TABLET */
@media (max-width: 900px) {
    .hero-grid, .about, .contact { grid-template-columns: 1fr; gap: 30px; }
    .hero { padding-block: 55px; }
    .section { padding-block: 60px; }
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hero-logo-img { max-width: 440px; }
}

/* 12. RESPONSIVE: MÓVIL */
@media (max-width: 600px) {
    .container { width: min(1140px, calc(100% - 28px)); }
    .nav { min-height: 74px; }
    .brand strong { font-size: 19px; }
    .brand img { max-height: 48px; }
    .menu-toggle { display: block; }
    .menu { position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 15px; padding: 20px; background: var(--white); box-shadow: 0 10px 20px #12395c19; }
    .menu.open { display: flex; }
    .product-grid { grid-template-columns: 1fr; }
    .product-media { height: 240px; min-height: 240px; }
    .product-body { padding: 18px; }
    .hero-panel { padding: 24px; }
    .hero-logo { padding: 10px 0; }
    .hero-logo-img { max-width: 100%; }
    .contact-form { padding: 20px; }
    .footer-inner { flex-direction: column; }
}

/* Accesibilidad: respeta la preferencia de reducir movimiento. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
/* =======================================================
   WHATSAPP FLOTANTE - LA CASA DEL CITÓFONO
   ======================================================= */

.floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;

    width: 62px;
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #25D366;
    color: #ffffff;

    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);

    text-decoration: none;
    z-index: 9999;

    transition: transform 0.3s ease,
                background-color 0.3s ease;
}

.floating-whatsapp:hover {
    background-color: #128C7E;
    transform: scale(1.1);
}

.floating-whatsapp:focus-visible {
    outline: 3px solid #075E54;
    outline-offset: 4px;
}

.whatsapp-icon {
    width: 34px;
    height: 34px;
    fill: currentColor;
}