/* ============ Reset & tokens ============ */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

:root {
  --bg: #101114;
  --bg-alt: #16171b;
  --bg-card: #1b1c21;
  --bg-card-hover: #212228;
  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --text: #f5f6f8;
  --text-dim: #9ea0a8;
  --text-faint: #6d6f78;
  --accent: #f2913f;
  --accent-2: #ffb066;
  --accent-dark: #c9702a;
  --accent-soft: rgba(242,145,63,.14);
  --whatsapp: #25D366;
  --whatsapp-dark: #1da851;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --shadow-lg: 0 20px 50px rgba(0,0,0,.45);
  --shadow-md: 0 10px 30px rgba(0,0,0,.35);
  --font-head: "Oswald", sans-serif;
  --font-body: "Sora", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--accent); color: #101114; padding: .6rem 1rem; z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

h1, h2, h3 { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .02em; margin: 0; }

.eyebrow {
  display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--accent); margin-bottom: .5rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #16130d; box-shadow: 0 10px 24px rgba(242,145,63,.28); }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(242,145,63,.4); }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-whatsapp { background: var(--whatsapp); color: #06210f; box-shadow: 0 10px 24px rgba(37,211,102,.25); }
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-text { color: var(--text-dim); }
.btn-text:hover { color: var(--text); }
.btn-block { width: 100%; }
.btn-sm { padding: .55rem 1.1rem; font-size: .85rem; }

.chip {
  display: inline-block; padding: .3rem .75rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-2); font-size: .72rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .06em;
}

/* ============ Header ============ */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(16,17,20,.85); backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 1240px; margin: 0 auto; padding: .7rem 1.25rem;
  display: flex; align-items: center; gap: 1.25rem;
}
.brand { display: flex; align-items: center; gap: .65rem; flex-shrink: 0; }
.brand-logo { border-radius: 10px; object-fit: cover; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; letter-spacing: .04em; }
.brand-tag { font-size: .68rem; color: var(--text-dim); letter-spacing: .03em; }

.cat-nav { display: none; gap: 1.5rem; margin-left: 1rem; flex: 1; }
.cat-nav a { font-size: .85rem; font-weight: 600; color: var(--text-dim); white-space: nowrap; }
.cat-nav a:hover { color: var(--accent-2); }

.header-actions { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text);
  position: relative; flex-shrink: 0;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn svg { width: 19px; height: 19px; }
.cart-badge {
  position: absolute; top: -4px; right: -4px; background: var(--accent); color: #16130d;
  font-size: .65rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

@media (min-width: 900px) {
  .cat-nav { display: flex; }
}

/* ============ Hero ============ */
.hero {
  position: relative; min-height: 62vh; display: flex; align-items: flex-end;
  overflow: hidden; padding: 3rem 1.25rem 3.5rem;
}
.hero-media {
  position: absolute; inset: 0; display: grid; grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr); gap: 2px; z-index: 0;
}
.hero-tile { overflow: hidden; }
.hero-tile img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8) brightness(.55); transform: scale(1.05); }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(16,17,20,.55) 0%, rgba(16,17,20,.75) 55%, rgba(16,17,20,.97) 100%),
    radial-gradient(120% 90% at 15% 100%, rgba(242,145,63,.28), transparent 60%);
}
.hero-content { position: relative; z-index: 2; max-width: 1240px; margin: 0 auto; width: 100%; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); line-height: 1.05; color: #fff; text-shadow: 0 4px 24px rgba(0,0,0,.4); }
.hero p { max-width: 520px; color: var(--text-dim); margin: 1rem 0 1.6rem; font-size: 1.02rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }

