/* ============================================================
   VARIABLES Y BASE
   ============================================================ */
:root {
  --bg: #0f1420;
  --bg-alt: #161d2e;
  --bg-card: #1b2436;
  --border: #2a3550;
  --text: #e8ecf4;
  --text-muted: #9aa5bd;
  --accent: #3ea6ff;
  --accent-dark: #1f7fd6;
  --accent-soft: rgba(62, 166, 255, 0.12);
  --success: #25d366;
  --warning: #ffb020;
  --radius: 10px;
  --max-width: 1180px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

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

section {
  padding: 56px 0;
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px; }
h3 { font-size: 1.15rem; }

.section-title {
  text-align: center;
  margin-bottom: 8px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 36px;
}

.text-center { text-align: center; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #06141f;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-whatsapp {
  background: var(--success);
  color: #06210f;
}

.btn-whatsapp:hover {
  background: #1fb857;
}

.btn-block {
  width: 100%;
}

/* ============================================================
   HEADER / NAV
   ============================================================ */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 20, 32, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text);
}

.nav-brand .logo-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav-links {
  display: flex;
  gap: 26px;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 1.1rem;
}

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 20px;
    gap: 14px;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding: 80px 0 60px;
  background:
    radial-gradient(circle at 15% 20%, var(--accent-soft), transparent 45%),
    radial-gradient(circle at 85% 0%, rgba(37, 211, 102, 0.08), transparent 40%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}

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

.hero-tag {
  display: inline-block;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.hero p.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 16px 0 28px;
  max-width: 520px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.hero-visual {
  background: linear-gradient(160deg, var(--bg-card), var(--bg-alt));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
}

.hero-visual ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.hero-visual li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.hero-visual li .icon {
  font-size: 1.2rem;
}

/* ============================================================
   TARJETAS GENÉRICAS (categorías, servicios, features)
   ============================================================ */
.grid {
  display: grid;
  gap: 22px;
}

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.card .icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 8px 0 0;
}

.card ul {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-left: 18px;
  margin: 12px 0 0;
}

.card ul li { margin-bottom: 4px; }

.bg-alt {
  background: var(--bg-alt);
}

/* ============================================================
   CATÁLOGO
   ============================================================ */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #06141f;
}

#filtros-subcategoria .filter-chip {
  font-size: 0.78rem;
  padding: 6px 13px;
  opacity: 0.9;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 14px;
  min-width: 220px;
}

.search-box input {
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  width: 100%;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1000px) {
  .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.product-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.product-thumb {
  aspect-ratio: 4 / 3;
  background: var(--bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.product-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-code {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.product-brand {
  font-size: 0.78rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

.product-name {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.product-specs {
  font-size: 0.82rem;
  color: var(--text-muted);
  flex: 1;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.product-price {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text);
}

.product-price small {
  display: block;
  font-weight: 400;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.badge-stock {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(37, 211, 102, 0.12);
  color: var(--success);
  font-weight: 700;
}

.badge-stock.out {
  background: rgba(255, 87, 87, 0.12);
  color: #ff6b6b;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 60px 20px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

/* ============================================================
   ARMADOR DE PC
   ============================================================ */
.builder-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 26px;
  align-items: start;
}

@media (max-width: 900px) {
  .builder-layout { grid-template-columns: 1fr; }
}

.builder-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.builder-step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.builder-step-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.builder-options {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}

.builder-options::-webkit-scrollbar {
  width: 8px;
}

.builder-options::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.builder-step-search {
  margin-bottom: 12px;
}

.builder-step-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

.builder-step-search input:focus {
  border-color: var(--accent);
}

.builder-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.builder-option:hover {
  border-color: var(--accent);
}

.builder-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.builder-option-info strong {
  display: block;
  font-size: 0.9rem;
}

.builder-option-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.builder-option-price {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
}

.builder-summary {
  position: sticky;
  top: 90px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}

.summary-line:last-of-type {
  border-bottom: none;
}

.summary-line .label {
  color: var(--text-muted);
}

.summary-line .value {
  font-weight: 600;
  text-align: right;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 800;
}

/* ============================================================
   FORMULARIOS
   ============================================================ */
.form-grid {
  display: grid;
  gap: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-success {
  display: none;
  background: rgba(37, 211, 102, 0.1);
  border: 1px solid var(--success);
  color: var(--success);
  padding: 14px 16px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 0.9rem;
}

.form-success.visible {
  display: block;
}

/* ============================================================
   PÁGINA DE CONTACTO
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
}

@media (max-width: 800px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GALERÍA DE TRABAJOS
   ============================================================ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.gallery-item {
  aspect-ratio: 4 / 3;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 2rem;
  overflow: hidden;
  position: relative;
}

.gallery-item span.caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(15, 20, 32, 0.85);
  color: var(--text);
  font-size: 0.75rem;
  padding: 6px 10px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 24px;
}

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

.footer-grid h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
}

.footer-grid p, .footer-grid a {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.footer-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.footer-bottom {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

/* ============================================================
   BOTÓN FLOTANTE DE WHATSAPP
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  background: var(--success);
  color: #06210f;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  z-index: 200;
  transition: transform 0.15s ease;
}

.whatsapp-float:hover {
  transform: scale(1.08);
  text-decoration: none;
}

/* ============================================================
   UTILIDADES
   ============================================================ */
.page-hero {
  padding: 46px 0 10px;
  text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
