/* ============================================================
   El Imperio del Frío — estilo minimalista masculino
   Paleta: blanco ahumado con degradados (grafito / azul acero)
   Mobile-first, sin frameworks externos (cero dependencias de red).
   ============================================================ */

:root {
  --color-bg: #eceef1;            /* blanco ahumado */
  --color-surface: #ffffff;
  --color-dark: #141c26;          /* grafito profundo */
  --color-text: #242c36;
  --color-muted: #66707c;
  --color-accent: #0ea5e9;        /* cian vivo moderno */
  --color-accent-dark: #0369a1;   /* cian oscuro */
  --color-border: #d8dde3;
  --color-accent-soft: #e0f2fe;   /* cian suave */
  --color-smoke-soft: #dfe3e8;    /* gris humo */
  --color-green: #0aa66f;
  --radius: 14px;
  --shadow: 0 10px 28px rgba(20, 28, 38, 0.10);
  --max-width: 1140px;
  --font-heading: Georgia, 'Times New Roman', serif;
  --font-body: -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

body.no-scroll { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-dark);
  margin: 0 0 0.5em;
}

a { color: inherit; }

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

section { padding: 4rem 1.25rem; }

.section-heading {
  max-width: 640px;
  margin: 0 auto 2.5rem;
  text-align: center;
}

.section-heading p { color: var(--color-muted); }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  transition: transform 0.15s ease, background 0.15s ease;
}

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

.btn--primary {
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
}

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

.btn--ghost {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
}

.btn--block { width: 100%; text-align: center; }

.btn--small { padding: 0.5rem 1rem; font-size: 0.9rem; }

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--color-border);
}

.navbar__inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.navbar__brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-dark);
  letter-spacing: -0.02em;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}
.navbar__brand span {
  white-space: nowrap;
}

.navbar__brand span::first-letter { color: var(--color-accent); }

.navbar__logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.navbar__toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  order: 3;
}

.navbar__toggle span {
  width: 22px;
  height: 2px;
  background: var(--color-dark);
}

.navbar__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  flex-direction: column;
  padding: 1rem 1.25rem;
}

.navbar__menu.is-open { display: flex; }

.navbar__menu a {
  padding: 0.6rem 0;
  text-decoration: none;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-border);
  transition: color .18s ease;
}

.navbar__menu a:hover { color: var(--color-accent); }

.navbar__menu a:last-child { border-bottom: none; }

.cart-fab {
  position: relative;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  order: 2;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.cart-fab__icon {
  font-size: 1.25rem;
  line-height: 1;
  display: block;
}

.cart-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  display: inline-grid;
  place-items: center;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-sizing: border-box;
}
.cart-fab__badge:empty,
.cart-fab__badge[data-empty="1"] {
  display: none;
}

@keyframes cart-fab-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Botón flotante del carrito */
.cart-fab-float {
  position: fixed;
  right: 1.25rem;
  bottom: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  z-index: 45;
  animation: cart-fab-in 0.2s ease-out;
}

.cart-fab-float[hidden] { display: none; }

.cart-fab-float__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--color-dark);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* --- Hero --- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(47, 77, 104, .12), transparent 30%),
    radial-gradient(circle at 85% 10%, rgba(23, 40, 58, .10), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--color-bg) 100%);
  text-align: center;
  padding: 5rem 1.25rem 4rem;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.hero::before { left: -70px; top: 25px; background: rgba(47, 77, 104, .10); }
.hero::after { right: -70px; bottom: 20px; background: rgba(23, 40, 58, .08); }

.hero > * { position: relative; z-index: 1; }

.hero__eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 0.85rem;
}

.hero h1 {
  font-size: 2.75rem;
  background: linear-gradient(110deg, #0ea5e9 0%, #06b6d4 35%, #22d3ee 65%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 12px rgba(14, 165, 233, 0.35));
  letter-spacing: -0.02em;
}

.hero__tagline {
  max-width: 560px;
  margin: 0 auto 1.75rem;
  color: var(--color-muted);
}

.hero__actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero__stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  max-width: 820px;
  margin: 3rem auto 0;
}

