/* Only the phone/tablet header is restyled; desktop geometry stays unchanged. */
@media (max-width:1024px) {
  html body { --ab-mobile-admin:0px; }
  html body.admin-bar { --ab-mobile-admin:32px; }
  html body .wd-toolbar { display:none!important; }
  html body.sticky-toolbar-on { padding-bottom:0!important; }
  html body .ab-site-welcome { position:relative!important; top:auto!important; }
  html body .whb-header,
  html body.ab-header-compact .whb-header { top:var(--ab-mobile-admin)!important; }
  html body .whb-header .whb-main-header { position:relative!important; top:0!important; transform:none!important; }
  html body .whb-general-header > .container { width:100%!important; max-width:100%!important; padding-inline:12px!important; }
  html body .whb-general-header .whb-general-header-inner,
  html body.ab-header-compact .whb-general-header .whb-general-header-inner {
    display:grid!important; grid-template-columns:96px minmax(40px,1fr) 188px!important;
    align-items:center!important; gap:8px!important; height:76px!important; min-height:76px!important;
  }
  html body .whb-general-header .whb-visible-lg { display:none!important; }
  html body .whb-general-header :is(.whb-mobile-left,.whb-mobile-center,.whb-mobile-right) {
    display:flex!important; align-items:center!important; min-width:0!important; height:100%!important;
    max-width:none!important; padding:0!important; margin:0!important; gap:4px!important;
  }
  html body .whb-general-header .whb-mobile-left { justify-content:flex-start!important; }
  html body .whb-general-header .whb-mobile-center { justify-content:center!important; }
  html body .whb-general-header .whb-mobile-right { justify-content:flex-end!important; }
  html body .whb-general-header .whb-mobile-center .site-logo,
  html body .whb-general-header .whb-mobile-center .wd-logo {
    display:flex!important; justify-content:center!important; align-items:center!important;
    width:100%!important; min-width:0!important; height:68px!important; padding:0!important; margin:0!important;
  }
  html body .whb-general-header .whb-mobile-center .site-logo img {
    display:block!important; width:auto!important; height:auto!important; max-width:100%!important;
    max-height:68px!important; object-fit:contain!important; transform:none!important;
  }
  html body .whb-general-header :is(.whb-mobile-left,.whb-mobile-right) .wd-tools-element {
    flex:0 0 auto!important; padding:0!important; margin:0!important; min-width:0!important;
  }
  html body .whb-general-header :is(.whb-mobile-left,.whb-mobile-right) .wd-tools-element > a {
    box-sizing:border-box!important; display:flex!important; align-items:center!important; justify-content:center!important;
    width:44px!important; min-width:44px!important; height:48px!important; min-height:48px!important;
    padding:3px!important; margin:0!important; gap:0!important; border-radius:24px!important;
    color:#64503b!important; text-decoration:none!important;
  }
  html body .whb-general-header :is(.whb-mobile-left,.whb-mobile-right) .wd-tools-text,
  html body .whb-general-header .whb-mobile-right :is(.ab-wishlist-copy,.ab-cart-label,.wd-dropdown-my-account) { display:none!important; }
  html body .whb-general-header .whb-mobile-left .wd-tools-element > a { border:0!important; background:transparent!important; }
  html body .whb-general-header .whb-mobile-left .wd-tools-icon { width:26px!important; height:26px!important; }
  html body .whb-general-header .whb-mobile-left .wd-tools-icon:before { font-size:23px!important; }
  html body .whb-general-header .whb-abmsearch .wd-tools-icon:before {
    content:""!important; display:block!important; width:24px!important; height:24px!important;
    background:transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364503b' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='m15.5 15.5 5 5'/%3E%3C/svg%3E") center/24px 24px no-repeat!important;
  }
  html body .whb-general-header .whb-mobile-right .wd-header-my-account > a { border:0!important; background:transparent!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-my-account > a:before {
    flex:0 0 40px!important; width:40px!important; height:40px!important;
    border:2px solid #efd5a2!important; box-shadow:0 2px 5px rgb(96 67 29 / 7%)!important;
  }
  html body .whb-general-header .whb-mobile-right .wd-header-my-account .wd-tools-icon { display:none!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-wishlist > a { border:0!important; background:transparent!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-wishlist .wd-tools-icon {
    display:flex!important; align-items:center!important; justify-content:center!important;
    width:40px!important; height:40px!important; border-radius:50%!important; background:#75a56a!important;
    box-shadow:inset 0 1px 1px rgb(255 255 255 / 35%)!important;
  }
  html body .whb-general-header .whb-mobile-right .wd-header-wishlist .wd-tools-icon:before { color:#fff!important; font-size:23px!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-cart > a {
    width:88px!important; min-width:88px!important; flex-direction:row!important; gap:4px!important;
    border:1px solid #efd5a2!important; background:#fff8e9!important; padding:5px!important;
  }
  html body .whb-general-header .whb-mobile-right .wd-header-cart .wd-tools-icon {
    flex:0 0 25px!important; width:25px!important; height:25px!important; min-width:0!important;
    background:none!important; display:flex!important; align-items:center!important; justify-content:center!important;
  }
  html body .whb-general-header .whb-mobile-right .wd-header-cart .wd-tools-icon:before { font-size:23px!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-cart .wd-tools-count { display:none!important; }
  html body .whb-general-header .whb-mobile-right .ab-cart-copy,
  html body .whb-general-header .whb-mobile-right .ab-cart-line {
    display:block!important; position:static!important; min-width:0!important; width:auto!important;
    margin:0!important; padding:0!important; line-height:1.1!important;
  }
  html body .whb-general-header .whb-mobile-right .ab-cart-price {
    display:block!important; max-width:100%!important; font-size:11px!important; font-weight:700!important;
    line-height:1.15!important; white-space:nowrap!important; color:#64503b!important;
  }
  html body .whb-general-header :is(.whb-mobile-left,.whb-mobile-right) a:focus-visible {
    outline:2px solid #69895b!important; outline-offset:2px!important;
  }
  /* The native dimmer was 1299 while the navigation was only 1105. */
  html body .mobile-nav.wd-side-hidden { z-index:1301!important; width:min(360px,calc(100vw - 32px))!important; max-width:calc(100vw - 32px)!important; background:#fffdf8!important; }
  html body .mobile-nav.wd-opened { transform:translate3d(0,0,0)!important; visibility:visible!important; pointer-events:auto!important; }
  html body .wd-close-side { z-index:1299!important; }
  /* Keep the cart inside Safari's visible area, not behind its toolbars. */
  html body .cart-widget-side {
    z-index:1301!important; box-sizing:border-box!important;
    top:var(--ab-cart-top,var(--ab-mobile-admin))!important; bottom:auto!important;
    height:calc(100vh - var(--ab-mobile-admin))!important;
    height:var(--ab-cart-height,calc(100dvh - var(--ab-mobile-admin)))!important;
    max-height:none!important; min-height:0!important;
    display:flex!important; flex-direction:column!important; overflow:hidden!important;
  }
  html body .cart-widget-side > .wd-heading { flex:0 0 auto!important; padding-block:14px!important; }
  html body .cart-widget-side > .widget_shopping_cart,
  html body .cart-widget-side .widget_shopping_cart_content {
    display:flex!important; flex-direction:column!important; flex:1 1 auto!important;
    height:auto!important; min-height:0!important; margin-bottom:0!important; overflow:hidden!important;
  }
  html body .cart-widget-side .shopping-cart-widget-body {
    flex:1 1 auto!important; min-height:0!important; overflow:hidden!important;
  }
  html body .cart-widget-side .shopping-cart-widget-body > .wd-scroll-content {
    height:100%!important; max-height:100%!important; overflow-x:hidden!important;
    overflow-y:auto!important; overscroll-behavior:contain; -webkit-overflow-scrolling:touch;
  }
  html body .cart-widget-side .shopping-cart-widget-footer {
    flex:0 0 auto!important; max-height:calc(100% - 44px)!important;
    overflow-y:auto!important; overscroll-behavior:contain;
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important; background:#fff!important;
  }
  html body .cart-widget-side .woocommerce-mini-cart__buttons a { min-height:44px!important; }
  html body .mobile-nav { padding-top:48px!important; top:0!important; height:100vh!important; height:100dvh!important; overflow-y:auto!important; overscroll-behavior:contain; }
  html body .mobile-nav .ab-mobile-menu-close {
    position:absolute; top:4px; right:8px; width:44px; min-width:44px; height:40px; min-height:40px;
    padding:0; border:0; border-radius:20px; box-shadow:none; color:#64503b; background:#fff2d9;
    font-size:28px; line-height:1; cursor:pointer;
  }
  html body .cart-widget-side :is(.woocommerce-mini-cart__total,.shopping-cart-widget-footer) { min-width:0!important; }
  html body .cart-widget-side .woocommerce-mini-cart__total { display:flex!important; flex-wrap:wrap!important; gap:6px 12px!important; justify-content:space-between!important; }
  html body .cart-widget-side .woocommerce-mini-cart__total .amount { white-space:nowrap!important; max-width:100%!important; font-size:20px!important; }
  html body.home .elementor-element-ae627cc .gallery { grid-template-columns:repeat(3,minmax(0,1fr))!important; }
  html body.home .elementor-element-ae627cc .gallery-item:nth-of-type(n+4) { display:none!important; }
}
@media (min-width:601px) and (max-width:782px) { html body.admin-bar { --ab-mobile-admin:46px; } }
@media (max-width:767px) {
  html body .whb-general-header > .container { padding-inline:8px!important; }
  html body .whb-general-header .whb-general-header-inner,
  html body.ab-header-compact .whb-general-header .whb-general-header-inner { grid-template-columns:88px minmax(40px,1fr) 156px!important; gap:4px!important; height:68px!important; min-height:68px!important; }
  html body .whb-general-header .whb-mobile-center :is(.site-logo,.wd-logo) { height:62px!important; }
  html body .whb-general-header .whb-mobile-center .site-logo img { max-height:62px!important; }
  html body .whb-general-header .whb-mobile-left { gap:0!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-cart > a { width:60px!important; min-width:60px!important; flex-direction:column!important; gap:0!important; padding:3px!important; }
  html body .whb-general-header .whb-mobile-right .wd-header-cart .wd-tools-icon { flex-basis:25px!important; }
  html body .whb-general-header .whb-mobile-right .ab-cart-price { font-size:10.5px!important; }
  html body.home .elementor-element-ae627cc .gallery { grid-template-columns:repeat(2,minmax(0,1fr))!important; gap:9px!important; }
  html body.home .elementor-element-ae627cc .gallery-item:nth-of-type(4) { display:block!important; }
  html body.home .elementor-element-ae627cc .gallery-item:nth-of-type(n+5) { display:none!important; }
}
@media (max-width:600px) { html body.admin-bar { --ab-mobile-admin:0px; } }

/* The catalog sidebar becomes the sole mobile/tablet filter drawer. */
@media (max-width:1024px) {
  html body .abl-mobile-filter-toggle { display:none!important; }
  html body .abl-library-layout { grid-template-columns:minmax(0,1fr)!important; }
  html body .mobile-nav.ab-catalog-drawer {
    box-sizing:border-box!important; width:clamp(230px,72vw,360px)!important;
    padding:48px 14px 0!important;
    background:#fff!important; border-right:1px solid #bfe4ec!important;
    border-radius:0 24px 24px 0!important; scrollbar-width:thin; scrollbar-color:#b8c4bc #f7f8f5;
  }
  html body .ab-catalog-drawer > :is(.wd-search-form,.wd-nav-mob-tab,.mobile-categories-menu) { display:none!important; }
  html body .ab-catalog-drawer .ab-mobile-menu-heading {
    position:absolute; top:10px; left:20px; color:#6f5745; font-size:16px; font-weight:700; line-height:30px;
  }
  html body .ab-catalog-drawer .ab-mobile-menu-close { z-index:5; height:44px; min-height:44px; top:2px; background:#fff5df; }
  html body .ab-catalog-drawer .abl-sidebar { display:block!important; width:100%!important; margin:0!important; padding:0!important; }
  html body .ab-catalog-drawer .abl-sidebar * { box-sizing:border-box; }
  html body .ab-catalog-drawer .ab-side-search { margin-bottom:12px; }
  html body .ab-catalog-drawer .ab-side-search .searchform { height:48px!important; min-height:48px!important; }
  html body .ab-catalog-drawer .ab-side-search .searchform :is(.s,.searchsubmit) { height:46px!important; min-height:46px!important; }
  html body .ab-catalog-drawer #abl-library-sidebar .ab-side-search form.searchform input.s { min-width:0!important; padding:0 14px!important; font-size:17px!important; line-height:46px!important; }
  html body .ab-catalog-drawer .abl-category-nav,
  html body .ab-catalog-drawer .abl-filter-group {
    overflow:visible!important; margin:0 0 16px!important; padding:12px 0 14px!important;
    border:0!important; border-top:1px solid #d5eaf0!important; border-radius:0!important;
    background:#fff!important; box-shadow:none!important; min-width:0!important;
  }
  html body .ab-catalog-drawer :is(.ab-category-title,.abl-filter-title) { margin-bottom:12px!important; }
  html body .ab-catalog-drawer .abl-filter-form { margin:0!important; }
  html body .ab-catalog-drawer .abl-filter-options { padding:0!important; }
  html body .ab-catalog-drawer .ab-cat-row { align-items:center!important; padding:0!important; gap:2px!important; }
  html body .ab-catalog-drawer .ab-cat-link {
    min-height:44px!important; padding:9px 6px!important; font-size:16px!important; line-height:26px!important;
    color:#354e56!important; text-decoration:underline!important; text-decoration-color:#b4dfe8!important;
    text-underline-offset:4px!important; overflow-wrap:anywhere;
  }
  html body .ab-catalog-drawer .ab-cat-children { background:#fff!important; padding-left:12px!important; }
  html body .ab-catalog-drawer .ab-cat-toggle { width:44px!important; min-width:44px!important; height:44px!important; min-height:44px!important; max-height:none!important; margin:0!important; }
  html body .ab-catalog-drawer .abl-filter-option { min-height:44px; align-items:center; gap:8px; padding:0; font-size:16px; line-height:26px; }
  html body .ab-catalog-drawer .abl-filter-check { width:36px; min-width:36px; height:44px; }
  html body .ab-catalog-drawer .abl-filter-check input { width:18px; min-width:18px; height:18px; accent-color:#6b965b; }
  html body .ab-catalog-drawer .abl-filter-link { padding:9px 0; color:#354e56!important; text-decoration:underline!important; text-decoration-color:#b4dfe8!important; text-underline-offset:4px; overflow-wrap:anywhere; }
  html body .ab-catalog-drawer .abl-filter-option:has(input:checked) { background:#f1f7ed; border-radius:8px; }
  html body .ab-catalog-drawer .abl-filter-option:has(input:checked) .abl-filter-link { color:#416737!important; font-weight:700; }
  html body .ab-catalog-drawer .ab-mobile-filter-actions {
    position:sticky; bottom:0; z-index:6; padding:10px 0 max(10px,env(safe-area-inset-bottom)); border-top:1px solid #e9dcc5;
    background:rgb(255 255 255 / 97%); box-shadow:0 -5px 14px rgb(70 65 45 / 5%);
  }
  html body .ab-catalog-drawer .abl-show-button {
    min-height:48px!important; height:auto!important; aspect-ratio:auto!important; padding:12px 16px!important;
    background:#f8e4b8!important; border:1px solid #e3c88f!important; border-radius:24px!important;
    color:#60482d!important; font-size:16px!important; font-weight:700!important; line-height:22px!important;
  }
  html body .ab-catalog-drawer .abl-show-button span { position:static!important; width:auto!important; height:auto!important; margin:0!important; overflow:visible!important; clip:auto!important; white-space:normal!important; }
  html body .ab-catalog-drawer .abl-clear-filters { min-height:44px; display:grid; place-items:center; margin:2px 0 0; color:#547347!important; font-size:15px; }
  html body .ab-catalog-drawer .ab-mobile-pages { border-bottom:1px solid #d5eaf0; padding:0 0 6px; margin:0 0 12px; }
  html body .ab-catalog-drawer .ab-mobile-pages summary { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; min-height:44px; padding:10px 6px; color:#60482d; font-size:16px; font-weight:700; }
  html body .ab-catalog-drawer .ab-mobile-pages summary::after { content:''; flex:0 0 8px; width:8px; height:8px; margin-right:5px; border-right:2px solid #8b6d4d; border-bottom:2px solid #8b6d4d; transform:rotate(-45deg); transition:transform .15s ease; }
  html body .ab-catalog-drawer .ab-mobile-pages[open] summary::after { transform:rotate(45deg); }
  /* The ID also overrides the legacy heart's more-specific OPEN-state rules. */
  html body #ab-mobile-navigation .ab-mobile-pages .wd-nav-opener {
    display:grid!important; place-items:center!important; width:44px!important; min-width:44px!important;
    height:44px!important; min-height:44px!important; padding:0!important; border:0!important;
    background:transparent!important; box-shadow:none!important; color:#8b6d4d!important;
  }
  html body #ab-mobile-navigation .ab-mobile-pages .wd-nav-opener::before {
    content:''!important; position:static!important; display:block!important; width:8px!important; height:8px!important;
    border:0!important; border-right:2px solid #8b6d4d!important; border-bottom:2px solid #8b6d4d!important;
    background:none!important; box-shadow:none!important; font-size:0!important;
    transform:rotate(-45deg)!important; transition:transform .15s ease;
  }
  html body #ab-mobile-navigation .ab-mobile-pages .wd-nav-opener.wd-active::before { transform:rotate(45deg)!important; }
  html body #ab-mobile-navigation .ab-mobile-pages .wd-nav-opener::after { content:none!important; display:none!important; }
  html body .ab-catalog-drawer .mobile-pages-menu { display:block!important; }
  html body .ab-catalog-drawer .mobile-pages-menu a { text-transform:none!important; font-size:16px!important; color:#354e56!important; }
  html body .ab-catalog-drawer :is(a,button,input,summary):focus-visible { outline:2px solid #71965f!important; outline-offset:2px!important; }
}
