/*
 * Digipos Theme — Mobil
 * Spec: MOBILE.md
 * Breakpoints: 1024 tablet · 768 mobil · 480 liten mobil
 * Alle verdier bruker tokens fra theme.css (:root).
 */

/* ─────────────────────────────────────────────
   GLOBAL OVERFLYT-VAKT
   min-width:auto er default for grid/flex-barn → de nekter å bli smalere
   enn innholdet (f.eks. langt produktnavn med nowrap).
   Dette er rotårsaken til horisontal body-float.
───────────────────────────────────────────── */
.dp-product-grid > *,
.dp-product-rail > *,
.dp-product-card,
.dp-product-card__name { min-width: 0; }

/* ─────────────────────────────────────────────
   SCRIM (delt av alle overlays)
───────────────────────────────────────────── */
.dp-scrim {
    position: fixed;
    inset: 0;
    background: rgba(24, 22, 19, 0.45);
    z-index: 250;                        /* under drawer/sheet (300), over toolbar (90) og alt annet */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.dp-scrim.is-visible {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0s;
}

/* ─────────────────────────────────────────────
   HEADER — mobil
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dp-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: var(--space-2);
        padding: 0 var(--space-4);
    }

    /* hamburger venstre */
    .dp-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text);
        padding: 0;
        flex-shrink: 0;
    }

    /* logo midtstilt */
    .dp-logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }
    .dp-logo img { max-height: 32px; width: auto; }

    /* desktop nav skjules */
    .dp-nav { display: none !important; }

    /* actions: søk-ikon + kurv — vanlig flex, ikke display:contents */
    .dp-header__actions {
        display: flex;
        align-items: center;
        gap: var(--space-1);
        flex-shrink: 0;
    }
    .dp-search-wrap { position: static; }
    .dp-search-input { display: none; }
    .dp-header__search-mobile .dp-search-input { display: block; }
    .dp-search-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--color-text);
        padding: 0;
    }

    /* kurv-wrap — minicart-panelet er nå UTENFOR header (body-nivå), z-index 300 gjelder root */
    .dp-cart-wrap { position: relative; }
    .dp-minicart {
        width: 90vw;
        max-width: 400px;
        border-radius: 0;
        box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    }
}

/* ─────────────────────────────────────────────
   HEADER SEARCH-VARIANT — mobil
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dp-header--search {
        --dp-header-height: auto;
        --dp-header-height-scrolled: auto;
        height: auto;
    }
    .dp-header--search .dp-topbar { justify-content: center; font-size: 11px; }
    .dp-header--search .dp-topbar .dp-topbar__item { display: none; }
    .dp-header--search .dp-topbar .dp-topbar__item.is-active { display: flex; }
    .dp-header--search .dp-header__main {
        height: 56px;
        padding: 0 var(--space-4);
        gap: var(--space-2);
    }
    .dp-header--search .dp-search-bar { display: none; }
    .dp-header--search .dp-menu-toggle { display: flex; }
    .dp-header--search .dp-header__nav-row { display: none; }
    .dp-header--search .dp-header__actions { margin-left: auto; }
    /* Søk-rad under main bar */
    .dp-header--search .dp-header__search-mobile {
        display: block;
        padding: 0 var(--space-4) var(--space-3);
    }
    .dp-header--search .dp-header__search-mobile .dp-search-icon-wrap {
        position: relative;
        display: flex;
        align-items: center;
        width: 100%;
    }
    .dp-header--search .dp-header__search-mobile input {
        width: 100%;
        height: 44px;
        padding: 0 1rem 0 2.75rem;
        border: 1.5px solid var(--color-border);
        border-radius: 8px;
        font-size: var(--text-sm);
        background: var(--color-bg-2);
        color: var(--color-text);
    }
    .dp-header--search .dp-header__search-mobile input:focus {
        outline: none;
        border-color: var(--color-primary);
        background: var(--color-surface);
    }
    .dp-header--search .dp-header__search-mobile .dp-search-icon {
        position: absolute;
        left: 0.875rem;
        color: var(--color-text-subtle);
        pointer-events: none;
    }
}