/* ============ Marquee ============ */
.marquee {
  overflow: hidden; background: linear-gradient(90deg, var(--bg-alt), #1a1b20, var(--bg-alt));
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--accent-soft);
  padding: .85rem 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee-scroll 32s linear infinite; will-change: transform; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-item {
  font-family: var(--font-head); text-transform: uppercase; letter-spacing: .05em;
  font-size: .92rem; font-weight: 600; color: var(--text); white-space: nowrap; padding: 0 .9rem;
}
.marquee-dot { color: var(--accent); font-size: .55rem; padding: 0 .3rem; }
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ============ Category pills ============ */
.cat-pills-wrap {
  position: sticky; top: 61px; z-index: 50; background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.cat-pills {
  max-width: 1240px; margin: 0 auto; padding: .8rem 1.25rem; display: flex; gap: .6rem;
  overflow-x: auto; scrollbar-width: none;
}
.cat-pills::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0; padding: .55rem 1.1rem; border-radius: 999px; font-size: .85rem; font-weight: 600;
  background: var(--bg-card); border: 1px solid var(--border); color: var(--text-dim);
  transition: all .15s ease;
}
.cat-pill.active { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #16130d; border-color: transparent; }
.cat-pill:hover:not(.active) { border-color: var(--border-strong); color: var(--text); }

/* ============ Catalog ============ */
.catalog { max-width: 1240px; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.4rem; gap: 1rem; flex-wrap: wrap; }
.section-head h2 { font-size: 1.7rem; }
.section-head p, #catalogCount { color: var(--text-faint); font-size: .85rem; margin: 0; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.1rem;
}
.product-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow: hidden; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-md); }
.product-card-media { position: relative; aspect-ratio: 1/1; background: #0c0d0f; overflow: hidden; }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-card-media img { transform: scale(1.06); }
.product-card-media .no-img { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--text-faint); font-size: .8rem; }
.video-badge {
  position: absolute; top: .5rem; left: .5rem; background: rgba(0,0,0,.6); color: #fff; font-size: .68rem;
  padding: .2rem .5rem; border-radius: 999px; display: flex; align-items: center; gap: .25rem;
}
.product-card-body { padding: .85rem .95rem 1rem; display: flex; flex-direction: column; gap: .4rem; flex: 1; }
.product-cat-chip { font-size: .65rem; text-transform: uppercase; letter-spacing: .06em; color: var(--accent-2); font-weight: 700; }
.product-name { font-size: .95rem; font-weight: 600; line-height: 1.3; }
.product-desc { font-size: .78rem; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1; }
.product-foot { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; gap: .5rem; }
.product-price { font-weight: 700; font-size: 1rem; color: var(--text); }
.product-price.quote { color: var(--accent-2); font-size: .82rem; }
.product-unit { font-size: .7rem; color: var(--text-faint); }
.add-btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0;
  transition: background .15s ease, transform .15s ease;
}
.add-btn:hover { background: var(--accent); color: #16130d; transform: scale(1.08); }

.empty-state { text-align: center; color: var(--text-faint); padding: 2rem 0; }

/* ============ Location ============ */
.location { padding: 3rem 1.25rem; background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.location-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1fr; gap: 2rem; }
.location-info h2 { font-size: 1.8rem; margin-bottom: .8rem; }
.location-address { font-size: 1.05rem; color: var(--text); max-width: 420px; }
.location-hours { color: var(--text-dim); font-size: .92rem; margin: .6rem 0 1.4rem; }
.location-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.location-map { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); min-height: 300px; box-shadow: var(--shadow-md); }
.location-map iframe { width: 100%; height: 100%; min-height: 300px; border: 0; filter: grayscale(.15) contrast(1.05); }

@media (min-width: 900px) {
  .location-grid { grid-template-columns: 1fr 1.2fr; align-items: center; }
}

/* ============ Footer ============ */
.site-footer { padding: 2.2rem 1.25rem 1.2rem; }
.footer-inner { max-width: 1240px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: center; }
.footer-social { display: flex; gap: .6rem; }
.social-btn {
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.05); border: 1px solid var(--border); color: var(--text-dim);
  transition: all .15s ease;
}
.social-btn svg { width: 18px; height: 18px; }
.social-btn:hover { background: var(--accent-soft); color: var(--accent-2); border-color: var(--accent-soft); }
.footer-brand { display: flex; align-items: center; gap: .7rem; }
.footer-brand img { border-radius: 8px; }
.footer-brand strong { display: block; font-family: var(--font-head); letter-spacing: .04em; }
.footer-brand span { font-size: .75rem; color: var(--text-faint); }
.footer-contact { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .85rem; color: var(--text-dim); }
.footer-contact a:hover { color: var(--accent-2); }
.footer-copy { text-align: center; color: var(--text-faint); font-size: .75rem; margin: 1.5rem 0 0; }

