/* The same Woo fragment can also appear in a sidebar widget. */
.kokos-panel-heading, .kokos-suggestions, .kokos-coupons, .kokos-summary { display: none; }
.w-cart.kokos-drawer {
    --kc-paper: var(--color-content-bg, #fff);
    --kc-ink: var(--color-content-text, #573320);
    --kc-brand: var(--color-content-primary, #573320);
    --kc-line: color-mix(in srgb, var(--color-content-border, #946243) 25%, var(--kc-paper));
    --kc-tint: color-mix(in srgb, var(--color-content-bg-alt, #c8dbd3) 34%, var(--kc-paper));
    --kc-pad: clamp(16px, 4vw, 24px);
}
.w-cart.kokos-drawer.opened::before {
    content: ""; position: fixed; inset: 0; z-index: 119;
    background: var(--color-content-overlay, rgb(0 0 0 / .54)); cursor: pointer;
}
html:has(.w-cart.kokos-drawer.opened), body:has(.w-cart.kokos-drawer.opened) { overflow: hidden; }
.w-cart.kokos-drawer .w-cart-content {
    box-sizing: border-box; width: min(500px, 100vw); max-width: 100vw; padding: 0;
    background: var(--kc-paper); color: var(--kc-ink); overflow: hidden; text-align: start;
}
.w-cart.kokos-drawer .widget_shopping_cart {
    display: flex; flex-direction: column; box-sizing: border-box; height: 100%; min-height: 0;
    overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom, 0px);
}
.w-cart.kokos-drawer .widget_shopping_cart_content { display: contents; }
.w-cart.kokos-drawer .widget_shopping_cart > *,
.w-cart.kokos-drawer .widget_shopping_cart_content > * { flex-shrink: 0; }
.w-cart.kokos-drawer .kokos-panel-heading {
    order: 1; position: sticky; top: 0; z-index: 2; display: flex; align-items: baseline; gap: 10px;
    padding: calc(15px + env(safe-area-inset-top, 0px)) 60px 14px var(--kc-pad);
    background: var(--kc-paper); border-bottom: 1px solid var(--kc-line);
}
.kokos-drawer .kokos-panel-heading h2, .kokos-drawer .kokos-carousel-head h3 {
    margin: 0; padding: 0; color: var(--color-content-heading, currentColor);
    text-transform: none; letter-spacing: normal;
}
.kokos-drawer .kokos-panel-heading h2 { font-size: 1.4rem; line-height: 1.25; }
.kokos-panel-heading span { font-size: .85rem; white-space: nowrap; }
.w-cart.kokos-drawer .w-cart-closer {
    position: absolute; top: calc(4px + env(safe-area-inset-top, 0px)); right: 8px; left: auto;
    z-index: 3; width: 44px; height: 44px; line-height: 1; font-size: 20px; color: var(--kc-ink);
}
.w-cart.kokos-drawer .kokos-shipping {
    order: 2; margin: 12px var(--kc-pad) 4px; padding: 12px 14px;
    background: var(--kc-tint); color: var(--kc-ink); border: 0; border-radius: 10px;
}
.kokos-drawer .kokos-shipping .kokos-shipping__message { font-size: .92rem; }
.kokos-drawer .kokos-shipping .kokos-shipping__message strong { color: var(--kc-ink); }
.kokos-drawer .kokos-shipping .kokos-shipping__track { height: 6px; margin: 7px 0 4px; background: var(--kc-line); }
.kokos-drawer .kokos-shipping .kokos-shipping__fill { background: var(--kc-meter, #63856b); }
.kokos-drawer .kokos-shipping .kokos-shipping__threshold,
.kokos-drawer .kokos-shipping .kokos-shipping__conditions { display: inline; font-size: .72rem; color: inherit; }
.w-cart.kokos-drawer ul.woocommerce-mini-cart {
    order: 3; flex: 1 0 100px; min-height: 100px; overflow-y: auto; overflow-x: hidden;
    margin: 4px 0 0; padding: 0 var(--kc-pad); scrollbar-width: thin; scroll-padding-block: 8px;
}
.w-cart.kokos-drawer ul.product_list_widget li.woocommerce-mini-cart-item {
    margin: 0; padding: 12px 0; border-bottom: 1px solid var(--kc-line); line-height: 1.35; min-height: 76px;
}
.w-cart.kokos-drawer ul.product_list_widget li.woocommerce-mini-cart-item:last-child { border-bottom: 0; }
.w-cart.kokos-drawer ul.product_list_widget li img {
    width: 70px; height: 70px; object-fit: cover; border-radius: 8px; margin-inline-end: 12px;
}
.w-cart.kokos-drawer.kokos-cart-compact ul.product_list_widget li img { width: 58px; height: 58px; }
.w-cart.kokos-drawer ul.product_list_widget li > a { color: var(--kc-ink); font-size: .92rem; font-weight: 600; }
.kokos-drawer .woocommerce-mini-cart-item .quantity { display: block; margin-top: 4px; }
.w-cart.kokos-drawer .kokos-item-actions { align-items: center; gap: 3px; }
.w-cart.kokos-drawer .kokos-item-actions button {
    border-color: var(--kc-line); background: var(--kc-paper); color: var(--kc-ink);
}
.w-cart.kokos-drawer .kokos-item-actions a.kokos-remove { margin-inline-start: auto; color: var(--kc-ink); }
.kokos-drawer .woocommerce-mini-cart__total { display: none; }
.kokos-drawer .kokos-suggestions, .kokos-drawer .kokos-coupons, .kokos-drawer .kokos-summary {
    display: block; box-sizing: border-box; padding: 10px var(--kc-pad); border-top: 1px solid var(--kc-line);
}
.kokos-drawer .kokos-suggestions { order: 4; }
.kokos-drawer .kokos-carousel-head, .kokos-drawer .kokos-summary > div,
.kokos-drawer .kokos-applied { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kokos-drawer .kokos-carousel-head { margin-bottom: 6px; min-height: 28px; }
.kokos-drawer .kokos-carousel-head h3 { font-size: 1rem; line-height: 1.3; }
.kokos-arrows { display: flex; gap: 3px; }
.kokos-arrows[hidden] { display: none; }
.kokos-arrows button { min-width: 34px; min-height: 32px; font: inherit; font-size: 21px; line-height: 1; background: transparent; color: inherit; }
.kokos-arrows button:disabled { opacity: .3; }
.kokos-suggestions .kokos-cart-products {
    display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity;
    padding: 2px 2px 5px; scrollbar-width: thin;
}
.kokos-suggestions .kokos-cart-product {
    flex: 0 0 clamp(112px, 27%, 140px); display: flex; flex-direction: column; align-items: stretch;
    gap: 5px; scroll-snap-align: start; padding: 0; min-width: 0; text-align: start;
}
.kokos-suggestions .kokos-cart-product__image img { width: 100%; height: 74px; object-fit: cover; border-radius: 8px; }
.kokos-suggestions .kokos-cart-product__info { flex: 1; display: flex; flex-direction: column; justify-content: space-between; }
.kokos-suggestions .kokos-cart-product__name {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    font-size: .76rem; line-height: 1.28; font-weight: 500;
}
.kokos-suggestions .kokos-cart-product__price { font-size: .79rem; font-weight: 600; }
.w-cart.kokos-drawer .kokos-suggestions .kokos-cart-product__add {
    font-size: .76rem; padding: 7px 4px; text-align: center;
    border-radius: 6px; min-height: 30px; box-shadow: none;
}
.kokos-suggestions .added_to_cart { display: none; }
.w-cart.kokos-drawer .kokos-cart-block { order: 5; margin: 0; padding: 10px var(--kc-pad); border-color: var(--kc-line); box-sizing: border-box; }
.kokos-drawer .kokos-coupons { order: 6; }
.kokos-drawer .kokos-coupon-form { margin: 0; display: flex; align-items: flex-end; gap: 8px; }
.kokos-coupon-form label { flex: 1; min-width: 0; font-size: .85rem; line-height: 1.5; font-weight: 600; }
.kokos-drawer .kokos-coupon-form input { margin-top: 4px; width: 100%; height: 42px; min-height: 42px; font-size: 16px; }
.kokos-coupon-form button { min-height: 42px; padding: 0 12px; border-radius: 6px; font: inherit; font-size: .85rem; }
.kokos-applied { margin-top: 6px; font-size: .8rem; overflow-wrap: anywhere; }
.kokos-applied button { font: inherit; color: inherit; background: transparent; text-decoration: underline; white-space: nowrap; }
.w-cart.kokos-drawer .kokos-cart-feedback { order: 7; margin: 0; padding: 6px var(--kc-pad); line-height: 1.35; }
.w-cart.kokos-drawer .kokos-cart-feedback:empty { padding: 0; }
.kokos-drawer .kokos-summary { order: 8; padding-bottom: 4px; font-size: 1rem; }
.kokos-summary small, .kokos-summary .kokos-discount { font-size: .78rem; line-height: 1.4; }
.kokos-summary .kokos-discount { margin-bottom: 3px; }
.w-cart.kokos-drawer .woocommerce-mini-cart__buttons {
    order: 9; flex-direction: column; gap: 0; margin: 0; padding: 8px var(--kc-pad) 4px;
}
.w-cart.kokos-drawer .woocommerce-mini-cart__buttons a.checkout {
    display: grid; place-items: center;
    min-height: 46px; border: 0; text-align: center;
}
.w-cart.kokos-drawer .woocommerce-mini-cart__buttons > .kokos-cart-continue,
.w-cart.kokos-drawer .kokos-empty-back {
    min-height: 44px; font: inherit; font-size: .85rem;
    box-shadow: none; border: 0; text-align: center;
}
.kokos-drawer .woocommerce-mini-cart__empty-message { order: 3; padding: 24px var(--kc-pad); }
.kokos-drawer .kokos-empty-back { order: 9; }
.kokos-drawer .w-cart-content :focus-visible { outline: 2px solid var(--kc-brand); outline-offset: -2px; }

/* Match Kokos's primary and secondary Impreza button presets. The theme
   marks text colors important, so set foreground and background together. */
.w-cart.kokos-drawer .w-cart-content .kokos-cart-continue {
    --kc-action-bg: #fff;
    --kc-action-text: #25282b;
}
.w-cart.kokos-drawer .w-cart-content :is(.kokos-cart-product__add, .kokos-cart-continue, .kokos-coupon-form button, .woocommerce-mini-cart__buttons .checkout) {
    background: var(--kc-action-bg, #73432a);
    color: var(--kc-action-text, #fff) !important;
}
.w-cart.kokos-drawer .w-cart-content :is(.kokos-cart-product__add, .kokos-cart-continue, .kokos-coupon-form button, .woocommerce-mini-cart__buttons .checkout):is(:hover, :focus-visible, :active) {
    background: var(--color-content-heading, #573320);
    color: #fff !important;
}
.w-cart.kokos-drawer .w-cart-content :is(.kokos-cart-product__add, .kokos-cart-continue, .kokos-coupon-form button, .woocommerce-mini-cart__buttons .checkout):focus-visible {
    outline: 2px solid #fff;
    outline-offset: -4px;
}
@media (max-width: 680px), (orientation: landscape) and (max-width: 960px) and (max-height: 550px) {
    .w-cart.kokos-drawer .w-cart-content {
        top: var(--wp-admin--admin-bar--height, 0px); bottom: auto; width: 100vw; max-width: none;
        height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
        height: calc(100dvh - var(--wp-admin--admin-bar--height, 0px)); inset-inline-end: 0;
    }
    .kokos-drawer .kokos-cart-product__image img { height: 62px; }
    .kokos-drawer .kokos-arrows button, .kokos-drawer .kokos-coupon-form button,
    .w-cart.kokos-drawer .kokos-suggestions .kokos-cart-product__add { min-height: 44px; }
}
@media (max-height: 690px) {
    .w-cart.kokos-drawer ul.woocommerce-mini-cart { flex: 1 0 auto; max-height: 36vh; min-height: 74px; }
}

/* Compact secondary action in recommendation cards, including mobile. */
.w-cart.kokos-drawer .w-cart-content .kokos-suggestions .kokos-cart-product__add,
.kokos-page-intro .kokos-suggestions .kokos-cart-product .kokos-cart-product__add {
    display: flex; align-items: center; justify-content: center; text-align: center;
    align-self: stretch; box-sizing: border-box; min-height: 30px; width: 100%; padding: 4px 10px;
    font-size: 12px; line-height: 1.25; background: #f4eee8; color: #573320 !important;
}
.w-cart.kokos-drawer .w-cart-content .kokos-suggestions .kokos-cart-product__add:is(:hover,:active,:focus-visible),
.kokos-page-intro .kokos-suggestions .kokos-cart-product .kokos-cart-product__add:is(:hover,:active,:focus-visible) {
    background: #573320; color: #fff !important;
}
