/* ========= Variables (light/dark) ========= */
:root {
  --bg: #ffffff;
  --text: #0f172a;
  --muted: #f1f5f9;
  --line: #e2e8f0;
  --brand: #2563eb;
  --brand-600: #1e40af;
  --accent: #0ea5e9;
}
html[data-theme="dark"] {
  --bg: #0b1220;
  --text: #e5e7eb;
  --muted: #0f172a;
  --line: #1e293b;
  --brand: #3b82f6;
  --brand-600: #2563eb;
  --accent: #22d3ee;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }

.container { width: min(1100px, 92%); margin: 0 auto; }
.container.narrow { width: min(780px, 92%); }
.section { padding: 56px 0; }
.section h2 { margin: 0 0 12px; letter-spacing: -0.02em; font-size: clamp(22px, 3vw, 30px); }

/* ========= Header ========= */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; gap: 14px; padding: 12px 4%; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; letter-spacing: .2px; }
.brand .logo { height: 36px; width: auto; }

.nav-list { list-style: none; display: flex; gap: 18px; margin: 0 0 0 auto; padding: 0; }
.nav-list a { color: var(--text); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.nav-list a.active, .nav-list a:hover { background: var(--muted); }

.controls { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.flag { height: 18px; }
.toggle, .burger {
  border: 1px solid var(--line); background: var(--muted); color: var(--text);
  height: 36px; width: 36px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
}
.burger { display: none; }

@media (max-width: 900px){
  .burger { display: grid; }
  .nav-list {
    position: fixed; inset: 66px 16px auto 16px;
    background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
    padding: 12px; flex-direction: column; gap: 6px;
    max-height: 0; overflow: clip; opacity: 0; transform: translateY(-6px);
    transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,.15);
  }
  .nav-list.open { max-height: 260px; opacity: 1; transform: translateY(0); }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 12px; padding: 12px 16px;
  font-weight: 700; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 10px 24px rgba(37,99,235,.18); }
.btn-primary:hover { background: var(--brand-600); }

/* ========= Hero ========= */
.hero { display: grid; place-items: center; padding: 84px 4% 40px; text-align: center; position: relative; overflow: hidden; }
.hero h1 { margin: 0 0 8px; font-size: clamp(30px, 5vw, 56px); letter-spacing: -0.03em; }
.hero .tag { color: #64748b; margin: 0 0 18px; font-size: clamp(15px, 2.4vw, 18px); }
.hero .cta { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* ========= Cards / utilities ========= */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 960px){ .grid-3 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 560px){ .grid-3 { grid-template-columns: 1fr; } }

.card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.card h3 { margin: 6px 0 8px; font-size: 18px; }
.card p { margin: 0; color: #64748b; }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 680px){ .price-grid { grid-template-columns: repeat(2, 1fr);} }
.price { background: var(--muted); border: 1px solid var(--line); border-radius: 12px; padding: 12px; text-align: center; font-weight: 800; }
.note { color: #64748b; margin-top: 8px; }

/* ========= Calculator ========= */
.calc { display: grid; gap: 10px; }
.calc .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 560px){ .calc .row { grid-template-columns: 1fr; } }
.input, .checkbox {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text);
}
.result { font-size: 24px; font-weight: 800; }

/* ========= Products ========= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 14px; }
.pill { border: 1px solid var(--line); background: var(--muted); color: var(--text); padding: 8px 12px; border-radius: 999px; cursor: pointer; font-weight: 700; }
.pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 1024px){ .products { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 560px){ .products { grid-template-columns: 1fr;} }
.product-card { background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 12px; display: grid; gap: 10px; }
.thumb { aspect-ratio: 3/2; border-radius: 10px; overflow: hidden; background: var(--muted); display: grid; place-items: center; }
.meta { color: #64748b; font-size: 14px; }
.row { display: flex; gap: 10px; align-items: baseline; }
.price-strong { font-weight: 900; font-size: 18px; }
.min { font-size: 13px; color: #64748b; }
.actions { display: flex; gap: 8px; }
.actions .btn { flex: 1; padding: 10px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }

/* ========= Lightbox ========= */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: none; place-items: center; z-index: 60; }
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }

/* ========= Footer & helpers ========= */
.site-footer { border-top: 1px solid var(--line); padding: 16px 0; text-align: center; }
.backtop { position: fixed; right: 14px; bottom: 14px; display: none; }
.backtop.show { display: inline-flex; }
.reveal { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .4s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ========= Social FAB ========= */
.fab-wrap { position: fixed; left: 14px; bottom: 14px; display: grid; gap: 10px; z-index: 55; }
.fab { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; text-decoration: none; }
.fab.wa { background: linear-gradient(135deg,#25D366,#128C7E); }
.fab.fb { background: #1877F2; }
.fab.ig { background: radial-gradient(120% 120% at 30% 30%, #f58529 0%, #dd2a7b 35%, #8134af 65%, #515bd4 100%); }
.fab svg { width: 60%; height: 60%; }


.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(2rem, 6vw, 5rem);
  font-weight: 800;
  text-transform: uppercase;
  pointer-events: none;
  z-index: 0;
  white-space: nowrap;
  background: linear-gradient(270deg, #ff6b6b, #feca57, #1dd1a1, #5f27cd);
  background-size: 600% 600%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 12s ease infinite, floatText 6s ease-in-out infinite;
}
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes floatText {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-10px); }
}
.section-title {
  text-align: center;
  margin: 0 0 1rem;
  display: block;
  width: 100%;
}
