/* Soft commerce surfaces, preserving native WooCommerce behavior. */
@layer studio-redesign {
  html:has([data-id="header-cart"]) { scrollbar-gutter: stable; }
  html body .elementor-location-header [data-id="header-cart"] .elementor-menu-cart__container {
    transform: none !important; opacity: 0 !important; visibility: hidden !important; pointer-events: none;
    transition: opacity 220ms ease, visibility 0s linear 260ms !important;
  }
  html body .elementor-location-header [data-id="header-cart"].elementor-menu-cart--shown .elementor-menu-cart__container {
    opacity: 1 !important; visibility: visible !important; pointer-events: auto;
    transition: opacity 220ms ease, visibility 0s !important;
  }
  html body .elementor-location-header [data-id="header-cart"] .elementor-menu-cart__main {
    opacity: 1 !important; transform: translate3d(calc(-100% - 16px),0,0) !important;
    transition: transform 260ms cubic-bezier(.22,1,.36,1) !important;
  }
  html body .elementor-location-header [data-id="header-cart"].elementor-menu-cart--shown .elementor-menu-cart__main {
    transform: translate3d(0,0,0) !important;
  }
  html body .elementor-location-header .elementor-menu-cart__main {
    inset-block: 8px !important; inset-inline-start: auto !important; inset-inline-end: 8px !important;
    width: min(460px, calc(92vw - 8px)) !important;
    height: calc(100dvh - 16px) !important; max-height: calc(100dvh - 16px) !important;
    padding: 24px !important; border: 0 !important; border-radius: 0 20px 20px 0 !important;
    background: var(--studio-surface) !important; color: var(--studio-ink) !important;
    box-shadow: 8px 0 32px rgb(45 41 37 / 12%) !important;
    display: flex !important; flex-direction: column !important; gap: 0 !important;
    overflow: hidden !important; text-align: start !important;
  }
  html body .elementor-menu-cart__main .elementor-menu-cart__close-button {
    position: absolute !important; top: 16px !important; left: 16px !important; right: auto !important;
    margin: 0 !important; width: 44px !important; height: 44px !important;
    display: flex !important; align-items: center !important; justify-content: center !important;
    border-radius: 8px !important; background: var(--studio-bg) !important; color: var(--studio-ink) !important; cursor: pointer;
  }
  html body .studio-cart-heading { font: 600 24px/1.3 Heebo,sans-serif !important; margin: 2px 0 18px !important; padding-inline-end: 48px; }
  html body .elementor-menu-cart__main .elementor-menu-cart__close-button::before,
  html body .elementor-menu-cart__main .elementor-menu-cart__close-button::after { display: none !important; }
  html body .elementor-menu-cart__close-button svg { display: block !important; width: 22px !important; height: 22px !important; flex: 0 0 22px; }
  html body .studio-cart-status { font: 400 14px/1.6 Heebo,sans-serif; color: var(--studio-muted); flex-shrink: 0; }
  html body .studio-cart-status:not(:empty) { padding-block: 0 12px; }
  html body .studio-cart-status--error { color: var(--studio-error, #9B3E35); }
  html body .elementor-menu-cart__main .widget_shopping_cart_content {
    min-height: 0; flex: 1; display: flex !important; flex-direction: column; overflow: hidden;
    overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--studio-line) transparent;
  }
  html body .elementor-menu-cart__main .elementor-menu-cart__products { display: block !important; overflow-x: hidden !important; overflow-y: auto !important; max-height: none !important; min-height: 0; flex: 1; scrollbar-width: thin; scrollbar-color: var(--studio-line) transparent; overscroll-behavior: contain; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product {
    position: relative !important; display: grid !important; grid-template-columns: 80px minmax(0,1fr) !important;
    grid-template-rows: auto auto !important; gap: 10px 16px !important; padding: 20px 0 !important;
    margin: 0 !important; border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; align-items: start !important;
  }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-image { grid-column: 1 !important; grid-row: 1/3 !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-image img { width: 80px !important; height: 100px !important; object-fit: contain !important; background: var(--studio-bg); border-radius: 8px !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-name { grid-column: 2 !important; grid-row: 1 !important; padding-inline-end: 30px !important; font: 600 15px/1.55 Heebo,sans-serif !important; text-align: start !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-name a { color: var(--studio-ink) !important; text-decoration: none !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-name dl { margin-block: 8px 0 !important; font-size: 13px !important; color: var(--studio-muted) !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-price { grid-column: 2 !important; grid-row: 2 !important; width: 100%; }
  html body .elementor-menu-cart__main .elementor-menu-cart__product-remove { position: absolute !important; top: 14px !important; left: 0 !important; right: auto !important; width: 36px !important; height: 36px !important; margin: 0 !important; background: transparent !important; }
  html body .studio-mini-edit { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
  html body .studio-mini-unit { font: 400 14px/1.5 Heebo,sans-serif !important; color: var(--studio-ink) !important; }
  html body .studio-mini-unit > span:not(.woocommerce-Price-amount) { color: var(--studio-muted); font-size: 12px; }
  html body .studio-mini-stepper { display: inline-flex; align-items: center; direction: ltr; border: 1px solid var(--studio-line); border-radius: 8px; overflow: hidden; }
  html body .studio-mini-stepper button { display: inline-flex !important; align-items: center; justify-content: center; width: 36px !important; min-width: 36px !important; height: 44px !important; padding: 0 !important; border: 0 !important; background: var(--studio-bg) !important; color: var(--studio-ink) !important; border-radius: 0 !important; }
  html body .studio-mini-stepper button:disabled { opacity: .4; cursor: not-allowed; }
  html body .studio-mini-stepper input { width: 42px !important; min-width: 42px !important; height: 44px !important; padding: 0 !important; margin: 0 !important; text-align: center !important; border: 0 !important; border-radius: 0 !important; background: var(--studio-surface) !important; font: 400 16px/1 Heebo,sans-serif !important; color: var(--studio-ink) !important; appearance: textfield; }
  html body .studio-mini-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
  html body .studio-mini-tools { padding-block: 12px 8px; flex: 0 0 auto; max-height: 42%; overflow: auto; }
  html body .studio-mini-coupon summary { cursor: pointer; font-size: 15px; min-height: 44px; display: list-item; list-style-position: inside; padding-block: 10px; }
  html body .studio-mini-coupon-form { margin: 8px 0 20px !important; }
  html body .studio-mini-coupon-form label { display: block; font-size: 14px; margin-bottom: 8px; }
  html body .studio-mini-coupon-form > div { display: flex; gap: 10px; }
  html body .studio-mini-coupon-form input { min-width: 0; width: 100%; height: 46px; border: 1px solid var(--studio-line); border-radius: 8px; padding: 8px 12px; font-size: 16px; background: var(--studio-surface); }
  html body .studio-mini-coupon-form button, html body .studio-mini-remove-coupon { background: var(--studio-sage-soft) !important; color: var(--studio-ink) !important; border: 0 !important; border-radius: 8px !important; min-height: 44px !important; padding: 10px 14px !important; white-space: nowrap; font: 500 14px/1.5 Heebo,sans-serif !important; }
  html body .studio-mini-summary { margin-top: 16px; border-top: 1px solid var(--studio-line); padding-top: 20px; }
  html body .studio-mini-total, html body .studio-mini-discount { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
  html body .studio-mini-total { font-size: 18px; }
  html body .studio-mini-discount { margin-bottom: 12px; font-size: 14px; }
  html body .studio-mini-summary p { margin: 10px 0 0 !important; font-size: 14px; line-height: 1.6; color: var(--studio-muted); }
  html body .elementor-menu-cart__main .elementor-menu-cart__subtotal { display: none !important; }
  html body .elementor-menu-cart__main .elementor-menu-cart__footer-buttons { display: grid !important; grid-template-columns: 1fr !important; gap: 10px !important; position: static; flex: 0 0 auto; padding: 18px 0 0 !important; margin: 0 !important; background: transparent; border: 0 !important; }
  @supports (backdrop-filter: blur(1px)) {
    html body .elementor-location-header .elementor-menu-cart__main { background: color-mix(in srgb,var(--studio-surface) 97%,transparent) !important; backdrop-filter: blur(18px); }
    html body .elementor-location-header .elementor-menu-cart__container { background: rgb(45 41 37 / 15%) !important; backdrop-filter: blur(2px); }
  }
  html body .elementor-menu-cart__main .elementor-menu-cart__footer-buttons a, html body .studio-empty-shop { display: flex !important; align-items: center; justify-content: center; min-height: 48px !important; width: 100% !important; border-radius: 8px !important; padding: 12px 20px !important; margin: 0 !important; font: 600 16px/1.5 Heebo,sans-serif !important; background: var(--studio-cocoa) !important; color: var(--studio-surface) !important; text-align: center !important; }
  html body .elementor-menu-cart__main a.elementor-button--view-cart { order: 2; background: var(--studio-bg) !important; color: var(--studio-ink) !important; }
  html body .woocommerce-mini-cart__empty-message { margin-block: auto !important; text-align: center !important; font: 600 24px/1.4 Heebo,sans-serif; padding-block: 40px; }
  html body .woocommerce-mini-cart__empty-message p { font: 400 16px/1.7 Heebo,sans-serif; color: var(--studio-muted); margin: 12px 0 24px; }
  html body .elementor-menu-cart__main :is(button,a,input,summary,[role="button"]):focus-visible { outline: 2px solid var(--studio-accent) !important; outline-offset: 2px; }
  html body .studio-add-feedback { flex-basis: 100%; margin: 8px 0 0; font-size: 14px; color: var(--studio-muted); }
  html body .studio-add-feedback:empty { display: none; }

  /* Round functional groups, not every row. */
  html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-eyebrow { display: none !important; }
  html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-hero { padding-block: 32px !important; margin-block: 0 28px !important; border: 0 !important; }
  html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-hero h1 { font-size: 36px !important; line-height: 1.25 !important; margin: 0 0 12px !important; }
  html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-hero p { max-width: 58ch; margin: 0 auto !important; font-size: 16px !important; line-height: 1.7 !important; }
  html body.woocommerce-cart .woocommerce-cart-form, html body.woocommerce-cart .cart_totals, html body.woocommerce-checkout #customer_details .col-1, html body.woocommerce-checkout #customer_details .col-2, html body.woocommerce-checkout #order_review { border: 1px solid var(--studio-line) !important; border-radius: 16px !important; background: var(--studio-surface) !important; box-shadow: none !important; overflow: hidden; }
  html body.woocommerce-cart .woocommerce-cart-form { padding: 8px 24px 24px !important; }
  html body.woocommerce-cart table.shop_table.cart { border: 0 !important; margin: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
  html body.woocommerce-cart table.cart th, html body.woocommerce-cart table.cart td { border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; background: transparent !important; padding: 20px 12px !important; }
  html body.woocommerce-cart table.cart thead th { font-size: 14px !important; color: var(--studio-muted); font-weight: 500; }
  html body.woocommerce-cart table.cart td.product-name a { color: var(--studio-ink) !important; font-size: 16px; }
  html body.woocommerce-cart table.cart td.product-thumbnail img { width: 72px !important; height: 88px !important; object-fit: contain; border-radius: 8px; }
  html body.woocommerce-cart table.cart td.actions { display: table-cell !important; padding-block: 24px 0 !important; border: 0 !important; }
  html body.woocommerce-cart .studio-cart-actions { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
  html body.woocommerce-cart table.cart .product-remove { width: 52px !important; }
  html body.woocommerce-cart table.cart .product-thumbnail { width: 96px !important; }
  html body.woocommerce-cart table.cart .product-quantity { width: 80px !important; }
  html body.woocommerce-cart table.cart td.actions .coupon { display: flex !important; gap: 12px !important; float: none !important; flex: 1; align-items: center; }
  html body.woocommerce-cart table.cart td.actions .coupon input { width: min(220px,100%) !important; min-width: 100px; border-radius: 8px !important; border-color: var(--studio-line) !important; min-height: 48px; }
  html body.woocommerce-cart table.cart td.actions button { margin: 0 !important; border-radius: 8px !important; min-height: 48px !important; padding-inline: 20px !important; }
  html body.woocommerce-cart .cart_totals { padding: 28px !important; }
  html body.woocommerce-cart .cart_totals h2 { text-align: start !important; font-size: 24px !important; margin: 0 0 24px !important; padding: 0 !important; border: 0 !important; background: transparent !important; }
  html body.woocommerce-cart .cart_totals table :is(th,td) { border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; background: transparent !important; padding: 16px 0 !important; }
  html body.woocommerce-cart .cart_totals table th { padding-inline-end: 12px !important; }
  html body.woocommerce-cart .cart_totals .shop_table { border: 0 !important; }
  html body.woocommerce-cart .wc-proceed-to-checkout { padding: 20px 0 0 !important; }
  html body.woocommerce-cart .wc-proceed-to-checkout a { margin: 0 !important; border-radius: 8px !important; min-height: 50px; display: flex !important; align-items: center; justify-content: center; }
  html body.woocommerce-checkout #customer_details .col-1, html body.woocommerce-checkout #customer_details .col-2 { padding: 28px !important; }
  html body.woocommerce-checkout #customer_details { padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
  html body.woocommerce-checkout #order_review_heading { padding: 0 !important; background: transparent !important; border: 0 !important; border-radius: 0 !important; margin: 0 0 16px !important; text-align: start !important; box-shadow: none !important; }
  html body.woocommerce-checkout #order_review table.shop_table { border: 0 !important; background: transparent !important; }
  html body.woocommerce-checkout #order_review table :is(th,td) { border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; background: transparent !important; padding: 16px 0 !important; }
  html body.woocommerce-checkout #order_review table .product-name { padding-inline-end: 16px !important; }
  html body.woocommerce-checkout h3 { font-size: 24px !important; line-height: 1.4 !important; }
  html body.woocommerce-checkout form .form-row { padding: 0 !important; margin-bottom: 20px !important; }
  html body.woocommerce-checkout form .form-row label { display: block; margin-bottom: 8px; line-height: 1.5; font-size: 15px; }
  html body.woocommerce-checkout form .studio-fixed-country { display: none !important; }
  html body.woocommerce-checkout form :is(#billing_state_field,#shipping_state_field) { clear: both !important; float: none !important; width: 100% !important; }
  html body.woocommerce-checkout form .form-row-first { clear: both !important; }
  html body.woocommerce-checkout form .form-row :is(input.input-text,textarea,select), html body.woocommerce-checkout .select2-selection--single { min-height: 48px !important; border: 1px solid var(--studio-line) !important; border-radius: 8px !important; background: var(--studio-surface) !important; padding: 10px 12px !important; font-size: 16px !important; line-height: 1.6 !important; color: var(--studio-ink) !important; }
  html body.woocommerce-checkout #order_review { padding: 28px !important; }
  html body.woocommerce-checkout .select2-container .select2-selection--single { height: 48px !important; min-height: 48px !important; padding: 0 !important; }
  html body.woocommerce-checkout .select2-container .select2-selection__rendered { height: 46px !important; line-height: 46px !important; padding: 0 12px 0 36px !important; }
  html body.woocommerce-checkout .select2-container .select2-selection__arrow { height: 46px !important; top: 0 !important; left: 10px !important; right: auto !important; width: 20px !important; }
  html body.woocommerce-checkout .select2-container .select2-selection__rendered { direction: rtl !important; text-align: right !important; }
  html body.woocommerce-checkout .select2-dropdown { border-color: var(--studio-line) !important; border-radius: 8px !important; overflow: hidden; background: var(--studio-surface) !important; }
  html body.woocommerce-checkout .select2-results__option { padding: 12px 14px !important; font-size: 16px !important; }
  html body.woocommerce-checkout .select2-results__option--highlighted[aria-selected],
  html body.woocommerce-checkout .select2-results__option--highlighted[data-selected] { background: var(--studio-cocoa) !important; color: var(--studio-surface) !important; }
  html body.woocommerce-checkout .select2-search__field { min-height: 44px !important; font-size: 16px !important; border: 1px solid var(--studio-line) !important; border-radius: 4px !important; }
  html body.woocommerce-checkout #payment { background: var(--studio-bg) !important; border-radius: 12px !important; }
  html body.woocommerce-checkout #payment .payment_box { background: var(--studio-sage-soft) !important; border-radius: 8px; }
  html body.woocommerce-checkout #payment .payment_box::before { border-bottom-color: var(--studio-sage-soft) !important; }
  html body.woocommerce-checkout #place_order { width: 100%; min-height: 50px !important; margin: 0 !important; border-radius: 8px !important; text-align: center !important; }
  html body:is(.woocommerce-cart,.woocommerce-checkout) .woocommerce-info { border: 1px solid var(--studio-line) !important; border-radius: 12px !important; background: var(--studio-sage-soft) !important; color: var(--studio-ink) !important; }
  @media (max-width:767px) {
    html body .elementor-location-header .elementor-menu-cart__main { padding: 20px !important; }
    html body .studio-cart-heading { font-size: 22px !important; }
    html body .elementor-menu-cart__main .elementor-menu-cart__product { grid-template-columns: 64px minmax(0,1fr) !important; gap: 10px 12px !important; }
    html body .elementor-menu-cart__main .elementor-menu-cart__product-image img { width: 64px !important; height: 84px !important; }
    html body .studio-mini-total { font-size: 16px; }
    html body .studio-mini-edit { align-items: start; }
    html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-hero { padding-block: 24px !important; margin-bottom: 16px !important; }
    html body:is(.woocommerce-cart,.woocommerce-checkout) .studio-commerce-hero h1 { font-size: 30px !important; }
    html body.woocommerce-cart .woocommerce-cart-form { padding: 0 16px 20px !important; }
    html body.woocommerce-cart table.cart tr.cart_item { border: 0 !important; border-bottom: 1px solid var(--studio-line) !important; border-radius: 0 !important; padding: 16px 0 !important; margin: 0 !important; background: transparent !important; box-shadow: none !important; }
    html body.woocommerce-cart table.cart td { padding: 10px 0 !important; border: 0 !important; }
    html body.woocommerce-cart table.cart td.product-thumbnail { padding-bottom: 16px !important; }
    html body.woocommerce-cart table.cart td.actions { display: block !important; padding-top: 20px !important; }
    html body.woocommerce-cart .studio-cart-actions { flex-direction: column; align-items: stretch; gap: 16px; }
    html body.woocommerce-cart table.cart .product-remove, html body.woocommerce-cart table.cart .product-thumbnail, html body.woocommerce-cart table.cart .product-quantity { width: auto !important; }
    html body.woocommerce-cart table.cart td.actions .coupon { display: flex !important; flex-direction: column !important; align-items: stretch !important; gap: 10px !important; width: 100% !important; }
    html body.woocommerce-cart table.cart td.actions .coupon input, html body.woocommerce-cart table.cart td.actions .coupon button, html body.woocommerce-cart table.cart td.actions > button { width: 100% !important; float: none !important; }
    html body.woocommerce-cart .cart_totals, html body.woocommerce-checkout #customer_details .col-1, html body.woocommerce-checkout #customer_details .col-2, html body.woocommerce-checkout #order_review { padding: 20px !important; }
    html body.woocommerce-checkout #customer_details .form-row-first, html body.woocommerce-checkout #customer_details .form-row-last { width: 100% !important; float: none !important; }
  }
  @media (prefers-reduced-motion:reduce) {
    html body .elementor-location-header [data-id="header-cart"] :is(.elementor-menu-cart__main,.elementor-menu-cart__container) { transition: none !important; }
  }
}