.stat {
  background: linear-gradient(145deg, #ffffff 0%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 0.75rem;
  box-shadow: var(--shadow);
}

.stat strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.7rem;
  color: var(--color-accent-dark);
}

.stat span { font-size: 0.82rem; color: var(--color-muted); }

/* --- Secciones con ancho máximo --- */
.services, .shop, .contact, .why, .featured, .process, .projects, .team { max-width: var(--max-width); margin: 0 auto; }

/* --- ¿Por qué elegirnos? --- */
.why__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.why-card {
  background: linear-gradient(145deg, #ffffff 0%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.why-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(23, 40, 58, .14); }

.why-card__icon {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.why-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
.why-card p { margin: 0; color: var(--color-muted); font-size: 0.92rem; }

/* --- Servicios --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.service-card {
  background: linear-gradient(145deg, #ffffff 0%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem 0.9rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  text-align: center;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.service-card:hover { transform: translateY(-3px); border-color: #b9c4cf; box-shadow: 0 14px 32px rgba(23, 40, 58, .14); }

.service-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  font-size: 1.2rem;
  flex: 0 0 42px;
}

.service-card h4 { font-size: 0.92rem; margin: 0; }
.service-card p { margin: 0; font-size: 0.78rem; color: var(--color-muted); flex: 1; }

/* --- Proceso --- */
.process__steps {
  list-style: none;
  counter-reset: paso;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 960px;
}

.process__steps li {
  counter-increment: paso;
  position: relative;
  background: linear-gradient(145deg, #ffffff 0%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.25rem 4.25rem;
  box-shadow: var(--shadow);
}

.process__steps li::before {
  content: counter(paso);
  position: absolute;
  left: 1.1rem;
  top: 1.15rem;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-dark) 100%);
  color: #fff;
  font-weight: 800;
  font-family: var(--font-heading);
}

.process__steps strong { font-family: var(--font-heading); color: var(--color-dark); font-size: 1.05rem; }
.process__steps p { margin: 0.25rem 0 0; color: var(--color-muted); font-size: 0.9rem; }

/* --- Proyectos --- */
.projects__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}

.project-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(23, 40, 58, .14); }

.project-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

.project-card__body { padding: 1.1rem 1.25rem 1.4rem; }

.project-card__body h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.project-card__body p { margin: 0 0 0.6rem; color: var(--color-muted); font-size: 0.9rem; }
.project-card__meta { font-size: 0.78rem; font-weight: 700; color: var(--color-accent); text-transform: uppercase; letter-spacing: .05em; }

/* --- Products grid --- */
.products-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 2.5rem;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.form-row { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }

.form-row label, fieldset.form-row legend { font-weight: 600; font-size: 0.9rem; }

fieldset.form-row { border: none; padding: 0; margin: 0 0 1.1rem; }

.form-row input[type="text"],
.form-row input[type="tel"],
.form-row input[type="date"],
.form-row textarea,
.form-row select {
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-bg);
}

.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(47, 77, 104, .10);
}

.form-error {
  color: #b3261e;
  background: #fdecea;
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.form-hint { font-size: .78rem; opacity: .7; margin-top: .1rem; }

/* --- Product cards --- */
.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  min-width: 0;
}

.product-card:hover { transform: translateY(-3px); border-color: #b9c4cf; box-shadow: 0 14px 32px rgba(23, 40, 58, .14); }

.product-card__open { width: 100%; border: 0; background: transparent; padding: 0; cursor: pointer; }

.product-card__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(145deg, #ffffff, #e8edf2);
  transition: transform .2s ease;
}

.product-card__open:hover .product-card__img { transform: scale(1.02); }

.product-card__badges { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: center; width: 100%; }

.category-chip, .size-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .18rem .5rem;
  font-size: .66rem;
  font-weight: 700;
}

.category-chip { background: var(--color-accent-soft); color: var(--color-accent-dark); }
.size-chip { background: var(--color-smoke-soft); color: #444d57; }

.soldout-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .18rem .5rem;
  font-size: .66rem;
  font-weight: 700;
  background: #fde8e8;
  color: #b3261e;
}

.product-card.is-soldout .product-card__img { filter: grayscale(.85); opacity: .65; }

