/* =========================================================
   style.css – Art By Åberg Shop
   Header: logga som bakgrund-block + meny UNDER
   Ⓐ Style | Pedagogisk version (JUSTERA HÄR-kommentarer)
   ========================================================= */

/* =========================================================
   0) JUSTERA HÄR – SNABBREGLAGE
   ---------------------------------------------------------
   Dessa variabler är det du oftast vill pilla på.
   ========================================================= */
:root {
    /* Brand (överskrivs delvis inline i header.php) */
    --accent: #111111;
    /* knappfärg etc */
    --accent-red: #e63946;
    /* badge/markering */

    /* Basfärger */
    --text: #1a1a1a;
    --muted: #666666;
    --bg: #ffffff;
    --light-bg: #f5f5f7;
    --border: rgba(0, 0, 0, .12);
    --white: #ffffff;

    /* Layout */
    --container-width: 1400px;

    /* =========================
       HEADER (LOGGA-BLOCKET)
       ========================= */
    --header-height: 130px;
    /* JUSTERA HÄR: höjden på logga-bilden */

    /* =========================
       MENYBAR (NAVBAR)
       ========================= */
    --nav-bg: rgba(100, 100, 100);
    /* JUSTERA HÄR: bakgrund på menyraden */
    --nav-padding-y: 0px;
    /* JUSTERA HÄR: höjd på menyraden (vertikal padding) */
    --nav-padding-x: 14px;
    /* JUSTERA HÄR: sidopadding i menyraden */
    --nav-min-height: 0px;
    /* JUSTERA HÄR: minsta höjd på menyraden */

    /* Menylänkar */
    --nav-link-padding-y: 3px;
    /* JUSTERA HÄR: klickyta på länkar (höjd) */
    --nav-link-padding-x: 14px;
    /* JUSTERA HÄR: klickyta på länkar (bredd) */
    --nav-link-gap: 14px;
    /* JUSTERA HÄR: avstånd mellan menyval */
    --nav-link-radius: 10px;
    /* rundning på hover-bubbla */
    --nav-hover-bg: rgba(255, 255, 255, .12);
    /* hover bakgrund på länk */

    /* Effekter */
    --shadow: 0 10px 30px rgba(0, 0, 0, .08);
}

/* =========================================================
   1) Reset + Bas
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Fallback för äldre webkit */
    overflow-x: clip;
    /* Sista skyddsnätet mot högerskroll */
}

/* Bas-media för polering */
img,
svg,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    font-family: Consolas, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}


a {
    color: inherit;
    text-decoration: none;
    transition: 0.2s ease;
}

a:hover {
    text-decoration: none;
}

/* =========================================================
   2) Typografi
   ========================================================= */
h1,
h2,
h3,
h4 {
    font-family: Consolas, Georgia, serif;
    font-weight: 800;
    color: var(--accent);
    line-height: 1.15;
}

.muted {
    color: var(--muted);
}

/* =========================================================
   3) Container (används på innehåll, inte headern)
   ========================================================= */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-left: 28px;
    padding-right: 28px;
}

/* =========================================================
   4) HEADER – LOGGA SOM EGET BLOCK
   ---------------------------------------------------------
   Headern bygger på:
   - <header class="main-header" style="--header-bg: url('...');">
   - CSS skapar ett bildblock med ::before
   - nav kommer EFTER och hamnar automatiskt under
   ========================================================= */
.main-header {
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
}

/* Själva logga-/bildblocket */
.main-header::before {
    content: "";
    display: block;
    width: 100%;
    height: var(--header-height);
    /* JUSTERA HÄR via variabel */

    /* fallback om ingen logga finns */
    background-color: var(--light-bg);

    /* Bilden kommer från header.php via --header-bg */
    background-image: var(--header-bg);
    background-size: cover;
    /* fyller bredden (kan beskära lite) */
    background-position: left top;
    /* topp/vänster */
    background-repeat: no-repeat;
}

/* =========================================================
   5) NAVBAR – MENY UNDER LOGGAN
   ========================================================= */
