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

:root {
    --color-bg: #fafafa;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-muted: #666666;
    --color-accent: #c8a14b;
    --color-accent-dark: #a6863a;
    --color-border: #e0e0e0;
    --radius: 8px;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --container-max: 1100px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
}

a { color: var(--color-accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Header ─────────────────────────────────────────────── */
.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.site-title a {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
}

.site-nav a {
    color: var(--color-muted);
    margin-left: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    padding-bottom: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.site-nav a:hover { color: var(--color-text); text-decoration: none; }
.site-nav a.active { color: var(--color-text); border-bottom-color: var(--color-accent); }

/* ── Hero ───────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 3rem 1.5rem 2rem;
}

.hero h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hero p {
    color: var(--color-muted);
    font-size: 1.1rem;
}

/* ── Listings Grid ──────────────────────────────────────── */
.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding-bottom: 3rem;
}

.listing-card {
    background: var(--color-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.listing-card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: #f0f0f0;
}

.listing-card-body {
    padding: 1.25rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.listing-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.4rem;
}

.listing-card .category {
    color: var(--color-accent-dark);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.listing-card .short-desc {
    color: var(--color-muted);
    font-size: 0.95rem;
    flex-grow: 1;
    margin-bottom: 1rem;
}

.listing-card .price {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text);
}

.listing-card .status-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-left: 0.5rem;
    vertical-align: middle;
}

.status-till-salu { background: #e8f5e9; color: #2e7d32; }
.status-reserverad { background: #fff3e0; color: #e65100; }
.status-sald { background: #f5f5f5; color: #999; }

/* ── Item Detail Page ───────────────────────────────────── */
.back-link {
    display: inline-block;
    margin: 1.5rem 0;
    color: var(--color-muted);
    font-size: 0.95rem;
}

.item-detail {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 3rem;
}

.item-detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    background: #f0f0f0;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    overflow-x: auto;
}

.gallery-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.gallery-thumb:hover { opacity: 0.9; }
.gallery-thumb.active { opacity: 1; border: 2px solid var(--color-accent); }

.item-detail-body {
    padding: 2rem;
}

.item-detail-body h2 {
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
}

.item-detail-body .category {
    color: var(--color-accent-dark);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.5rem;
}

.item-detail-body .price-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.item-detail-body .price {
    font-size: 1.8rem;
    font-weight: 700;
}

.item-detail-body .market-value {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.item-detail-section {
    margin-bottom: 2rem;
}

.item-detail-section h3 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.item-detail-section p {
    margin-bottom: 0.5rem;
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}

.spec-table th, .spec-table td {
    text-align: left;
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--color-border);
}

.spec-table th {
    width: 35%;
    color: var(--color-muted);
    font-weight: 500;
    font-size: 0.9rem;
}

.spec-table td {
    font-weight: 500;
}

/* ── Generic Page Content ───────────────────────────────── */
.page-content {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2.5rem;
    margin: 2rem 0 3rem;
}

.page-content h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.page-content p {
    margin-bottom: 1rem;
    color: var(--color-text);
}

.contact-info p {
    margin-bottom: 0.6rem;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--color-muted);
    font-size: 0.85rem;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .site-header .container {
        flex-direction: column;
        gap: 0.5rem;
    }
    .site-nav a { margin: 0 0.75rem; }
    .hero h2 { font-size: 1.5rem; }
    .listings-grid {
        grid-template-columns: 1fr;
    }
    .item-detail-body { padding: 1.25rem; }
}
