:root {
    /* Base Colors */
    --bg-dark: #0f1115;
    --bg-body: #0a0b0e;
    --bg-card: #1a1d24;
    --bg-card-hover: #22262f;
    --bg-surface: #2d3139;
    
    /* Typography */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-h1: #ffffff;
    
    /* Brand & Accents */
    --accent-red: #e60000;
    --accent-red-hover: #ff1a1a;
    --accent-primary: var(--accent-red);
    
    /* Utilities */
    --border-color: #2d3139;
    --border-soft: rgba(255,255,255,0.05);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Layout & Spacing */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-pill: 9999px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--accent-red);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.pt-4 { padding-top: 2rem; }

/* Header */
.site-header {
    background: rgba(15, 17, 21, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.brand-logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-logo .accent {
    color: var(--accent-red);
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
}

.main-nav a {
    font-size: 0.95rem;
    font-weight: 600;
    text-transform: uppercase;
}

.admin-btn {
    border: 1px solid var(--border-color);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem !important;
}

/* Hero */
.hero-section {
    padding: 100px 0;
    background: linear-gradient(180deg, rgba(230,0,0,0.05) 0%, rgba(15,17,21,1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: var(--accent-red);
    color: #fff;
    border-color: var(--accent-red);
    box-shadow: 0 4px 10px rgba(230,0,0,0.3);
}

.btn-primary:hover {
    background-color: var(--accent-red-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230,0,0,0.4);
}

.btn-secondary {
    background-color: var(--bg-surface);
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-card-hover);
    color: #fff;
    border-color: var(--text-muted);
}

/* Product Grid */
.products-section {
    padding: 60px 20px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 30px;
    border-left: 4px solid var(--accent-red);
    padding-left: 15px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }
}

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

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-red);
}

.product-image-wrapper {
    position: relative;
    aspect-ratio: 4/3;
    background: #000;
    overflow: hidden;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: transform 0.5s ease, opacity 0.2s;
}

.product-card:hover .product-image {
    transform: scale(1.05);
    opacity: 1;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 800;
    border-radius: 4px;
    text-transform: uppercase;
}

.badge-success { background: var(--success); color: #fff; }
.badge-error { background: var(--error); color: #fff; }

.product-info {
    padding: 20px;
}

.product-brand {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.product-title {
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.product-price {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-main);
}

/* Product Detail */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: var(--text-muted);
}

.product-detail-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    padding-bottom: 60px;
}

@media (max-width: 768px) {
    .product-detail-layout {
        grid-template-columns: 1fr;
    }
}

.product-gallery .main-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.product-title-large {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.2;
}

.sku-category {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 30px;
}

.price-stock-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.price-large {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--accent-red);
}

.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-dot.green { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.red { background: var(--error); box-shadow: 0 0 8px var(--error); }

.product-description h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Admin Dashboard */
.admin-container {
    padding: 40px 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
}

.data-table-wrapper {
    background: var(--bg-card);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th, .data-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background: var(--bg-card-hover);
}

.btn-text {
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.btn-text:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    padding: 40px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

/* ===== FRONTEND UX/UI OVERHAUL ===== */

/* Form Controls */
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-control:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(230,0,0,0.2);
}

/* Trust Bar */
.trust-bar {
    background: #000;
    border-bottom: 1px solid var(--border-soft);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}
.trust-bar-inner {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 8px 0;
    flex-wrap: wrap;
}

/* Header Layout */
.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
    gap: 20px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Search Form (Desktop) */
.search-form {
    display: flex;
    align-items: center;
    position: relative;
    width: 300px;
}
.search-form input[type="search"] {
    width: 100%;
    padding: 10px 40px 10px 16px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: #fff;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.search-form input[type="search"]:focus {
    border-color: var(--accent-red);
    box-shadow: 0 0 0 3px rgba(230,0,0,0.15);
}
.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-red);
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.search-form button:hover {
    background: var(--accent-red-hover);
}

/* Cart Toggle Button */
.cart-toggle-btn {
    background: var(--bg-surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    cursor: pointer;
    color: white;
    position: relative;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cart-toggle-btn:hover {
    border-color: var(--accent-red);
    background: var(--bg-card-hover);
}
.cart-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--accent-red);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
}

/* Brand Showcase */
.brand-box:hover {
    border-color: var(--accent-red) !important;
    color: var(--accent-red) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(230,0,0,0.15);
}
.mb-5 { margin-bottom: 3rem; }

/* Pagination */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
}
.page-btn {
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.page-btn:hover, .page-btn.active {
    background: var(--accent-red);
    border-color: var(--accent-red);
    color: #fff;
}

/* Mobile Navigation (Off-canvas Drawer) */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.8rem;
    cursor: pointer;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100vh;
    background: var(--bg-card);
    z-index: 1001;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 5px 0 15px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
}
.mobile-drawer.open {
    left: 0;
}
.mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-soft);
}
.mobile-drawer-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.mobile-drawer-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow-y: auto;
}
.mobile-drawer-body a {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.mobile-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-btn { display: block; }
    .search-form { display: none; /* Flyttas in i mobildrawern istället */ }
    .header-inner { gap: 10px; }
    .trust-bar-inner { gap: 10px; font-size: 0.65rem; }
    
    /* Make buttons larger on mobile for thumbs */
    .btn { padding: 14px 24px; }
}

/* Brand Logo Standardization */
.brand-logo-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px;
    width: 140px; 
    height: 70px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s;
    margin-bottom: 20px;
}

.brand-logo-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.brand-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.brand-text-fallback {
    font-weight: 800;
    color: var(--text-main);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
    display: block;
}