.navbar {
    width: 100%;

    /* JUSTERA HÄR: meny-bakgrund */
    background: var(--nav-bg);

    /* Suddig glas-effekt (kan kommenteras bort om du vill) */
    backdrop-filter: blur(6px);

    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;

    /* JUSTERA HÄR: meny-höjd och padding */
    padding: var(--nav-padding-y) var(--nav-padding-x);
    min-height: var(--nav-min-height);

    /* JUSTERA HÄR: avstånd mellan vänster (meny) och höger (ikon) när det wrappar */
    gap: 10px;
}

.nav-toggle-button {
    display: none;
    align-items: center;
    gap: 0.7rem;
    min-height: 44px;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    color: #ffffff;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nav-toggle-button:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .24);
}

.nav-toggle-button__icon {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
}

.nav-toggle-button__icon span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transform-origin: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle-button__label {
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.nav-toggle-button:focus-visible,
.nav-links a:focus-visible,
.cart-icon:focus-visible {
    outline: 2px solid rgba(255, 255, 255, .85);
    outline-offset: 2px;
}

/* ---------- Menylänkarna ---------- */
.nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;

    /* JUSTERA HÄR: avstånd mellan "Hem / Butik / Om oss" */
    gap: var(--nav-link-gap);
}

/* Själva länkarnas “klickyta” och utseende */
.nav-links a {
    color: #ffffff;
    font-weight: 800;
    letter-spacing: 0.2px;

    /* JUSTERA HÄR: gör menyn “tjockare / tunnare” */
    padding: var(--nav-link-padding-y) var(--nav-link-padding-x);

    border-radius: var(--nav-link-radius);
    display: inline-flex;
    align-items: center;
}

/* Hover (mus över) */
.nav-links li:hover>a {
    background: var(--nav-hover-bg);
}

/* ---------- Ikoner (varukorg) ---------- */
.nav-icons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Varukorgs-ikon (och klickyta) */
.cart-icon {
    position: relative;
    color: #ffffff;
    font-size: 1.25rem;

    /* Justera klickyta runt ikonen (påverkar menyhöjd lite) */
    padding: 3px 10px;
    border-radius: 10px;
}

.cart-icon:hover {
    background: var(--nav-hover-bg);
}

/* Badge på varukorg */
.cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;

    width: 20px;
    height: 20px;
    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--accent-red);
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;

    box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}

/* Shop Semantic Classes (för att ersätta inline styles) */
.shop-page-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: none;
    padding-bottom: 0.2rem;
}

.shop-category-section {
    margin-bottom: 1rem;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0.2rem;
}

.page-title,
.section-title {
    font-size: 1.5rem;
    margin: 0;
}

.section-title a {
    color: inherit;
    text-decoration: none;
}

.view-all-link {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.view-all-link i {
    font-size: 0.8rem;
    margin-left: 4px;
}

.section-meta {
    color: var(--muted);
    font-size: 0.95rem;
}


/* =========================================================
   6) HERO
   ========================================================= */
.hero {
    padding: 5rem 0;
    text-align: center;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: clamp(2rem, 3vw, 3.5rem);
    margin-bottom: 0.75rem;
}

.hero p {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    color: var(--muted);
}

/* =========================================================
   7) PRODUKTGRID
   ========================================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin: 0;
}

@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 1000px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 700px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   7b) SHOP LAYOUT (sidebar + grid)
   ========================================================= */
.shop-layout {
    margin-top: 2rem;
    margin-left: 0;
    margin-right: auto;
}

.shop-pagination {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 0.35rem;
}

.shop-pagination::-webkit-scrollbar {
    display: none;
}

.shop-pagination .btn {
    flex: 0 0 auto;
}

/* =========================================================
   7c) SIZES PAGE
   ========================================================= */
.sizes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.sizes-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sizes-card__head {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent);
}

.sizes-card__head--red {
    border-bottom-color: var(--accent-red);
}

.sizes-card__icon {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}

.sizes-card__title {
    margin: 0;
    font-size: 1.6rem;
}

.sizes-card__text {
    flex: 1;
    margin-bottom: 2rem;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.5;
}

.sizes-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 1rem;
}

