/* =========================================================
   GYG Soluciones en Sistemas — Portal de Empaque Industrial
   Sistema de diseño v2 — claro, moderno, amigable
   ========================================================= */

:root {
  --primary: #1786C4;
  --primary-dark: #0F5F92;
  --primary-tint: #E7F4FC;
  --accent: #FF7A45;
  --accent-dark: #E85F2B;
  --accent-tint: #FFEDE3;
  --ink: #1F2A37;
  --ink-soft: #5B6674;
  --bg: #F6F9FC;
  --surface: #FFFFFF;
  --line: #E4E9EF;
  --success: #25D366;
  --success-dark: #1EBE59;

  --display: 'Poppins', sans-serif;
  --body: 'Inter', sans-serif;

  --radius-lg: 20px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(31,42,55,0.08);
  --shadow-hover: 0 16px 40px rgba(31,42,55,0.14);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  margin: 0 0 0.5em 0;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 4vw, 3.1rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em 0; color: var(--ink-soft); }

.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background: var(--primary-tint);
  padding: 6px 14px;
  border-radius: 100px;
}

/* ---------- header / nav ---------- */
header.site-header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--max);
  margin: 0 auto;
  gap: 20px;
}
.brand { display: flex; align-items: center; white-space: nowrap; }
.brand-logo { height: 40px; width: auto; display: block; }

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  justify-content: center;
}
nav.main-nav > a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
  white-space: nowrap;
}
nav.main-nav > a:hover { color: var(--primary); background: var(--primary-tint); }
nav.main-nav > a.active { color: var(--primary); font-weight: 600; }

/* dropdown (details/summary — works on click + tap, no JS needed) */
.nav-dropdown { position: relative; }
.nav-dropdown summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.nav-dropdown summary::-webkit-details-marker { display: none; }
.nav-dropdown summary:hover { color: var(--primary); background: var(--primary-tint); }
.nav-dropdown summary .chev { font-size: 0.7em; transition: transform .15s; }
.nav-dropdown[open] summary .chev { transform: rotate(180deg); }
.nav-dropdown.active summary { color: var(--primary); font-weight: 600; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 8px;
  min-width: 240px;
  z-index: 60;
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  color: var(--ink);
}
.dropdown-menu a:hover { background: var(--primary-tint); color: var(--primary); }
.dropdown-menu a .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0;
}

.nav-cta {
  background: var(--accent);
  color: var(--white, #fff) !important;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: 100px;
  white-space: nowrap;
  transition: background .15s, transform .15s;
  box-shadow: 0 6px 16px rgba(255,122,69,0.35);
}
.nav-cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: var(--primary-tint);
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
}

@media (max-width: 940px) {
  nav.main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 24px 20px;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }
  nav.main-nav.open { display: flex; }
  nav.main-nav > a { padding: 12px 8px; text-align: left; }
  .nav-dropdown summary { padding: 12px 8px; }
  .dropdown-menu { position: static; box-shadow: none; border: none; padding: 0 0 0 12px; margin-top: 4px; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.94rem;
  font-weight: 600;
  padding: 14px 24px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(255,122,69,0.32); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--ink); background: var(--surface); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-whatsapp { background: var(--success); color: #06331a; box-shadow: 0 8px 20px rgba(37,211,102,0.32); }
.btn-whatsapp:hover { background: var(--success-dark); transform: translateY(-1px); }
.btn-block { width: 100%; justify-content: center; }

/* ---------- hero ---------- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -180px; right: -160px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--primary-tint) 0%, transparent 70%);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -160px; left: -120px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, var(--accent-tint) 0%, transparent 70%);
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.hero p.lead { font-size: 1.1rem; max-width: 46ch; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }

.trust-bar {
  margin-top: 36px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.86rem;
  color: var(--ink-soft);
}
.trust-bar div { display: flex; align-items: center; gap: 8px; }
.trust-bar .ico {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--success); color: #fff; font-size: 0.7rem;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ---------- hero visual card ---------- */
.hero-visual { position: relative; }
.hero-img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-hover);
  position: relative;
}
.hero-img-card img { width: 100%; height: 360px; object-fit: cover; }
.floating-badge {
  position: absolute;
  bottom: -18px; left: 24px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.floating-badge .badge-value { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--primary); }
.floating-badge .badge-label { font-size: 0.76rem; color: var(--ink-soft); }

/* ---------- category grid ---------- */
.categories { padding: 70px 0 60px; }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.cat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.cat-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.cat-card .cat-img { height: 170px; overflow: hidden; background: var(--primary-tint); }
.cat-card .cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-body { padding: 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.cat-body h3 { font-size: 1.05rem; margin-bottom: 0; }
.cat-body p { font-size: 0.88rem; margin-bottom: 6px; }
.cat-body .price-tag { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--accent-dark); }
.cat-body .price-tag small { font-size: 0.68rem; color: var(--ink-soft); font-family: var(--body); font-weight: 400; }
.cat-body .btn { margin-top: 8px; padding: 10px 18px; font-size: 0.85rem; }

