/* Next Level Home Automation — site styles */
:root {
  --blue: #2e8eba;
  --blue-dark: #1d6f96;
  --blue-soft: #e8f4fa;
  --ink: #0e1a24;
  --ink-2: #3c4b57;
  --muted: #6b7b88;
  --line: #e2e9ee;
  --bg: #f6f9fb;
  --white: #fff;
  --wa: #1fa855;
  --wa-dark: #178a45;
  --red: #c8423b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(14,26,36,.06), 0 6px 20px rgba(14,26,36,.06);
  --head: "Lexend", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); }
p { margin: 0 0 1em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.section { padding: 48px 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: .98rem; border: 2px solid transparent; cursor: pointer; font-family: var(--body); transition: transform .12s, background .15s; text-decoration: none !important; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue); }
.btn-danger { background: #fff; color: var(--red); border-color: #f0c9c6; }
.btn-lg { padding: 15px 26px; font-size: 1.05rem; }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.wa-svg { width: 20px; height: 20px; }

/* header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; }
.brand img { height: 64px; width: auto; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.main-nav a { color: var(--ink-2); font-weight: 500; font-size: .93rem; padding: 8px 10px; border-radius: 8px; }
.main-nav a:hover { background: var(--blue-soft); color: var(--blue-dark); text-decoration: none; }
.nav-btn { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px; }
.nav-btn span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% 10%, #d6ecf7 0%, transparent 60%), linear-gradient(180deg, #fff 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; padding-top: 56px; padding-bottom: 56px; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-dark); background: var(--blue-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
.hl { color: var(--blue); }
.lead { font-size: 1.12rem; color: var(--ink-2); }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin: 26px 0 22px; }
.hero-points { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; color: var(--ink-2); }
.hero-points li::before { content: "✓"; color: var(--blue); font-weight: 700; margin-right: 10px; }
.hero-art { display: flex; justify-content: center; }
.orbit { position: relative; width: min(380px, 80vw); aspect-ratio: 1; border-radius: 50%; border: 2px dashed #bfdcea; display: grid; place-items: center; }
.orbit > img { width: 46%; filter: drop-shadow(0 10px 24px rgba(46,142,186,.25)); }
.orb { position: absolute; width: 72px; height: 72px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; color: var(--blue); }
.orb .cat-svg { width: 38px; height: 38px; }
.o1 { top: -4%; left: 50%; transform: translateX(-50%); }
.o2 { top: 26%; right: -8%; }
.o3 { bottom: 0; right: 8%; }
.o4 { bottom: 0; left: 8%; }
.o5 { top: 26%; left: -8%; }

/* categories */
.cat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.cat-tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 18px; display: flex; flex-direction: column; gap: 6px; color: var(--ink); transition: border-color .15s, transform .15s, box-shadow .15s; }
.cat-tile:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: var(--shadow); text-decoration: none; }
.cat-ico { width: 54px; height: 54px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; margin-bottom: 6px; }
.cat-ico .cat-svg { width: 32px; height: 32px; }
.cat-tile strong { font-family: var(--head); font-size: 1.05rem; }
.cat-tile .muted { font-size: .88rem; flex: 1; }
.cat-count { font-size: .85rem; font-weight: 600; color: var(--blue-dark); }

