/* Header cart icon + Blocks-style count badge */
.header-cart-wrap .header-cart-button,
header.custom-header .header-cart-button {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px !important;
	background: transparent !important;
	box-shadow: none !important;
	border: 0 !important;
	color: var(--global-palette5, #666) !important;
}

.header-cart-wrap .header-cart-button:hover,
header.custom-header .header-cart-button:hover {
	background: transparent !important;
	color: var(--global-palette1, #e69b3f) !important;
}

.header-cart-wrap .header-cart-button .kadence-svg-iconset,
header.custom-header .header-cart-button .kadence-svg-iconset {
	font-size: 27px !important;
	line-height: 1;
	display: block;
}

.header-cart-wrap .header-cart-button .kadence-svg-iconset svg,
header.custom-header .header-cart-button .kadence-svg-iconset svg {
	width: 27px;
	height: 27px;
	display: block;
}

.header-cart-wrap .header-cart-button .header-cart-total,
header.custom-header .header-cart-total {
	position: absolute !important;
	top: -2px;
	right: -6px;
	z-index: 1;
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--global-palette1, #e69b3f) !important;
	color: #fff !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	box-sizing: border-box;
	pointer-events: none;
}

.header-cart-wrap .header-cart-button:hover .header-cart-total,
header.custom-header .header-cart-button:hover .header-cart-total {
	background: var(--global-palette1, #e69b3f) !important;
	color: #fff !important;
}

body.drawer-open #cart-drawer,
body.showing-popup-drawer-from-right #cart-drawer {
	z-index: 10000;
}

/* Slide-Out Cart (classic Kadence #cart-drawer) */

#cart-drawer .drawer-inner {
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

#cart-drawer .drawer-header {
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
}

#cart-drawer .drawer-content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#cart-drawer .mini-cart-container,
#cart-drawer .kadence-mini-cart-refresh {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

#cart-drawer .kadence-mini-cart-refresh > ul.woocommerce-mini-cart {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    margin: 0;
    padding-bottom: 1em;
}

#cart-drawer .woocommerce-mini-cart__total {
    flex-shrink: 0;
    margin-top: auto !important;
    margin-bottom: 0.25em;
    padding-top: 1em;
    border-top: 1px solid #ececec;
}

#cart-drawer .knapp-mini-cart-checkout-note {
    flex-shrink: 0;
    margin: 0 0 0.75em;
    padding: 0;
    font-size: 13px;
    line-height: 1.35;
    color: #6b7280;
}

#cart-drawer .woocommerce-mini-cart__buttons {
    flex-shrink: 0;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 0.75em;
}

#cart-drawer .side-cart-header {
    font-size: 24px;
    font-weight: 500;
}

#cart-drawer .woocommerce-mini-cart__empty-message {
    font-weight: 400;
    font-size: 17px;
}

#cart-drawer .woocommerce-mini-cart__buttons .button {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
    box-shadow: none;
    min-height: 4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Image out of flow so flex gap is between title/price/pack/qty text, not under the 64px thumb. */
#cart-drawer .woocommerce-mini-cart-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    border-bottom: 1px solid #ececec;
    padding: 0 4.5rem 1em 76px;
    margin-bottom: 1em;
    position: relative;
    min-height: 64px;
}

#cart-drawer .woocommerce-mini-cart-item:last-child {
    border: none;
    margin-bottom: 0;
}

#cart-drawer .woocommerce-mini-cart-item img {
    position: absolute;
    left: 0;
    top: 0;
    float: none;
    width: 64px;
    height: auto;
    margin: 0;
}

#cart-drawer .woocommerce-mini-cart-item a:not(.remove) {
    order: 1;
    display: block;
    font-weight: 400;
    color: var(--global-palette-highlight);
    font-size: 16px;
    line-height: 1.2;
    margin: 0;
    padding: 0;
    text-decoration: none;
    overflow: visible;
}

