/* Grunnleggende.no - Main Styles */
/* Modern Norwegian e-commerce design */

/* ===== Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #e2e8f0;
    background: #000000;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: #ffffff;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: 16px;
}

/* ===== Utility Classes ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.section {
    padding: 64px 0;
}

.section-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 32px;
    text-align: center;
}

.section-footer {
    text-align: center;
    margin-top: 32px;
}
/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 24px;
    font-size: 16px;
    font-weight: 500;
    transition: all 150ms ease;
    cursor: pointer;
}

.btn-primary {
    background: #ffffff;
    color: black;
}

.btn-primary:hover {
    background: #ffffff;
    color: black;
}

.btn-secondary {
    background: #ffffff;
    color: black;
}

.btn-secondary:hover {
    background: #ffffff;
    color: black;
}

.btn-outline {
    background: transparent;
    color: #ffffff;
    border-color: #ffffff;
}

.btn-outline:hover {
    background: #ffffff;
    color: white;
}

.btn-accent {
    background: #ffffff;
    color: black;
}

.btn-accent:hover {
    background: #ffffff;
    color: black;
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-small {
    padding: 4px 16px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Forms ===== */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #e2e8f0;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 8px 16px;
    font-size: 16px;
    border: 1px solid #333333;
    border-radius: 8px;
    background: #111111;
    color: #e2e8f0;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error,
.form-select.error {
    border-color: #ef4444;
}

.form-error {
    font-size: 14px;
    color: #ef4444;
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== Header ===== */
.site-header {
    background: #000000;
}

.header-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 32px;
}

.header-inner-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    gap: 32px;
}

svg {
    color: #000000;
}

.logo {
}

.logo:hover {
    color: #ffffff;
}

.logo-svg {
    height: 105px;
    width: auto;
    fill: #ffffff;
}

.logo-svg g {
    fill: #ffffff;
    fill: #000000;
}

/* .logo-svg g:last-of-type {
    fill: #ffffff;
} */

.logo-text {
    letter-spacing: -0.02em;
}
.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-list a {
    color: #e2e8f0;
    padding: 5px 10px;
    position: relative;
}

.nav-list a:hover,
.nav-list a.active {
    color: #ffffff;
    background: #ffffff;
    color: black;
}

.nav-list a.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #ffffff;
}

.cart-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #e2e8f0;
    position: relative;
}

.cart-link:hover {
    color: #ffffff;
}

.cart-icon {
    width: 24px;
    height: 24px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ffffff;
    color: white;
    font-size: 12px;
    font-weight: 600;
    width: 20px;
    height: 20px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 150ms ease;
}

.cart-count.has-items {
    opacity: 1;
    transform: scale(1);
}

/* Mobile menu */
.mobile-menu-toggle {
    display: none;
    padding: 8px;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    left: 0;
}

.hamburger::before { top: -7px; }
.hamburger::after { bottom: -7px; }

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #111111;
        border-bottom: 1px solid #333333;
        padding: 16px;
    }

    .main-nav.open {
        display: block;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list a {
        display: block;
        padding: 16px;
    }
}

/* ===== Hero ===== */
.hero {
    background: #000000;
    color: white;
    padding: 64px 0;
    text-align: center;
}

.hero h1 {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 20px;
    opacity: 0.9;
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 18px;
    }
}

/* ===== Product Grid ===== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.product-card {
    background: #111111;
    border: 1px solid #333333;
    border-radius: 12px;
    overflow: hidden;
    transition: all 200ms ease;
}

.product-card:hover {
    border-color: #444444;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.product-link {
    display: block;
    color: inherit;
}

.product-link:hover {
    color: inherit;
}

.product-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: #1a1a1a;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 300ms ease;
}

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

.product-image.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666666;
    font-size: 14px;
}

.product-info {
    padding: 16px;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.product-desc {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-current {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.price-old {
    font-size: 14px;
    color: #94a3b8;
    text-decoration: line-through;
}

.add-to-cart-btn {
    width: calc(100% - 32px);
    margin: 0 16px 16px;
}

/* ===== USP Section ===== */
.usp-section {

}

.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.usp-item {
    text-align: center;
    padding: 24px;
}

.usp-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: #ffffff;
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usp-item h3 {
    font-size: 18px;
    margin-bottom: 4px;
}

.usp-item p {
    font-size: 14px;
    color: #94a3b8;
}

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

/* ===== Footer ===== */
.site-footer {
    padding: 64px 0 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

.footer-col p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

.payment-icons {
    display: flex;
    gap: 16px;
}

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

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

/* ===== Cart Page ===== */
.cart-page .page-title {
    font-size: 32px;
    margin-bottom: 32px;
}

.cart-container {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 32px;
    align-items: start;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: 16px;
    padding: 16px;
    border: 1px solid #333333;
    border-radius: 12px;
    align-items: center;
    background: #111111;
}

.cart-item-image {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.cart-item-price {
    color: #94a3b8;
    font-size: 14px;
}

.cart-item-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.quantity-control {
    display: flex;
    align-items: center;
    border: 1px solid #333333;
    border-radius: 8px;
    background: #111111;
}

.quantity-control button {
    width: 36px;
    height: 36px;
    font-size: 18px;
    color: #e2e8f0;
}

.quantity-control button:hover {
    background: #222222;
}

.quantity-control input {
    width: 48px;
    height: 36px;
    text-align: center;
    border: none;
    border-left: 1px solid #333333;
    border-right: 1px solid #333333;
    background: #111111;
    color: #e2e8f0;
}

.remove-item {
    color: #ef4444;
    font-size: 14px;
}

.cart-summary {
    background: #111111;
    border-radius: 12px;
    padding: 32px;
    position: sticky;
    top: 100px;
    border: 1px solid #333333;
}

.cart-summary h3 {
    font-size: 20px;
    margin-bottom: 24px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
    padding-top: 16px;
    border-top: 1px solid #333333;
    margin-top: 16px;
}

.cart-summary .btn {
    margin-top: 24px;
}

.empty-cart {
    text-align: center;
    padding: 64px;
}

.empty-cart h2 {
    margin-bottom: 16px;
}

.empty-cart p {
    color: #94a3b8;
    margin-bottom: 32px;
}

@media (max-width: 900px) {
    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        position: static;
    }
}

@media (max-width: 640px) {
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .cart-item-actions {
        grid-column: span 2;
        justify-content: space-between;
    }
}

/* ===== Checkout Page ===== */
.checkout-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 32px;
    align-items: start;
}