/* ============ Floating buttons ============ */
.fab-stack {
  position: fixed; right: 1.1rem; bottom: calc(1.1rem + env(safe-area-inset-bottom)); z-index: 55;
  display: flex; flex-direction: column; gap: .7rem; align-items: center;
}
.fab {
  width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg); transition: transform .15s ease;
}
.fab:hover { transform: scale(1.07); }
.fab-whatsapp { background: var(--whatsapp); color: #06210f; }
.fab-share { background: var(--bg-card); border: 1px solid var(--border-strong); color: var(--text); width: 44px; height: 44px; }
.fab-share svg { width: 18px; height: 18px; }

/* ============ Cart drawer ============ */
.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(6,6,8,.6); backdrop-filter: blur(3px); z-index: 70;
}
.cart-drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 100%); background: var(--bg-alt);
  border-left: 1px solid var(--border); z-index: 80; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.9,.3,1);
}
.cart-drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.drawer-head h3 { font-size: 1.1rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: .9rem; }
.cart-empty { color: var(--text-faint); text-align: center; margin-top: 2rem; }

.cart-item { display: flex; gap: .8rem; align-items: center; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem; }
.cart-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #0c0d0f; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-size: .85rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-item-price { font-size: .78rem; color: var(--text-faint); }
.cart-item-qty { display: flex; align-items: center; gap: .4rem; }
.qty-btn { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.qty-btn:hover { background: rgba(255,255,255,.15); }
.cart-item-remove { color: var(--text-faint); font-size: .72rem; margin-left: .3rem; }
.cart-item-remove:hover { color: #ff6b6b; }

.drawer-foot { border-top: 1px solid var(--border); padding: 1rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .7rem; }
.cart-total-row { display: flex; justify-content: space-between; align-items: center; font-size: 1.05rem; }
.cart-note { font-size: .72rem; color: var(--text-faint); margin: -.3rem 0 0; }

/* ============ Product modal ============ */
.product-modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(.96); opacity: 0;
  pointer-events: none; width: min(720px, 92vw); max-height: 88vh; overflow-y: auto;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-lg);
  z-index: 90; display: grid; grid-template-columns: 1fr; box-shadow: var(--shadow-lg);
  transition: transform .2s ease, opacity .2s ease;
}
.product-modal.open { opacity: 1; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.modal-close { position: absolute; top: .8rem; right: .8rem; z-index: 2; background: rgba(0,0,0,.5); }
.modal-media { background: #0c0d0f; aspect-ratio: 4/3; }
.modal-media img, .modal-media video { width: 100%; height: 100%; object-fit: cover; }
.modal-info { padding: 1.4rem 1.4rem calc(1.4rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .6rem; }
.modal-info h3 { font-size: 1.3rem; }
.modal-info p { color: var(--text-dim); font-size: .92rem; }
.modal-price-row { display: flex; align-items: baseline; gap: .5rem; }
.modal-price { font-size: 1.4rem; font-weight: 700; }
.modal-price.quote { color: var(--accent-2); font-size: 1rem; }
.modal-unit { color: var(--text-faint); font-size: .8rem; }
.qty-row { display: flex; align-items: center; gap: 1rem; margin: .3rem 0; }
.qty-row .qty-btn { width: 34px; height: 34px; font-size: 1.2rem; }

@media (min-width: 720px) {
  .product-modal { grid-template-columns: 1fr 1fr; }
  .modal-media { aspect-ratio: auto; }
}

/* ============ Install banner ============ */
.install-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 65;
  max-width: 480px; margin: 0 auto; background: var(--bg-card); border: 1px solid var(--border-strong);
  border-radius: var(--radius-md); padding: .8rem 1rem; display: flex; align-items: center; gap: .8rem;
  box-shadow: var(--shadow-lg); animation: slideUp .3s ease;
}
.install-banner img { border-radius: 10px; flex-shrink: 0; }
.install-text { flex: 1; display: flex; flex-direction: column; font-size: .82rem; }
.install-text span { color: var(--text-faint); font-size: .74rem; }
@keyframes slideUp { from { transform: translateY(30px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ============ Toast ============ */
.toast {
  position: fixed; left: 50%; bottom: calc(6.5rem + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #1f2024; color: var(--text); border: 1px solid var(--border-strong); padding: .7rem 1.2rem;
  border-radius: 999px; font-size: .85rem; z-index: 95; box-shadow: var(--shadow-md); animation: toastIn .2s ease;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 480px) {
  .fab-stack { right: .8rem; }
}