.product-card__brand, .detail-brand {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--color-accent-dark);
  font-weight: 700;
}

.product-card h4 { font-size: 1rem; margin: 0; }

.product-card__profile { font-size: .82rem; color: var(--color-muted); min-height: 2.5em; }

.product-card__price { color: var(--color-accent-dark); font-weight: 700; font-size: .95rem; }

.no-results, .loading { text-align: center; padding: 2rem; color: var(--color-muted); grid-column: 1 / -1; }

.no-results { display: flex; flex-direction: column; gap: .25rem; }

/* --- Featured carousel --- */
.featured-slider { position: relative; display: flex; align-items: center; gap: .5rem; }

.featured-track {
  display: flex;
  overflow: hidden;
  flex: 1;
  scroll-behavior: smooth;
  touch-action: pan-y;
  user-select: none;
}

.featured-card {
  min-width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 72%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.featured-card__image {
  border: 0;
  padding: 0;
  background: var(--color-accent-soft);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
}

.featured-card__image img { width: 100%; aspect-ratio: 1; object-fit: cover; }

.featured-card h3 { font-size: 1.6rem; margin: .2rem 0; }
.featured-card p { color: var(--color-muted); }

.slider-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  font-size: 1.7rem;
  z-index: 2;
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}

.slider-btn:hover {
  color: var(--color-accent);
  border-color: #aeb9c4;
  background: var(--color-accent-soft);
}

/* --- Nuestro Equipo --- */
.team__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.team-card {
  background: linear-gradient(145deg, #ffffff 0%, var(--color-accent-soft) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}

.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(23, 40, 58, .14);
}

.team-card__photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 0.85rem;
  border: 3px solid var(--color-accent-soft);
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.25);
  background: var(--color-smoke-soft);
}
.team-card__avatar {
  display: none;
}

.team-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.team-card__role {
  display: block;
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.65rem;
}

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

/* --- Contact --- */
.contact__grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.contact__map {
  width: 100%;
}

.contact__map iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--color-smoke-soft);
}

.contact__map-caption {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--color-muted);
  font-weight: 500;
}

.contact__info h3 {
  font-size: 1rem;
  color: var(--color-accent-dark);
  margin-bottom: 0.2rem;
}

.contact__info p {
  margin: 0 0 1rem;
  font-weight: 600;
}

.contact__info a {
  color: var(--color-accent);
}

.contact__hours {
  font-weight: 500 !important;
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-top: -0.6rem !important;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2.5rem 1.25rem 2rem;
  border-top: 1px solid var(--color-border);
  color: var(--color-muted);
  background: linear-gradient(180deg, transparent, #e2e6ea);
}

.footer__logo { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 0.6rem; }

.footer p { margin: 0.25rem 0; }
.footer p:first-of-type { color: var(--color-accent-dark); font-weight: 800; }
.footer__muted { font-size: 0.85rem; }
code { font-size: .8em; }

/* --- Cart drawer --- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 38, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 50;
}

.overlay.is-open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 51;
  display: flex;
  flex-direction: column;
}

.drawer.is-open { transform: translateX(0); }

.drawer__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(90deg, #ffffff, var(--color-accent-soft));
}

.icon-btn {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.3rem 0.6rem;
}

.drawer__items {
  padding: 1rem 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.drawer__empty { color: var(--color-muted); text-align: center; margin-top: 2rem; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}

.cart-item img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: var(--color-bg); }

.cart-item__info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cart-item__info strong { font-size: .86rem; }
.cart-item__info span { color: var(--color-muted); font-size: .76rem; }

.cart-item__qty { display: flex; align-items: center; gap: 0.5rem; }

.cart-item__qty button, .qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  cursor: pointer;
  font-weight: 700;
}

.cart-item__qty button:hover, .qty-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  background: var(--color-accent-soft);
}

.cart-item__remove {
  background: none;
  border: none;
  color: var(--color-muted);
  cursor: pointer;
  font-size: 0.9rem;
}

.drawer__footer {
  padding: 1.25rem;
  border-top: 1px solid var(--color-border);
}

.cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

/* --- Modal --- */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 28, 38, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 60;
}

.modal.is-open { opacity: 1; pointer-events: auto; }