/* product grid + card */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: var(--ink); display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.card-img { position: relative; aspect-ratio: 1; background: #fff; border-bottom: 1px solid var(--line); }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 14px; }
.ph { width: 100%; height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue-soft), #f7fbfd); color: var(--blue); }
.ph .cat-svg { width: 38%; height: 38%; opacity: .85; }
.ph.big { border-radius: var(--radius); }
.badge { position: absolute; top: 12px; left: 12px; font-size: .75rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge.out { background: var(--ink); color: #fff; }
.badge.sale { background: var(--red); color: #fff; }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-cat { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--blue-dark); }
.card h3 { font-size: 1.05rem; margin: 0; }
.card .muted { font-size: .88rem; margin: 0; flex: 1; }
.price { font-family: var(--head); font-weight: 700; font-size: 1.15rem; margin-top: 8px; }
.price s { color: var(--muted); font-weight: 400; font-size: .9em; margin-left: 6px; }
.price.big { font-size: 1.8rem; margin: 6px 0; }

/* how it works */
.how { background: var(--ink); color: #fff; padding: 56px 0; }
.how h2 { text-align: center; margin-bottom: 30px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.steps li { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 24px; }
.steps span { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--blue); font-weight: 700; margin-bottom: 12px; }
.steps strong { display: block; font-family: var(--head); font-size: 1.1rem; margin-bottom: 6px; }
.steps p { color: #b8c6d1; margin: 0; }

/* shop page */
.page-head { background: #fff; border-bottom: 1px solid var(--line); padding: 34px 0 26px; }
.page-head h1 { margin-bottom: 4px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 10px; }
.filters { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { padding: 7px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: .9rem; font-weight: 500; }
.chip:hover { border-color: var(--blue); text-decoration: none; }
.chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.search input { padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); font: inherit; min-width: 240px; background: #fff; }
.empty { text-align: center; padding: 50px 20px; }

/* product page */
.pdp { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pdp-img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); aspect-ratio: 1; overflow: hidden; }
.pdp-img img { width: 100%; height: 100%; object-fit: contain; padding: 24px; }
.pdp-info h1 { margin: 6px 0; }
.stock { font-weight: 600; font-size: .95rem; }
.stock.in { color: var(--wa-dark); }
.stock.out { color: var(--red); }
.assure { list-style: none; padding: 0; margin: 18px 0; color: var(--ink-2); font-size: .93rem; display: grid; gap: 6px; }
.assure li::before { content: "•"; color: var(--blue); margin-right: 8px; font-weight: 700; }
.desc { border-top: 1px solid var(--line); padding-top: 18px; color: var(--ink-2); }

/* contact */
.contact-card { max-width: 560px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }
.contact-card dl { text-align: left; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; margin: 26px 0 0; }
.contact-card dt { font-weight: 600; color: var(--muted); }
.contact-card dd { margin: 0; }

/* footer */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 40px 0 20px; margin-top: 20px; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; }
.footer-grid h4 { font-size: .95rem; }
.footer-grid a, .footer-grid span { display: block; color: var(--ink-2); margin-bottom: 6px; }
.footer-icon { width: 44px; margin-bottom: 10px; }
.fine { color: var(--muted); font-size: .78rem; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 16px; }

.wa-float { position: fixed; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(31,168,85,.4); z-index: 30; }
.wa-float .wa-svg { width: 30px; height: 30px; }

/* responsive */
@media (max-width: 1000px) {
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .nav-btn { display: flex; }
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 10px 20px 16px; }
  #nav-toggle:checked ~ .main-nav { display: flex; }
}
@media (max-width: 760px) {
  .hero-grid, .pdp { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .hero-grid { padding-top: 36px; padding-bottom: 40px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .card-body { padding: 12px; }
  .brand img { height: 44px; }
  .section { padding: 32px 16px; }
  .search input { min-width: 0; width: 100%; }
  .search { width: 100%; }
}

/* ---------------- admin ---------------- */
body.admin { background: #eef3f6; }
.admin-bar { background: var(--ink); color: #fff; }
.admin-row { display: flex; justify-content: space-between; align-items: center; min-height: 58px; gap: 12px; flex-wrap: wrap; }
.admin-brand { color: #fff; font-family: var(--head); font-weight: 600; display: flex; align-items: center; gap: 10px; }
.admin-brand img { width: 30px; filter: brightness(1.3); }
.admin-bar nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.admin-bar nav a, .linkish { color: #cfe1ec; padding: 6px 10px; border-radius: 8px; font: inherit; font-size: .93rem; background: none; border: 0; cursor: pointer; }
.admin-bar nav a:hover, .linkish:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.admin-main { padding-top: 26px; padding-bottom: 60px; max-width: 900px; }
.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-head h1 { margin: 0; font-size: 1.7rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash.ok { background: #e3f6ea; color: #14612f; }
.flash.error { background: #fbe7e5; color: #8d2620; }
.flash.warn { background: #fff4d6; color: #6d5200; }
.admin-list { display: grid; gap: 10px; }
.admin-item { display: grid; grid-template-columns: 60px 1fr auto auto; gap: 14px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.admin-item.hidden-item { opacity: .55; }
.admin-info { display: flex; flex-direction: column; min-width: 0; }
.admin-info a { color: var(--ink); }
.admin-info .muted { font-size: .85rem; }
.thumb { width: 60px; height: 60px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb .cat-svg { width: 34px; height: 34px; }
.thumb.lg { width: 120px; height: 120px; flex-shrink: 0; }
.thumb.lg .cat-svg { width: 60px; height: 60px; }
.pill { border: 0; border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: .82rem; cursor: pointer; font-family: var(--body); }
.pill.in { background: #e3f6ea; color: #14612f; }
.pill.out { background: #fbe7e5; color: #8d2620; }
.form { display: grid; gap: 16px; }
.form h2 { margin: 12px 0 0; font-size: 1.2rem; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .93rem; }
.form input:not([type=checkbox]):not([type=file]), .form select, .form textarea, .login-box input { font: inherit; font-weight: 400; padding: 11px 13px; border: 1px solid #cdd8e0; border-radius: 10px; background: #fff; width: 100%; }
.form input:focus, .form select:focus, .form textarea:focus, .login-box input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.form small { font-weight: 400; color: var(--muted); font-size: .82rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.narrow { max-width: 220px; }
.photo-field { display: flex; gap: 18px; align-items: flex-start; }
.checks { display: flex; gap: 22px; flex-wrap: wrap; }
.form label.check, label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.check input { width: 20px; height: 20px; accent-color: var(--blue); }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }
.danger-zone { margin-top: 26px; text-align: right; }
.login-box { max-width: 380px; margin: 60px auto; display: grid; gap: 16px; text-align: center; }
.login-box img { width: 220px; margin: 0 auto 6px; }
.login-box label { display: grid; gap: 6px; text-align: left; font-weight: 600; }
@media (max-width: 640px) {
  .row2 { grid-template-columns: 1fr; }
  .admin-item { grid-template-columns: 52px 1fr auto; }
  .admin-item > .btn { display: none; }
  .photo-field { flex-direction: column; }
}
