/* Native WooCommerce sidecart and quantity controls in the Schuch shop style. */
html.bd-cart-drawer-open { overflow: hidden; }
.bd-cart-drawer {
    --bd-cart-green: #3e5c44;
    --bd-cart-title: #344d38;
    --bd-cart-muted: #586651;
    --bd-cart-border: #dce4d8;
    box-sizing: border-box;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(100%, 480px);
    max-width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    margin: 0;
    padding: 28px;
    border: 0;
    background: #fff;
    color: #293a2d;
    font: 16px/1.5 'Nunito', sans-serif;
    box-shadow: -12px 0 40px rgb(31 48 33 / 12%);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    opacity: 0;
    transition: transform .22s ease, opacity .22s ease;
}
.bd-cart-drawer:not([open]) { display: none; }
.bd-cart-drawer[open] { display: flex; flex-direction: column; gap: 20px; }
.bd-cart-drawer.is-open { transform: translateX(0); opacity: 1; }
.bd-cart-drawer::backdrop { background: rgb(27 40 29 / 38%); opacity: 0; transition: opacity .22s ease; }
.bd-cart-drawer.is-open::backdrop { opacity: 1; }
.bd-cart-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--bd-cart-border); }
.bd-cart-drawer__head h2 { margin: 4px 0 0; padding: 0; color: var(--bd-cart-title); font-size: 30px; line-height: 1.2; }
.bd-cart-drawer__eyebrow { color: var(--bd-cart-muted); font-size: 13px; }
.bd-cart-drawer .bd-cart-drawer__close { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 44px; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--bd-cart-border); border-radius: 50%; background: #f5f7f2; color: var(--bd-cart-title); font: 28px/1 sans-serif; cursor: pointer; }
.bd-cart-drawer__status { margin: 0; padding: 12px 14px; border-radius: 6px; background: #edf3e9; color: var(--bd-cart-title); font-size: 14px; line-height: 1.5; }
.bd-cart-drawer__status.is-error { color: #8b2d29; background: #fbefed; }
.bd-cart-drawer__status[hidden] { display: none !important; }
.bd-cart-drawer__content { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 24px; }
.bd-cart-drawer__content[aria-busy="true"] { opacity: .6; pointer-events: none; }
.bd-cart-drawer__items { margin: 0; padding: 0; list-style: none; }
.bd-cart-drawer__item { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 16px; padding: 0 0 20px; margin: 0 0 20px; border-bottom: 1px solid var(--bd-cart-border); }
.bd-cart-drawer__item:last-child { margin-bottom: 0; }
.bd-cart-drawer__photo { aspect-ratio: 1; padding: 6px; background: #f5f7f2; border: 1px solid #e7ebe3; border-radius: 7px; overflow: hidden; }
.bd-cart-drawer__photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bd-cart-drawer__name { margin: 0 0 6px; padding: 0; color: var(--bd-cart-title); font-size: 16px; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.bd-cart-drawer__name a { color: inherit; text-decoration: none; }
.bd-cart-drawer__quantity { color: var(--bd-cart-green); white-space: nowrap; }
.bd-cart-drawer__details .variation { margin: 6px 0; color: var(--bd-cart-muted); font-size: 12px; line-height: 1.5; }
.bd-cart-drawer__details .variation p { margin: 0; padding: 0; }
.bd-cart-drawer__details .variation dt[class*="variation-gzd-"],
.bd-cart-drawer__details .variation dd.variation-gzd-unit_price { display: none; }
.bd-cart-drawer__details .variation dd { margin: 0 0 4px; }
.bd-cart-drawer__price { display: block; color: var(--bd-cart-green); font-size: 17px; font-weight: 700; }
.bd-cart-drawer__price .unit-price { display: block; color: var(--bd-cart-muted); font-size: 12px; font-weight: 400; }
.bd-cart-drawer__remove { display: inline-flex; align-items: center; min-height: 44px; color: var(--bd-cart-muted); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.bd-cart-drawer__remove[aria-disabled="true"] { opacity: .5; }
.bd-cart-drawer__summary { display: grid; gap: 10px; margin-top: auto; }
.bd-cart-drawer__subtotal,
.bd-cart-drawer__cost,
.bd-cart-drawer__total { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0; padding: 0; color: var(--bd-cart-title); font-size: 14px; line-height: 1.5; }
.bd-cart-drawer__subtotal { font-size: 16px; }
.bd-cart-drawer__cost > :first-child,
.bd-cart-drawer__total > :first-child { min-width: 0; overflow-wrap: anywhere; }
.bd-cart-drawer__summary .amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.bd-cart-drawer__total { padding-top: 12px; border-top: 1px solid var(--bd-cart-border); font-size: 17px; font-weight: 700; }
.bd-cart-drawer__tax { margin: 0 0 6px; padding: 0; color: var(--bd-cart-muted); font-size: 12px; line-height: 1.5; }
.bd-cart-drawer .bd-cart-button { display: flex; align-items: center; justify-content: center; gap: 12px; box-sizing: border-box; min-height: 48px; padding: 12px 16px; border: 1px solid var(--bd-cart-green); border-radius: 6px; font: inherit; font-size: 15px; font-weight: 700; line-height: 1.4; text-align: center; text-decoration: none; cursor: pointer; }
.bd-cart-drawer .bd-cart-button--primary { background: var(--bd-cart-green); color: #fff; }
.bd-cart-drawer .bd-cart-button--primary:hover { background: #2f4934; color: #fff; }
.bd-cart-drawer .bd-cart-button--secondary { background: #fff; color: var(--bd-cart-green); }
.bd-cart-drawer .bd-cart-button--secondary:hover { background: #f5f7f2; }
.bd-cart-drawer .bd-cart-drawer__continue { align-self: center; min-height: 44px; margin: 0; padding: 8px 12px; border: 0; background: transparent; color: var(--bd-cart-muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.bd-cart-drawer__empty { display: grid; justify-items: start; gap: 16px; padding: 24px 0; }
.bd-cart-drawer__empty > svg { color: var(--bd-cart-green); }
.bd-cart-drawer__empty h3 { margin: 0; padding: 0; color: var(--bd-cart-title); font-size: 26px; line-height: 1.25; }
.bd-cart-drawer__empty p { margin: 0; padding: 0; color: var(--bd-cart-muted); }
.bd-cart-drawer__loading { color: var(--bd-cart-muted); }
.bd-cart-drawer a:focus-visible,
.bd-cart-drawer button:focus-visible,
.bd-cart-drawer input:focus-visible { outline: 3px solid #83a175; outline-offset: 3px; }

/* Native quantity inputs stay editable; plus/minus buttons enhance them. */
#page-container .quantity.bd-qty-stepper,
.bd-cart-drawer .quantity.bd-qty-stepper { display: inline-grid; grid-template-columns: 42px 46px 42px; align-items: center; float: none; gap: 0; box-sizing: border-box; width: auto; margin: 0; padding: 3px; border: 1px solid #dce4d8; border-radius: 6px; background: #f5f7f2; }
#page-container .quantity.bd-qty-stepper input.qty,
.bd-cart-drawer .quantity.bd-qty-stepper input.qty { box-sizing: border-box; width: 46px; min-width: 0; min-height: 44px; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: #344d38; text-align: center; font: inherit; font-size: 16px; font-weight: 700; appearance: textfield; box-shadow: none; }
.bd-qty-stepper input.qty::-webkit-inner-spin-button,
.bd-qty-stepper input.qty::-webkit-outer-spin-button { appearance: none; margin: 0; }
#page-container .bd-qty-stepper__btn,
.bd-cart-drawer .bd-qty-stepper__btn { display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 44px; min-width: 0; margin: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #344d38; font: 22px/1 sans-serif; cursor: pointer; }
#page-container .bd-qty-stepper__btn:hover,
.bd-cart-drawer .bd-qty-stepper__btn:hover { background: #e8eee2; }
#page-container .bd-qty-stepper__btn:disabled,
.bd-cart-drawer .bd-qty-stepper__btn:disabled { opacity: .35; cursor: default; }
#page-container .bd-qty-stepper__btn:focus-visible,
#page-container .bd-qty-stepper input.qty:focus-visible { outline: 3px solid #83a175; outline-offset: 0; }
.bd-cart-drawer__quantity-form { margin: 12px 0 0; }

/* Match the approved product cards, including the primary add action. */
body.single-product #page-container #main-content div.product .summary form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 30px; }
body.single-product #page-container #main-content div.product .summary form.cart .quantity { margin: 0 !important; }
body.single-product #page-container #main-content div.product .summary form.cart .single_add_to_cart_button,
body.single-product #page-container #main-content div.product .summary form.cart .single_add_to_cart_button:hover { flex: 1; float: none; height: 52px; min-height: 52px; margin: 0; padding: 13px 18px; border: 1px solid #3e5c44; border-radius: 6px; background: #3e5c44; color: #fff; font-size: 16px; font-weight: 700; line-height: 1.4 !important; }
body.single-product #page-container #main-content div.product .summary form.cart .single_add_to_cart_button:hover { background: #2f4934; }
body.single-product #page-container #main-content div.product .summary form.cart .single_add_to_cart_button:is(:disabled, .disabled) { background: #e8ede5; border-color: #dce4d8; color: #586651; cursor: wait; }
.bd-cart-is-adding { cursor: wait; opacity: .8; }
/* Restore the existing desktop cart; keep a compact cart next to Divi's mobile menu. */
#et-secondary-menu > a.et-cart-info { display: inline-flex; align-items: center; margin-left: 16px; }
#main-header #et-top-navigation > a.bd-cart-header-link { display: none; }
@media (max-width: 980px) {
    #main-header #et-top-navigation > a.bd-cart-header-link { position: relative; z-index: 2; display: inline-flex; align-items: center; justify-content: center; float: left; gap: 5px; min-width: 44px; min-height: 44px; margin: -7px 12px 0 0; color: #344d38; font-size: 12px; line-height: 1; }
}
#et-secondary-menu > a.et-cart-info:focus-visible,
#main-header a.bd-cart-header-link:focus-visible { outline: 3px solid #83a175; outline-offset: 3px; }
@media (max-width: 600px) {
    .bd-cart-drawer { padding: 22px 20px max(20px, env(safe-area-inset-bottom)); }
    .bd-cart-drawer__item { grid-template-columns: 66px minmax(0, 1fr); gap: 12px; }
    body.single-product #page-container #main-content div.product .summary form.cart { gap: 12px; }
    body.single-product #page-container #main-content div.product .summary form.cart .single_add_to_cart_button { flex-basis: calc(100% - 150px); min-width: 150px; }
}
@media (prefers-reduced-motion: reduce) { .bd-cart-drawer, .bd-cart-drawer::backdrop { transition: none; } }