.modal__content {
  position: relative;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1.75rem;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
}

.modal__summary {
  background: var(--color-bg);
  border-radius: var(--radius);
  padding: 1rem;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.7;
}

.modal__actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.modal__actions .btn { flex: 1; text-align: center; }

.modal__close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  z-index: 1;
}

/* --- Product detail modal --- */
.product-modal { max-width: 860px; }

.product-detail {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 1fr);
  gap: 2rem;
  align-items: start;
}

.detail-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--color-bg);
}

.detail-copy h3 { font-size: 2rem; margin: .2rem 0; }
.detail-profile { color: var(--color-muted); }

.field-label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .35rem; }

.detail-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin: 1rem 0;
}

.detail-meta-grid > div {
  background: linear-gradient(135deg, #ffffff, var(--color-accent-soft));
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: .75rem;
}

.detail-meta-grid .field-label {
  margin-bottom: .15rem;
  color: var(--color-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.size-label { display: block; font-size: 1rem; color: var(--color-dark); }

.detail-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
  font-size: 1.15rem;
}

.detail-price-row strong:first-child { color: var(--color-accent-dark); }

/* --- Services modal --- */
.service-modal { max-width: 560px; }

.service-modal__intro { color: var(--color-muted); font-size: 0.92rem; margin-top: -0.3rem; }

.service-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.service-option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  font-size: 0.82rem;
  background: var(--color-bg);
  transition: border-color .15s ease, background .15s ease;
  user-select: none;
}

.service-option:hover { border-color: #aeb9c4; }

.service-option input { accent-color: var(--color-accent); flex: 0 0 auto; }

.service-option.is-checked {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
  color: var(--color-accent-dark);
  font-weight: 600;
}

/* --- Catálogo: buscador --- */
.catalog-toolbar {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0 auto 1.5rem;
  max-width: 820px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .6rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: .2rem 1rem;
  box-shadow: var(--shadow);
}

.search-box span { font-size: 1.5rem; color: var(--color-accent); }

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  padding: .75rem .2rem;
  font: inherit;
}

.search-box:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(47, 77, 104, .10), var(--shadow);
}

.search-count { white-space: nowrap; color: var(--color-muted); font-size: .9rem; }

/* --- Misc --- */
.section-heading .hero__eyebrow { display: block; margin-bottom: 0.4rem; }

.section-heading h2::after {
  content: '';
  display: block;
  width: 42px;
  height: 3px;
  margin: .45rem auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-accent-dark));
}

#checkout-form textarea, #service-form textarea { resize: vertical; }

#sinpe-proof-row[hidden] { display: none !important; }

.btn:disabled, .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ============================================================
   Responsive — tablet / desktop
   ============================================================ */
@media (min-width: 768px) {
  .navbar__toggle { display: none; }

  .navbar__menu {
    display: flex;
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    padding: 0;
    gap: 1.5rem;
    order: 1;
  }

  .navbar__menu a { border-bottom: none; padding: 0; }

  .hero h1 { font-size: 3.5rem; }

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

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

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

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

  .process__steps { grid-template-columns: repeat(2, 1fr); }

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

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

  .contact__grid { grid-template-columns: 2fr 1fr; }

  .navbar__menu { order: 1; }
  .cart-fab { order: 3; }
}

@media (min-width: 1200px) {
  .services-grid { grid-template-columns: repeat(5, 1fr); }
  .products-grid { grid-template-columns: repeat(4, 1fr); }
  .process__steps { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 767px) {
  .catalog-toolbar { align-items: stretch; flex-direction: column; }
  .search-count { text-align: right; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card__image img { max-height: 320px; }
  .product-detail { grid-template-columns: 1fr; gap: 1rem; }
  .detail-copy h3 { font-size: 1.7rem; }
  .service-options { grid-template-columns: 1fr; }
  .navbar__brand { gap: .4rem; font-size: 1.05rem; white-space: nowrap; }
  .navbar__logo { width: 38px; height: 38px; }
  .cart-fab { width: 42px; height: 42px; padding: 0; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}


.services--hidden,
section.services[hidden] {
  display: none !important;
  padding: 0 !important;
  margin: 0 !important;
  height: 0 !important;
}
