:root {
    --primary: #2563eb;
    --secondary: #0f172a;
    --bg: #f7f7f9;
    --card: #ffffff;
    --text: #222;
    --muted: #666;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.site-header {
    background: var(--primary);
    color: #fff;
    padding: 16px 0;
    border-bottom: 4px solid var(--secondary);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-header .logo { font-size: 22px; font-weight: bold; display: flex; align-items: center; }
.site-header .logo img { max-height: 44px; width: auto; display: block; }
.main-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a:hover { color: var(--secondary); }

.hero {
    position: relative;
    background: var(--primary);
    color: #fff;
    padding: 60px 0;
    text-align: center;
    overflow: hidden;
    display: flex;
}
.hero.has-image { padding: 0; }
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; }
.hero-text { position: relative; z-index: 2; width: 100%; margin-top: auto; margin-bottom: auto; }
.hero.hero-pos-top .hero-text { margin-top: 40px; margin-bottom: auto; }
.hero.hero-pos-bottom .hero-text { margin-top: auto; margin-bottom: 40px; }
.hero h1 { margin: 0; font-size: 32px; }

section.wrap { padding: 40px 20px; }

.grid { display: grid; gap: 20px; margin-top: 20px; }
.grid-cats { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid-products { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.cat-card .thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; }
.category-cover { width: 100%; max-height: 280px; object-fit: cover; border-radius: 12px; margin-bottom: 16px; }
.categories h2, .featured h2 {
    display: inline-block;
    border-bottom: 3px solid var(--primary);
    padding-bottom: 6px;
}
.cat-card, .product-card {
    background: var(--card);
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .15s ease, border-color .15s ease;
}
.cat-card:hover, .product-card:hover { transform: translateY(-3px); border-color: var(--primary); }
.product-card .thumb {
    width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--bg);
}
.product-card .thumb.no-image {
    display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px;
}
.product-card .name { font-weight: bold; }
.product-card .desc { color: var(--muted); font-size: 14px; }

.product-page { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.badges { display: flex; flex-wrap: wrap; gap: 12px; margin: 16px 0; }
.badge {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--card); border: 2px solid var(--bg); border-radius: 14px;
    padding: 12px 18px; min-width: 90px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.badge-icon { font-size: 26px; line-height: 1; margin-bottom: 4px; }
.badge-label { font-size: 12px; color: var(--muted); }
.badge-value { font-size: 16px; font-weight: bold; color: var(--secondary); }
.price { font-size: 28px; font-weight: bold; color: var(--primary); }
.product-cats a { background: var(--bg); padding: 4px 10px; border-radius: 20px; margin-inline-end: 6px; font-size: 13px; }

.product-gallery { position: relative; }
.product-gallery .no-image {
    aspect-ratio: 1; border-radius: 12px; background: var(--bg);
    display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.gallery-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    border-radius: 12px; scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-slide { flex: 0 0 100%; scroll-snap-align: start; }
.gallery-slide img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
    background: rgba(255,255,255,.9); border: none; border-radius: 50%;
    width: 36px; height: 36px; font-size: 20px; cursor: pointer; line-height: 1;
}
.gallery-prev { left: 10px; }
.gallery-next { right: 10px; }
.gallery-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 2; }
.gallery-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.6); cursor: pointer; padding: 0; }
.gallery-dot.active { background: #fff; }

.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 100;
    display: flex; align-items: center; justify-content: center; padding: 30px;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox-close {
    position: absolute; top: 16px; left: 16px; background: none; border: none;
    color: #fff; font-size: 32px; cursor: pointer; line-height: 1;
}

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

form.contact-form label, #install form label { display: block; margin: 14px 0 6px; }
form.contact-form input, form.contact-form textarea {
    width: 100%; padding: 10px 12px; border: 1px solid #ccc; border-radius: 8px; font-family: inherit;
}
.btn {
    display: inline-block; margin-top: 16px; background: var(--primary); color: #fff;
    border: none; padding: 10px 20px; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.success { color: #1a7f37; font-weight: bold; }
.err { color: #b00020; font-weight: bold; }

.site-footer { background: var(--primary); color: #f0f0f0; padding: 30px 0; margin-top: 40px; border-top: 4px solid var(--secondary); }
.site-footer ul { list-style: none; display: flex; gap: 16px; padding: 0; flex-wrap: wrap; }
.site-footer .copy { margin-top: 16px; font-size: 13px; color: #888; }