/* ─────────────────────────────────────────────
   MOBILMENY-DRAWER
───────────────────────────────────────────── */
.dp-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: -100%;
    width: 85vw;
    max-width: 360px;
    height: 100dvh;
    background: var(--color-bg);
    z-index: 300;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    transition: left 0.3s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.1);
}
.dp-mobile-nav.is-open {
    display: flex;
    left: 0;
}
@media (min-width: 769px) {
    .dp-mobile-nav { display: none !important; }
}

.dp-mobile-nav__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}
.dp-mobile-nav__logo img { max-height: 28px; width: auto; }
.dp-mobile-nav__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}

.dp-mobile-nav__menu { flex: 1; }
.dp-mobile-nav__list,
.dp-mobile-nav__menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.dp-mobile-nav__list > li,
.dp-mobile-nav__menu li {
    border-bottom: 1px solid var(--color-border);
}
.dp-mobile-nav__list a,
.dp-mobile-nav__menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    letter-spacing: 0.02em;
    min-height: 56px;
}
.dp-mobile-nav__list a:hover,
.dp-mobile-nav__menu a:hover { color: var(--color-primary); }

/* Rad med lenke + åpne/lukke-chevron for kategorier med underkategorier */
.dp-mobile-nav__row { display: flex; align-items: stretch; }
.dp-mobile-nav__row a { flex: 1; }
.dp-mobile-nav__expand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    min-height: 56px;
    flex-shrink: 0;
    background: none;
    border: none;
    border-left: 1px solid var(--color-border);
    color: var(--color-text-muted);
    cursor: pointer;
}
.dp-mobile-nav__expand svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
.dp-mobile-nav__item.is-open > .dp-mobile-nav__row .dp-mobile-nav__expand svg { transform: rotate(90deg); }

.dp-mobile-nav__submenu {
    max-height: 0;
    overflow: hidden;
    background: var(--color-bg-2);
    transition: max-height 0.25s ease;
}
.dp-mobile-nav__item.is-open > .dp-mobile-nav__submenu {
    max-height: 1000px; /* romslig nok for lengste kategoriliste */
}
.dp-mobile-nav__submenu li { border-bottom: 1px solid var(--color-border); }
.dp-mobile-nav__submenu li:last-child { border-bottom: none; }
.dp-mobile-nav__submenu a {
    font-size: var(--text-sm);
    font-weight: 500;
    padding: var(--space-3) var(--space-5) var(--space-3) var(--space-7);
    min-height: 48px;
}

.dp-mobile-nav__secondary {
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}
.dp-mobile-nav__secondary a {
    font-size: var(--text-sm);
    color: var(--color-muted);
    text-decoration: none;
    padding: var(--space-2) 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.dp-mobile-nav__search {
    padding: var(--space-4) var(--space-5);
    flex-shrink: 0;
}
.dp-mobile-nav__search-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-family: inherit;
    background: var(--color-bg-2);
}

/* ─────────────────────────────────────────────
   MOBIL SØKEFLATE (sklir ned under header)
───────────────────────────────────────────── */
.dp-mobile-search {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    z-index: 260;  /* over scrim (250) — søkefeltet skal IKKE dimmes */
    transform: translateY(-100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.dp-mobile-search.is-open {
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.25s ease, visibility 0s;
}
@media (min-width: 769px) {
    .dp-mobile-search { display: none; }
    .dp-search-toggle { display: none; }
}
.dp-mobile-search__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) 0;
}
.dp-mobile-search__input {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: var(--text-base);
    font-family: inherit;
    min-height: 44px;
}
.dp-mobile-search__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    flex-shrink: 0;
}

