*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #1a1a1a;
  --red: #ff0015;
  --red-dark: #cc0010;
  --text: #f0f0f0;
  --text-muted: #888;
  --border: #2a2a2a;
  --radius: 10px;
}

body { background: var(--bg); color: var(--text); font-family: 'Poppins', sans-serif; overflow-x: hidden; }

/* TOP NAVBAR */
.topnav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; background: rgba(10,10,10,0.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.topnav-logo img { height: 36px; }
.topnav-links { display: flex; gap: 18px; align-items: center; overflow: hidden; }
.topnav-links a { color: var(--text-muted); text-decoration: none; font-size: 13px; font-weight: 600; letter-spacing: 0.3px; transition: color 0.2s; white-space: nowrap; }
.topnav-links a:hover, .topnav-links a.active { color: var(--red); }
.hamburger { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 8px; line-height: 1; flex-shrink: 0; }
.hamburger i { display: block; transition: opacity 0.12s ease; }

/* MOBILE MENU */
.mobile-menu {
  display: flex; position: fixed; inset: 0; background: rgba(10,10,10,0.98);
  z-index: 99; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  opacity: 0; pointer-events: none;
  transform: translateY(-18px);
  transition: opacity 0.3s cubic-bezier(0.4,0,0.2,1), transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-menu a, .mobile-menu .mobile-close {
  opacity: 0; transform: translateY(10px);
  transition: opacity 0.22s ease, transform 0.22s ease, color 0.2s;
}
.mobile-menu.open .mobile-close { opacity: 1; transform: translateY(0); transition-delay: 0.04s; }
.mobile-menu.open a:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.08s; }
.mobile-menu.open a:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.mobile-menu.open a:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.16s; }
.mobile-menu.open a:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.20s; }
.mobile-menu.open a:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.mobile-menu.open a:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.28s; }
.mobile-menu.open a:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }
.mobile-menu a {
  color: var(--text);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
}
.mobile-menu a:hover { color: var(--red); letter-spacing: 4px; }
.mobile-close { position: absolute; top: 20px; right: 24px; background: none; border: none; color: var(--text-muted); font-size: 26px; cursor: pointer; transition: color 0.2s, transform 0.2s; }
.mobile-close:hover { color: var(--red); transform: rotate(90deg); }