#cart-drawer .woocommerce-mini-cart-item a:not(.remove):hover {
    color: #333;
    text-decoration: none;
}

#cart-drawer .woocommerce-mini-cart-item dl.variation {
    order: 3;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    font-size: 14px;
    color: #b6b5b5;
    overflow: hidden;
    line-height: 1.2;
}

#cart-drawer .woocommerce-mini-cart-item dl.variation dt,
#cart-drawer .woocommerce-mini-cart-item dl.variation dd {
    float: none;
    display: inline;
    margin: 0;
    padding: 0;
    font-weight: 400;
    line-height: 1.2;
}

#cart-drawer .woocommerce-mini-cart-item dl.variation dd {
    color: #333;
    margin-right: 0.75em;
}

#cart-drawer .woocommerce-mini-cart-item dl.variation dd p {
    display: inline;
    margin: 0;
}

/* DOM: title, pack, price, qty — visual via order: title → price → pack → qty */
#cart-drawer .woocommerce-mini-cart-item .quantity.knapp-mini-cart-qty,
#cart-drawer .knapp-mini-cart-qty {
    order: 4;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    color: inherit !important;
    border: 0 !important;
    background: transparent !important;
    clear: none !important;
    float: none !important;
    width: auto !important;
    line-height: 1.2 !important;
}

#cart-drawer .knapp-mini-cart-qty.is-updating {
    opacity: 0.6;
    pointer-events: none;
}

#cart-drawer .knapp-mini-cart-line-total {
    position: absolute;
    top: 0;
    right: 0;
    font-weight: 700;
    font-size: 16px;
    color: var(--global-palette4);
    line-height: 1.2;
    white-space: nowrap;
}

#cart-drawer .knapp-mini-cart-qty__price {
    order: 2;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    font-weight: 700 !important;
    color: var(--global-palette4) !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
}

#cart-drawer .knapp-mini-cart-qty__row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Blocks-style quantity selector — always horizontal */
#cart-drawer .knapp-mini-cart-qty__stepper {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    width: 110px !important;
    height: 36px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    background: #fff !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

#cart-drawer .knapp-mini-cart-qty__btn {
    display: flex !important;
    flex: 0 0 34px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #1e1e1e !important;
    font-size: 18px !important;
    font-weight: 400 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    box-shadow: none !important;
    float: none !important;
}

#cart-drawer .knapp-mini-cart-qty__btn:hover,
#cart-drawer .knapp-mini-cart-qty__btn:focus {
    background: #f7f7f7 !important;
    color: #1e1e1e !important;
    box-shadow: none !important;
}

#cart-drawer .knapp-mini-cart-qty__input,
#cart-drawer input.knapp-mini-cart-qty__input[type="number"] {
    display: block !important;
    flex: 1 1 42px !important;
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-left: 1px solid #ddd !important;
    border-right: 1px solid #ddd !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: center !important;
    color: #1e1e1e !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 34px !important;
    box-shadow: none !important;
    float: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
}

#cart-drawer .knapp-mini-cart-qty__input:focus {
    outline: none !important;
    box-shadow: none !important;
}

#cart-drawer .knapp-mini-cart-qty__input::-webkit-outer-spin-button,
#cart-drawer .knapp-mini-cart-qty__input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

#cart-drawer .knapp-mini-cart-qty__remove {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    width: 28px !important;
    height: 28px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    color: #1e1e1e !important;
    line-height: 1 !important;
    text-decoration: none !important;
    font-size: 0 !important;
    float: none !important;
}

#cart-drawer .knapp-mini-cart-qty__remove:hover {
    color: var(--global-palette-btn-bg) !important;
    background: transparent !important;
}

#cart-drawer .knapp-mini-cart-qty__remove svg {
    display: block;
}

/* Hide Woo’s default corner × (trash lives next to qty). */
#cart-drawer .woocommerce-mini-cart-item > a.remove {
    display: none !important;
}

#cart-drawer .woocommerce-mini-cart__total {
    font-size: 14px;
}