/* ─────────────────────────────────────────────
   FORSIDE — mobil
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dp-hero { min-height: 380px; }
    .dp-hero__title { font-size: clamp(28px, 8vw, 40px); }
    .dp-hero__actions { flex-wrap: wrap; gap: var(--space-3); }
    .dp-hero__actions .dp-btn { flex: 1; min-width: 140px; text-align: center; }

    /* USP-bar: horisontal scroll */
    .dp-usp-bar__inner { flex-wrap: nowrap; justify-content: flex-start; gap: var(--space-5); overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; scrollbar-width: none; padding-left: var(--space-4); padding-right: var(--space-4); }
    .dp-usp-bar__inner::-webkit-scrollbar { display: none; }
    .dp-usp-item { flex: 0 0 auto; scroll-snap-align: start; }

    /* Kategorier: 2-kol */
    .dp-categories { grid-template-columns: 1fr 1fr; }

    /* Produkt-rails: kant-til-kant karusell med peek */
    .dp-product-rail {
        display: flex;
        gap: var(--space-4);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        /* negativ margin gir bleed til skjermkant — rail-ens overflow:auto klipper */
        margin-inline: calc(-1 * var(--space-4));
        padding-inline: var(--space-4);
        padding-bottom: var(--space-2);
    }
    .dp-product-rail::-webkit-scrollbar { display: none; }
    .dp-product-rail > * {
        flex: 0 0 70%;     /* neste kort «peeker» inn fra høyre */
        scroll-snap-align: start;
        min-width: 0;
    }

    /* Full produktgrid: 2 kol */
    .dp-product-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-3); }

    /* Kort-tekst kant-pust — bildet er flush, teksten skal ha litt luft */
    .dp-product-card__category,
    .dp-product-card__name,
    .dp-product-card__price { padding-inline: var(--space-1); }

    /* Nyhetsbrev */
    .dp-newsletter__form { flex-direction: column; }
    .dp-newsletter__form .dp-btn { width: 100%; }
}

@media (max-width: 480px) {
    .dp-container { padding: 0 var(--space-4); }
    .dp-hero__title { font-size: clamp(24px, 7vw, 32px); }
    .dp-product-grid { gap: var(--space-2); }
}

/* ─────────────────────────────────────────────
   KATEGORISIDER — sticky verktøylinje + filter-sheet
───────────────────────────────────────────── */

/* Mobil-verktøylinje: skjult på desktop, sticky på mobil */
.dp-mobile-toolbar { display: none; }

@media (max-width: 768px) {
    /* Skjul sidebar — bruk sheet i stedet */
    .dp-filter-sidebar { display: none; }
    .dp-shop-layout { flex-direction: column; }

    /* Skjul desktop count/sort-bar på mobil */
    .dp-shop-main .dp-shop-toolbar { display: none; }

    /* .dp-mobile-toolbar-markup mangler i malen p.t. — inntil den bygges,
       gi den faktiske .dp-shop-toolbar (Filter/antall/Sorter i én rad) en
       mobiltilstand: treff-teksten får egen full-bredde linje i stedet for
       å klemmes mellom knappene og knekke ord for ord. */
    .dp-shop-toolbar {
        flex-wrap: wrap;
        gap: var(--space-2) var(--space-3);
    }
    .dp-shop-toolbar .dp-filter-toggle,
    .dp-shop-toolbar .dp-shop-sort {
        flex: 1 1 auto;
    }
    .dp-shop-count {
        flex-basis: 100%;
        order: -1;
        font-size: var(--text-xs);
        white-space: normal;
    }

    /* Sticky mobil-verktøylinje */
    .dp-mobile-toolbar {
        display: block;
        position: sticky;
        top: var(--header-height);
        z-index: 90;                     /* under scrim (250) — dekkes når drawer åpnes */
        background: var(--color-bg);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-2) 0;
    }
    .dp-mobile-toolbar__inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: var(--color-border);
    }
    .dp-mobile-toolbar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: var(--space-2);
        padding: var(--space-3);
        font-size: var(--text-sm);
        font-weight: 600;
        background: var(--color-bg);
        border: none;
        cursor: pointer;
        color: var(--color-text);
        min-height: 48px;
        letter-spacing: 0.03em;
    }
    .dp-mobile-toolbar__btn:hover { background: var(--color-bg-2); }
    .dp-mobile-toolbar__btn svg { width: 16px; height: 16px; flex-shrink: 0; }
}


/* Filter bottom-sheet */
.dp-filter-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 80dvh;
    background: var(--color-bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: bottom 0.3s ease;
}
.dp-filter-sheet.is-open { bottom: 0; }
@media (min-width: 769px) {
    .dp-filter-sheet { display: none !important; }
}