/* HERO */
.hero { min-height: 68vh; min-height: max(68vh, 480px); display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.7)), url('../tuotekuvat/banneri.jpg') center/cover no-repeat, #111; padding: 104px 20px 50px; }
.hero h1 { font-family: 'Tilt Neon', cursive; font-size: clamp(2.2rem, 5vw, 4rem); color: #fff; margin-bottom: 16px; line-height: 1.1; }
.hero h1 span { color: var(--red); }
.hero p { font-size: 1rem; color: rgba(255,255,255,0.78); max-width: 600px; margin: 0 auto 10px; line-height: 1.8; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }

/* HOME PAGE BANNER (inside content column) */
.home-banner { background: linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.7)), url('../tuotekuvat/banneri.jpg') center/cover no-repeat, #111; min-height: 68vh; min-height: max(68vh, 480px); display: flex; align-items: center; background-size: cover; background-position: center; }
.home-banner-inner { padding: 120px 44px 80px; }
.home-banner h1 { font-family: 'Poppins', sans-serif; font-size: clamp(2.4rem, 5vw, 4.2rem); color: #fff; margin-bottom: 14px; line-height: 1.1; font-weight: 800; }
.home-banner h1 span { color: var(--red); }
.home-banner p { font-size: 0.98rem; color: rgba(255,255,255,0.8); max-width: 540px; margin-bottom: 28px; line-height: 1.75; }

/* BUTTONS */
.btn { display: inline-block; padding: 14px 36px; background: var(--red); color: #fff; text-decoration: none; border-radius: 6px; font-weight: 700; font-size: 13px; letter-spacing: 1px; text-transform: uppercase; transition: background 0.2s, transform 0.15s; border: none; cursor: pointer; font-family: 'Poppins', sans-serif; }
.btn:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-outline { background: transparent; border: 2px solid var(--red); color: var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; }

/* INFO STRIP */
.info-strip { background: var(--bg2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.info-strip-inner { display: flex; justify-content: center; gap: 60px; padding: 48px 40px; flex-wrap: wrap; max-width: 1200px; margin: 0 auto; }
.info-item { text-align: center; }
.info-item i { font-size: 1.8rem; color: var(--red); margin-bottom: 10px; display: block; }
.info-item h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.info-item p { font-size: 0.8rem; color: var(--text-muted); }

/* PAGE LAYOUT WITH SIDEBAR */
.page-wrap { margin-top: 64px; }
.page-layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 64px); }

/* SIDEBAR */
.sidebar { position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; background: var(--bg); border-right: 1px solid var(--border); padding: 24px 0; flex-shrink: 0; scrollbar-width: thin; scrollbar-color: #444 var(--bg); }
.sidebar::-webkit-scrollbar { width: 4px; height: 4px; }
.sidebar::-webkit-scrollbar-track { background: var(--bg); }
.sidebar::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
.sidebar-heading { font-size: 0.68rem; letter-spacing: 2.5px; text-transform: uppercase; color: var(--red); font-weight: 700; padding: 0 20px 8px 16px; display: block; margin-top: 16px; border-left: 3px solid var(--red); }
.sidebar a { display: block; padding: 9px 20px; color: var(--text-muted); text-decoration: none; font-size: 0.85rem; border-left: 3px solid transparent; transition: all 0.15s; }
.sidebar a:hover, .sidebar a.active { color: var(--text); border-left-color: var(--red); background: rgba(255,0,21,0.10); }
.cat-group { margin-bottom: 4px; }

/* MAIN CONTENT */
.main-content { padding: 52px 44px; }
.page-hero-block { margin-bottom: 40px; }
.page-hero-block h1 { font-family: 'Poppins', sans-serif; font-size: clamp(1.8rem, 4vw, 2.5rem); color: #fff; margin-bottom: 10px; font-weight: 800; }
.page-hero-block h1 span { color: var(--red); }
.page-hero-block p { color: var(--text-muted); font-size: 0.92rem; line-height: 1.75; max-width: 680px; }

/* FILTER / SEARCH BAR */
.filter-bar { background: var(--bg2); border-bottom: 1px solid var(--border); padding: 12px 20px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; position: sticky; top: 64px; z-index: 10; }
.search-input { background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 8px 13px; color: var(--text); font-size: 0.84rem; font-family: 'Poppins', sans-serif; width: 200px; transition: border-color 0.2s; }
.search-input:focus { outline: none; border-color: var(--red); }
.search-input::placeholder { color: var(--text-muted); }
.filter-cats { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 5px 13px; color: var(--text-muted); font-size: 0.74rem; font-weight: 600; cursor: pointer; transition: all 0.15s; font-family: 'Poppins', sans-serif; white-space: nowrap; }
.filter-btn:hover { color: var(--text); border-color: #444; }
.filter-btn.active { background: var(--red); border-color: var(--red); color: #fff; }

/* PRODUCT SECTIONS */
.tuotteet-content { }
.cat-section { margin-bottom: 60px; scroll-margin-top: 80px; padding: 36px 36px 0; }
.cat-section.hidden { display: none; }
.cat-section-title { font-family: 'Tilt Neon', cursive; font-size: 1.5rem; color: #fff; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 28px; display: flex; align-items: center; gap: 12px; }
.cat-section-title i { color: var(--red); font-size: 1.2rem; }

/* PRODUCT CARDS */
.product-grid { display: flex; flex-wrap: wrap; gap: 18px; }
.product-card { width: 248px; display: flex; flex-direction: column; background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: border-color 0.2s, transform 0.15s; }
.product-card:hover { border-color: #3a3a3a; transform: translateY(-2px); }
.product-card.hidden { display: none !important; }
.product-card img { display: block; width: 100%; height: auto; object-fit: unset; }
.product-card-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.product-card-body h3 { font-size: 0.92rem; font-weight: 700; color: #fff; margin-bottom: 6px; }
.product-card-body p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.65; flex: 1; }
.product-card-price { display: inline-block; margin-top: 10px; font-size: 0.82rem; color: var(--red); font-weight: 700; }

/* SOMISTUS GALLERY */
.somistus-info { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px; display: flex; align-items: center; gap: 12px; }
.somistus-info i { color: var(--red); font-size: 1rem; flex-shrink: 0; }
.somistus-info p { font-size: 0.84rem; color: var(--text-muted); line-height: 1.6; }
.somistus-info strong { color: var(--red); }
.somistus-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.somistus-gallery img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); transition: transform 0.2s; }
.somistus-gallery img:hover { transform: scale(1.02); }

/* GALLERIA */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.gallery-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 8px; cursor: pointer; transition: transform 0.2s, opacity 0.2s; border: 1px solid var(--border); }
.gallery-grid img:hover { transform: scale(1.02); opacity: 0.88; }
.lightbox { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.93); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 90vh; object-fit: contain; border-radius: 6px; }
.lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 32px; cursor: pointer; opacity: 0.8; }
.lightbox-close:hover { opacity: 1; }

/* KULJETUSHINNASTO */
.transport-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 28px; }
.transport-card { background: var(--bg3); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.transport-card h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.transport-card h3 i { color: var(--red); }
.transport-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.85; }
.transport-card strong { color: var(--text); }
.notice-box { background: rgba(255,0,21,0.05); border: 1px solid rgba(255,0,21,0.18); border-radius: var(--radius); padding: 18px 22px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.8; }
.notice-box strong { color: var(--red); }

/* CONTACT PAGE */
.contact-wrap { padding: 52px 44px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 40px; }
.contact-info-block h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 20px; }
.contact-detail { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; color: var(--text); font-size: 0.92rem; }
.contact-detail i { color: var(--red); width: 18px; text-align: center; flex-shrink: 0; }
.contact-detail a { color: var(--text); text-decoration: none; }
.contact-detail a:hover { color: var(--red); }
.contact-note { margin-top: 24px; padding: 16px; background: var(--bg3); border-left: 3px solid var(--red); border-radius: 4px; font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.78rem; color: var(--text-muted); margin-bottom: 6px; letter-spacing: 0.5px; text-transform: uppercase; }
.form-group input, .form-group textarea { width: 100%; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; padding: 12px 14px; color: var(--text); font-size: 0.9rem; font-family: 'Poppins', sans-serif; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { resize: vertical; min-height: 130px; }

/* FOOTER */
footer { background: var(--bg2); border-top: 1px solid var(--border); padding: 36px 40px; text-align: center; }
footer img { height: 32px; display: block; margin: 0 auto 12px; }
footer p { font-size: 0.8rem; color: var(--text-muted); }
footer a { color: var(--red); text-decoration: none; }

/* RESPONSIVE */
@media (max-width: 960px) {
  .page-layout { grid-template-columns: 1fr; }
  .sidebar { position: sticky; top: 64px; height: auto; border-right: none; border-bottom: 1px solid var(--border); padding: 8px 0; display: flex; overflow-x: auto; white-space: nowrap; z-index: 9; background: var(--bg); }
  .sidebar-heading { display: none; }
  .sidebar a { display: inline-block; border-left: none; border-bottom: 3px solid transparent; padding: 9px 12px; white-space: nowrap; font-size: 0.8rem; }
  .sidebar a:hover, .sidebar a.active { color: var(--red); border-bottom-color: var(--red); border-left-color: transparent; background: none; }
  .cat-group { display: inline-flex; }
  .filter-bar { top: 114px; }
  .cat-section { scroll-margin-top: 130px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .transport-grid { grid-template-columns: 1fr; }
  .info-strip-inner { gap: 36px; }
}

@media (max-width: 768px) {
  .topnav-links { display: none; }
  .hamburger { display: block; }
  .main-content { padding: 32px 18px; }
  .contact-wrap { padding: 32px 18px; }
  .cat-section { padding: 28px 18px 0; }
}

@media (max-width: 600px) {
  .product-card { width: 100%; max-width: 380px; }
  .somistus-gallery { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .hero p { font-size: 0.95rem; }
}
