/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; font-family: 'Inter', system-ui, sans-serif; color: #1a1a1a; background: #fff; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 1.2rem; font-weight: 600; }

/* ===== LAYOUT ===== */
.inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

/* ===== NAVBAR ===== */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 32px; height: 64px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee;
    transition: box-shadow 0.3s;
}
#navbar.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
.nav-logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em; color: #1a1a1a; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: #444; transition: color 0.2s; }
.nav-links a:hover { color: #1a1a1a; }
.nav-actions { display: flex; align-items: center; gap: 16px; }
.cart-btn {
    position: relative; background: none; border: none; cursor: pointer;
    font-size: 1.3rem; color: #1a1a1a; padding: 8px;
}
.cart-count {
    position: absolute; top: 2px; right: 2px;
    background: var(--accent); color: #fff;
    font-size: 0.65rem; font-weight: 700;
    width: 16px; height: 16px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    display: none;
}
.cart-count.visible { display: flex; }
.hamburger { display: none; background: none; border: none; cursor: pointer; font-size: 1.5rem; }

/* ===== HERO ===== */
.hero {
    position: relative; height: 100vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-top: 64px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.hero-bg::after {
    content: '';
    position: absolute; inset: 0;
    background: url('/static/img/hero.jpg') center/cover no-repeat;
    opacity: 0.35;
}
.hero-content {
    position: relative; z-index: 1;
    text-align: center; color: #fff;
    padding: 0 24px;
}
.hero-content h1 { color: #fff; margin-bottom: 16px; }
.hero-content p { font-size: 1.1rem; color: rgba(255,255,255,0.8); margin-bottom: 32px; }

/* ===== BUTTONS ===== */
.btn-primary {
    display: inline-block;
    background: var(--accent); color: #fff;
    padding: 14px 32px; border-radius: 4px;
    font-size: 0.9rem; font-weight: 600; letter-spacing: 0.02em;
    transition: background 0.2s, transform 0.2s;
    border: none; cursor: pointer;
}
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-secondary {
    display: inline-block;
    background: transparent; color: #1a1a1a;
    padding: 13px 32px; border-radius: 4px;
    font-size: 0.9rem; font-weight: 600;
    border: 2px solid #1a1a1a;
    transition: all 0.2s;
}
.btn-secondary:hover { background: #1a1a1a; color: #fff; }
.btn-full { width: 100%; text-align: center; }

/* ===== CATEGORIES BAR ===== */
.categories-bar { padding: 24px 0; border-bottom: 1px solid #eee; }
.categories-bar .inner { display: flex; gap: 12px; flex-wrap: wrap; }

/* ===== PILLS ===== */
.cat-pill {
    padding: 8px 20px; border-radius: 999px;
    border: 1px solid #ddd; font-size: 0.85rem; font-weight: 500;
    color: #444; transition: all 0.2s;
}
.cat-pill:hover, .cat-pill.active {
    background: #1a1a1a; color: #fff; border-color: #1a1a1a;
}

/* ===== PRODUCT GRID ===== */
.featured-section { padding: 64px 0; }
.featured-section h2 { margin-bottom: 32px; }
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}
.product-card { display: flex; flex-direction: column; }
.product-img {
    aspect-ratio: 3/4; overflow: hidden;
    background: #f5f5f5; border-radius: 4px; margin-bottom: 12px;
}
.product-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-img img { transform: scale(1.04); }
.product-img-placeholder {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: #ccc;
}
.product-info { display: flex; flex-direction: column; gap: 4px; }
.product-name { font-weight: 600; font-size: 0.95rem; }
.product-cat { font-size: 0.8rem; color: #888; }
.product-price { font-size: 0.95rem; font-weight: 700; color: #1a1a1a; }
.center-btn { text-align: center; margin-top: 40px; }

/* ===== USP ===== */
.usp-section { padding: 64px 0; background: #f8f8f8; }
.usp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.usp { text-align: center; }
.usp i { font-size: 2rem; color: #1a1a1a; margin-bottom: 12px; display: block; }
.usp strong { display: block; margin-bottom: 6px; }
.usp p { font-size: 0.85rem; color: #666; }

/* ===== PAGE HEADER ===== */
.page-header {
    padding: 80px 0 32px;
    margin-top: 64px;
    border-bottom: 1px solid #eee;
}

/* ===== PRODUKTER LAYOUT ===== */
.produkter-layout { padding: 32px 0 64px; }
.filter-bar { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.empty-state { color: #888; padding: 40px 0; }

/* ===== CART DRAWER ===== */
.cart-drawer {
    position: fixed; top: 0; right: -420px; width: 420px; height: 100vh;
    background: #fff; z-index: 200; box-shadow: none;
    display: flex; flex-direction: column;
    transition: right 0.3s ease;
}
.cart-drawer.open { right: 0; box-shadow: -4px 0 32px rgba(0,0,0,0.12); }
.cart-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px; border-bottom: 1px solid #eee;
}
.cart-header button { background: none; border: none; cursor: pointer; font-size: 1.2rem; }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-footer { padding: 20px 24px; border-top: 1px solid #eee; }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1rem; }

/* ===== MOBILE MENU ===== */
.mobile-menu {
    position: fixed; top: 0; left: -100%; width: 80%; max-width: 320px; height: 100vh;
    background: #fff; z-index: 200; padding: 80px 32px 32px;
    display: flex; flex-direction: column; gap: 8px;
    transition: left 0.3s ease;
    box-shadow: 4px 0 32px rgba(0,0,0,0.1);
}
.mobile-menu.open { left: 0; }
.mobile-menu a { font-size: 1.1rem; font-weight: 500; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.mobile-menu-close {
    position: absolute; top: 20px; right: 20px;
    background: none; border: none; cursor: pointer; font-size: 1.4rem;
}
.overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.4);
    z-index: 190; display: none;
}
.overlay.visible { display: block; }

/* ===== ADMIN ===== */
.admin-layout { padding: 100px 0 64px; }
.admin-layout h1 { margin-bottom: 32px; }
.admin-stats { display: flex; gap: 24px; margin-bottom: 40px; }
.stat-card {
    flex: 1; background: #f8f8f8; border-radius: 8px;
    padding: 24px; text-align: center;
}
.stat-card i { font-size: 2rem; display: block; margin-bottom: 8px; }
.stat-card strong { font-size: 2rem; display: block; }
.stat-card span { color: #888; font-size: 0.9rem; }
.admin-menu { display: flex; flex-direction: column; gap: 8px; }
.admin-link {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px; background: #f8f8f8; border-radius: 8px;
    font-weight: 500; transition: background 0.2s;
}
.admin-link:hover { background: #f0f0f0; }

/* ===== ERROR PAGE ===== */
.error-page { padding: 160px 0; text-align: center; }
.error-page h1 { font-size: 6rem; color: #eee; margin-bottom: 16px; }

/* ===== FOOTER ===== */
footer { background: #1a1a1a; color: #fff; padding: 48px 0; margin-top: 80px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col strong { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.footer-col p, .footer-col a { font-size: 0.85rem; color: rgba(255,255,255,0.6); }
.footer-col a:hover { color: #fff; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hamburger { display: block; }
    .usp-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-inner { grid-template-columns: 1fr; }
    .cart-drawer { width: 100%; right: -100%; }
    .admin-stats { flex-direction: column; }
}
@media (max-width: 480px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .usp-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ===== PRODUKTSIDE ===== */
.produkt-page { padding: 24px 0 48px; margin-top: 64px; }
.produkt-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.produkt-breadcrumb { font-size: 0.8rem; color: #888; margin-bottom: 16px; }
.produkt-breadcrumb a:hover { color: #1a1a1a; }
.produkt-page h1 { font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 12px; }
.produkt-pris { font-size: 1.5rem; font-weight: 700; margin-bottom: 24px; color: #1a1a1a; }

/* Gallery */
.gallery-main {
    aspect-ratio: 3/4; overflow: hidden;
    background: #f5f5f5; border-radius: 4px; margin-bottom: 12px;
}
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { width: 72px; height: 72px; border-radius: 4px; overflow: hidden; cursor: pointer; border: 2px solid transparent; }
.thumb.active { border-color: #1a1a1a; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Variants */
.variant-group { margin-bottom: 20px; }
.variant-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: #444; }
.variant-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-pill {
    padding: 8px 16px; border-radius: 4px;
    border: 1px solid #ddd; background: #fff;
    font-size: 0.85rem; cursor: pointer; transition: all 0.15s;
}
.variant-pill:hover { border-color: #1a1a1a; }
.variant-pill.active { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }

/* ATC button */
.btn-atc { margin-bottom: 24px; font-size: 1rem; padding: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* Description */
.produkt-description { font-size: 0.9rem; line-height: 1.7; color: #444; margin-bottom: 24px; border-top: 1px solid #eee; padding-top: 24px; }

/* Meta */
.produkt-meta { display: flex; flex-direction: column; gap: 10px; }
.produkt-meta div { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #666; }
.produkt-meta i { font-size: 1rem; color: #1a1a1a; }

@media (max-width: 768px) {
    .produkt-layout { grid-template-columns: 1fr; gap: 24px; }
    .produkt-page { padding: 16px 0 40px; }
}

/* ===== IKONER ===== */
.produkt-icons, .produkt-vask {
    border-top: 1px solid #eee;
    padding-top: 20px;
    margin-bottom: 20px;
}
.icons-label {
    font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #888; margin-bottom: 12px;
}
.icons-row { display: flex; flex-wrap: wrap; gap: 16px; }
.icon-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.icon-item img { width: 48px; height: 48px; object-fit: contain; }
.icon-item span { font-size: 0.7rem; color: #666; text-align: center; max-width: 60px; }
.vask-tekst { font-size: 0.85rem; color: #555; line-height: 1.6; }
.vask-tekst p { margin: 0; }
.produkt-sku { font-size: 0.8rem; color: #aaa; margin-bottom: 20px; }

/* ===== SØKEFELT ===== */
.nav-search { display: flex; align-items: center; gap: 0; }
.nav-search input {
    border: 1px solid #eee; border-right: none;
    padding: 8px 14px; border-radius: 4px 0 0 4px;
    font-size: 0.85rem; width: 200px; outline: none;
    transition: border-color 0.2s;
}
.nav-search input:focus { border-color: #1a1a1a; }
.nav-search button {
    background: #1a1a1a; color: #fff; border: none;
    padding: 8px 12px; border-radius: 0 4px 4px 0;
    cursor: pointer; font-size: 0.9rem;
}
@media (max-width: 768px) { .nav-search { display: none; } }

/* ===== SØKE DROPDOWN ===== */
.search-wrap { position: relative; }
.search-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid #eee; border-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    z-index: 300; display: none;
}
.search-dropdown.open { display: block; }
.search-result-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; text-decoration: none; color: #1a1a1a;
    transition: background 0.15s; border-bottom: 1px solid #f5f5f5;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: #f8f8f8; }
.search-result-thumb {
    width: 40px; height: 40px; object-fit: cover;
    border-radius: 4px; background: #f0f0f0; flex-shrink: 0;
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-sku { font-size: 0.75rem; color: #aaa; }
.search-result-price { font-size: 0.85rem; font-weight: 600; flex-shrink: 0; }
.search-result-all {
    display: block; text-align: center; padding: 10px;
    font-size: 0.8rem; color: #666; border-top: 1px solid #eee;
}
.search-result-all:hover { background: #f8f8f8; color: #1a1a1a; }

/* ===== LOGO ===== */
.nav-logo { display: flex; align-items: center; }
.logo-full { height: 22px; width: auto; fill: #1a1a1a; }

@media (max-width: 480px) {
    .logo-full { height: 18px; }
}

/* ===== MOBIL SØKEBAR ===== */
.search-toggle { display: none; background: none; border: none; cursor: pointer; font-size: 1.3rem; padding: 8px; }
.mobile-search-bar {
    display: none;
    position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
    background: #fff; border-bottom: 1px solid #eee;
    padding: 12px 16px;
}
.mobile-search-bar.open { display: block; }
.mobile-search-bar form { display: flex; }
.mobile-search-bar input {
    flex: 1; border: 1px solid #ddd; border-right: none;
    padding: 10px 14px; border-radius: 4px 0 0 4px;
    font-size: 0.9rem; outline: none;
}
.mobile-search-bar button {
    background: var(--accent); color: #fff; border: none;
    padding: 10px 14px; border-radius: 0 4px 4px 0; cursor: pointer;
}
@media (max-width: 768px) {
    .search-toggle { display: block; }
}

/* ===== ACCENT FARGE ===== */
:root { --accent: #ed6c1e; }

/* ===== LIGHTBOX ===== */
.lightbox {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.85);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox-img {
    max-width: 90vw; max-height: 88vh;
    object-fit: contain; border-radius: 4px;
    user-select: none;
    background: #fff;
}
.lightbox-close {
    position: fixed; top: 16px; right: 16px;
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
}
.lightbox-prev, .lightbox-next {
    position: fixed; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: #fff;
    width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.2rem; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
.lightbox-counter {
    position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    color: rgba(255,255,255,0.6); font-size: 0.85rem;
}
.gallery-main { cursor: zoom-in; }
.thumb { cursor: pointer; }