.dp-filter-sheet__drag {
    width: 36px;
    height: 4px;
    background: var(--color-border);
    border-radius: 2px;
    margin: var(--space-3) auto var(--space-2);
    flex-shrink: 0;
}
.dp-filter-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-5) var(--space-3);
    flex-shrink: 0;
}
.dp-filter-sheet__reset {
    font-size: var(--text-sm);
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    min-height: 44px;
}
.dp-filter-sheet__title {
    font-weight: 700;
    font-size: var(--text-base);
}
.dp-filter-sheet__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
}
.dp-filter-sheet__body {
    flex: 1;
    overflow-y: auto;
    padding: 0 var(--space-5);
    -webkit-overflow-scrolling: touch;
}
.dp-filter-sheet__footer {
    padding: var(--space-4) var(--space-5);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
    flex-shrink: 0;
}
.dp-filter-sheet__cta {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    font-weight: 700;
}

/* ─────────────────────────────────────────────
   PRODUKTSIDE — galleri swipe + sticky kjøpsbar
───────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Galleri: swipe.
       Høyde MUST defineres på galleriet (CSS grid) — ikke på img eller __main.
       __main har overflow-x:auto → height:auto her kollapser hvis bildets intrinsiske
       høyde overstyrer. Løsning: aspect-ratio på GALLERIET (grid, ikke flex) +
       overflow:hidden + height:100% nedover. position:static = ingen stacking context. */
    .dp-product-gallery {
        grid-template-columns: 1fr;
        position: static;
        aspect-ratio: 4/5;
        overflow: hidden;
        border-radius: var(--radius-lg);
    }
    .dp-product-gallery__main {
        display: flex;
        height: 100%;           /* fyller gallerets aspect-ratio-høyde */
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .dp-product-gallery__main::-webkit-scrollbar { display: none; }
    .dp-product-gallery__main img {
        flex: 0 0 100%;
        width: 100%;
        height: 100%;           /* fyller __main som igjen fyller gallerets faste høyde */
        object-fit: cover;
        scroll-snap-align: start;
    }
    .dp-product-gallery__thumbs { display: none; }

    /* Dot-indikator */
    .dp-gallery-dots {
        display: flex;
        justify-content: center;
        gap: var(--space-2);
        padding: var(--space-3) 0;
    }
    .dp-gallery-dots__dot {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--color-border);
        transition: background 0.2s, transform 0.2s;
    }
    .dp-gallery-dots__dot.is-active {
        background: var(--color-primary);
        transform: scale(1.4);
    }

}

/* Sort-sheet — samme shell som filter-sheet */
.dp-sort-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    transition: bottom 0.3s ease;
    max-height: 70dvh;
}
.dp-sort-sheet.is-open { bottom: 0; }
@media (min-width: 769px) {
    .dp-sort-sheet { display: none !important; }
}
.dp-sort-sheet__body {
    overflow-y: auto;
    padding: var(--space-2) 0 calc(var(--space-4) + env(safe-area-inset-bottom));
}
.dp-sort-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    color: var(--color-text);
    text-decoration: none;
    border-bottom: 1px solid var(--color-border);
    min-height: 56px;
}
.dp-sort-option.is-active { font-weight: 700; color: var(--color-primary); }
.dp-sort-option:last-child { border-bottom: none; }

/* Sticky «Legg i kurv»-bar */
.dp-product-sticky-cart {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--space-3) var(--space-4);
    padding-bottom: calc(var(--space-3) + env(safe-area-inset-bottom));
    z-index: 150;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.dp-product-sticky-cart.is-visible { display: block; }
@media (min-width: 769px) {
    .dp-product-sticky-cart { display: none !important; }
}
.dp-product-sticky-cart__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.dp-product-sticky-cart__info { flex: 1; min-width: 0; }
.dp-product-sticky-cart__name {
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dp-product-sticky-cart__price {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--color-primary);
}
.dp-product-sticky-cart__btn {
    flex-shrink: 0;
    padding: var(--space-3) var(--space-5);
    min-height: 48px;
    font-size: var(--text-base);
    font-weight: 700;
    white-space: nowrap;
}

