/*
 * Becca Design – site-custom.css (v23)
 * Endast designändringar som inte redan sköts av GeneratePress/WooCommerce.
 * Produktkolumner och responsiv produktgrid lämnas åt temat.
 * Enskilda produktsidor: single-product.css.
 */

:root {
    --bd-header: #e99fba;
    --bd-page-bg: #f3d3d5;
    --bd-surface: #fff9f8;
    --bd-ink: #342a33;
    --bd-rose: #863251;
    --bd-coral: #ef5c35;
    --bd-footer: #fff0f2;
}

/* Grundfärger och huvudmeny */
body,
.separate-containers .inside-article,
.separate-containers .page-header,
.separate-containers .comments-area {
    background: var(--bd-page-bg);
}
#masthead.site-header,
#site-navigation.main-navigation { background: var(--bd-header); }
#masthead.site-header {
    position: relative;
    z-index: 20;
    border-bottom: 1px solid rgba(112, 41, 69, .15);
    box-shadow: 0 5px 16px rgba(112, 41, 69, .06);
}
#site-navigation .main-nav > ul > li > a,
#site-navigation .menu-toggle,
#site-navigation .mobile-bar-items a { color: var(--bd-ink); }
#site-navigation .main-nav > ul > li > a:hover { color: var(--bd-rose); }
.main-nav { margin-top: 0; }

@media (min-width: 769px) {
    #masthead .inside-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
    #masthead #site-navigation { margin-left: auto; float: none; }
    #site-navigation .main-nav > ul > li:not(.wc-menu-item):not(.search-item) > a {
        background: transparent;
        font-size: 15px;
        font-weight: 600;
    }
    #site-navigation .main-nav ul.sub-menu {
        width: 255px;
        padding: 8px;
        background: var(--bd-surface);
        border: 1px solid #e9cad7;
        border-radius: 13px;
        box-shadow: 0 12px 30px rgba(92, 36, 59, .13);
    }
    #site-navigation .main-nav ul.sub-menu li a {
        padding: 10px 12px;
        color: var(--bd-ink);
        background: transparent;
        border-radius: 7px;
        font-size: 14px;
        text-transform: none;
        white-space: normal;
    }
    #site-navigation .main-nav ul.sub-menu li:hover > a,
    #site-navigation .main-nav ul.sub-menu li:focus-within > a {
        color: var(--bd-rose);
        background: #f8e1e9;
    }
}

/* Mobilheader: en rad. GeneratePress sköter menyns öppning/stängning. */
@media (max-width: 768px) {
    #masthead .inside-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
    }
    #masthead .site-logo { flex: 0 0 auto; margin: 0; }
    #masthead .site-logo img { display: block; width: clamp(105px, 33vw, 140px); height: auto; }

    #masthead #site-navigation {
        position: static;
        flex: 0 0 auto;
        float: none;
        width: auto;
        margin-left: auto;
        background: transparent;
    }
    #masthead #site-navigation .inside-navigation {
        position: static;
        display: flex;
        align-items: center;
        gap: 2px;
    }
    #masthead #site-navigation .mobile-bar-items {
        position: static;
        display: flex;
        align-items: center;
        float: none;
    }
    #masthead #site-navigation .mobile-bar-items a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 34px;
        height: 42px;
        padding: 0 5px;
        line-height: 1;
    }
    #masthead #site-navigation .wc-mobile-cart-items .cart-contents { gap: 5px; white-space: nowrap; }
    #masthead #site-navigation .wc-mobile-cart-items .number-of-items {
        position: static;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 19px;
        height: 19px;
        margin: 0;
        font-size: 11px;
        line-height: 1;
    }
    #masthead #site-navigation .menu-toggle {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 40px;
        width: 40px;
        height: 42px;
        margin: 0;
        padding: 0;
        background: transparent;
    }
    /* Texten "Meny" finns kvar för skärmläsare, men visas inte under ikonen. */
    #masthead #site-navigation .menu-toggle .mobile-menu {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }
    #site-navigation.toggled .main-nav {
        position: absolute;
        z-index: 5;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff7f9;
        box-shadow: 0 12px 20px rgba(92, 36, 59, .12);
    }
    #site-navigation.toggled .main-nav ul { background: #fff7f9; }
    #site-navigation.toggled .main-nav li a { color: var(--bd-ink); }
}