@media (max-width: 1000px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 780px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .cat-grid { grid-template-columns: 1fr; }
}

/* ---------- why-buy section ---------- */
.why { background: var(--primary-dark); padding: 64px 0; color: #fff; position: relative; overflow: hidden; }
.why h2 { color: #fff; }
.why .eyebrow { background: rgba(255,255,255,0.15); color: #fff; }
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.why-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 24px;
}
.why-card .ico {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; margin-bottom: 14px;
}
.why-card h3 { color: #fff; margin-bottom: 8px; }
.why-card p { color: rgba(255,255,255,0.75); margin: 0; }
@media (max-width: 780px) { .why-grid { grid-template-columns: 1fr; } }

/* ---------- product page ---------- */
.page-head { padding: 48px 0 12px; }
.page-head p.lead { max-width: 70ch; font-size: 1.05rem; }

.product {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 40px;
  padding: 36px;
  margin: 28px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  align-items: start;
}
.product-gallery img {
  width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  aspect-ratio: 4/3.2;
  object-fit: cover;
}
.product-gallery .thumbs { display: flex; gap: 10px; margin-top: 10px; }
.product-gallery .thumbs img { height: 72px; width: 72px; object-fit: cover; aspect-ratio: auto; }

.product-info .kicker {
  font-size: 0.78rem; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; display: block;
}
.product-info h3.model { font-size: 1.5rem; margin-bottom: 4px; }
.product-info .sku { font-size: 0.85rem; color: var(--ink-soft); margin-bottom: 16px; display: block; }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 22px; }
.spec-pill {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
}
.spec-pill .k { font-size: 0.72rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.03em; }
.spec-pill .v { font-weight: 600; color: var(--ink); font-size: 0.95rem; }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: var(--accent-tint);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.price-row .amount { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--accent-dark); }
.price-row .unit { font-size: 0.86rem; color: var(--ink-soft); }
.price-note { font-size: 0.82rem; color: var(--ink-soft); margin-top: -8px; margin-bottom: 20px; }

.product-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.feature-list { list-style: none; margin: 0; padding: 0; }
.feature-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 0;
  width: 18px; height: 18px;
  background: var(--primary-tint);
  color: var(--primary);
  border-radius: 50%;
  font-size: 0.68rem;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
}

/* ---------- comparison table ---------- */
.compare-wrap { overflow-x: auto; margin: 26px 0; border-radius: var(--radius); border: 1px solid var(--line); }
table.compare { width: 100%; border-collapse: collapse; min-width: 560px; background: var(--surface); }
table.compare th, table.compare td { padding: 14px 18px; text-align: left; font-size: 0.92rem; }
table.compare thead th { background: var(--primary); color: #fff; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
table.compare td.price { font-family: var(--display); color: var(--accent-dark); font-weight: 700; }
table.compare tbody tr:nth-child(even) { background: var(--bg); }
table.compare tbody tr:not(:last-child) td { border-bottom: 1px solid var(--line); }

/* ---------- FAQ ---------- */
.faq { padding: 16px 0 60px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; }
.faq-item h4 { margin-bottom: 8px; font-size: 1rem; color: var(--ink); }
.faq-item p { margin: 0; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 50px 0;
  text-align: center;
  border-radius: var(--radius-lg);
  margin: 0 auto 60px;
  max-width: var(--max);
  color: #fff;
}
.cta-banner h2 { color: #fff; margin-bottom: 8px; }
.cta-banner p { color: rgba(255,255,255,0.85); }

/* ---------- contacto page ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 0 70px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.contact-card h3 { margin-bottom: 16px; }
.contact-row { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.contact-row:first-of-type { border-top: none; }
.contact-row .label { font-size: 0.78rem; color: var(--ink-soft); width: 110px; flex-shrink: 0; text-transform: uppercase; letter-spacing: 0.03em; font-weight: 600; }
@media (max-width: 780px) { .contact-grid { grid-template-columns: 1fr; } .product { grid-template-columns: 1fr; padding: 24px; } .spec-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
footer.site-footer { background: #101826; color: #9AA6B4; padding: 44px 0 24px; font-size: 0.9rem; }
footer.site-footer .foot-grid { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 28px; }
footer.site-footer a:hover { color: var(--accent); }
footer.site-footer .foot-links a { display: block; margin-bottom: 10px; }
footer.site-footer .foot-bottom { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.08); font-size: 0.8rem; }

/* ---------- whatsapp floating button ---------- */
.wa-float {
  position: fixed; bottom: 22px; right: 22px;
  background: var(--success); color: #fff;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(37,211,102,0.45);
  z-index: 60; font-size: 1.7rem;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
