/**
 * WM Dynamic Woo – Frontend-styling
 * Enqueued via wmdw_enqueue_frontend_css() on Woo/shop pages (and header cart when enabled).
 */

/* ── Wrapper ────────────────────────────────────────────────────────────────── */
.wmdw-wrap {display: flex;
flex-direction: column;
gap: 2px;
line-height: 1.4; }

.wmdw-wrap .wmdw-regular {display: block; }

.wmdw-sale-row {display: inline-flex;
align-items: center;
gap: 6px;
flex-wrap: wrap;
line-height: 1.25; }

.wmdw-sale-row .wmdw-current {display: inline !important; }

.wc-block-components-product-price:has(.wmdw-wrap),
.wc-block-components-product-price:has(.wmdw-regular),
.wc-block-components-product-price:has(.wmdw-badge) {display: flex;
flex-direction: column;
align-items: flex-start; }

/* Default price colors for single/cart/checkout.
   Loop colors/sizes come from Shop Design (shop-card inline CSS). */
.wmdw-current,
.wmdw-qty-note {font-weight: 700;
text-decoration: none;
color: #a81000; }

.wmdw-regular {color: #999;
text-decoration: line-through; }

/* ── Membership badge (next to sale price) ──────────────────────────────────── */
.wmdw-badge,
.wmdw-wrap--role .wmdw-badge {display: inline-block;
width: auto;
padding: 4px;
margin: 0;
border-radius: 4px;
background: var(--wp--preset--color--dark-1);
color: var(--wp--preset--color--light-1);
font-size: 11px;
font-weight: 400;
letter-spacing: normal;
line-height: 1.2;
text-transform: none;
vertical-align: middle; }

/* ── Kundvagn & kassa – linjera upp snyggt i tabellen ───────────────────────── */
td.product-price .wmdw-wrap,
td.product-subtotal .wmdw-wrap {flex-direction: column;
gap: 1px; }

/* ── Customer Wishlist ──────────────────────────────────────────────────────── */
li.product,
.wc-block-grid__product,
.wmdw-has-wishlist {position: relative; }

/* Wishlist left, Sale right — Woo defaults sale to position:static (top-left). */
.wc-block-product-template .wp-block-woocommerce-product-image .wc-block-components-product-sale-badge,
.wc-block-product-template .wc-block-components-product-sale-badge,
ul.products li.product .onsale {
	position: absolute !important;
	top: 2px !important;
	right: 2% !important;
	left: auto !important;
	z-index: 4;
}

.wmdw-wishlist-heart {position: absolute;
top: 2px;
left: 2%;
right: auto;
z-index: 5;
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
padding: 0;
border: 0;
border-radius: 50%;
background: rgba(255, 255, 255, 0.92);
color: #555;
cursor: pointer;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
transition: color 0.15s ease, transform 0.15s ease; }

.wmdw-wishlist-heart:hover,
.wmdw-wishlist-heart:focus-visible {color: #c0392b;
transform: scale(1.05);
outline: none; }

.wmdw-wishlist-heart.is-active {color: #c0392b; }

.wmdw-wishlist-heart:disabled {opacity: 0.6;
cursor: wait; }

.wmdw-heart-icon {width: 20px;
height: 20px;
display: block; }

.wmdw-wishlist-heart.is-active .wmdw-heart-icon path {fill: currentColor; }
.wmdw-wishlist-remove {flex: 0 0 auto;
padding: 0 6px;
border: 0;
background: none;
color: inherit;
font-size: 20px;
line-height: 1;
opacity: 0.5;
cursor: pointer; }

.wmdw-wishlist-remove:hover,
.wmdw-wishlist-remove:focus-visible {opacity: 1;
color: #c0392b; }

.wmdw-wishlist-empty {margin: 1rem 0 2rem; }
.wmdw-wishlist-page .products {margin-top: 1rem; }

body.woocommerce-account .woocommerce-MyAccount-content {float: none;
width: 100%;
padding-top: 12px;
max-width: 800px;
margin-inline: auto; }

body.woocommerce-account .woocommerce form .form-row label {line-height: unset;
font-size: var(--wp--preset--font-size--size-1);
margin-bottom: 0; }

body.woocommerce-account.woocommerce-page form .form-row input.input-text,
body.woocommerce-account.woocommerce-page form .form-row select,
body.woocommerce-account.woocommerce-page form .form-row textarea.input-text {font-size: var(--wp--preset--font-size--size-1);
padding: 8px; }

body.woocommerce-account .account_display_name_description {display: none; }

body.woocommerce-account .addresses .title .edit {float: unset;
width: fit-content;
padding: 4px;
background: var(--wp--preset--color--dark-2);
color: var(--wp--preset--color--light-1);
border-radius: 6px;
font-size: 11px; }

body.woocommerce-account .woocommerce-MyAccount-content h2 {font-size: var(--wp--preset--font-size--size-5);
margin-top: 12px;
margin-bottom: 0; }

body.woocommerce-account .woocommerce table.my_account_orders .button {white-space: nowrap;
font-size: 12px;
padding: 4px;
width: 100px; }

/* Cart page + shared list (/cart/ + bulk) — one CSS for .wmdw-bulk-cart__table */
.woocommerce-cart main .woocommerce,
.wmdw-cart-page {max-width: unset !important; }

.wmdw-bulk-cart {margin-top: 0;
width: 100%; }

.wmdw-bulk-orders-page .wmdw-bulk-cart {margin-top: 2rem;
background: var(--wp--preset--color--light-1);
padding: 6px; }

.wmdw-bulk-cart.is-refreshing {opacity: 0.55;
pointer-events: none; }

.wmdw-bulk-cart__empty {margin: 0;
opacity: 0.7; }

.wmdw-bulk-cart .wmdw-bulk-cart__table {width: 100% !important;
max-width: none !important;
border-collapse: collapse;
table-layout: auto;
font-size: var(--wp--preset--font-size--size-1, 0.875rem); }

.wmdw-bulk-cart .wmdw-bulk-cart__table th,
.wmdw-bulk-cart .wmdw-bulk-cart__table td {padding: 8px 10px 8px 0;
text-align: left;
vertical-align: middle;
border-bottom: 1px solid rgba(0, 0, 0, 0.08); }

.wmdw-bulk-cart .wmdw-bulk-cart__th-remove,
.wmdw-bulk-cart .wmdw-bulk-cart__remove {width: 2rem;
padding-right: 4px;
text-align: center; }

.wmdw-bulk-cart .wmdw-bulk-cart__remove-link {color: #c62828;
font-size: 1.35rem;
line-height: 1;
text-decoration: none;
font-weight: 600; }

.wmdw-bulk-cart .wmdw-bulk-cart__remove-link:hover,
.wmdw-bulk-cart .wmdw-bulk-cart__remove-link:focus {color: #8e0000; }

.wmdw-bulk-cart .wmdw-bulk-cart__th-thumb,
.wmdw-bulk-cart .wmdw-bulk-cart__thumb {width: 60px;
padding-right: 10px; }

.wmdw-bulk-cart .wmdw-bulk-cart__img,
.wmdw-bulk-cart .wmdw-bulk-cart__thumb img {display: block;
width: 60px !important;
height: 60px !important;
object-fit: cover; }

.wmdw-bulk-cart .wmdw-bulk-cart__name {line-height: 1.3; }

.wmdw-bulk-cart .wmdw-bulk-cart__th-price,
.wmdw-bulk-cart .wmdw-bulk-cart__price,
.wmdw-bulk-cart .wmdw-bulk-cart__th-qty,
.wmdw-bulk-cart .wmdw-bulk-cart__qty,
.wmdw-bulk-cart .wmdw-bulk-cart__th-total,
.wmdw-bulk-cart .wmdw-bulk-cart__total {text-align: right !important;
white-space: nowrap; }

.wmdw-bulk-cart .wmdw-bulk-cart__price .wmdw-wrap,
.wmdw-bulk-cart .wmdw-bulk-cart__total .wmdw-wrap {align-items: flex-end;
width: 100%; }

.wmdw-bulk-cart .wmdw-bulk-cart__price .wmdw-sale-row,
.wmdw-bulk-cart .wmdw-bulk-cart__total .wmdw-sale-row {justify-content: flex-end; }

.wmdw-bulk-cart .wmdw-bulk-cart__qty .qty {width: 4.5rem;
max-width: 100%;
text-align: center;
padding: 4px 6px; }

.wmdw-bulk-cart .wmdw-qty-note {display: block;
margin-top: 4px;
font-size: 0.8em;
font-weight: 400;
white-space: normal; }

/* Quantity discount info (hover / focus – no JS). */
.wmdw-qty-info {position: relative;
display: flex;
line-height: 1;
width: 100%;
cursor: pointer;
justify-content: center; }

.wmdw-qty-info__label {background: var(--wp--preset--color--white);
font-size: 11px;
padding: 4px 6px;
border: 1px solid var(--wp--preset--color--dark-2);
border-radius: 4px;
color: var(--wp--preset--color--dark-1); }

.wmdw-qty-info__panel {display: none;
position: absolute;
bottom: 100%;
z-index: 9999;
min-width: 94px;
padding: 2px;
font-size: 13px;
line-height: 1;
background: var(--wp--preset--color--dark-2);
border: 1px solid var(--wp--preset--color--black);
color: var(--wp--preset--color--white); }

.wmdw-qty-info:hover .wmdw-qty-info__panel,
.wmdw-qty-info:focus-within .wmdw-qty-info__panel {display: block; }

.wmdw-qty-info.is-closed .wmdw-qty-info__panel,
.wmdw-qty-info.is-closed:hover .wmdw-qty-info__panel,
.wmdw-qty-info.is-closed:focus-within .wmdw-qty-info__panel, .woocommerce-store-notice {display: none !important; }

body.single-product .wmdw-qty-info {justify-content: left; }

.wmdw-qty-info__panel table {width: 100%;
border-collapse: separate;
border-spacing: 0 4px;
font-size: inherit; }

.wmdw-qty-info__panel th,
.wmdw-qty-info__panel td {padding: 0 !important;
border-bottom: unset !important;
text-align: left;
white-space: nowrap; }

.wmdw-qty-info__panel td:last-child {text-align: right; }

.wmdw-qty-info__panel tbody tr[data-qty] {cursor: pointer;
transition: background-color 0.5s, color 0.5s; }

.wmdw-qty-info__panel tbody tr[data-qty] td {padding: 6px !important;
border-top: 1px solid #fff !important;
border-bottom: 1px solid #fff !important;
transition: background-color 0.5s, color 0.5s; }

.wmdw-qty-info__panel tbody tr[data-qty] td:first-child {border-left: 1px solid #fff !important; }

.wmdw-qty-info__panel tbody tr[data-qty] td:last-child {border-right: 1px solid #fff !important; }

.wmdw-qty-info__panel tbody tr[data-qty]:hover,
.wmdw-qty-info__panel tbody tr[data-qty]:hover td {background-color: var(--wp--preset--color--white);
color: var(--wp--preset--color--dark-2); }

.wmdw-bulk-cart__qty .wmdw-qty-info {margin-top: 4px;
justify-content: flex-end;
text-align: right; }

.wmdw-bulk-cart .wmdw-bulk-cart__actions {display: flex;
justify-content: flex-end;
margin-top: 12px; }

.wmdw-bulk-cart .wmdw-bulk-cart__actions .wp-element-button,
.wmdw-bulk-cart button[name="update_cart"] {height: auto;
min-height: 0;
padding: 6px 12px !important;
font-size: 13px !important;
line-height: 1.3 !important; }

/* /cart/ mid: promo | totals on one row; stack ≤900px */
.wmdw-cart-page__mid {display: grid !important;
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
gap: 1rem;
align-items: start;
margin-top: 2rem;
width: 100%; }

.wmdw-cart-page__promo {min-width: 0;
width: auto !important;
float: none !important;
max-width: none !important; }

.wmdw-cart-page__totals {min-width: 0;
width: auto !important;
float: none !important;
max-width: none !important;
padding: 8px;
border: 2px solid var(--wp--preset--color--dark-2);
border-radius: 8px; }

.wmdw-cart-page__totals-title {font-size: var(--wp--preset--font-size--size-3, 1.1rem);
margin: 0 0 0.5rem;
line-height: 1.3; }

.wmdw-cart-page__totals-table {width: 100%;
border-collapse: collapse;
font-size: var(--wp--preset--font-size--size-1, 0.875rem); }

.wmdw-cart-page__totals-table th,
.wmdw-cart-page__totals-table td {padding: 4px 0;
line-height: 1.35;
vertical-align: top; }

.wmdw-cart-page__totals-table th {text-align: left;
font-weight: 600; }

.wmdw-cart-page__totals-table td {text-align: right; }

.wmdw-cart-page__totals-table .includes_tax {display: block;
font-weight: 400;
font-size: 0.9em; }

.wmdw-gift-offer {display: grid;
grid-template-columns: 60px minmax(0, 1fr) auto;
gap: 12px;
align-items: center;
margin-top: 1rem; }

.wmdw-gift-offer__img {display: block;
width: 60px;
height: 60px;
object-fit: cover; }

.wmdw-gift-offer__meta {min-width: 0; }

.wmdw-gift-offer__meta p {margin: 2px 0;
font-size: 0.875rem; }

.wmdw-gift-offer .price {display: block;
font-size: 0.875rem; }

.wmdw-cart-page__totals-inner {display: flex;
flex-direction: column; }

.wmdw-cart-page__totals-inner > .wp-element-button {display: inline-block;
align-self: flex-end;
margin-top: 0.75rem;
margin-left: auto;
text-decoration: none; }

.wmdw-cart-page__cross-sells {margin-top: 2.5rem;
width: 100%; }

/* Woo cross-sells → slim horizontal rows (qty + ATC from multi-buy) */
.wmdw-cart-page__cross-sells .wmdw-cart-cross-sells__title {margin: 0 0 0.75rem;
font-size: 1rem;
font-weight: 600;
line-height: 1.3; }

.wmdw-cart-page__cross-sells ul.products {display: flex !important;
flex-direction: column !important;
gap: 0;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
float: none !important; }

.wmdw-cart-page__cross-sells ul.products::before,
.wmdw-cart-page__cross-sells ul.products::after {display: none !important;
content: none !important; }

.wmdw-cart-page__cross-sells ul.products li.product,
.wmdw-cart-page__cross-sells li.product {width: 100% !important;
max-width: 800px !important;
float: none !important;
margin: 0 !important;
padding: 4px !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
display: flex !important;
flex-direction: row !important;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
gap: 12px;
text-align: left !important; }

.wmdw-cart-page__cross-sells ul.products li.product a.woocommerce-loop-product__link,
.wmdw-cart-page__cross-sells .woocommerce ul.products li.product a.woocommerce-loop-product__link {display: flex !important;
flex-direction: row;
align-items: center;
gap: 12px;
min-width: 0;
flex: 1 1 auto;
text-decoration: none; }

.wmdw-cart-page__cross-sells ul.products li.product a img,
.wmdw-cart-page__cross-sells ul.products li.product img {width: 60px !important;
height: 63px !important;
object-fit: cover;
margin: 0 !important;
flex: 0 0 60px;
border-radius: 4px !important; }

.wmdw-cart-page__cross-sells ul.products li.product .woocommerce-loop-product__title,
.wmdw-cart-page__cross-sells ul.products li.product .wp-block-post-title {font-size: 0.95rem !important;
margin: 0 !important;
flex: 1 1 auto;
min-width: 0;
text-align: left; }

.wmdw-cart-page__cross-sells .onsale,
.wmdw-cart-page__cross-sells span.onsale,
.wmdw-cart-page__cross-sells .woocommerce-loop-product__link .onsale {display: none !important; }

.wmdw-cart-page__cross-sells ul.products li.product .price {margin: 0 !important;
font-size: 0.875rem;
white-space: nowrap;
text-align: right; }

.wmdw-cart-page__cross-sells .price .wmdw-wrap {display: flex;
flex-direction: column;
align-items: flex-end;
gap: 2px; }

.wmdw-cart-page__cross-sells .price .wmdw-sale-row {display: inline-flex;
align-items: center;
gap: 6px; }

.wmdw-cart-page__cross-sells ul.products li.product .wmdw-loop-cart {display: inline-flex;
align-items: center;
gap: 8px;
flex: 0 0 auto;
margin-left: 0; }

.wmdw-cart-page__cross-sells ul.products li.product .quantity .qty {width: 4.5rem;
text-align: center;
padding: 4px 6px; }

.wmdw-bulk-orders .wmdw-bulk-cart__heading,
.wmdw-bulk-orders-page .wmdw-bulk-cart__heading {margin: 2rem 0 0.75rem;
font-size: 1.1rem;
font-weight: 600;
line-height: 1.3; }

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

/* If a Cart Block shell remains, never leave it stuck in skeleton mode. */
body.woocommerce-cart .wc-block-components-loading-mask,
body.woocommerce-cart .wc-block-components-spinner,
body.woocommerce-cart .wp-block-woocommerce-cart.is-loading .wc-block-components-skeleton {display: none !important; }

/* Dölj sidans H1 – inte produkttitlar i cross-sells. */
body.woocommerce-cart .wp-block-post-title {display: none; }
body.woocommerce-cart .wmdw-cart-page__cross-sells .wp-block-post-title,
body.woocommerce-cart .wmdw-cart-page__cross-sells .woocommerce-loop-product__title {display: revert; }

/* Checkout + order confirmation */
.wc-block-components-totals-footer-item .wc-block-components-totals-footer-item-tax {
	display: flex;
	justify-content: end;
	width: 100%;
	text-align: right;
}

.wc-block-order-confirmation-status h1 {
	font-size: var(--wp--preset--font-size--size-6);
	margin-bottom: 0;
}

.wc-block-order-confirmation-status p {
	font-size: var(--wp--preset--font-size--size-4);
}

body.wmdw-account-wishlist .wmdw-wishlist-page ul.products li.product {align-items: center;
display: flex;
flex-direction: column; }

body.wmdw-account-wishlist .woocommerce ul.products li.product .button {display: inline-block;
margin: 0;
font-size: 13px;
padding: 2px 4px; }

/* ── Header shopping cart ───────────────────────────────────────────────────── */
.wmdw-shopping-cart-link[hidden] {display: none !important; }

.wmdw-shopping-cart-link {display: inline-grid !important;
place-items: center;
padding: 0 10px;
transition: background 0.6s, color 0.4s; }

.wmdw-shopping-cart-icon,
.wmdw-shopping-cart-count {grid-area: 1 / 1; }

.wmdw-shopping-cart-icon {width: 32px; height: 32px;}

.wmdw-shopping-cart-count {font-size: 11px; margin: 4px 2px 6px 6px; }

.wmdw-shopping-cart-count.is-empty {visibility: hidden; }

/* ── WM-Menu logo payoff (styling — inte i wm-menu) ───────────────────────── */
.wm-menu-logo-top__payoff { margin: 0;}

@media (max-width: 1000px) {.wm-menu-logo-at-top .wm-menu-logo-top__payoff {display: none !important; }
}

/* ── Butikskatalog ─────────────────────────────────────────────────────────── */
:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .woocommerce-result-count,
:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .woocommerce.wc-block-product-results-count,
:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .wc-block-product-results-count {display: none !important; }

:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .woocommerce-ordering,
:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .woocommerce-ordering select,
:is(body.woocommerce-shop, body.tax-product_cat, body.tax-product_tag, body.wmdw-product-catalog) .wmdw-shop-category-filter {font-size: var(--wp--preset--font-size--size-1); }

.wmdw-shop-toolbar {align-items: center;
display: flex;
justify-content: space-around;
padding: 4px;
position: sticky;
top: 0;
z-index: 5; }

.wmdw-shop-toolbar .wc-block-catalog-sorting {margin: 0; }

.wmdw-shop-category-filter-wrap {display: flex;
align-items: center; }

.wmdw-shop-category-filter {cursor: pointer; }

/* Product breadcrumbs: category thumbnail before title. */
.woocommerce .woocommerce-breadcrumb {
	margin: 4px 0 0;
	font-size: var(--wp--preset--font-size--size-1);
}

.wmdw-product-breadcrumb .wmdw-breadcrumb-cat {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	vertical-align: middle;
	border: 1px solid var(--wp--preset--color--dark-2);
	padding: 4px;
	border-radius: 8px;
	color: var(--wp--preset--color--dark-2);
	background: var(--wp--preset--color--white);
	transition: background-color 0.5s ease, color 0.5s ease;
}

.wmdw-product-breadcrumb .wmdw-breadcrumb-cat:hover {
	background-color: var(--wp--preset--color--light-1);
	color: var(--wp--preset--color--dark-1);
}

.wmdw-product-breadcrumb .wmdw-breadcrumb-cat__thumb {
	width: 48px;
	height: 32px;
	object-fit: cover;
	border-radius: 8px;
}

/* Shop Design → Sliders: sticky bar only.
   Colors / radius come from wm-slider “Inherit menu colors”.
   Layout gap (margin-block-start) is cancelled in wm-slider CSS. */
.wmdw-shop-slider {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 6px 0;
	box-sizing: border-box;
}

.wmdw-shop-slider > .wm-slider.wm-slider--inherit-menu-colors {
	margin-block: -6px;
	padding-block: 6px;
	box-sizing: border-box;
}

/* WP content widths (Shop Design → Sliders → Narrow / Wide / Full). */
.wmdw-shop-slider.alignwide {
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 100%);
	margin-left: auto;
	margin-right: auto;
}

.wmdw-shop-slider.alignfull {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	box-sizing: border-box;
}

/* Continuous feed sentinel – invisible trigger below the product grid. */
.wmdw-feed-hit {
	width: 100%;
	height: 1px;
	margin: 0;
	padding: 0;
	border: 0;
	pointer-events: none;
}

/* Continuous feed: hide pagination (class is on <html> from JS). */
html.wmdw-infinite-products .wp-block-query-pagination,
html.wmdw-infinite-products .woocommerce-pagination,
html.wmdw-infinite-products .wc-block-pagination,
.wmdw-product-feed .wp-block-query-pagination {
	display: none !important;
}

/* Shop Design: hide catalog sorting toolbar site-wide. */
body.wmdw-hide-default-sorting .wmdw-shop-toolbar {
	display: none !important;
}

/* Woo-grid+gap: min-width:0 så kort inte trycks utanför skärmen. */
.wc-block-product-template__responsive,
.wc-block-product-template__responsive > li,
ul.products > li.product {min-width: 0; }

/* alignfull: tema sätter margin-left negativ fel i nested context – nollställ. */
.wp-block-woocommerce-product-collection.alignfull {margin-left: 0;
margin-right: 0; }

/* Shortcode-loop: Woos .columns-N → lika radhöjd, utan att gissa kolumnantal. */
body:not(.woocommerce-cart) ul.products[class*="columns-"] {display: grid;
align-items: stretch; }

body:not(.woocommerce-cart) ul.products[class*="columns-"]::before,
body:not(.woocommerce-cart) ul.products[class*="columns-"]::after {content: none;
display: none; }

body:not(.woocommerce-cart) ul.products.columns-2 {grid-template-columns: repeat(2, minmax(0, 1fr)); }
body:not(.woocommerce-cart) ul.products.columns-3 {grid-template-columns: repeat(3, minmax(0, 1fr)); }
body:not(.woocommerce-cart) ul.products.columns-4 {grid-template-columns: repeat(4, minmax(0, 1fr)); }
body:not(.woocommerce-cart) ul.products.columns-5 {grid-template-columns: repeat(5, minmax(0, 1fr)); }
body:not(.woocommerce-cart) ul.products.columns-6 {grid-template-columns: repeat(6, minmax(0, 1fr)); }

body:not(.woocommerce-cart) ul.products[class*="columns-"] > li.product {float: none;
margin-right: 0; }

/* Produktkort – struktur (utseende styrs av genererad wmdw-shop-card.css). */
.wc-block-product-template__responsive > li.wc-block-product {display: flex;
flex-direction: column;
height: 100%; }

ul.products > li.product {display: flex;
flex-direction: column; }

.wc-block-product-template .wc-block-product,
ul.products li.product {box-sizing: border-box; }

/* Lika bildhöjd i grid – center crop, alltid samma ruta. */
.wc-block-product-template .wp-block-woocommerce-product-image {
	position: relative;
	aspect-ratio: 1 / 1;
	width: 100%;
	overflow: hidden;
}

.wc-block-product-template .wp-block-woocommerce-product-image a {
	display: block;
	width: 100%;
	height: 100%;
}

.wc-block-product-template .wp-block-woocommerce-product-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

ul.products li.product img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	object-position: center center;
}

.wc-block-product-template .wp-block-woocommerce-product-button {margin-top: auto;
width: 100%;
display: flex;
justify-content: center; }

ul.products li.product .button,
ul.products li.product .add_to_cart_button {margin-top: auto;
align-self: center; }

.wc-block-product-template .wp-block-post-title,
ul.products li.product .woocommerce-loop-product__title {line-height: 1;
text-align: center; }

.wc-block-product-template .wmdw-card-excerpt,
ul.products li.product .wmdw-card-excerpt {text-align: center;
margin: 0 0 0.75rem; }

.wc-block-product-template .wc-block-components-product-price,
ul.products li.product .price {display: flex;
flex-direction: column;
align-items: center;
text-align: center; }

.wc-block-product-template .wmdw-wrap,
ul.products li.product .wmdw-wrap {align-items: flex-end;
text-align: center; }

.wc-block-product-template .wc-block-components-product-price del,
.wc-block-product-template .wc-block-components-product-price .wmdw-regular,
ul.products li.product .price del,
ul.products li.product .price .wmdw-regular {display: block; }

.wc-block-product-template .wc-block-components-product-price .wmdw-sale-row,
ul.products li.product .price .wmdw-sale-row {display: inline-flex;
align-items: center;
gap: 6px;
justify-content: center; }

.wc-block-product-template .wc-block-components-product-price .wmdw-sale-row ins,
.wc-block-product-template .wc-block-components-product-price .wmdw-sale-row .wmdw-current,
.wc-block-product-template .wc-block-components-product-price .wmdw-sale-row .wmdw-badge,
ul.products li.product .price .wmdw-sale-row ins,
ul.products li.product .price .wmdw-sale-row .wmdw-current,
ul.products li.product .price .wmdw-sale-row .wmdw-badge {display: inline-block !important; }

.wc-block-product-template .wc-block-components-product-price ins:not(.wmdw-sale-row *),
.wc-block-product-template .wc-block-components-product-price .wmdw-current:not(.wmdw-sale-row *),
ul.products li.product .price ins:not(.wmdw-sale-row *),
ul.products li.product .price .wmdw-current:not(.wmdw-sale-row *) {display: block; }

.wc-block-product-template .wp-block-woocommerce-product-button .wp-element-button,
ul.products li.product :is(a.button, button.button, .add_to_cart_button) {line-height: 28px;
padding: 2px 6px;
border-radius: 4px; }

/* Hover-invertering – samma mönster som admin-preview (tema slår annars ut genererad :hover på /butik). */
.wc-block-product-template .wp-block-woocommerce-product-button :is(.wp-element-button, .add_to_cart_button):hover,
.wc-block-product-template .wp-block-woocommerce-product-button :is(.wp-element-button, .add_to_cart_button):focus-visible,
ul.products li.product :is(a.button, button.button, .add_to_cart_button):hover,
ul.products li.product :is(a.button, button.button, .add_to_cart_button):focus-visible {color: var(--wmdw-btn-hover-color) !important;
background-color: var(--wmdw-btn-hover-bg) !important; }

/* ── Butikssida – verktygsrad m.m. ─────────────────────────────────────────── */
.wmdw-loop-cart {display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
gap: 6px;
width: 100%; }

.wmdw-loop-cart .quantity {margin: 0; }

.woocommerce .quantity .qty {width: 40px;
text-align: right; }

.wmdw-loop-cart .qty {border-radius: 4px;
border: 1px solid;
line-height: 28px; }

.wmdw-loop-cart .wp-element-button,
.wmdw-loop-cart .add_to_cart_button {line-height: 28px;
padding: 2px 6px;
border-radius: 4px; }

/* WooCommerce lägger till "Visa varukorg" efter ajax – dölj i rutnät */
:is(.wc-block-product-template, ul.products) .added_to_cart,
:is(.wc-block-product-template, ul.products) a.added_to_cart.wc-forward,
.wmdw-bulk-orders .added_to_cart,
.wmdw-bulk-orders a.added_to_cart.wc-forward {display: none !important; }

/* ── Enskild produkt ─────────────────────────────────────────────────────────── */
body.single-product :not(.wp-block-woocommerce-product-collection) :is(.woocommerce span.onsale, .wc-block-components-product-sale-badge),
body.single-product .wp-block-columns :is(.woocommerce span.onsale, .wc-block-components-product-sale-badge) {display: none !important; }

body.single-product .wmdw-wrap {display: flex;
flex-direction: column;
align-items: flex-end;
line-height: 1.2;
font-size: var(--wp--preset--font-size--size-3); }

body.single-product .wmdw-sale-row {display: inline-flex;
align-items: center;
gap: 6px; }

body.single-product .wp-block-woocommerce-product-price {margin-block-start: 0; }

body.single-product .wc-block-add-to-cart-form form {padding: 0; }

body.single-product .wc-block-add-to-cart-form .single_add_to_cart_button {font-size: var(--wp--preset--font-size--size-2);
padding: 4px 8px;
border-radius: 6px; }

body.single-product .wp-block-woocommerce-product-meta {font-size: var(--wp--preset--font-size--size-1); }

/* ── WooCommerce – generellt ─────────────────────────────────────────────────── */
.woocommerce-Tabs-panel--description h5 {color: var(--wp--preset--color--dark-2);
font-size: var(--wp--preset--font-size--size-3);
margin: 0; }

.product .wp-block-post-excerpt,
.product #payment-method-message {margin: 0; }

.wp-block-woocommerce-product-price + #payment-method-message {height: fit-content; }

.product #payment-method-message *,
.u-fs-sm {font-size: 11px !important; }

/* ── EAN-streckkod ───────────────────────────────────────────────────────────── */
.wmdw-ean {margin-block-start: 0; }

.wmdw-ean-barcode {display: flex;
flex-direction: column;
align-items: flex-start;
gap: 4px;
max-width: 170px; }

.wmdw-ean-barcode svg {display: block;
width: 100%;
height: auto; }

.wmdw-ean-number {font-size: var(--wp--preset--font-size--size-1);
font-variant-numeric: tabular-nums;
letter-spacing: 0.04em; }

/* ── Frontend search ([wmdw_product_search]) ─────────────────────────────────── */
.wmdw-search {position: relative;
width: 100%;
max-width: 480px; }

.wmdw-search--compact {max-width: 260px; }

.wmdw-search__form {position: relative;
margin: 0; }

.wmdw-search__label {display: block;
font-weight: 600;
margin-bottom: 6px; }

.wmdw-search__field {position: relative;
display: flex;
align-items: center; }

.wmdw-search__icon {position: absolute;
left: 12px;
display: flex;
color: #888;
pointer-events: none; }

.wmdw-search__input {width: 100%;
padding: 10px 40px 10px 38px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 16px;
line-height: 1.4;
background: #fff; }

.wmdw-search__input:focus {outline: none;
border-color: #2c3e50;
box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.12); }

.wmdw-search__spinner {position: absolute;
right: 12px;
width: 16px;
height: 16px;
border: 2px solid #ddd;
border-top-color: #2c3e50;
border-radius: 50%;
animation: wmdw-search-spin 0.6s linear infinite; }

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

.wmdw-search__results {position: absolute;
z-index: 50;
top: calc(100% + 6px);
left: 0;
right: 0;
margin: 0;
padding: 6px;
list-style: none;
background: var(--wp--preset--color--white);
color: var(--wp--preset--color--dark-1);
border: 1px solid #e2e2e2;
border-radius: 10px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
max-height: 60vh;
overflow-y: auto; }

.wmdw-search__heading {padding: 8px 10px 4px;
font-size: 0.72em;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
color: var(--wp--preset--color--dark-1);
opacity: 0.65; }

.wmdw-search__item {margin: 0; }

.wmdw-search__link {display: flex;
align-items: center;
gap: 12px;
padding: 8px 10px;
border-radius: 8px;
text-decoration: none;
color: var(--wp--preset--color--dark-1); }

.wmdw-search__item.is-active .wmdw-search__link,
.wmdw-search__link:hover {background: color-mix(in srgb, var(--wp--preset--color--dark-1) 8%, var(--wp--preset--color--white)); }

.wmdw-search__thumb {width: 40px;
height: 40px;
flex: 0 0 40px;
object-fit: cover;
border-radius: 6px;
background: color-mix(in srgb, var(--wp--preset--color--dark-1) 6%, var(--wp--preset--color--white)); }

.wmdw-search__link--no-thumb {padding-left: 12px; }

.wmdw-search__text {display: flex;
flex-direction: column;
min-width: 0; }

.wmdw-search__name {font-weight: 600;
color: var(--wp--preset--color--dark-1);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }

.wmdw-search__price {font-size: 0.85em;
color: var(--wp--preset--color--dark-1);
opacity: 0.75; }

.wmdw-search__price del {opacity: 0.55;
margin-right: 4px; }

.wmdw-search__empty {padding: 14px 12px;
color: var(--wp--preset--color--dark-1);
opacity: 0.65;
text-align: center; }

.wmdw-search__viewall {margin-top: 4px;
border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--dark-1) 12%, var(--wp--preset--color--white)); }

.wmdw-search__viewall-link {display: block;
padding: 10px;
text-align: center;
font-weight: 600;
text-decoration: none;
color: var(--wp--preset--color--dark-1); }

.wmdw-search__viewall-link:hover {background: color-mix(in srgb, var(--wp--preset--color--dark-1) 8%, var(--wp--preset--color--white));
border-radius: 8px; }

@media (max-width: 600px) {
.wmdw-search,
.wmdw-search--compact {max-width: 100%; }
}

/* ── Bulk orders ([wmdw_bulk_orders]) ────────────────────────────────────────── */
.wmdw-bulk-orders {width: 100%;
max-width: none; }

.wmdw-bulk-orders.is-loading .wmdw-bulk-orders__list {opacity: 0.45;
pointer-events: none; }

.wmdw-bulk-orders__toolbar {display: flex;
align-items: center;
gap: 12px;
margin-bottom: 12px;
flex-wrap: wrap; }

.wmdw-bulk-orders__category,
.wmdw-bulk-orders__price-group {min-width: 200px;
padding: 8px 10px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 15px;
background: #fff; }

.wmdw-bulk-orders__cat-search {position: relative;
min-width: 200px;
flex: 1 1 220px;
max-width: 320px; }

.wmdw-bulk-orders__cat-input {width: 100%;
box-sizing: border-box;
padding: 8px 10px;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 15px;
background: #fff; }

.wmdw-bulk-orders__cat-results {position: absolute;
z-index: 30;
left: 0;
right: 0;
top: calc(100% + 4px);
margin: 0;
padding: 4px 0;
list-style: none;
max-height: 240px;
overflow: auto;
background: #fff;
border: 1px solid #ccc;
border-radius: 6px;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08); }

.wmdw-bulk-orders__cat-option {padding: 8px 10px;
cursor: pointer;
font-size: 14px;
line-height: 1.3; }

.wmdw-bulk-orders__cat-option:hover,
.wmdw-bulk-orders__cat-option:focus {background: color-mix(in srgb, var(--wp--preset--color--dark-1) 8%, #fff); }

.wmdw-bulk-orders__cat-empty {padding: 8px 10px;
font-size: 13px;
opacity: 0.65; }

.wmdw-bulk-orders__count {font-size: 0.9em;
opacity: 0.7; }

.wmdw-bulk-orders__list {display: flex;
flex-direction: column;
gap: 6px;
border-top: none; }

.wmdw-bulk-orders__row {display: flex;
align-items: center;
gap: 12px;
padding: 6px;
background: var(--wp--preset--color--light-2);
border-bottom: none; }

.wmdw-bulk-orders__thumb {flex: 0 0 48px;
width: 48px;
height: 48px;
display: block;
overflow: hidden;
border-radius: 4px;
background: #f3f3f3; }

.wmdw-bulk-orders__img,
.wmdw-bulk-orders__thumb img {display: block;
width: 100%;
height: 100%;
object-fit: cover; }

.wmdw-bulk-orders__info {flex: 1 1 auto;
min-width: 0;
display: flex;
flex-direction: column;
gap: 2px; }

.wmdw-bulk-orders__name {font-weight: 600;
text-decoration: none;
color: inherit;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis; }

.wmdw-bulk-orders__actions {flex: 0 0 auto;
margin-left: auto; }

.wmdw-bulk-orders__cart {display: flex;
align-items: center;
gap: 8px; }

.wmdw-bulk-orders__qty {display: inline-flex;
align-items: center;
gap: 0;
margin: 0; }

.wmdw-bulk-orders__qty .qty {width: 72px;
height: 32px;
margin: 0;
padding: 0 6px;
border: 1px solid #ccc;
border-radius: 4px;
text-align: center;
font-size: 14px; }

.wmdw-bulk-orders__actions .button,
.wmdw-bulk-orders__cart .button {padding: 6px 12px;
font-size: 13px;
line-height: 1.3;
white-space: nowrap; }

.wmdw-bulk-orders__cart .ajax_add_to_cart.is-disabled {opacity: 0.45;
pointer-events: none;
cursor: not-allowed; }

.wmdw-bulk-orders__price {font-size: 0.9em;
line-height: 1.25; }

.wmdw-bulk-orders__price .wmdw-wrap {display: inline-flex;
flex-direction: column;
align-items: flex-start;
flex-wrap: nowrap;
gap: 2px;
line-height: 1.3; }

.wmdw-bulk-orders__price .wmdw-wrap .wmdw-regular,
.wmdw-bulk-orders__price .wmdw-regular {display: block; }

.wmdw-bulk-orders__price .wmdw-sale-row {display: inline-flex;
align-items: center;
gap: 6px; }

.wmdw-bulk-orders__price .wmdw-sale-row .wmdw-current,
.wmdw-bulk-orders__price .wmdw-sale-row .wmdw-badge {display: inline-block; }

.wmdw-bulk-orders__price .wmdw-badge {margin: 0; }

/* Hide number spinners only on /bulk-orders/ (shortcode wrapper). */
.wmdw-bulk-orders-page input.qty::-webkit-outer-spin-button,
.wmdw-bulk-orders-page input.qty::-webkit-inner-spin-button {-webkit-appearance: none;
margin: 0; }

.wmdw-bulk-orders-page input.qty {-moz-appearance: textfield;
appearance: textfield; }

.wmdw-bulk-orders__empty {padding: 20px 4px;
opacity: 0.65;
margin: 0; }

.wmdw-bulk-orders__hint {opacity: 0.75; }

@media (max-width: 600px) {
.wmdw-bulk-orders__row {flex-wrap: wrap;
align-items: flex-start; }

.wmdw-bulk-orders__info {flex: 1 1 calc(100% - 60px); }

.wmdw-bulk-orders__actions {flex: 1 1 100%;
margin-left: 60px;
margin-top: 4px; }

.wmdw-bulk-orders__cart {flex-wrap: wrap; }
}

/* Platshållaren som håller medlemsmenyn levande ska inte ge en tom rad. */
.member-nav-container li:has(> .wmdw-main-nav-skip) {display: none; }

/* ── My Page (profile.php): wishlist, adresser, ordrar ───────────────────────── */
.wmdw-profile-section {width: 100%;
background: white;
padding: 10px;
box-sizing: border-box;
border-radius: 8px; }

.wmdw-profile-section-title {margin: 0 0 0.75rem;
font-size: 1rem;
font-weight: 600;
line-height: 1.3; }

/* Wishlist → samma slimmade rader som cart cross-sells */
.wmdw-profile-section--wishlist ul.products {display: flex !important;
flex-direction: column !important;
gap: 0;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
float: none !important; }

.wmdw-profile-section--wishlist ul.products::before,
.wmdw-profile-section--wishlist ul.products::after {display: none !important;
content: none !important; }

.wmdw-profile-section--wishlist ul.products li.product {width: 100% !important;
float: none !important;
margin: 0 !important;
padding: 4px !important;
border-bottom: 1px solid rgba(0, 0, 0, 0.08);
display: flex !important;
flex-direction: row !important;
flex-wrap: nowrap;
align-items: center;
justify-content: space-between;
gap: 12px;
text-align: left !important; }

.wmdw-profile-section--wishlist ul.products li.product a.woocommerce-loop-product__link {display: flex !important;
flex-direction: row;
align-items: center;
gap: 12px;
min-width: 0;
flex: 1 1 auto;
text-decoration: none; }

.wmdw-profile-section--wishlist ul.products li.product img {width: 60px !important;
height: 63px !important;
object-fit: cover;
margin: 0 !important;
flex: 0 0 60px;
border-radius: 4px !important; }

.wmdw-profile-section--wishlist ul.products li.product .woocommerce-loop-product__title {font-size: 0.95rem !important;
margin: 0 !important;
flex: 1 1 auto;
min-width: 0;
text-align: left; }

.wmdw-profile-section--wishlist .onsale {display: none !important; }

.wmdw-profile-section--wishlist ul.products li.product .price {margin: 0 !important;
font-size: 0.875rem;
white-space: nowrap;
text-align: right; }

.wmdw-profile-section--wishlist ul.products li.product .price,
.wmdw-profile-section--wishlist ul.products li.product .wmdw-wrap {align-items: end;
text-align: right; }

.wmdw-profile-section--wishlist ul.products li.product .button {flex: 0 0 auto;
margin: 0;
font-size: 13px;
padding: 2px 4px; }

/* Adresser: Woos egen rubrik + beskrivning bort, korten i bredd */
.wmdw-profile-section--addresses > p,
.wmdw-profile-section--addresses .woocommerce-Address-title h2 {display: none; }

.wmdw-profile-section--addresses .woocommerce-Addresses {display: grid;
grid-template-columns: 1fr 1fr;
gap: 1rem; }

.wmdw-profile-section--addresses .woocommerce-Address {width: auto !important;
float: none !important; }

@media (max-width: 450px) {
.wmdw-profile-section--addresses .woocommerce-Addresses {grid-template-columns: 1fr; }
}

/* Affiliate: kod att kopiera + mejlknapp */
.wmdw-affiliate-row {display: flex;
align-items: center;
flex-wrap: wrap;
gap: 12px;
margin: 0 0 0.5rem; }

.wmdw-affiliate-code {padding: 6px 12px;
border: 1px dashed currentColor;
border-radius: 6px;
background: none;
color: inherit;
font-family: monospace;
font-size: 1.1rem;
font-weight: 700;
letter-spacing: 0.05em;
cursor: pointer; }

.wmdw-affiliate-points {margin: 0; }

/* Ordertabell: full bredd + kolumnjustering */
.wmdw-profile-section--orders .woocommerce-orders-table {width: 100%; }

.wmdw-profile-section--orders .woocommerce-orders-table__header-order-actions,
.wmdw-profile-section--orders .woocommerce-orders-table__cell-order-actions {text-align: right; }

.wmdw-profile-section--orders .woocommerce-orders-table__header-order-date,
.wmdw-profile-section--orders .woocommerce-orders-table__cell-order-date,
.wmdw-profile-section--orders .woocommerce-orders-table__header-order-status,
.wmdw-profile-section--orders .woocommerce-orders-table__cell-order-status {text-align: center; }

.wmdw-profile-section--orders .woocommerce-orders-table__header-order-number,
.wmdw-profile-section--orders .woocommerce-orders-table__cell-order-number,
.wmdw-profile-section--orders .woocommerce-orders-table__header-order-total,
.wmdw-profile-section--orders .woocommerce-orders-table__cell-order-total {text-align: left; }