/* Arkivens info-/sorteringsrad */
.bd-product-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin: 28px 0 24px;
    padding: 15px 20px;
    background: var(--bd-surface);
    border-radius: 16px;
}
.bd-product-toolbar__left { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; }
.bd-product-toolbar__left > * { display: inline-flex; gap: 8px; align-items: center; }
.bd-product-count, .bd-product-feature { color: var(--bd-ink); font-size: 15px; }
.bd-product-count :is(i, svg), .bd-product-feature :is(i, svg) { color: var(--bd-coral); }
.bd-product-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.bd-product-sort span { margin-right: 7px; color: #716b72; }
.bd-product-sort a {
    padding: 7px 11px;
    color: var(--bd-ink);
    border-radius: 9px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.bd-product-sort a:is(:hover, .active) { background: #f8e1e9; color: var(--bd-rose); }
@media (max-width: 768px) {
    .bd-product-toolbar { flex-direction: column; align-items: stretch; }
    .bd-product-feature { display: none; }
    .bd-product-sort { border-top: 1px solid #eed9df; padding-top: 9px; }
}

/* Produktkort: avsiktligt INGA regler för ul.products grid/kolumner eller li-bredd! */
.woocommerce ul.products li.product {
    display: flex;
    flex-direction: column;
    position: relative;
    min-width: 0;
    padding: 11px;
    background: var(--bd-surface);
    border-radius: 17px;
    box-shadow: 0 5px 16px rgba(95, 39, 50, .05);
    text-align: left;
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    color: var(--bd-ink);
    text-decoration: none;
}
.woocommerce ul.products li.product .wc-product-image {
    position: relative;
    overflow: hidden;
    margin-bottom: 12px;
    border-radius: 11px;
    aspect-ratio: 1;
}
.woocommerce ul.products li.product .inside-wc-product-image { height: 100%; }
.woocommerce ul.products li.product .wc-product-image img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}
/* Ingen transform på bilderna – GP:s sekundärbild ska fortsätta fungera. */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0 2px 7px;
    min-height: 2.9em;
    padding: 0;
    color: var(--bd-ink);
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
    text-align: left;
}
/* Vänsterställ betyg och pris även när GP har centrerad produkttext. */
.woocommerce ul.products li.product.woocommerce-text-align-center .star-rating {
    float: none;
    align-self: flex-start;
    margin: 0 2px 7px;
}
/* Wrapper läggs bara runt betyg med recensioner av en liten PHP-filter. */
.woocommerce ul.products li.product.woocommerce-text-align-center .bd-card-rating {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 7px;
    margin: 0 2px 7px;
}
.woocommerce ul.products li.product.woocommerce-text-align-center .bd-card-rating .star-rating { margin: 0; }
.woocommerce ul.products li.product.woocommerce-text-align-center .bd-card-review-count {
    color: #826e77;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}
.woocommerce ul.products li.product.woocommerce-text-align-center .price {
    align-self: flex-start;
    width: auto;
    margin: auto 2px 10px;
    color: var(--bd-ink);
    font-size: 17px;
    font-weight: 700;
    text-align: left;
}
.woocommerce ul.products li.product .price ins { color: #bb432f; text-decoration: none; }
.woocommerce ul.products li.product a.button {
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    min-height: 40px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 11px;
    background: var(--bd-coral);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    white-space: normal;
}
.woocommerce ul.products li.product a.button:hover { background: #d94729; color: #fff; }
.woocommerce ul.products li.product a.added_to_cart { margin-top: 8px; font-size: 13px; }

/* [products]-shortcodes har egna WooCommerce-kolumner (inte GP:s arkivgrid). */
@media (min-width: 1025px) {
    .woocommerce.columns-4 ul.products.columns-4 > li.product {
        box-sizing: border-box;
        width: 23%;
        margin-right: 2.6%;
    }
    .woocommerce.columns-4 ul.products.columns-4 > li.product:nth-child(4n) {
        margin-right: 0;
    }
}
@media (max-width: 768px) {
    /* Endast shortcode-produkter i sidinnehåll; inte produktkategorier. */
    body.page .entry-content .woocommerce[class*="columns-"] > ul.products > li.product {
        box-sizing: border-box;
        float: none !important;
        clear: both !important;
        width: 100% !important;
        margin: 0 0 20px !important;
    }
}

/* Etiketter från functions.php */
.woocommerce ul.products li.product.best-seller .woocommerce-loop-product__link::before,
.woocommerce ul.products li.product.new-product .woocommerce-loop-product__link::after,
.woocommerce ul.products li.product :is(.sista-exemplaret, .kommer-strax) {
    position: absolute;
    z-index: 3;
    top: 10px;
    padding: 6px 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.1;
}
.woocommerce ul.products li.product.best-seller .woocommerce-loop-product__link::before {
    content: 'Populär!'; left: 10px; background: #ffe071; color: #443019;
}
.woocommerce ul.products li.product.new-product .woocommerce-loop-product__link::after {
    content: 'Nyhet!'; right: 10px; background: #f6d4e0; color: var(--bd-rose);
}
.woocommerce ul.products li.product :is(.sista-exemplaret, .kommer-strax) {
    left: 10px; background: #3a2d3c; color: #fff;
}
.woocommerce ul.products li.product.best-seller :is(.sista-exemplaret, .kommer-strax) { top: 44px; }

/* Minivarukorg: ingen undermenystyling får träffa produktlistan. */
#site-navigation #wc-mini-cart {
    width: min(365px, calc(100vw - 24px));
    padding: 0;
    background: var(--bd-surface);
    border: 1px solid #ecd5dd;
    border-radius: 15px;
    box-shadow: 0 12px 28px rgba(77, 39, 57, .14);
    overflow: hidden;
}
#site-navigation #wc-mini-cart :is(.inside-wc-mini-cart, .widget, .widget_shopping_cart_content) {
    padding: 0;
    margin: 0;
    background: transparent;
}
#site-navigation #wc-mini-cart ul.woocommerce-mini-cart {
    margin: 0;
    padding: 8px 15px;
    list-style: none;
    max-height: 360px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}
#site-navigation #wc-mini-cart li.mini_cart_item {
    position: relative;
    min-height: 78px;
    padding: 12px 30px 12px 70px;
    border: 0;
    border-bottom: 1px solid #eddee2;
    background: transparent;
    box-shadow: none;
}
#site-navigation #wc-mini-cart li.mini_cart_item::before,
#site-navigation #wc-mini-cart li.mini_cart_item::after,
#site-navigation #wc-mini-cart .woocommerce-mini-cart__buttons::before,
#site-navigation #wc-mini-cart .woocommerce-mini-cart__buttons::after { content: none; display: none; }
#site-navigation #wc-mini-cart li.mini_cart_item > a:not(.remove) {
    position: static;
    display: block;
    padding: 0;
    color: var(--bd-ink);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none;
}
#site-navigation #wc-mini-cart li.mini_cart_item img {
    position: absolute;
    top: 10px;
    left: 0;
    float: none;
    width: 58px;
    height: 58px;
    margin: 0;
    border-radius: 8px;
    object-fit: cover;
}
#site-navigation #wc-mini-cart li.mini_cart_item .quantity {
    display: block;
    margin-top: 4px;
    color: #705966;
    font-size: 13px;
}
#site-navigation #wc-mini-cart li.mini_cart_item > a.remove {
    position: absolute;
    top: 12px;
    right: 0;
    left: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f7e4ea;
    color: var(--bd-rose);
    font-size: 20px;
    line-height: 1;
}
#site-navigation #wc-mini-cart .woocommerce-mini-cart__total {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 13px 16px;
    background: #fff0f2;
    color: var(--bd-ink);
}
#site-navigation #wc-mini-cart .woocommerce-mini-cart__buttons {
    display: flex;
    gap: 8px;
    margin: 0;
    padding: 13px 15px 16px;
}
#site-navigation #wc-mini-cart .woocommerce-mini-cart__buttons .button {
    flex: 1;
    float: none;
    min-width: 0;
    min-height: 42px;
    margin: 0;
    padding: 10px 6px;
    border-radius: 10px;
    background: var(--bd-coral);
    color: #fff;
    font-size: 13px;
    text-align: center;
}
#site-navigation #wc-mini-cart .woocommerce-mini-cart__buttons .button:hover {
    background: #d94729;
    color: #fff;
}
/* Ingen popup där GP/WooCommerce inte fyller den. */
body.woocommerce-cart #wc-mini-cart,
body.woocommerce-checkout #wc-mini-cart { display: none; }
.cart-contents .number-of-items { background: var(--bd-rose); color: #fff; border-radius: 50%; }

/* Gemensamma smådetaljer */
.woocommerce .woocommerce-breadcrumb { font-size: 14px; }
.woocommerce .woocommerce-breadcrumb a { color: #b7483a; text-decoration: none; }
.wcpa_image label { display: flex; align-items: center; gap: 10px; }
fieldset.wcpa_field_wrap legend.wcpa_field_label { font-size: 1.1em; font-weight: 700; margin-bottom: 12px; }
.woocommerce-variation-add-to-cart-disabled { display: none; }
.subcategories-text-links { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.subcategories-text-links a { color: var(--bd-ink); text-decoration: none; }
.subcategories-text-links a:hover { color: var(--bd-rose); text-decoration: underline; }

/* Befintliga funktioner som inte bör ändras av en designrensning. */
.woocommerce-order { padding: clamp(16px, 3vw, 40px); }
.wc-block-review-sort-select { display: none; }
.masonry-container .page-header { display: none; }
#pwgc-redeem-gift-card-number,
#pwgc-redeem-button,
#pwgc-redeem-error { display: none; }
#pwgc-redeem-gift-card-form.active :is(#pwgc-redeem-gift-card-number, #pwgc-redeem-button, #pwgc-redeem-error) {
    display: block;
}

/* GP Elements-footer */
.site-footer { margin-top: 65px; background: var(--bd-footer); }
.bd-footer, .bd-footer * { box-sizing: border-box; }
.bd-footer {
    padding: 50px 0 25px;
    background: var(--bd-footer);
    border-top: 1px solid #ebcbd6;
    color: var(--bd-ink);
    font: 400 14px/1.65 'Montserrat', sans-serif;
}
.bd-footer .bd-footer__inner { max-width: 1480px; margin: 0 auto; padding: 0 30px; }
.bd-footer .bd-footer__columns.wp-block-columns { display: grid; grid-template-columns: 1.05fr 1.15fr .95fr; gap: 35px; }
.bd-footer .bd-footer__column { min-width: 0; }
.bd-footer .bd-footer__heading {
    margin: 0 0 22px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8c9d3;
    color: var(--bd-ink);
    font-size: 20px;
    font-weight: 700;
}
.bd-footer .bd-footer__intro, .bd-footer .bd-footer__newsletter-text { color: #70535f; }
.bd-footer .bd-footer__facts { padding: 0; margin: 0; list-style: none; }
.bd-footer .bd-footer__facts li,
.bd-footer .bd-footer__avg-time { margin: 0 0 12px; color: #513f4a; }
.bd-footer .bd-footer__facts strong,
.bd-footer .bd-footer__avg-time strong { color: var(--bd-ink); }
.bd-footer a { color: #7a3150; text-decoration: none; }
.bd-footer a:hover { color: #b44062; text-decoration: underline; }
.bd-footer .bd-footer__payment-methods { display: block; width: 300px; max-width: 100%; height: auto; margin: 16px 0; }
.bd-footer .bd-footer__useful-links { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 15px; }
.bd-footer .bd-footer__useful-links a { font-weight: 600; font-size: 13px; }

.bd-footer ul.bd-footer__news {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.bd-footer .bd-footer__news-card {
    position: relative;
    min-width: 0;
    aspect-ratio: 1.4;
    overflow: hidden;
    border-radius: 12px;
    background: #e8bdca;
}
.bd-footer .bd-footer__news-link { position: absolute; inset: 0; display: block; color: #fff; }
.bd-footer .bd-footer__news-image { display: block; width: 100%; height: 100%; object-fit: cover; }
.bd-footer .bd-footer__news-image--empty { background: #d783a3; }
.bd-footer .bd-footer__news-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 32px 10px 10px;
    background: linear-gradient(transparent, rgba(43, 20, 34, .85));
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
}
.bd-footer .bd-footer__more-news { margin-top: 14px; }
.bd-footer .bd-footer__newsletter .bd-footer__field { margin-bottom: 12px; }
.bd-footer .bd-footer__newsletter label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; }
.bd-footer .bd-footer__newsletter input {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #e5c9d1;
    border-radius: 10px;
    background: #fff;
}
.bd-footer .bd-footer__newsletter button {
    width: 100%;
    min-height: 46px;
    padding: 10px;
    border-radius: 10px;
    background: var(--bd-coral);
    color: #fff;
    font-weight: 700;
}
.bd-footer .bd-footer__socials { display: flex; gap: 10px; margin-top: 20px; }
.bd-footer .bd-footer__socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #e3bbc9;
    border-radius: 50%;
    background: #fff9f8;
}
.bd-footer .bd-footer__socials svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.bd-footer .bd-footer__bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 42px;
    padding-top: 18px;
    border-top: 1px solid #e8c9d3;
}
.bd-footer .bd-footer__bottom p { margin: 0; color: #775b68; font-size: 12px; }
@media (max-width: 1050px) { .bd-footer .bd-footer__columns.wp-block-columns { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px) {
    .bd-footer .bd-footer__columns.wp-block-columns { grid-template-columns: minmax(0,1fr); }
    .bd-footer .bd-footer__column:last-child { grid-column: auto; }
    .bd-footer .bd-footer__inner { padding: 0 20px; }
}

/* WooCommerce varukorg: endast utseende och desktop-layout. */
body.woocommerce-cart .inside-article,
body.woocommerce-checkout .inside-article { max-width: 1350px; margin-inline: auto; }
body.woocommerce-cart .entry-title { margin-bottom: 24px; }
body.woocommerce-cart .woocommerce-cart-form,
body.woocommerce-cart .cart-collaterals .cart_totals {
    overflow: hidden;
    background: var(--bd-surface);
    border: 1px solid #eddce0;
    border-radius: 18px;
    box-shadow: 0 6px 20px rgba(103, 53, 69, .04);
}
body.woocommerce-cart .cart-collaterals,
body.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: 100%; }
body.woocommerce-cart .woocommerce-cart-form table.shop_table,
body.woocommerce-cart .cart_totals table.shop_table { margin: 0; border: 0; background: transparent; }
body.woocommerce-cart .woocommerce-cart-form th { background: #faeff1; }
body.woocommerce-cart .woocommerce-cart-form :is(th, td) { padding: 14px 10px; }
body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 72px; border-radius: 10px; }
body.woocommerce-cart .woocommerce-cart-form .product-name a { color: var(--bd-ink); font-weight: 600; text-decoration: none; }
body.woocommerce-cart .woocommerce-cart-form .product-remove a.remove { color: var(--bd-rose); }
body.woocommerce-cart .woocommerce-cart-form td.actions { padding: 15px; }
body.woocommerce-cart .woocommerce-cart-form td.actions .coupon { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
body.woocommerce-cart .woocommerce-cart-form td.actions .coupon #coupon_code {
    width: 140px;
    min-height: 38px;
    margin: 0;
    border: 1px solid #e6d6db;
    border-radius: 9px;
    background: #fff;
    font-size: 13px;
}
body.woocommerce-cart .woocommerce-cart-form td.actions :is(button[name='apply_coupon'], button[name='update_cart']) {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid #e6d6db;
    border-radius: 9px;
    background: #fff5f6;
    color: #725064;
    font-size: 12px;
}
body.woocommerce-cart .cart-collaterals .cart_totals { padding: 22px; }
body.woocommerce-cart .cart_totals h2 { margin-bottom: 16px; font-size: 21px; }
body.woocommerce-cart .cart_totals :is(th, td) { background: transparent; font-size: 13px; }
body.woocommerce-cart .cart_totals input[type='radio'] { accent-color: var(--bd-rose); }
body.woocommerce-cart .wc-proceed-to-checkout { padding: 10px 0 0; text-align: center; }
body.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
    display: inline-block;
    width: auto;
    min-width: 220px;
    margin: 0;
    padding: 13px 20px;
    border-radius: 11px;
    background: var(--bd-coral);
    color: #fff;
    font-size: 14px;
}
body.woocommerce-cart :is(.woocommerce-message, .woocommerce-info, .cart-empty) {
    background: var(--bd-surface);
    color: var(--bd-ink);
    border-radius: 12px;
    border-left: 4px solid var(--bd-rose);
}
body.woocommerce-cart .return-to-shop a.button { padding: 12px 18px; border-radius: 10px; color: #fff; }
@media (min-width: 1080px) {
    body.woocommerce-cart .entry-content > .woocommerce {
        display: grid;
        grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
        align-items: start;
        gap: 24px;
    }
    /* Ta inte upp en gridcell för en tom meddelandebehållare. */
    body.woocommerce-cart .woocommerce-notices-wrapper:empty { display: none; }
    body.woocommerce-cart .woocommerce-notices-wrapper:not(:empty) { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    body.woocommerce-cart .woocommerce-cart-form,
    body.woocommerce-cart .cart-collaterals .cart_totals { width: 100%; }
    body.woocommerce-cart .cart-collaterals { margin-top: 20px; }
    body.woocommerce-cart .woocommerce-cart-form td.actions .coupon { float: none; }
    body.woocommerce-cart .woocommerce-cart-form td.actions .coupon #coupon_code { width: 100%; max-width: 180px; }
    body.woocommerce-cart .woocommerce-cart-form td.actions button[name='update_cart']:disabled { display: none; }
    body.woocommerce-cart .cart_totals .wc-proceed-to-checkout a.checkout-button { max-width: 100%; }

    /* Endast varukorgstabellen får mobilgrid. Produktarkiv lämnas till GP. */
    body.woocommerce-cart .woocommerce-cart-form table.cart,
    body.woocommerce-cart .woocommerce-cart-form table.cart tbody { display: block; width: 100%; }
    body.woocommerce-cart .woocommerce-cart-form table.cart thead { display: none; }
    body.woocommerce-cart .woocommerce-cart-form table.cart tr.cart_item {
        display: grid;
        grid-template-columns: 70px minmax(0, 1fr) 30px;
        align-items: start;
        gap: 6px 12px;
        padding: 14px;
        border-bottom: 1px solid #eddce0;
    }
    body.woocommerce-cart .woocommerce-cart-form table.cart tr.cart_item td {
        display: block !important;
        width: auto !important;
        min-width: 0;
        padding: 0 !important;
        border: 0;
        text-align: left !important;
    }
    body.woocommerce-cart .woocommerce-cart-form table.cart tr.cart_item td::before { display: none; }
    body.woocommerce-cart .woocommerce-cart-form .product-thumbnail { grid-column: 1; grid-row: 1 / span 4; }
    body.woocommerce-cart .woocommerce-cart-form .product-thumbnail img { width: 70px; }
    body.woocommerce-cart .woocommerce-cart-form .product-remove { grid-column: 3; grid-row: 1; }
    body.woocommerce-cart .woocommerce-cart-form .product-name { grid-column: 2; grid-row: 1; }
    body.woocommerce-cart .woocommerce-cart-form .product-price { grid-column: 2; grid-row: 2; }
    body.woocommerce-cart .woocommerce-cart-form .product-quantity { grid-column: 2; grid-row: 3; }
    body.woocommerce-cart .woocommerce-cart-form .product-subtotal { grid-column: 2; grid-row: 4; }
    body.woocommerce-cart .woocommerce-cart-form table.cart tr:last-child { display: block; }
}

/* Kassans yttre element; Svea-iframe lämnas oförändrad. */
body.woocommerce-checkout .entry-content {
    max-width: 1170px;
    margin-inline: auto;
    padding: clamp(18px, 3vw, 35px);
    background: var(--bd-surface);
    border-radius: 18px;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info {
    padding: 12px 16px;
    background: #fff2f5;
    color: #745d69;
    border-radius: 10px;
}
body.woocommerce-checkout .woocommerce-form-coupon-toggle a { color: var(--bd-rose); }
body.woocommerce-checkout #order_review table.shop_table { border-radius: 12px; background: #fff; }
body.woocommerce-checkout #order_review table.shop_table th,
body.woocommerce-checkout #order_review table.shop_table td { padding: 12px 14px; }
body.woocommerce-checkout .woocommerce-additional-fields textarea { width: 100%; border-radius: 10px; }

/* Vanliga infosidor – direkta innehållsrubriker, inte produktkort i [products]. */
body.page:not(.home):not(.woocommerce-page) .site-main > article.page {
    max-width: 1250px;
    margin-inline: auto;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content {
    padding: clamp(22px, 3vw, 40px);
    background: var(--bd-surface);
    border-radius: 18px;
    line-height: 1.75;
}
/* En sida med [products] ska inte få en extra vit panel runt produktkorten. */
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content:has(.woocommerce ul.products) {
    padding: 0;
    background: transparent;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content > :is(p, ul, ol, h2, h3, h4) {
    max-width: 900px;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content > h2 {
    margin-top: 32px;
    padding-bottom: 10px;
    border-bottom: 1px solid #edd9df;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content > h3 { margin-top: 24px; }
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content > :is(p, ul:not(.products), ol) a { color: var(--bd-rose); }
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .wp-block-image img { border-radius: 13px; }
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .wpforms-container {
    max-width: 720px;
    margin: 20px 0;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .wpforms-container :is(input[type='text'], input[type='email'], textarea) {
    width: 100%;
    max-width: 100%;
    border: 1px solid #e5d1d8;
    border-radius: 9px;
    background: #fff;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .wpforms-submit {
    min-width: 140px;
    padding: 12px 20px;
    border-radius: 10px;
    background: var(--bd-coral);
    color: #fff;
}
body.page:not(.home):not(.woocommerce-page) .site-main > article.page .wp-block-tag-cloud a {
    display: inline-block;
    margin: 3px;
    padding: 6px 10px;
    background: #fff0f3;
    border-radius: 20px;
    color: var(--bd-rose);
    font-size: 12px !important;
    text-decoration: none;
}
@media (max-width: 768px) {
    body.page:not(.home):not(.woocommerce-page) .site-main > article.page .entry-content { padding: 22px 18px; }
    body.page:not(.home):not(.woocommerce-page) .wp-block-image .alignright { float: none; margin: 0 0 20px; }
    .site-footer { margin-top: 45px; }
}

/* Blogg – enskilt inlägg. Hero-bilden ligger UTANFÖR #page i GeneratePress. */
body.single-post .featured-image.page-header-image-single {
    box-sizing: border-box;
    width: calc(100% - 40px);
    max-width: 1160px;
    margin: 32px auto 24px;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: 0 6px 22px rgba(87, 41, 57, .07);
}
body.single-post .featured-image.page-header-image-single img {
    display: block;
    width: 100%;
    height: auto;
}
body.single-post .site-main > article.post .inside-article,
body.single-post .comments-area {
    box-sizing: border-box;
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 54px);
    background: var(--bd-surface);
    border: 1px solid #efdde2;
    border-radius: 18px;
    box-shadow: 0 5px 20px rgba(87, 41, 57, .045);
}
body.single-post .site-main > article.post .entry-header,
body.single-post .site-main > article.post .entry-content {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}
body.single-post .site-main > article.post .entry-content { line-height: 1.75; }
body.single-post .site-main > article.post .entry-header .entry-meta {
    margin-bottom: 16px;
    color: #826774;
    font-size: 13px;
}
body.single-post .site-main > article.post .entry-content > h1 {
    margin-bottom: 24px;
    font-size: clamp(30px, 3.2vw, 42px);
    line-height: 1.2;
}
body.single-post .site-main > article.post .entry-content :is(p, ul, ol) { margin-bottom: 22px; }
body.single-post .site-main > article.post .wp-block-image img { border-radius: 12px; }
body.single-post .comments-area { margin-top: 24px; }
body.single-post .comments-area .comment-reply-title { margin-bottom: 18px; }
body.single-post .comments-area #commentform textarea,
body.single-post .comments-area #commentform input:not([type='submit']):not([type='hidden']) {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    background: #fff;
    border: 1px solid #e8cbd6;
    border-radius: 10px;
}
body.single-post .comments-area #commentform textarea:focus,
body.single-post .comments-area #commentform input:focus { border-color: var(--bd-rose); }
body.single-post .comments-area #commentform #submit {
    min-height: 44px;
    padding: 11px 22px;
    border: 0;
    border-radius: 11px;
    background: var(--bd-coral);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}
body.single-post .comments-area #commentform #submit:hover,
body.single-post .comments-area #commentform #submit:focus {
    background: #d94729;
    color: #fff;
}

/* Bloggarkiv – behåll GP:s 2/1-kolumnlayout och masonry. */
body.category-blogg #main { max-width: 1260px; margin: 0 auto; padding-top: 32px; }
body.category-blogg .generate-columns-container { margin-left: 0; }
body.category-blogg .masonry-container > .page-header {
    display: block;
    box-sizing: border-box;
    width: calc(100% - 20px);
    margin: 0 10px 18px;
    padding: 0 0 5px;
    background: transparent;
}
body.category-blogg .masonry-container > .page-header .page-title {
    margin: 0;
    font-size: clamp(30px, 3.2vw, 40px);
}
body.category-blogg .generate-columns-container > article.generate-columns {
    margin-bottom: 0;
    padding: 10px;
}
body.category-blogg article.generate-columns > .inside-article {
    padding: 0 24px 24px;
    overflow: hidden;
    border: 1px solid #efdde2;
    border-radius: 18px;
    background: var(--bd-surface);
    box-shadow: 0 5px 20px rgba(87, 41, 57, .055);
}
body.category-blogg article.generate-columns.no-featured-image-padding .inside-article > .post-image {
    margin: 0 -24px 20px;
}
body.category-blogg article.generate-columns .post-image img {
    display: block;
    width: 100%;
    height: 235px;
    object-fit: cover;
}
body.category-blogg article.generate-columns .entry-header .entry-meta {
    margin-bottom: 10px;
    color: #826774;
    font-size: 12px;
}
body.category-blogg article.generate-columns .entry-title {
    margin: 0 0 12px;
    font-size: clamp(21px, 2vw, 25px);
    line-height: 1.3;
    font-weight: 700;
}
body.category-blogg article.generate-columns .entry-title a { color: var(--bd-ink); text-decoration: none; }
body.category-blogg article.generate-columns .entry-title a:hover { color: var(--bd-rose); }
body.category-blogg article.generate-columns .entry-summary { font-size: 15px; line-height: 1.65; }
body.category-blogg article.generate-columns .entry-summary p { margin-bottom: 0; }
body.category-blogg article.generate-columns .entry-summary .read-more {
    color: var(--bd-rose);
    font-weight: 700;
    text-decoration: none;
}
body.category-blogg article.generate-columns footer.entry-meta {
    margin: 20px 0 0;
    padding-top: 12px;
    border-top: 1px solid #efdee3;
    font-size: 12px;
}
body.category-blogg article.generate-columns footer.entry-meta .cat-links { display: none; }
body.category-blogg article.generate-columns footer.entry-meta a { color: var(--bd-rose); }

@media (max-width: 768px) {
    body.single-post .featured-image.page-header-image-single {
        width: calc(100% - 24px);
        margin-top: 18px;
        margin-bottom: 18px;
        border-radius: 13px;
    }
    body.single-post .site-main > article.post .inside-article,
    body.single-post .comments-area { padding: 24px 20px; border-radius: 14px; }
    body.category-blogg #main { padding-top: 22px; }
    body.category-blogg article.generate-columns > .inside-article { padding: 0 18px 20px; }
    body.category-blogg article.generate-columns.no-featured-image-padding .inside-article > .post-image {
        margin: 0 -18px 17px;
    }
    body.category-blogg article.generate-columns .post-image img { height: 200px; }
}

/* Startsidan – text, bilder och recensioner inom samma innehållsbredd. */
body.home .entry-content > :is(h2.wp-block-heading, h3.wp-block-heading, p.wp-block-paragraph, ul.wp-block-list, .wp-block-image) {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}
body.home .entry-content > h2.wp-block-heading { margin-top: 42px; margin-bottom: 20px; }
body.home .entry-content > h3.wp-block-heading { margin-top: 30px; margin-bottom: 16px; }
body.home .entry-content > p.wp-block-paragraph { margin-bottom: 20px; line-height: 1.7; }
body.home .entry-content > ul.wp-block-list {
    box-sizing: border-box;
    padding-left: 34px;
}

/* Figuren (inte bara brödtexten) måste hålla sig inom maxbredden. */
body.home .entry-content > .wp-block-image figure.alignright {
    max-width: min(300px, 32%);
    margin: 0 0 22px 28px;
}

/* Köpinfo – färg och innehåll styrs fortsatt i Gutenberg. */
body.home .entry-content > .wp-block-group.has-background {
    width: 100%;
    max-width: 1180px;
    margin: 44px auto;
    border-radius: 18px;
    overflow: hidden;
}
body.home .entry-content > .wp-block-group.has-background > .wp-block-group__inner-container {
    padding: clamp(24px, 3.5vw, 48px);
}
body.home .entry-content > .wp-block-group.has-background h2 { margin-bottom: 18px; }
body.home .entry-content > .wp-block-group.has-background li { line-height: 1.7; }

/* WooCommerce Alla recensioner – rätt item-klass är __item. */
body.home .entry-content > .wc-block-all-reviews {
    max-width: 1180px;
    margin: 0 auto 42px;
}
body.home .wc-block-all-reviews .wc-block-review-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.home .wc-block-all-reviews .wc-block-review-list-item__item {
    box-sizing: border-box;
    min-width: 0;
    margin: 0;
    padding: 22px;
    background: var(--bd-surface);
    border: 1px solid #efdde3;
    border-radius: 16px;
    box-shadow: 0 4px 14px rgba(70, 32, 48, .04);
}
body.home .wc-block-all-reviews .wc-block-review-list-item__info { margin-bottom: 14px; }
body.home .wc-block-all-reviews .wc-block-review-list-item__meta { font-size: 14px; }
body.home .wc-block-all-reviews .wc-block-review-list-item__product { font-size: 15px; line-height: 1.4; }
body.home .wc-block-all-reviews .wc-block-review-list-item__image img { border-radius: 9px; }
body.home .wc-block-all-reviews .wc-block-review-list-item__text { color: #4b3d44; font-size: 15px; line-height: 1.6; }
body.home .wc-block-all-reviews .wc-block-review-list-item__text p:last-child { margin-bottom: 0; }

/* Kategoriernas extra beskrivning efter produktlistan.
   Nuvarande PHP ger <p class="term-description"><h2>… vilket webbläsaren
   delar upp i syskonelement. Följande väljer bara det avsnittet. */
body.tax-product_cat .wc-columns-container > .term-description,
body.tax-product_cat .wc-columns-container > .term-description ~ :is(h2, h3, h4, p, ul, ol, figure) {
    box-sizing: border-box;
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(20px, 3vw, 38px);
    padding-right: clamp(20px, 3vw, 38px);
}
body.tax-product_cat .wc-columns-container > .term-description ~ h2 { margin-top: 42px; }
body.tax-product_cat .wc-columns-container > .term-description ~ h3 { margin-top: 28px; }
body.tax-product_cat .wc-columns-container > .term-description ~ :is(ul, ol) { padding-left: clamp(44px, 5vw, 65px); }
body.tax-product_cat .wc-columns-container > .term-description ~ p img { max-width: 100%; height: auto; }

@media (max-width: 1050px) {
    body.home .wc-block-all-reviews .wc-block-review-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
    body.home .entry-content > .wp-block-image figure.alignright {
        float: none;
        max-width: min(300px, 100%);
        margin: 12px auto 24px;
    }
}
@media (max-width: 680px) {
    body.home .wc-block-all-reviews .wc-block-review-list { grid-template-columns: 1fr; }
    body.home .wc-block-all-reviews .wc-block-review-list-item__item { padding: 20px; }
    body.home .entry-content > .wp-block-group.has-background { margin: 32px auto; border-radius: 14px; }
}
