/* MELON Studio 2.3.2 — scoped, opt-out mobile accessibility/layout repairs.
   Active only when "mobile_fixes_enabled" is checked. */
@media (max-width: 1100px) {
  body.melon-mobile-fixes.melon-header-mounted .ms-site-header-shell {
    width:100%;max-width:100%;margin:0;inset-inline:0;
  }
  body.melon-mobile-fixes .ms-site-header-shell .ms-drawer-head button[data-ms-menu-close] {
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
    width:42px!important;min-width:42px!important;height:42px!important;min-height:42px!important;
    padding:0!important;margin:0!important;line-height:1!important;
    border-radius:50%!important;flex:0 0 42px!important;
  }
  body.melon-mobile-fixes .ms-drawer-head .ms-close-glyph {
    width:18px;height:18px;position:relative;display:block;flex:none;
  }
  body.melon-mobile-fixes .ms-drawer-head .ms-close-glyph::before,
  body.melon-mobile-fixes .ms-drawer-head .ms-close-glyph::after {
    content:"";width:19px;height:2.5px;position:absolute;left:50%;top:50%;
    background:currentColor;border-radius:5px;transform-origin:center;
  }
  body.melon-mobile-fixes .ms-drawer-head .ms-close-glyph::before {transform:translate(-50%,-50%) rotate(45deg)}
  body.melon-mobile-fixes .ms-drawer-head .ms-close-glyph::after {transform:translate(-50%,-50%) rotate(-45deg)}
  /* Fallback for the theme's menu, when the custom header isn't enabled. */
  body.melon-mobile-fixes:not(.melon-header-mounted) .wd-close-side {
    display:inline-flex;align-items:center;justify-content:center;
    min-width:40px;min-height:40px;line-height:1;box-sizing:border-box;
  }
  body.melon-mobile-fixes .woocommerce-products-header .term-description,
  body.melon-mobile-fixes .woocommerce-products-header .term-description p,
  body.melon-mobile-fixes .wd-term-desc,
  body.melon-mobile-fixes .wd-term-desc p,
  body.melon-mobile-fixes .term-description > p {
    font-size:clamp(14px,3.7vw,16px)!important;
    line-height:2.05!important;overflow-wrap:anywhere;word-break:normal;
  }
  body.melon-mobile-fixes .woocommerce-products-header .term-description,
  body.melon-mobile-fixes .wd-term-desc,
  body.melon-mobile-fixes .term-description {max-width:100%;box-sizing:border-box}
  body.melon-mobile-fixes .woocommerce-products-header .term-description p,
  body.melon-mobile-fixes .wd-term-desc p {margin-block:0 1em;text-align:start}
  /* Keep native WooCommerce/Woodmart sorting behavior untouched, but make it readable. */
  body.melon-mobile-fixes .woocommerce-ordering,
  body.melon-mobile-fixes .wd-shop-tools .wd-sort-dropdown,
  body.melon-mobile-fixes .wd-shop-tools .wd-products-ordering {max-width:100%;min-width:0}
  body.melon-mobile-fixes .woocommerce-ordering select.orderby,
  body.melon-mobile-fixes .wd-shop-tools select.orderby {
    width:auto!important;max-width:min(52vw,220px);min-width:126px!important;
    min-height:43px;padding:7px 12px!important;direction:rtl!important;
    border:1px solid #d6c3b5!important;border-radius:10px!important;
    background-color:#fffaf6!important;color:#49352e!important;
    font-size:13px!important;text-overflow:ellipsis;
  }
  body.melon-mobile-fixes .wd-shop-tools .wd-sort-dropdown > a,
  body.melon-mobile-fixes .wd-shop-tools .wd-products-ordering > a,
  body.melon-mobile-fixes .wd-shop-tools .woocommerce-ordering > a {
    display:inline-flex!important;align-items:center;justify-content:center;min-height:42px;
    padding:9px 12px!important;min-width:109px;max-width:55vw;gap:5px;
    border:1px solid #d6c3b5;border-radius:9px;color:#49352e!important;
    font-size:13px!important;text-decoration:none;white-space:nowrap;
  }
  body.melon-mobile-fixes .ms-sort-label {display:block;font-size:12px;font-weight:650;color:#49352e;margin-bottom:5px}
  /* Keep the native filter button and sorting buttons in distinct tappable areas. */
  body.melon-mobile-fixes .shop-loop-head,
  body.melon-mobile-fixes .wd-shop-tools,
  body.melon-mobile-fixes .shop-tools {row-gap:10px;min-width:0;max-width:100%}
  body.melon-mobile-fixes .wd-show-sidebar-btn {min-height:42px}
}
@media(max-width: 700px) {
  body.melon-mobile-fixes .ms-site-header-shell .ms-site-header-inner,
  body.melon-mobile-fixes .ms-site-header-shell .ms-header-tools {max-width:100%;min-width:0}
  body.melon-mobile-fixes .ms-site-header-shell .ms-header-logo img {max-width:100%;object-fit:contain}
  body.melon-mobile-fixes .ms-announcement {padding-inline:12px;line-height:1.8}
  body.melon-mobile-fixes .ms-announcement a {display:block;color:inherit;text-decoration:none;min-height:24px;max-width:100%;overflow-wrap:anywhere}
  body.melon-mobile-fixes .ms-announcement a:focus-visible {outline:2px solid #e5c3a6;outline-offset:2px}
}
/* Page-anchor and browser "find in page" jumps should not be covered by the sticky header. */
html.melon-sticky-active {scroll-padding-top:var(--melon-sticky-offset,105px)}
body.melon-mobile-fixes.melon-global-header-ready [id]:not(.ms-site-header-shell *),
body.melon-mobile-fixes.melon-global-header-ready .woocommerce-notices-wrapper {scroll-margin-top:var(--melon-sticky-offset,105px)}

/* Brand announcement is a real full-width link only when the editor supplies its URL. */
body.melon-mobile-fixes .ms-announcement a {color:inherit!important;display:block;width:100%;text-decoration:none!important}
body.melon-mobile-fixes .ms-announcement a:hover {color:#f7dbc4!important}
body.melon-mobile-fixes .ms-announcement a:focus-visible {outline:2px solid #e6c5a6;outline-offset:2px}

/* MELON 2.3.3: compact real category introduction; content remains present and expandable. */
@media(max-width:767px){
 body.melon-mobile-fixes.tax-product_cat .ms-category-summary,
 body.melon-mobile-fixes.post-type-archive-product .ms-category-summary{
   max-height:7.4em;overflow:hidden;position:relative;
   font-size:14px!important;line-height:1.85!important;
   margin-block:10px 0!important;padding-inline:0!important;max-width:100%;
 }
 body.melon-mobile-fixes .ms-category-summary:not(.ms-category-summary-open):after{
   content:"";display:block;pointer-events:none;position:absolute;inset-inline:0;bottom:0;height:35px;
   background:linear-gradient(0deg,#fffaf6,rgba(255,250,246,0));
 }
 body.melon-mobile-fixes .ms-category-summary.ms-category-summary-open{
   max-height:none!important;overflow:visible!important;
 }
 body.melon-mobile-fixes .ms-category-summary-toggle{
   font-family:inherit;font-size:13px;font-weight:600;line-height:1.5;color:#62483d;background:#fffaf6;
   border:1px solid #d8c4b3;border-radius:9px;padding:10px 18px;margin:10px 0 24px;
   min-height:42px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;
 }
 body.melon-mobile-fixes .ms-category-summary-toggle:focus-visible{outline:2px solid #725141;outline-offset:2px}
 /* Sorting and the sidebar trigger must never push one another outside the viewport. */
 body.melon-mobile-fixes .shop-loop-head,
 body.melon-mobile-fixes .wd-shop-tools,
 body.melon-mobile-fixes .shop-tools{box-sizing:border-box!important;max-width:100%!important;min-width:0!important}
 body.melon-mobile-fixes .shop-loop-head{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:9px 12px!important}
 body.melon-mobile-fixes .shop-loop-head>*{min-width:0!important;max-width:100%!important}
 body.melon-mobile-fixes .wd-shop-tools{display:flex!important;align-items:center!important;justify-content:space-between!important;flex-wrap:wrap!important;gap:8px!important;width:100%!important}
 body.melon-mobile-fixes .woocommerce-ordering,
 body.melon-mobile-fixes .wd-shop-tools .wd-sort-dropdown,
 body.melon-mobile-fixes .wd-shop-tools .wd-products-ordering{
   box-sizing:border-box!important;position:relative!important;inset-inline:auto!important;
   margin:0!important;transform:none!important;float:none!important;
   max-width:100%!important;min-width:0!important;flex:0 1 auto!important;
 }
 body.melon-mobile-fixes .wd-shop-tools .wd-show-sidebar-btn{margin-inline:0!important;flex:0 1 auto!important;white-space:normal!important}
 body.melon-mobile-fixes .woocommerce-ordering select.orderby{width:min(47vw,190px)!important;max-width:100%!important;min-width:0!important;min-height:42px!important}
 body.melon-mobile-fixes .wd-sort-dropdown > a,
 body.melon-mobile-fixes .wd-products-ordering > a{
   display:inline-flex!important;align-items:center!important;justify-content:center!important;
   min-width:0!important;max-width:min(46vw,210px)!important;white-space:normal!important;
   text-align:center!important;line-height:1.7!important;padding:9px 10px!important;
 }
 body.melon-mobile-fixes .ms-sort-overflow-fix{margin-inline:0!important;inset-inline:auto!important;left:auto!important;right:auto!important;transform:none!important}
 /* Opaque Woodmart header covers scrolling text cleanly, without see-through collisions. */
 body.melon-mobile-fixes:not(.melon-header-mounted) .whb-header,
 body.melon-mobile-fixes:not(.melon-header-mounted) .whb-sticked .whb-main-header,
 body.melon-mobile-fixes:not(.melon-header-mounted) .whb-sticky-shadow{background-color:#fffaf6}
}
@media(max-width:360px){
 body.melon-mobile-fixes .wd-shop-tools{gap:7px!important}
 body.melon-mobile-fixes .wd-shop-tools .wd-show-sidebar-btn,
 body.melon-mobile-fixes .wd-shop-tools .wd-sort-dropdown > a{font-size:12px!important;padding:9px 7px!important}
}
@media(max-width:767px){body.melon-mobile-fixes .ms-category-summary-toggle[hidden]{display:none!important}}

/* MELON 2.3.4 — Woodmart's RTL mobile sorting dropdown escapes the viewport.
   Instead of fighting its absolute offsets, offer an independent, accessible
   WooCommerce orderby select and hide the original only after ours is ready. */
@media(max-width:1024px){
 body.melon-mobile-fixes.ms-mobile-sort-ready :is(.shop-loop-head,.wd-shop-tools,.shop-tools) :is(.woocommerce-ordering,.wd-sort-dropdown,.wd-products-ordering){display:none!important}
 body.melon-mobile-fixes .ms-mobile-sortbar{
   width:100%;min-width:0;max-width:100%;box-sizing:border-box;display:flex;
   align-items:center;gap:12px;direction:rtl;position:relative;
   margin:12px 0 23px!important;padding:14px 16px!important;
   border:1px solid #e7d8cb;border-radius:14px;
   background:linear-gradient(125deg,#fffaf6,#f6eee8);box-shadow:0 7px 22px rgba(76,48,38,.04)
 }
 body.melon-mobile-fixes .ms-mobile-sortbar label{
   flex:0 0 auto;margin:0;color:#4b362e;font-size:13px;line-height:1.6;font-weight:700;white-space:nowrap
 }
 body.melon-mobile-fixes .ms-mobile-sortbar select{
   flex:1 1 auto;min-width:0!important;width:100%!important;max-width:100%!important;
   box-sizing:border-box!important;margin:0!important;height:44px!important;min-height:44px!important;
   border:1px solid #d6bca9!important;border-radius:10px!important;
   color:#45332e!important;background:#fff!important;
   font-size:13px!important;font-weight:550;padding:8px 13px!important;
   box-shadow:none!important;appearance:auto!important;direction:rtl!important;text-align:right!important
 }
 body.melon-mobile-fixes .ms-mobile-sort-chevron{display:none}
 body.melon-mobile-fixes :is(.ms-category-summary,.ms-taxonomy-description.ms-category-summary){
   display:block!important;max-height:7.5em!important;overflow:hidden!important;
   position:relative!important;box-sizing:border-box!important;
   font-size:14px!important;line-height:1.9!important;margin:12px 0 0!important;
   color:#514039;overflow-wrap:anywhere;direction:rtl;text-align:right
 }
 body.melon-mobile-fixes .ms-category-summary :is(p,li,span,div){font-size:inherit!important;line-height:inherit!important}
 body.melon-mobile-fixes .ms-category-summary p{margin:0 0 .5em!important;padding:0!important}
 body.melon-mobile-fixes .ms-category-summary.ms-category-summary-open{max-height:none!important;overflow:visible!important}
 body.melon-mobile-fixes .ms-category-summary-toggle{display:inline-flex!important;max-width:100%!important;min-height:42px!important;margin:11px 0 22px!important;padding:10px 16px!important}
 body.melon-mobile-fixes .ms-category-summary-toggle[hidden]{display:none!important}
 /* A sticky site header necessarily scrolls over copy. On catalogue pages let
    the full custom header scroll normally; homepage remains sticky. */
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.tax-product_tag,.woocommerce-shop) .ms-site-header-shell.ms-shell-sticky{
   position:relative!important;top:auto!important;transform:none!important
 }
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.tax-product_tag,.woocommerce-shop) .ms-site-header-shell .ms-site-header{
   position:relative!important;top:auto!important
 }
}
@media(max-width:370px){body.melon-mobile-fixes .ms-mobile-sortbar{gap:7px;padding:11px!important}body.melon-mobile-fixes .ms-mobile-sortbar label{font-size:12px}}

@media(max-width:1024px){
 body.melon-mobile-fixes.ms-mobile-sort-ready:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) :is(.woocommerce-ordering,.wd-sort-dropdown,.wd-products-ordering){display:none!important}
}
/* MELON 2.4.0 — actual mobile archive overlap root cause: Woodmart sticky mode
   remains active even with MELON's own sticky shell disabled. Keep the original
   header visible, but disable its sticky/fixed positioning only on shop archives.
   Homepage/product pages are intentionally untouched. */
@media(max-width:1024px){
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) :is(.whb-header,.whb-header.whb-sticked,.whb-header.whb-sticky-prepared,.whb-header .whb-main-header,.whb-header .whb-general-header,.whb-header .whb-sticky-header,.whb-header .whb-clone,.whb-header .whb-sticked .whb-main-header){
   position:relative!important;top:auto!important;bottom:auto!important;left:auto!important;right:auto!important;transform:none!important;inset-block-start:auto!important
 }
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) .whb-header .whb-clone{display:none!important}
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) .whb-sticky-placeholder{height:0!important;min-height:0!important}
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) :is(.ms-site-header-shell,.ms-site-header){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;background:#fffaf6!important}
 body.melon-mobile-fixes:is(.tax-product_cat,.post-type-archive-product,.woocommerce-shop,.tax-product_tag) :is(.woocommerce-products-header,.wd-shop-title,.page-title){scroll-margin-top:20px!important}
}
