:root {
    --bg-color: #0b0f19;
    --card-bg: #151c2c;
    --border-color: #232d42;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --input-bg: #0b0f19;
    --hero-title: #ffffff;
    --accent-gold: #f59e0b;
}

body.light-theme {
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --input-bg: #f8fafc;
    --hero-title: #0f172a;
    --accent-gold: #d97706;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg-color); color: var(--text-main); line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; transition: background 0.3s, color 0.3s; }

/* HEADER */
.header { background: var(--card-bg); border-bottom: 1px solid var(--border-color); padding: 0.85rem 1.5rem; position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px); }
.header-container { max-width: 1320px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.logo { font-size: 1.5rem; font-weight: 800; color: var(--text-main); text-decoration: none; flex-shrink: 0; }
.logo span { color: #ff6600; }

.header-search { flex: 1; max-width: 360px; position: relative; }
.header-search input { width: 100%; padding: 0.5rem 1rem 0.5rem 2.2rem; border-radius: 20px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-main); font-size: 0.85rem; }
.header-search input:focus { outline: none; border-color: #ff6600; }
.search-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 0.85rem; }

.last-update-badge { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.75rem; padding: 0.35rem 0.75rem; border-radius: 20px; display: flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.update-dot { width: 7px; height: 7px; background: #10b981; border-radius: 50%; display: inline-block; box-shadow: 0 0 8px #10b981; }

.header-actions { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 600; transition: color 0.2s; }
.nav-links a:hover { color: #ff6600; }

.theme-toggle-btn { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-main); font-size: 1.1rem; padding: 0.4rem 0.8rem; border-radius: 20px; cursor: pointer; display: flex; align-items: center; gap: 0.4rem; font-weight: 600; }

/* LAYOUT GRID */
.page-layout { max-width: 1320px; margin: 0 auto; padding: 1.5rem 1rem 2rem; display: grid; grid-template-columns: 220px 1fr 220px; gap: 1.5rem; flex: 1; width: 100%; align-items: stretch; }

@media (max-width: 1100px) {
    .page-layout { grid-template-columns: 220px 1fr; }
    .right-sidebar-widget { display: none; }
}
@media (max-width: 820px) {
    .page-layout { grid-template-columns: 1fr; padding-top: 1rem; }
    .header-search, .last-update-badge { display: none; }
}

.product-content { width: 100%; display: flex; flex-direction: column; }
.hero-in-main { text-align: center; padding: 0.25rem 0 1.25rem; }
.hero-in-main h1 { font-size: 1.75rem; font-weight: 800; color: var(--hero-title); margin-bottom: 0.35rem; }
.hero-in-main p { color: var(--text-muted); font-size: 0.9rem; }

/* FEATURED BANNER */
.featured-wrapper { margin-bottom: 1.5rem; text-align: center; }
.featured-header { font-size: 0.95rem; font-weight: 800; color: var(--accent-gold); margin-bottom: 0.75rem; display: flex; align-items: center; justify-content: center; gap: 0.4rem; }
.featured-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }

.featured-card { background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, var(--card-bg) 100%); border: 1.5px solid var(--accent-gold); border-radius: 10px; padding: 0.75rem; display: flex; gap: 0.65rem; align-items: center; position: relative; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1); flex: 1 1 calc(50% - 0.75rem); min-width: 190px; text-align: left; }
.featured-badge { position: absolute; top: -10px; left: 8px; background: var(--accent-gold); color: #000; font-weight: 800; font-size: 0.6rem; padding: 0.12rem 0.45rem; border-radius: 10px; text-transform: uppercase; }
.featured-img { width: 45px; height: 60px; object-fit: contain; flex-shrink: 0; }
.featured-info { overflow: hidden; width: 100%; }
.featured-info h3 { font-size: 0.8rem; font-weight: 800; color: var(--text-main); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.1rem; }
.featured-bonus { color: var(--accent-gold); font-weight: 700; font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.2rem; }
.featured-price { font-size: 0.88rem; font-weight: 800; color: #10b981; margin-bottom: 0.35rem; }
.btn-featured { background: #ff6600; color: #fff; text-decoration: none; padding: 0.3rem 0.5rem; border-radius: 5px; font-weight: 700; font-size: 0.72rem; display: inline-block; width: 100%; text-align: center; }

/* PRODUCT CARDS */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; transition: transform 0.2s, border-color 0.2s; position: relative; }
.card.has-bonus-border { border-color: var(--accent-gold); }
.card:hover { transform: translateY(-4px); border-color: #3b82f6; }

.card-link { text-decoration: none; color: inherit; display: block; }
.card-img { height: 160px; background: var(--input-bg); display: flex; align-items: center; justify-content: center; padding: 1rem; border-bottom: 1px solid var(--border-color); position: relative; }
.card-img img { max-height: 100%; max-width: 100%; object-fit: contain; }
.card-date { position: absolute; top: 8px; right: 8px; background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.68rem; padding: 0.15rem 0.45rem; border-radius: 6px; z-index: 2; }
.bonus-tag { position: absolute; bottom: 8px; left: 8px; background: var(--accent-gold); color: #000; font-size: 0.68rem; font-weight: 800; padding: 0.15rem 0.5rem; border-radius: 6px; display: flex; align-items: center; gap: 0.3rem; z-index: 2; }

.compare-checkbox { position: absolute; top: 8px; left: 8px; z-index: 3; background: rgba(0,0,0,0.4); padding: 0.2rem 0.5rem; border-radius: 6px; display: flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: #fff; cursor: pointer; }

.card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.card-brand { color: #ff6600; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--text-main); margin: 0.2rem 0 0.4rem; transition: color 0.2s; }
.card-title:hover { color: #ff6600; }
.card-specs { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; display: flex; gap: 0.5rem; }

.card-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.85rem; border-top: 1px solid var(--border-color); margin-top: auto; }
.price-label { font-size: 0.72rem; color: var(--text-muted); }
.price-val { font-size: 1.1rem; font-weight: 800; color: #10b981; }
.btn-view { background: var(--input-bg); color: var(--text-main); border: 1px solid var(--border-color); text-decoration: none; padding: 0.45rem 0.75rem; border-radius: 6px; font-size: 0.8rem; font-weight: 700; transition: background 0.2s, border-color 0.2s; display: inline-block; }
.btn-view:hover { background: #ff6600; color: #fff; border-color: #ff6600; }

.pagination-container { display: flex; justify-content: center; align-items: center; gap: 0.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color); flex-wrap: wrap; }
.page-btn { background: var(--card-bg); border: 1px solid var(--border-color); color: var(--text-muted); padding: 0.5rem 0.9rem; border-radius: 8px; text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.page-btn.active { background: #ff6600; border-color: #ff6600; color: #fff; }

/* SIDEBARS */
.sidebar-widget, .right-sidebar-widget { display: flex; flex-direction: column; height: 100%; }
.sidebar-single-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 1.5rem; height: 100%; display: flex; flex-direction: column; gap: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.filter-section { display: flex; flex-direction: column; gap: 0.75rem; }
.widget-title { font-size: 0.95rem; font-weight: 700; color: var(--text-main); border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin: 0; }

.brand-buttons, .contract-buttons, .limit-buttons { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn-chip { background: var(--input-bg); border: 1px solid var(--border-color); color: var(--text-muted); padding: 0.45rem 0.75rem; border-radius: 20px; text-decoration: none; font-size: 0.82rem; font-weight: 600; transition: all 0.2s; display: inline-block; }
.btn-chip:hover { border-color: #ff6600; color: var(--text-main); }
.btn-chip.active { background: #ff6600; border-color: #ff6600; color: #fff; }

.sidebar-form select { width: 100%; padding: 0.65rem 0.85rem; border-radius: 8px; border: 1px solid var(--border-color); background: var(--input-bg); color: var(--text-main); font-size: 0.85rem; }
.sidebar-form select:focus { outline: none; border-color: #ff6600; }
.reset-container { margin-top: auto; text-align: center; padding-top: 1rem; border-top: 1px solid var(--border-color); }
.btn-reset-filter { color: #ef4444; text-decoration: none; font-size: 0.85rem; font-weight: 600; }

.recent-list { display: flex; flex-direction: column; gap: 0.75rem; }
.recent-item { display: flex; align-items: center; gap: 0.75rem; background: var(--input-bg); border: 1px solid var(--border-color); padding: 0.6rem; border-radius: 8px; text-decoration: none; color: var(--text-main); transition: border-color 0.2s, transform 0.2s; }
.recent-item:hover { border-color: #ff6600; transform: translateX(2px); }
.recent-thumb { width: 35px; height: 45px; object-fit: contain; flex-shrink: 0; }
.recent-info h4 { font-size: 0.8rem; font-weight: 700; margin: 0; line-height: 1.2; color: var(--text-main); }
.recent-info span { font-size: 0.7rem; color: #ff6600; font-weight: 600; }

/* ABOUT & FOOTER */
.about-section { max-width: 1320px; margin: 0 auto 3rem; padding: 0 1rem; width: 100%; }
.about-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 2rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.5rem; align-items: center; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.about-text h2 { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-bottom: 0.75rem; }
.about-text p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.about-features { display: flex; flex-direction: column; gap: 0.75rem; }
.feature-item { background: var(--input-bg); border: 1px solid var(--border-color); padding: 0.85rem 1rem; border-radius: 8px; color: var(--text-main); font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 0.75rem; }

.compare-bar { position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%); background: #151c2c; border: 2px solid #ff6600; color: #fff; padding: 0.75rem 1.5rem; border-radius: 30px; display: flex; align-items: center; gap: 1.5rem; z-index: 999; box-shadow: 0 10px 30px rgba(0,0,0,0.5); transition: bottom 0.3s ease; }
.compare-bar.active { bottom: 20px; }
.compare-btn { background: #ff6600; color: #fff; border: none; padding: 0.5rem 1.2rem; border-radius: 20px; font-weight: 800; cursor: pointer; font-size: 0.85rem; }

.footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 2rem 1.5rem; margin-top: auto; text-align: center; color: var(--text-muted); font-size: 0.85rem; }
.footer-links a { color: var(--text-muted); text-decoration: none; margin: 0 0.75rem; }

/* PRODUCT & COMPARE PAGES */
.container { max-width: 1000px; margin: 2rem auto 3rem; padding: 0 1rem; flex: 1; width: 100%; }
.breadcrumb { margin-bottom: 1rem; font-size: 0.85rem; color: var(--text-muted); }
.breadcrumb a { color: #3b82f6; text-decoration: none; font-weight: 600; }

.product-detail { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 1.75rem; display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 2rem; margin-bottom: 1.75rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
@media (max-width: 650px) { .product-detail { grid-template-columns: 1fr; } }
.product-media { background: var(--input-bg); border-radius: 10px; border: 1px solid var(--border-color); padding: 1.5rem; display: flex; align-items: center; justify-content: center; min-height: 220px; }
.product-media img { max-height: 220px; max-width: 100%; object-fit: contain; }
.brand-badge { color: #ff6600; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.product-title { font-size: 1.85rem; font-weight: 800; color: var(--text-main); margin: 0.25rem 0 0.5rem; }
.product-date { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 1rem; display: inline-block; background: var(--input-bg); padding: 0.2rem 0.6rem; border-radius: 6px; border: 1px solid var(--border-color); }
.product-description { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.25rem; }

.specs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.75rem; background: var(--input-bg); padding: 1rem; border-radius: 8px; border: 1px solid var(--border-color); }
.spec-item { font-size: 0.85rem; color: var(--text-muted); }
.spec-item strong { color: var(--text-main); display: block; font-size: 0.95rem; }

.deals-section { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 14px; padding: 1.75rem; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.deals-title { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-bottom: 1.25rem; }
.deal-card { background: var(--input-bg); border: 1px solid var(--border-color); border-radius: 10px; padding: 1.25rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; flex-wrap: wrap; gap: 1rem; position: relative; }
.deal-card.has-bonus { border: 2px solid var(--accent-gold); background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, var(--input-bg) 100%); }
.operator-name { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.deal-bonus-badge { color: var(--accent-gold); font-weight: 800; font-size: 0.95rem; margin-top: 0.25rem; display: flex; align-items: center; gap: 0.3rem; }
.deal-price { text-align: right; }
.btn-buy { background: #ff6600; color: #fff; text-decoration: none; padding: 0.65rem 1.25rem; border-radius: 8px; font-weight: 700; display: inline-block; transition: background 0.2s; font-size: 0.85rem; }
.btn-buy:hover { background: #e65c00; }

/* 2-KOLUMNERS LAYOUT NÄR VÄNSTERSIDEBAR SAKNAS */
.page-layout.two-column-layout {
    grid-template-columns: 1fr 220px;
}

@media (max-width: 1100px) {
    .page-layout.two-column-layout {
        grid-template-columns: 1fr;
    }
}