.checkout-form {
    background: #000000;
}

.checkout-section {
    margin-bottom: 32px;
}

.checkout-section h2 {
    font-size: 20px;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333333;
}

.order-summary {
    background: #111111;
    border-radius: 12px;
    padding: 32px;
    position: sticky;
    top: 100px;
    border: 1px solid #333333;
}

.order-item {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #333333;
}

.order-item:last-of-type {
    border-bottom: none;
}

.order-item-image {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #1a1a1a;
    flex-shrink: 0;
}

.order-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-item-details {
    flex: 1;
}

.order-item-name {
    font-weight: 500;
    font-size: 14px;
}

.order-item-qty {
    font-size: 12px;
    color: #94a3b8;
}

.order-item-price {
    font-weight: 600;
    font-size: 14px;
}

@media (max-width: 900px) {
    .checkout-container {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
        order: -1;
    }
}

/* ===== Product Single Page ===== */
.product-single {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    padding: 32px 0;
}

.product-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-main-image {
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.product-main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-thumbnails {
    display: flex;
    gap: 8px;
}

.product-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    border: 2px solid transparent;
    transition: all 150ms ease;
}

.product-thumbnail:hover,
.product-thumbnail.active {
    opacity: 1;
    border-color: #ffffff;
}

.product-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-details h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.product-details .price {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 24px;
}

.product-details .price-old {
    font-size: 18px;
    margin-right: 8px;
}

.product-description {
    color: #94a3b8;
    margin-bottom: 32px;
    line-height: 1.8;
}

.product-add-form {
    display: flex;
    gap: 16px;
    margin-bottom: 32px;
}

.product-add-form .quantity-control {
    flex-shrink: 0;
}

.product-add-form .btn {
    flex: 1;
}

.product-meta {
    font-size: 14px;
    color: #94a3b8;
}

.product-meta p {
    margin-bottom: 4px;
}

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

/* ===== Category Page ===== */
.category-header {
    text-align: center;
    padding: 48px 0;
    background: #111111;
    margin-bottom: 32px;
}

.category-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.category-header p {
    color: #94a3b8;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 64px;
    color: #94a3b8;
}

.empty-state h2 {
    color: #e2e8f0;
    margin-bottom: 16px;
}

/* ===== Messages / Alerts ===== */
.alert {
    padding: 16px 24px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #059669;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

.alert-info {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid #ffffff;
    color: #1d4ed8;
}

/* ===== Loading State ===== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #333333;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 24px;
}

.breadcrumb a {
    color: #94a3b8;
}

.breadcrumb a:hover {
    color: #ffffff;
}

.breadcrumb span {
    color: #e2e8f0;
}

/* ===== Content Pages (Om oss, Vilkår, etc.) ===== */
.content-page {
    max-width: 800px;
    margin: 0 auto;
}

.content-page h1 {
    text-align: center;
    margin-bottom: 48px;
}

.content-page-body {
    line-height: 1.8;
    color: #94a3b8;
}

.content-page-body p {
    margin-bottom: 24px;
}

.content-page-body p.intro {
    font-size: 18px;
    margin-bottom: 48px;
}

.content-page-body h2 {
    color: #e2e8f0;
    margin-top: 48px;
    margin-bottom: 16px;
}

.content-page-body h3 {
    color: #e2e8f0;
    margin-top: 32px;
    margin-bottom: 12px;
}

.content-page-body ul {
    margin-bottom: 24px;
    padding-left: 48px;
    list-style: disc;
}

.content-page-body ul li {
    margin-bottom: 8px;
}

.content-page-footer {
    text-align: center;
    margin-top: 64px;
}

.content-page-footer p {
    margin-bottom: 24px;
}

.content-page-body .last-updated {
    margin-top: 64px;
    font-size: 14px;
    color: #666666;
}

/* ===== Contact Page ===== */
.contact-page {
    max-width: 600px;
    margin: 0 auto;
}

.contact-page h1 {
    text-align: center;
    margin-bottom: 16px;
}

.contact-page .intro {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 48px;
}

.contact-form {
    background: #111111;
    padding: 48px;
    border-radius: 12px;
    border: 1px solid #333333;
}

.contact-info {
    margin-top: 64px;
    text-align: center;
    color: #94a3b8;
}

.contact-info h3 {
    color: #e2e8f0;
    margin-bottom: 16px;
}

.contact-info p {
    margin-bottom: 16px;
}