.sizes-pill {
    display: inline-block;
    min-width: 100px;
    padding: 0.6rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    color: var(--accent);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.sizes-note {
    grid-column: 1 / -1;
    margin-top: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 560px) {
    .sizes-grid {
        gap: 2.5rem;
    }

    .sizes-card__head {
        gap: 12px;
    }

    .sizes-card__icon {
        width: 42px;
        height: 42px;
    }

    .sizes-card__title {
        font-size: 1.45rem;
    }

    .sizes-pill {
        min-width: calc(50% - 5px);
    }
}

.product-card {
    background: var(--white);
    border: none;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: none;
    transition: transform .25s ease;
}

.product-card:hover .product-image img {
    filter: brightness(1.08);
}

.product-image {
    position: relative;
    aspect-ratio: 1 / 1;
    background: #f1f1f1;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter .3s ease;
}


.product-info {
    padding: 6px;
}

.product-info h3 {
    font-size: 1.05rem;
    margin-bottom: 4px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.product-info .price {
    font-weight: 900;
    color: var(--muted);
}

/* =========================================================
   8) KNAPPAR
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0.85rem 1.6rem;
    border-radius: 10px;
    border: 1px solid transparent;

    background: var(--accent);
    color: var(--white);

    cursor: pointer;
    font-weight: 900;
    letter-spacing: 0.2px;

    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn:hover {
    background: #000;
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, .12);
}

.btn-outline {
    background: transparent;
    border-color: var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* =========================================================
   8b) CART / CHECKOUT LAYOUT
   ========================================================= */
.cart-layout,
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: clamp(1rem, 2.5vw, 4rem);
}

.cart-layout > *,
.checkout-layout > * {
    min-width: 0;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-grid-2-1 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.checkout-form,
.order-summary,
.cart-items,
.cart-summary {
    min-width: 0;
}

.checkout-panel {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: 1.1111rem;
    padding: clamp(1.25rem, 2vw, 2rem);
    box-shadow: 0 1rem 2.5rem rgba(15, 23, 42, .06);
}

.checkout-form.checkout-panel {
    padding: clamp(1rem, 1.6vw, 1.5rem);
}

.checkout-panel--summary {
    background: linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
}

.checkout-heading {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.checkout-field {
    margin-bottom: 1rem;
}

.checkout-field label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.01em;
}

.checkout-input {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(15, 23, 42, .12);
    border-radius: 0.7778rem;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.checkout-input::placeholder {
    color: #94a3b8;
}

.checkout-input:focus {
    outline: none;
    border-color: rgba(15, 23, 42, .35);
    box-shadow: 0 0 0 0.2222rem rgba(15, 23, 42, .08);
    background: #fff;
}

.order-summary {
    align-self: start;
    position: sticky;
    top: 1.5rem;
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.checkout-summary-item-meta {
    color: #64748b;
    font-size: 0.85rem;
}

.checkout-summary-value {
    text-align: right;
    white-space: nowrap;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.checkout-summary-row--total {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(15, 23, 42, .12);
    font-weight: 700;
    font-size: 1.25rem;
}

.checkout-submit {
    width: 100%;
    margin-top: 1.75rem;
    min-height: 3.25rem;
    border-radius: 0.8889rem;
    text-align: center;
}

.checkout-note {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 1rem;
    text-align: center;
}

@media (max-width: 900px) {

    .cart-layout,
    .checkout-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .order-summary {
        position: static;
    }
}

@media (max-width: 560px) {

    .form-grid-2,
    .form-grid-2-1 {
        grid-template-columns: 1fr;
    }
}

.table-scroll {
    overflow-x: auto;
    max-width: 100%;
    margin-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-scroll table {
    min-width: max-content;
    /* istället för hårdkodade px om möjligt */
}

.table-scroll th,
.table-scroll td {
    white-space: nowrap;
}

.table-scroll td.name {
    white-space: normal;
    min-width: 220px;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
}

.cart-product-cell {
    gap: 1.5rem;
}

.cart-product-image,
.cart-product-placeholder {
    width: 80px;
    height: 80px;
    flex: 0 0 80px;
}

.cart-product-image {
    object-fit: cover;
}

.cart-product-placeholder {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.cart-product-info {
    min-width: 0;
}

.cart-product-title {
    display: block;
    overflow-wrap: anywhere;
}

.cart-product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
    font-size: 0.9rem;
    color: #64748b;
}

.cart-meta-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

.cart-qty-form {
    display: flex;
    align-items: center;
}

.cart-qty-input {
    width: 60px;
    padding: 0.25rem;
    border: 1px solid #eee;
    text-align: center;
}

.cart-cell-value {
    width: 100%;
}

.cart-price-value {
    display: inline-flex;
    flex-direction: column;
}

.cart-remove-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #e63946;
}

.cart-continue-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-summary-card {
    background: var(--light-bg);
    padding: 2rem;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cart-summary-row--total {
    margin-top: 2rem;
    margin-bottom: 0;
    padding-top: 1rem;
    border-top: 1px solid #ddd;
    font-weight: 700;
    font-size: 1.25rem;
}

.cart-summary-cta {
    width: 100%;
    margin-top: 2rem;
    padding: 1rem;
    text-align: center;
}

@media (max-width: 560px) {
    .table-scroll table {
        min-width: 520px;
    }
}

@media (max-width: 700px) {
    .table-scroll {
        overflow: visible;
    }

    .cart-table,
    .cart-table tbody,
    .cart-table tr {
        display: block;
        width: 100%;
    }

    .table-scroll .cart-table {
        min-width: 0;
        width: 100%;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody {
        display: block;
    }

    .cart-table tr {
        display: block;
        border-bottom: 1px solid #f1f5f9;
    }

    .cart-table td {
        display: block;
        width: 100%;
        padding: 0.5rem 0 !important;
        white-space: normal;
    }

    .cart-table td.name {
        min-width: 0;
        display: flex !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }

    .cart-table td[data-label] {
        display: grid;
        grid-template-columns: minmax(90px, auto) minmax(0, 1fr);
        align-items: center;
        column-gap: 1rem;
        text-align: left !important;
    }

    .cart-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0;
        color: #64748b;
        font-size: 0.78rem;
        font-weight: 700;
        letter-spacing: 0.01em;
        text-align: left;
        text-transform: uppercase;
    }

    .cart-table td[data-label] > .cart-cell-value {
        justify-self: end;
        min-width: 0;
        display: flex;
        justify-content: flex-end;
        align-items: center;
        text-align: right;
        width: auto;
    }

    .cart-price-value {
        align-items: flex-end;
    }

    .cart-qty-form {
        justify-content: flex-start;
    }

    .cart-qty-value,
    .cart-remove-value {
        justify-content: flex-end;
    }

    .cart-remove-link {
        justify-content: flex-end;
    }

    .cart-summary-card {
        padding: 1.5rem;
    }
}

/* =========================================================
   8c) PRODUCT PAGE LAYOUT
   ========================================================= */
.product-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 4vw, 6rem);
}

.product-layout > * {
    min-width: 0;
}

.product-gallery,
.product-details {
    width: 100%;
    min-width: 0;
}

.product-main-image,
.product-main-image img {
    width: 100%;
    max-width: 100%;
}

.product-title,
.product-price,
.product-description p {
    overflow-wrap: anywhere;
}

.product-share,
.product-share__row {
    min-width: 0;
    max-width: 100%;
}

.product-share__row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-share__trust {
    min-width: 0;
}

.product-details select,
.product-details button,
.product-details .btn {
    max-width: 100%;
}

.thumbnails {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.thumbnails img,
.thumbnails a,
.thumbnails button {
    min-height: 44px;
    min-width: 44px;
}

.thumbnails img.is-active {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (max-width: 900px) {
    .product-layout {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 560px) {
    .product-share__row {
        align-items: stretch;
    }

    .product-share__button {
        flex: 0 0 auto;
    }

    .product-share__trust {
        flex: 1 1 100%;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .thumbnails {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* =========================================================
   9) FOOTER
   ========================================================= */
.main-footer {
    position: static;
    width: 100%;
    min-height: 30px;
    background: var(--nav-bg);
    color: #ffffff;
    padding: 10px 0;
    margin-top: 4rem;
    /* Avstånd till innehållet ovanför */
    display: flex;
    align-items: center;
    padding-top: 10px;
}

.footer-bottom {
    width: 100%;
    text-align: center;
    padding: 2px 0;
    font-weight: 800;
}

.footer-bottom a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 10x;
    padding: 4px 10px;

}

.footer-bottom a:hover {
    color: #000000;
}

/* =========================================================
   10) RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
    .container {
        padding: 0 1rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Lite mer kompakt meny på mobil */
    :root {
        --nav-padding-x: 10px;
        --nav-link-gap: 10px;
    }

    .nav-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .nav-links::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 900px), (hover: none) and (pointer: coarse) and (max-width: 1366px) {
    .navbar {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 0.75rem;
    }

    .nav-toggle-button {
        display: inline-flex;
        justify-self: start;
    }

    .nav-icons {
        justify-self: end;
    }

    .nav-links {
        display: none;
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 0.25rem;
        padding: 0.5rem;
        flex-direction: column;
        gap: 0.35rem;
        border: 1px solid rgba(255, 255, 255, .12);
        border-radius: 16px;
        background: rgba(20, 20, 20, .28);
        backdrop-filter: blur(10px);
        overflow: visible;
        scrollbar-width: auto;
        box-shadow: 0 16px 36px rgba(0, 0, 0, .16);
    }

    .navbar.is-menu-open .nav-links {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        list-style: none;
    }

    .nav-links a {
        width: 100%;
        justify-content: space-between;
        min-height: 44px;
        padding: 0.8rem 0.95rem;
        border-radius: 12px;
    }

    .nav-links li:hover > a {
        background: rgba(255, 255, 255, .1);
    }

    .navbar.is-menu-open .nav-toggle-button__icon span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .navbar.is-menu-open .nav-toggle-button__icon span:nth-child(2) {
        opacity: 0;
    }

    .navbar.is-menu-open .nav-toggle-button__icon span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 560px) {
    :root {
        --header-height: 180px;
        /* JUSTERA HÄR: loggans höjd på mobil */
        --nav-min-height: 42px;
        --nav-link-padding-x: 12px;
        --nav-link-padding-y: 10px;
    }

    .navbar {
        padding: 0.5rem 0.85rem;
    }

    .nav-toggle-button {
        padding: 0.55rem 0.8rem;
    }

    a,
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .cart-icon {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
        touch-action: manipulation;
    }
}

/* --- Added via Mission: shop.php horizontal subcats --- */
.subcat-row {
    display: flex;
    gap: 10px;
    align-items: center;

    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-left: 14px;
    scroll-padding-right: 14px;
    padding: 4px 0 12px;
}



.subcat-row::-webkit-scrollbar {
    display: none;
}

.subcat-row a,
.subcat-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 4px 0;
    margin-right: 20px;

    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--muted);
    scroll-snap-align: start;
    user-select: none;
}

.subcat-row .is-active {
    color: var(--accent);
    cursor: default;
}

.subcat-row a:hover {
    color: var(--accent);
}

.subcat-row a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.parent-chip i {
    font-size: 0.8rem;
    margin-right: 6px;
    opacity: 0.7;
}

.filtered-chips {
    margin-bottom: 0;
}



/* Sista anti-overflow skydd för flex/grid */
@media (max-width: 900px) {

    /* Sista anti-overflow skydd för flex/grid */
    .shop-layout>*,
    .product-grid>*,
    .products-grid>* {
        min-width: 0;
    }
}

/* =========================================================
   FEATURED PRODUCTS – Profilerade konstverk
   ========================================================= */
.featured-products {
    margin-bottom: 2rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-top: 0;
}

@media (max-width: 1200px) {
    .featured-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1000px) {
    .featured-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 700px) {
    .featured-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 400px) {
    .featured-grid {
        grid-template-columns: 1fr;
    }
}

.featured-card {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.featured-card .product-card {
    flex: 1;
}

.featured-card-meta {
    padding: 4px 6px;
}

.featured-desc {
    font-size: 0.8rem;
    color: var(--muted);
    font-style: italic;
    margin: 0 0 2px;
    line-height: 1.4;
}

.featured-text {
    font-size: 0.75rem;
    color: #888;
    line-height: 1.4;
    margin: 0;
}

/* =========================================================
   FEATURED STORY PAGE (Redaktionell vy)
   ========================================================= */
.featured-story-page {
    padding-top: 4rem;
    padding-bottom: 6rem;
    background: #fff;
}
.featured-story-page .text-content p {
    margin-bottom: 1.5rem;
}
.featured-story-page .editorial-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 1rem;
    line-height: 1.1;
    color: #111;
}
.featured-story-page .editorial-lead {
    font-family: inherit;
    font-weight: 500;
}
.featured-story-page .purchase-card {
    transition: box-shadow 0.3s ease;
}
.featured-story-page .purchase-card:hover {
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}