/* ─────────────────────────────────────────────
   KURV & CHECKOUT — mobil
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dp-cart-layout { grid-template-columns: 1fr; }
    .dp-cart-summary { position: static; }
    .dp-cart-item { grid-template-columns: 72px 1fr auto; gap: var(--space-3); }

    .dp-checkout { grid-template-columns: 1fr; }
    .dp-order-summary { position: static; }
    .dp-form-row { grid-template-columns: 1fr; }

    /* Skjemafelt — min 48px */
    .dp-form-group input,
    .dp-form-group select,
    .dp-form-group textarea { min-height: 48px; }

    /* Ordre-tabellen (WooCommerce core review-order.php — ustylet <table>,
       aldri gitt en mobiltilstand). Rader blir flex-rader (label venstre,
       verdi høyre) i stedet for browserens standard tabell-layout, som
       klemmer "Produkt"/"Delsum"-kolonnene og knekker leveringsvalg-listen. */
    .dp-order-summary table.shop_table thead { display: none; }
    .dp-order-summary table.shop_table,
    .dp-order-summary table.shop_table tbody,
    .dp-order-summary table.shop_table tfoot { display: block; width: 100%; }
    .dp-order-summary table.shop_table tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: baseline;
        column-gap: var(--space-3);
        row-gap: var(--space-1);
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--color-border);
    }
    .dp-order-summary table.shop_table tr:last-child { border-bottom: none; }
    .dp-order-summary table.shop_table th,
    .dp-order-summary table.shop_table td {
        display: block;
        padding: 0;
        border: none;
        text-align: left;
    }
    .dp-order-summary table.shop_table th { font-weight: 600; flex-shrink: 0; }
    /* Leveringsvalg (radioliste) og lange produktnavn er for brede til å stå
       ved siden av label — la dem alltid ta hele bredden på egen linje. */
    .dp-order-summary table.shop_table .shipping td,
    .dp-order-summary table.shop_table .cart_item td.product-name {
        flex-basis: 100%;
    }
    .dp-order-summary table.shop_table ul#shipping_method {
        list-style: none; margin: var(--space-2) 0 0; padding: 0;
    }
    .dp-order-summary table.shop_table ul#shipping_method li { padding: var(--space-2) 0; }
}

/* Sticky betal-CTA (kurv + checkout) */
.dp-sticky-checkout-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: var(--space-4);
    padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom));
    z-index: 150;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
.dp-sticky-checkout-cta.is-visible { display: block; }
@media (min-width: 769px) {
    .dp-sticky-checkout-cta { display: none !important; }
}
.dp-sticky-checkout-cta__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.dp-sticky-checkout-cta__total {
    flex: 1;
    font-weight: 700;
    font-size: var(--text-lg);
}
.dp-sticky-checkout-cta__btn {
    flex-shrink: 0;
    padding: var(--space-3) var(--space-6);
    min-height: 52px;
    font-size: var(--text-base);
    font-weight: 700;
}

/* ─────────────────────────────────────────────
   HOVER-EFFEKTER → touch-safe
───────────────────────────────────────────── */
@media (max-width: 768px) {
    /* Hurtigkjøp + wishlist alltid synlig på mobil */
    .dp-product-card__actions { opacity: 1; transform: none; }
    .dp-product-card:hover .dp-product-card__actions { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────────
   GENERELLE MOBILTAP-TARGETS
───────────────────────────────────────────── */
@media (max-width: 768px) {
    .dp-pagination a,
    .dp-pagination button { min-width: 44px; min-height: 44px; }

    /* «Vis flere produkter» — full bredde, foretrukket foran nummerert paginering (MOBILE.md §4) */
    .dp-load-more__btn { width: 100%; min-height: 48px; }

    /* Sørg for ingen horisontal scroll — clip er bedre enn hidden, skaper ikke scroll-context */
    html, body { overflow-x: clip; }

    /* Breakpoint-normalisering: cart/retur/footer */
    .dp-cart-layout { grid-template-columns: 1fr; }
    .dp-footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 580px) {
    .dp-cart-item { grid-template-columns: 64px 1fr; }
    .dp-cart-item__qty { grid-column: 2; }
    .dp-cart-item__remove { grid-column: 2; }
}
