/* CafeStore 4.9.1 — unified responsive/layout hardening.
 * This file is intentionally loaded last. It contains the canonical layout
 * contract between CafeStore Unified and the dedicated CafeStore theme.
 */
:root{
  --cs-primary:#ed1944;
  --cs-primary-dark:#c90f36;
  --cs-surface:#fff;
  --cs-page:#f5f6f8;
  --cs-text:#20242b;
  --cs-muted:#697281;
  --cs-border:#e7ebf0;
  --cs-container-width:1240px;
  --cs-radius:18px;
}

html,body{max-width:100%;overflow-x:clip}
@supports not (overflow:clip){html,body{overflow-x:hidden}}
body.cafestore-native-theme{min-height:100vh;display:flex;flex-direction:column}
body.cafestore-native-theme>.cs-site-header,
body.cafestore-native-theme>.cs-breadcrumb-wrap,
body.cafestore-native-theme>.cs-main,
body.cafestore-native-theme>.cs-footer{flex:0 0 auto}
body.cafestore-native-theme>.cs-main{flex:1 0 auto;min-height:0;width:100%;display:block}
.cs-container{width:min(calc(100% - 32px),var(--cs-container-width));max-width:var(--cs-container-width);min-width:0}
.cs-content,.cs-main,.cs-home-shell,.csu-homepage,.cs-single-product,.cs-single-product__inner{min-width:0;max-width:100%}
.cs-content{width:100%}
.cs-home-shell{display:block!important;width:100%;overflow:visible}
.cs-home-shell>.csu-homepage{width:100%;max-width:none;margin:0;padding-inline:0}
.cs-home-shell>.cs-home-section{width:100%;max-width:100%}

/* Every grid/flex child that can contain user content is allowed to shrink. */
.cs-header-inner>* ,
.cs-single-product__inner>* ,
.csu-single-visual-row>* ,
.csu-home-section__head>* ,
.csu-home-cta>* ,
.csu-home-info-grid>* ,
.csu-product-card>*{min-width:0}
img,svg,video,canvas,iframe{max-width:100%}
input,select,textarea,button{max-width:100%}

/* Header: stable columns from tablet through wide desktop. */
@media (min-width:1021px){
  .cs-header-inner{width:min(calc(100% - 32px),var(--cs-container-width));grid-template-columns:minmax(145px,18%) minmax(190px,21%) minmax(260px,1fr) 74px!important;grid-template-areas:'category favorites search brand'!important;gap:8px!important}
}
@media (min-width:768px) and (max-width:1020px){
  .cs-header-inner{width:min(calc(100% - 24px),var(--cs-container-width));grid-template-columns:minmax(116px,132px) minmax(150px,176px) minmax(180px,1fr) 68px!important;grid-template-areas:'category favorites search brand'!important;gap:5px!important}
  .cs-header-category .csmm-trigger{font-size:11.5px!important;padding-inline:7px!important}
  .cs-header-favorites,.cs-header-compare{font-size:10.5px!important;padding-inline:2px!important;gap:3px!important}
}
@media (max-width:767px){
  .cs-container{width:min(calc(100% - 20px),var(--cs-container-width))}
  .cs-header-inner{width:100%;padding-inline:10px!important;grid-template-columns:46px minmax(0,1fr)!important;grid-template-areas:'brand search'!important;gap:4px!important}
  .cs-header-search{padding-inline:2px!important}
}

/* Homepage: no section may create page-level horizontal scroll. */
.csu-homepage,.csu-home-section,.csu-home-hero,.csu-home-carousel,.csu-home-products,.csu-home-info-grid,.csu-home-cta,.csu-home-seo,.csu-home-faq{min-width:0;max-width:100%}
.csu-home-category-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
.csu-home-carousel__track{max-width:none}
.csu-home-carousel__item{min-width:0}
@media (max-width:1100px){
  .csu-home-category-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
}
@media (max-width:900px){
  .csu-home-category-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  .csu-home-info-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:767px){
  .csu-homepage{padding:10px 0 44px!important}
  .csu-home-category-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .csu-home-category{min-height:108px;padding-inline:4px}
  .csu-home-category__media{width:52px;height:52px}
  .csu-home-section__head{align-items:center;gap:8px}
  .csu-home-section__head h2{font-size:18px}
  .csu-home-section__head>a{font-size:11px}
  .csu-home-info-grid{grid-template-columns:1fr}
  .csu-home-hero__actions{width:100%}
  .csu-home-hero__actions .csu-home-btn{min-width:0;flex:1 1 150px}
  .csu-home-cta{overflow:hidden}
}
@media (max-width:380px){
  .csu-home-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .csu-home-carousel__item{flex-basis:174px;width:174px}
  .csu-home-hero{padding-inline:13px}
  .csu-home-hero__actions .csu-home-btn{flex-basis:100%}
}

/* Single product visual area: gallery + five-action panel. */
.single-product .cs-single-product__inner{min-width:0}
.csu-single-visual-row{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(248px,292px)!important;grid-template-areas:'gallery actions'!important;gap:14px!important;align-items:stretch!important;width:100%!important;min-width:0!important;margin:0!important}
.csu-single-visual-row .csu-product-gallery{grid-area:gallery;width:100%!important;min-width:0!important}
.csu-single-visual-row .csu-product-actions-panel{grid-area:actions;width:100%!important;min-width:0!important;display:flex!important}
.csu-product-actions-panel,.csu-action-box{min-width:0!important}
.csu-single-visual-row .csu-action-box{display:grid!important;grid-template-columns:1fr!important;grid-auto-rows:minmax(48px,1fr)!important;gap:8px!important;width:100%!important;height:100%!important;padding:8px!important;border:1px solid var(--cs-border,#e7ebf0)!important;border-radius:16px!important;background:#fff!important;box-shadow:0 6px 20px rgba(20,25,35,.045)!important;box-sizing:border-box!important}
.csu-single-visual-row .csu-action-box .csu-action,
.csu-single-visual-row .csu-action-box .csu-compare-toggle--compact{appearance:none!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:10px!important;width:100%!important;min-width:0!important;height:auto!important;min-height:48px!important;margin:0!important;padding:9px 12px!important;border:1px solid transparent!important;border-radius:11px!important;background:#fff!important;color:#39414d!important;font:inherit!important;font-size:12.5px!important;font-weight:750!important;line-height:1.4!important;text-align:right!important;cursor:pointer!important;box-sizing:border-box!important;transition:background .16s ease,border-color .16s ease,color .16s ease,transform .16s ease!important}
.csu-single-visual-row .csu-action-box .csu-action:hover,
.csu-single-visual-row .csu-action-box .csu-compare-toggle--compact:hover{background:#fafbfc!important;border-color:#edf0f4!important;color:var(--cs-primary,#ed1944)!important;transform:translateX(-1px)!important}
.csu-single-visual-row .csu-action-box .csu-action:focus-visible,
.csu-single-visual-row .csu-action-box .csu-compare-toggle--compact:focus-visible{outline:2px solid rgba(237,25,68,.28)!important;outline-offset:1px!important}
.csu-single-visual-row .csu-action-box svg,.csu-single-visual-row .csu-action-box .csu-compare-icon{width:21px!important;height:21px!important;min-width:21px!important;flex:0 0 21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}

/* Gallery is a contained, predictable viewport at every desktop width. */
.csu-product-gallery__viewport{position:relative!important;width:100%!important;min-width:0!important;aspect-ratio:1.12/1!important;max-height:clamp(380px,42vw,620px)!important;overflow:hidden!important;border:1px solid var(--cs-border,#e7ebf0)!important;border-radius:18px!important;background:#fff!important;box-shadow:0 6px 22px rgba(20,25,35,.045)!important}
.csu-product-gallery__track{width:100%!important;height:100%!important;min-width:0!important;max-width:100%!important;display:flex!important;overflow-x:auto!important;overflow-y:hidden!important;scroll-snap-type:x mandatory!important;scrollbar-width:none!important;direction:ltr!important}
.csu-product-gallery__track::-webkit-scrollbar{display:none!important}
.csu-product-gallery__slide{position:relative!important;flex:0 0 100%!important;width:100%!important;min-width:100%!important;max-width:100%!important;height:100%!important;min-height:0!important;padding:16px!important;display:grid!important;place-items:center!important;scroll-snap-align:start!important;box-sizing:border-box!important}
.csu-product-gallery__image{display:block!important;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;margin:0!important}
.csu-product-gallery__thumbs{display:flex!important;gap:7px!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:thin!important;padding:8px 2px 1px!important;direction:rtl!important}
.csu-product-gallery__thumb{flex:0 0 58px!important;width:58px!important;height:58px!important;min-width:58px!important;padding:3px!important;border:1px solid #e4e8ed!important;border-radius:10px!important;background:#fff!important;display:grid!important;place-items:center!important;overflow:hidden!important;cursor:pointer!important}
.csu-product-gallery__thumb.is-active{border-color:var(--cs-primary,#ed1944)!important;box-shadow:0 0 0 2px rgba(237,25,68,.10)!important}
.csu-product-gallery__thumb img{display:block!important;width:100%!important;height:100%!important;object-fit:contain!important}
.csu-product-gallery__viewport .csu-slider-arrow{position:absolute!important;top:50%!important;transform:translateY(-50%)!important;z-index:10!important;display:grid!important;place-items:center!important;width:40px!important;height:40px!important;border:1px solid #e1e6ec!important;border-radius:12px!important;background:rgba(255,255,255,.94)!important;color:#3b424d!important;box-shadow:0 5px 16px rgba(20,25,35,.10)!important;cursor:pointer!important}
.csu-product-gallery__viewport .csu-slider-arrow--prev{right:12px!important}
.csu-product-gallery__viewport .csu-slider-arrow--next{left:12px!important}
.csu-slider-counter{position:absolute!important;left:12px!important;bottom:12px!important;z-index:10!important;padding:4px 9px!important;border-radius:999px!important;background:rgba(32,36,43,.72)!important;color:#fff!important;font-size:11px!important;line-height:1.4!important}

@media (max-width:1100px){
  .single-product .cs-single-product__inner{grid-template-columns:1fr!important}
  .csu-single-visual-row{grid-template-columns:minmax(0,1fr) minmax(230px,270px)!important}
}
@media (max-width:767px){
  .csu-single-visual-row{display:flex!important;flex-direction:column!important;gap:9px!important}
  .csu-single-visual-row .csu-product-gallery,.csu-single-visual-row .csu-product-actions-panel{width:100%!important}
  .csu-product-gallery__viewport{aspect-ratio:1/1!important;max-height:none!important;border-radius:15px!important}
  .csu-product-gallery__slide{padding:8px!important}
  .csu-product-gallery__thumb{flex-basis:50px!important;width:50px!important;height:50px!important;min-width:50px!important}
  .csu-single-visual-row .csu-action-box{display:flex!important;flex-direction:row!important;align-items:stretch!important;gap:6px!important;height:auto!important;padding:6px!important;border-radius:14px!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important}
  .csu-single-visual-row .csu-action-box::-webkit-scrollbar{display:none!important}
  .csu-single-visual-row .csu-action-box .csu-action,
  .csu-single-visual-row .csu-action-box .csu-compare-toggle--compact{flex:1 0 82px!important;width:82px!important;min-width:82px!important;min-height:66px!important;height:66px!important;padding:7px 5px!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:5px!important;border-radius:10px!important;font-size:10.5px!important;text-align:center!important}
  .csu-single-visual-row .csu-action-box svg,.csu-single-visual-row .csu-action-box .csu-compare-icon{width:20px!important;height:20px!important;min-width:20px!important;flex-basis:20px!important}
  .single-product .entry-summary{min-width:0!important;width:100%!important}
}
@media (max-width:380px){
  .csu-single-visual-row .csu-action-box .csu-action,
  .csu-single-visual-row .csu-action-box .csu-compare-toggle--compact{flex-basis:74px!important;width:74px!important;min-width:74px!important}
}

/* Related products infinite loading. */
.single-product .csu-related{width:100%;max-width:100%;min-width:0;overflow:visible}
.csu-related-grid{min-width:0!important}
.csu-related-marker{display:flex!important;align-items:center!important;justify-content:center!important;gap:9px!important;min-height:52px!important;margin:14px 0 2px!important;padding:10px 14px!important;border:1px solid #edf0f4!important;border-radius:12px!important;background:#fafbfc!important;color:#707986!important;font-size:12px!important;line-height:1.6!important;cursor:pointer!important;user-select:none!important}
.csu-related-marker.is-loading{color:#4d5662!important}
.csu-related-marker.csu-related-retry{border-color:#ffd4dc!important;background:#fff7f8!important;color:#c9143a!important}
.csu-related-loader,.cafestore-infinite-loader__spinner{width:20px!important;height:20px!important;min-width:20px!important;border:2px solid #e1e6ec!important;border-top-color:var(--cs-primary,#ed1944)!important;border-radius:50%!important;animation:csu-final-spin .72s linear infinite!important}
@keyframes csu-final-spin{to{transform:rotate(360deg)}}

/* Footer is a real flex-page footer, never a floating overlay. */
.cs-footer{flex-shrink:0!important;width:100%;margin-top:auto!important}
.cs-footer-inner,.cs-footer-top,.cs-footer-brand,.cs-footer-column{min-width:0}
.cs-footer-top{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr) minmax(0,1.2fr)!important}
.cs-footer p,.cs-footer-nav a{overflow-wrap:anywhere}
@media(max-width:767px){.cs-footer-top{grid-template-columns:1fr!important}.cs-footer-bottom{overflow-wrap:anywhere}}

/* Remove accidental fixed-width children from common WooCommerce/theme wrappers. */
.single-product .product,.single-product .summary,.single-product .woocommerce-tabs,.woocommerce-page .site-main,.woocommerce .products,.woocommerce ul.products{max-width:100%;min-width:0}
.woocommerce ul.products li.product{min-width:0!important}


/* CafeStore 4.9.2 — canonical header/gallery/sticky/CLS contract.
 * This section intentionally wins over all legacy patches above it.
 */

/* Header: mobile brand is always the right-most cell in the RTL product UI.
   The grid itself stays LTR so the search field remains the flexible left cell. */
@media (max-width: 767px){
  .cs-site-header{overflow:visible!important}
  .cs-header-inner{
    grid-template-columns:minmax(0,1fr) 54px!important;
    grid-template-areas:'search brand'!important;
    direction:ltr!important;
    width:100%!important;
    min-width:0!important;
  }
  .cs-brand{
    grid-area:brand!important;
    width:54px!important;
    max-width:54px!important;
    min-width:54px!important;
    justify-content:center!important;
    direction:rtl!important;
    overflow:visible!important;
  }
  .cs-header-search{
    grid-area:search!important;
    min-width:0!important;
    width:100%!important;
    overflow:visible!important;
  }
  .cs-header-engagement,.cs-header-category{display:none!important}
}
@media (max-width: 380px){
  .cs-header-inner{grid-template-columns:minmax(0,1fr) 50px!important}
  .cs-brand{width:50px!important;max-width:50px!important;min-width:50px!important}
  .cs-brand .custom-logo-link,.cs-brand img.custom-logo,.cs-brand .custom-logo-link img{width:44px!important;height:44px!important;max-width:44px!important;max-height:44px!important}
}

/* Gallery: keep the image intrinsic ratio inside a stable stage. Using auto-sized
   image content avoids accidental cropping caused by legacy height:100% rules. */
.single-product .csu-product-gallery__viewport{
  display:grid!important;
  grid-template-rows:1fr!important;
  align-items:stretch!important;
  justify-items:stretch!important;
  width:100%!important;
  min-width:0!important;
  min-height:clamp(360px,38vw,620px)!important;
  max-height:none!important;
  aspect-ratio:16/11!important;
  overflow:hidden!important;
}
.single-product .csu-product-gallery__track{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  direction:ltr!important;
}
.single-product .csu-product-gallery__slide{
  flex:0 0 100%!important;
  width:100%!important;
  min-width:100%!important;
  max-width:100%!important;
  height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
  display:grid!important;
  place-items:center!important;
  padding:18px!important;
  box-sizing:border-box!important;
}
.single-product .csu-product-gallery__image{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:100%!important;
  max-height:100%!important;
  min-width:0!important;
  min-height:0!important;
  object-fit:contain!important;
  object-position:center!important;
  margin:auto!important;
  flex:none!important;
}
.single-product .csu-product-gallery__thumbs{min-height:58px!important}
.single-product .csu-product-gallery__thumb img{object-fit:contain!important;object-position:center!important}
@media (min-width: 1021px){
  .single-product .csu-product-gallery__viewport{min-height:clamp(420px,40vw,680px)!important;aspect-ratio:16/10.5!important}
}
@media (min-width:768px) and (max-width:1020px){
  .single-product .csu-product-gallery__viewport{min-height:380px!important;aspect-ratio:16/11!important}
}
@media (max-width:767px){
  .single-product .csu-product-gallery__viewport{
    min-height:0!important;
    max-height:none!important;
    aspect-ratio:1/1!important;
    border-radius:15px!important;
  }
  .single-product .csu-product-gallery__slide{padding:8px!important}
  .single-product .csu-product-gallery__image{max-width:100%!important;max-height:100%!important}
}

/* Five-action panel: exactly five stable touch targets on mobile, with horizontal
   scrolling rather than layout compression. */
.single-product .csu-single-visual-row .csu-action-box{contain:layout paint!important}
@media (min-width: 1101px){
  .single-product .csu-single-visual-row{grid-template-columns:minmax(0,1fr) minmax(248px,292px)!important}
}
@media (min-width:768px){
  .single-product .csu-single-visual-row .csu-action-box{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-auto-rows:minmax(52px,1fr)!important;
  }
}
@media (max-width:767px){
  .single-product .csu-single-visual-row .csu-action-box{
    display:flex!important;
    flex-direction:row!important;
    align-items:stretch!important;
    gap:6px!important;
    width:100%!important;
    min-width:0!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain!important;
    scroll-snap-type:x proximity!important;
  }
  .single-product .csu-single-visual-row .csu-action-box .csu-action,
  .single-product .csu-single-visual-row .csu-action-box .csu-compare-toggle--compact{
    flex:1 0 calc((100% - 24px)/5)!important;
    width:auto!important;
    min-width:72px!important;
    max-width:none!important;
    min-height:68px!important;
    height:68px!important;
    scroll-snap-align:start!important;
  }
}
@media (max-width:380px){
  .single-product .csu-single-visual-row .csu-action-box .csu-action,
  .single-product .csu-single-visual-row .csu-action-box .csu-compare-toggle--compact{min-width:68px!important}
}

/* Related products: reserve the loader surface and keep appended content from
   changing any fixed/sticky purchase geometry. */
.single-product .csu-related-grid{min-width:0!important;contain:layout style!important}
.single-product .csu-related-marker{min-height:54px!important;contain:layout paint!important}

/* 4.9.4 — stable sticky purchase bar.
 * The bar is always fixed to the viewport. It must never react to the footer
 * or to related-product height changes; those changes happen above the bar.
 */
.csu-sticky-buy{
  position:fixed!important;
  left:0!important;
  right:0!important;
  top:auto!important;
  bottom:var(--csu-sticky-bottom-offset,0px)!important;
  width:100%!important;
  margin:0!important;
  z-index:100050!important;
  box-sizing:border-box!important;
  transform:none!important;
}
.csu-sticky-buy.is-footer-docked{
  position:fixed!important;
  top:auto!important;
  bottom:var(--csu-sticky-bottom-offset,0px)!important;
}
/* 4.9.5 — fixed UI reserves space INSIDE the main content, never after the footer.
 * The previous release put the reserve on <body>, which created a large blank
 * strip below the footer on mobile. */
body.single-product.has-csu-sticky-buy{
  padding-bottom:0!important;
}
body.cafestore-native-theme.single-product.has-csu-sticky-buy>.cs-main{
  padding-bottom:calc(var(--csu-sticky-reserve,78px) + 14px)!important;
}
@media(max-width:767px){
  body.cafestore-native-theme.single-product.has-csu-sticky-buy>.cs-main{
    padding-bottom:calc(var(--csu-sticky-reserve,82px) + var(--csu-mobile-bottom-total-px,64px) + 14px)!important;
  }
  .csu-sticky-buy{
    bottom:var(--csu-mobile-nav-h-px,64px)!important;
  }
}



/* Fallback for the same document structure when the body class is supplied by
 * a child theme rather than CafeStore's native shell. */
@media(max-width:767px){
  body.single-product.has-csu-sticky-buy>.cs-main{
    padding-bottom:calc(var(--csu-sticky-reserve,82px) + var(--csu-mobile-bottom-total-px,64px) + 14px)!important;
  }
}

/* Sticky CTA media/details primitives. */
.csu-sticky-buy__thumb{display:grid;place-items:center;flex:0 0 46px;width:46px;height:46px;overflow:hidden;border:1px solid #edf0f4;border-radius:11px;background:#fff;box-sizing:border-box}
.csu-sticky-buy__thumb img{display:block;width:100%;height:100%;object-fit:contain;margin:0;padding:3px}
.csu-sticky-buy__details{display:flex;flex-direction:column;min-width:0;flex:1;gap:2px}
@media(max-width:767px){.csu-sticky-buy__thumb{flex:0 0 42px;width:42px;height:42px;border-radius:10px}.csu-sticky-buy__details{min-width:0;max-width:calc(100% - 51px)}}

/* 4.9.5 — professional mobile CTA layout.
 * Details stay in one compact row (thumb + title/price) and the CTA gets a
 * predictable touch target. Long labels wrap instead of being clipped. */
@media(max-width:767px){
  .csu-sticky-buy{
    padding:7px 10px calc(7px + env(safe-area-inset-bottom))!important;
    background:rgba(255,255,255,.985)!important;
    border-top:1px solid #e4e8ee!important;
    box-shadow:0 -8px 28px rgba(20,25,35,.14)!important;
    backdrop-filter:saturate(150%) blur(14px)!important;
  }
  .csu-sticky-buy__inner{
    width:100%!important;
    min-height:64px!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    gap:10px!important;
  }
  .csu-sticky-buy__meta{
    order:1!important;
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:8px!important;
    padding:0!important;
    text-align:right!important;
    overflow:hidden!important;
  }
  .csu-sticky-buy__thumb{
    flex:0 0 44px!important;
    width:44px!important;
    height:52px!important;
    border-radius:10px!important;
    background:#fff!important;
    box-shadow:0 2px 8px rgba(20,25,35,.06)!important;
  }
  .csu-sticky-buy__details{
    flex:1 1 auto!important;
    min-width:0!important;
    max-width:none!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    justify-content:center!important;
    gap:1px!important;
    overflow:hidden!important;
  }
  .csu-sticky-buy__caption{
    display:-webkit-box!important;
    width:100%!important;
    margin:0!important;
    color:#252b34!important;
    font-size:11.5px!important;
    font-weight:800!important;
    line-height:1.45!important;
    white-space:normal!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    -webkit-box-orient:vertical!important;
    -webkit-line-clamp:2!important;
  }
  .csu-sticky-buy__price{
    display:block!important;
    width:100%!important;
    margin:0!important;
    color:#ed1944!important;
    font-size:13px!important;
    font-weight:900!important;
    line-height:1.45!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }
  .csu-sticky-buy__button{
    order:2!important;
    flex:0 0 43%!important;
    width:43%!important;
    min-width:0!important;
    min-height:52px!important;
    max-width:280px!important;
    padding:5px 10px!important;
    border-radius:14px!important;
    font-size:14px!important;
    font-weight:900!important;
    line-height:1.35!important;
    text-align:center!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    gap:5px!important;
    box-shadow:0 7px 20px rgba(237,25,68,.24)!important;
  }
  .csu-sticky-buy__button>span:last-child{
    min-width:0!important;
  }
  .csu-sticky-buy__icon{font-size:17px!important;flex:0 0 auto!important}
}

/* CLS hardening: don't allow images/media to collapse while loading. */
.csu-product-card__media{contain:layout paint size!important}

/* 5.0.2 — fullscreen search is a temporary presentation state only.
 * The DOM and inline styles of sticky purchase/navigation are never mutated.
 * These rules intentionally live in the final asset so they win over product/mobile
 * presentation rules while .csu-search-open exists, and disappear automatically on close. */
html.csu-search-open body.single-product .csu-sticky-buy,
html.csu-search-open body .csu-sticky-buy,
html.csu-search-open body .csu-mobile-bottom-nav,
html.csu-search-open body .csu-mobile-nav,
html.csu-search-open body .csu-mobile-nav__bar{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* CafeStore 5.1.5 — final UI contract: PWA prompt, desktop header order, OS dark mode. */

/* PWA install prompt must sit below the mega-menu but above the fixed header. It also
 * respects the device safe area and the real measured header height. */
.csu-install-prompt.is-visible{
  top:calc(var(--cs-site-header-height-px, 76px) + env(safe-area-inset-top, 0px) + 12px)!important;
  z-index:2147482500!important;
  max-width:min(520px,calc(100vw - 24px))!important;
}
@media(max-width:767px){
  .csu-install-prompt.is-visible{
    left:12px!important;right:12px!important;
    top:calc(var(--cs-site-header-height-px, 62px) + env(safe-area-inset-top, 0px) + 10px)!important;
  }
}

/* Desktop header: one row, deterministic visual order in RTL:
 * logo → search → favorites → compare → mega menu. */
@media(min-width:768px){
  .cs-site-header{z-index:2147480000!important;overflow:visible!important;}
  .cs-header-inner{
    width:min(calc(100% - 32px),var(--cs-container-width,1240px))!important;
    grid-template-columns:minmax(150px,180px) minmax(178px,190px) minmax(240px,1fr) 78px!important;
    grid-template-areas:'category engagement search brand'!important;
    direction:ltr!important;
    gap:10px!important;
    align-items:center!important;
    min-width:0!important;
    white-space:nowrap!important;
  }
  .cs-header-category{grid-area:category!important;min-width:0!important;width:100%!important;}
  .cs-header-category .csmm-trigger{width:100%!important;max-width:none!important;white-space:nowrap!important;}
  .cs-header-engagement{
    grid-area:engagement!important;
    direction:ltr!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:center!important;
    justify-content:center!important;
    gap:4px!important;
    min-width:0!important;
    white-space:nowrap!important;
  }
  .cs-header-favorites,.cs-header-compare{
    flex:0 0 auto!important;
    min-width:max-content!important;
    white-space:nowrap!important;
  }
  .cs-header-search{grid-area:search!important;min-width:0!important;width:100%!important;}
  .cs-brand{grid-area:brand!important;width:78px!important;min-width:78px!important;max-width:78px!important;}
}
@media(min-width:768px) and (max-width:1050px){
  .cs-header-inner{grid-template-columns:minmax(130px,150px) minmax(166px,178px) minmax(220px,1fr) 70px!important;gap:6px!important;}
  .cs-header-favorites,.cs-header-compare{font-size:11px!important;padding-inline:4px!important;gap:3px!important;}
  .cs-header-favorites svg,.cs-header-compare .csu-compare-icon{width:18px!important;height:18px!important;flex-basis:18px!important;}
  .cs-brand{width:70px!important;min-width:70px!important;max-width:70px!important;}
}

/* Mega-menu remains above every site chrome. */
.csmm-overlay{z-index:2147483000!important;}

/* OS-driven dark mode only: no user toggle or persistent override is introduced. */
:root{color-scheme:light;}
@media(prefers-color-scheme:dark){
  :root{
    color-scheme:dark;
    --cs-primary:#ff3d67;
    --cs-primary-dark:#e52b54;
    --cs-surface:#171a20;
    --cs-page:#0f1115;
    --cs-text:#f2f4f7;
    --cs-muted:#a8b0bc;
    --cs-border:#2b313b;
    --cs-bg:#0f1115;
    --cs-card:#171a20;
    --cs-color-primary:#ff3d67;
    --cs-color-secondary:#f2f4f7;
    --cs-color-text:#eef1f5;
    --cs-color-muted:#a8b0bc;
    --cs-color-border:#2b313b;
    --cs-color-surface:#171a20;
    --cs-color-bg:#0f1115;
    --csmm-accent:#ff3d67;
    --csmm-accent-soft:#34131d;
    --csmm-bg:#15181e;
    --csmm-text:#f2f4f7;
    --csmm-muted:#a8b0bc;
    --csmm-border:#303641;
  }
  html,body{background:#0f1115!important;color:#eef1f5!important;}
  body{color-scheme:dark;}
  .cs-site-header{background:rgba(21,24,30,.97)!important;border-color:#2b313b!important;box-shadow:0 2px 18px rgba(0,0,0,.28)!important;}
  .cs-header-search form,.cs-header-search .csu-native-search__form{background:#171a20!important;border-color:#303641!important;}
  .cs-header-search input[type=search],.csu-native-search__input{color:#eef1f5!important;caret-color:#ff3d67!important;}
  .cs-header-search input::placeholder,.csu-native-search__input::placeholder{color:#89929f!important;}
  .cs-header-engagement a{color:#eef1f5!important;}
  .cs-breadcrumb-wrap,.cs-breadcrumb{background:#15181e!important;border-color:#2b313b!important;}
  .cs-breadcrumb,.cs-breadcrumb a{color:#a8b0bc!important;}
  .cs-breadcrumb .breadcrumb_last{color:#eef1f5!important;}
  .cs-main,.cs-content{background:#0f1115!important;}
  .cs-card-section,.cs-archive-heading-card,.cs-home-shell>.cs-home-section,.cs-home-shell>section,.cs-home-shell>.wp-block-group{background:#171a20!important;border-color:#2b313b!important;color:#eef1f5!important;box-shadow:0 8px 28px rgba(0,0,0,.22)!important;}
  .cs-archive-heading-card h1,.cs-archive-title h1{color:#f2f4f7!important;}
  .cs-home-section,.csu-home-section,.csu-home-category,.csu-home-faq details,.csu-home-hero__quick a,.csu-home-hero__eyebrow,.cfs-product-section,.cfs-hero-badge,.cfs-btn--ghost{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important;}
  .cs-footer{background:#0a0c10!important;border-color:#2b313b!important;}
  .csu-install-prompt.is-visible{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important;box-shadow:0 18px 50px rgba(0,0,0,.48)!important;}
  .csu-install-prompt__body strong{color:#f2f4f7!important;}
  .csu-install-prompt__body span{color:#a8b0bc!important;}
  .csu-install-prompt__close{background:#242932!important;color:#d5dae1!important;border-color:#343b47!important;}
  .csmm-panel,.csmm-header,.csmm-sidebar,.csmm-cat-item,.csmm-sub-item{background:#15181e!important;color:#eef1f5!important;border-color:#303641!important;}
  .csmm-body{background:#0f1115!important;}
  .csmm-title,.csmm-cat-item .csmm-name,.csmm-sub-item strong{color:#eef1f5!important;}
  .csmm-cat-item:hover,.csmm-cat-item:focus-visible{background:#1d222a!important;color:#ff6b89!important;}
  .csmm-cat-item.is-active{background:#34131d!important;color:#ff6b89!important;}
  .csmm-sub-item:hover,.csmm-sub-item:focus-visible{background:#1c2027!important;border-color:#4a3340!important;}
  .csmm-close,.csmm-back{background:#1d222a!important;color:#e6e9ee!important;border-color:#343b47!important;}
  .csmm-close:hover,.csmm-back:hover{background:#34131d!important;border-color:#703444!important;color:#ff6b89!important;}
  .csu-native-search__suggestions,.csu-search-group,.csu-search-query-box,.csu-discover-chip,.csu-discover-product,.csu-search-intel__chip,.csu-visual-result,.csu-visual-loading,.csu-product-card,.csu-product-card__body,.csu-native-search__close,.csu-native-search__voice-status{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important;}
  .csu-native-search.is-open,.csu-native-search.is-open .csu-native-search__suggestions{background:#0f1115!important;}
  .csu-search-all,.csu-discover-chip--search .csu-discover-chip__icon,.csu-search-discover__spark,.csu-search-intel__chip>span,.csu-visual-results__icon{background:#34131d!important;color:#ff6b89!important;border-color:#4a2631!important;}
  .csu-native-search__close{color:#d8dde5!important;}
  .csu-native-search__voice:hover,.csu-native-search__visual:hover{background:transparent!important;}
  .csu-native-search__voice.is-listening{background:transparent!important;color:#ff5b7b!important;}
  .csu-single-visual-row .csu-action-box,.csu-single-visual-row .csu-action-box .csu-action,.csu-single-visual-row .csu-action-box .csu-compare-toggle--compact,.csu-product-gallery__viewport,.csu-product-gallery__thumb,.csu-sticky-buy-fixed,.csu-favorite-row,.csu-favorites-empty,.csu-compare__head,.csu-compare__table-wrap,.csu-compare__empty,.csu-compare__mobile-card,.csu-price-history-chart,.csu-report-dialog,.csu-price-history-dialog{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important;}
  .csu-single-visual-row .csu-action-box .csu-action:hover,.csu-single-visual-row .csu-action-box .csu-compare-toggle--compact:hover{background:#1d222a!important;border-color:#3a414d!important;color:#ff6b89!important;}
  .csu-product-gallery__viewport .csu-slider-arrow,.csu-compare-clear,.csu-compare-toggle,.csu-compare-link,.csu-favorites-more button{background:#1d222a!important;border-color:#343b47!important;color:#eef1f5!important;}
  .csu-related-marker{background:#1a1e25!important;border-color:#303641!important;color:#a8b0bc!important;}
  .csu-related-marker.csu-related-retry{background:#34131d!important;border-color:#633140!important;color:#ff7b96!important;}
  .woocommerce div.product .woocommerce-tabs,.single-product .entry-summary > *{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important;}
  .single-product .entry-summary > .price{background:#2a151c!important;color:#ff6b89!important;}
  .single-product .csu-related{background:#171a20!important;}
  .woocommerce,.woocommerce-page{color:#eef1f5!important;}
  a{color:inherit;}
  input,select,textarea{background:#171a20!important;color:#eef1f5!important;border-color:#303641!important;}
  input::placeholder,textarea::placeholder{color:#89929f!important;}
  ::selection{background:#ff3d67;color:#fff;}
}

/* 5.1.5 — shared footer polish and a single dark-mode token layer for all CafeStore modules. */
.cs-footer{position:relative!important;border-top:1px solid rgba(255,255,255,.08)!important}
.cs-footer-inner{max-width:1240px!important}
.cs-footer-heading-row{min-height:42px!important}
.cs-footer-heading-row h2,.cs-footer h2,.cs-footer h3{letter-spacing:-.01em}
.cs-footer-column{min-width:0}
.cs-footer-nav a{display:inline-flex!important;align-items:center;min-height:30px;padding-inline:2px;color:#b8bec7;text-decoration:none!important;border-radius:6px;transition:color .15s ease,background .15s ease}
.cs-footer-nav a:hover,.cs-footer-nav a:focus-visible{color:#fff!important;background:rgba(255,255,255,.055);outline:none}
.cs-footer-about{line-height:1.9!important}
.cs-footer-bottom{align-items:center}
@media(max-width:640px){.cs-footer-bottom{align-items:flex-start}.cs-footer-nav a{min-height:34px}}

@media(prefers-color-scheme:dark){
  :root{
    --csu-red:#ff4b70;
    --csu-ink:#f2f4f7;
    --csu-muted:#a8b0bc;
    --csu-border:#303641;
    --csu-soft:#1d222a;
  }

  /* Prevent legacy black text from surviving inside dark surfaces. */
  .csu-favorites-page,
  .csu-compare,
  .csu-report-dialog,
  .csu-price-history-dialog,
  .csu-product-card,
  .csu-single-visual-row,
  .csu-search-discover,
  .csu-native-search__suggestions{color:#eef1f5!important}

  .csu-favorites-head,.csu-favorite-row,.csu-favorites-empty,.csu-favorites-more button,
  .csu-compare__head,.csu-compare__table-wrap,.csu-compare__empty,.csu-compare__mobile-card,
  .csu-report-dialog,.csu-price-history-dialog,.csu-price-history-chart{background:#171a20!important;border-color:#303641!important;color:#eef1f5!important}

  .csu-favorites-head{background:linear-gradient(135deg,#171a20 0%,#21161b 100%)!important}
  .csu-favorites-head__title h1,.csu-favorites-head__title p strong,
  .csu-favorites-empty strong,.csu-favorite-row__content strong,
  .csu-compare__head h1,.csu-compare__empty strong,
  .csu-compare__table thead a,.csu-compare__table thead strong{color:#f2f4f7!important}
  .csu-favorites-head__title p,.csu-favorites-toolbar,.csu-favorites-empty p,.csu-compare__head p,.csu-compare__empty p{color:#a8b0bc!important}
  .csu-favorites-eyebrow,.csu-favorites-row__price,.csu-favorite-row__price,.csu-compare__eyebrow{color:#ff6b89!important}
  .csu-favorites-clear,.csu-compare-clear,.csu-compare-link{background:#1d222a!important;border-color:#343b47!important;color:#e9edf2!important}
  .csu-favorites-clear:not(:disabled):hover,.csu-favorites-clear:not(:disabled):focus-visible,.csu-compare-clear:hover,.csu-compare-clear:focus-visible{background:#2a1d23!important;border-color:#663442!important;color:#ff7b96!important}
  .csu-favorite-row__media{background:#111419!important;border-color:#303641!important}
  .csu-favorite-remove{background:#2a151c!important;border-color:#633140!important;color:#ff6b89!important}
  .csu-favorite-remove:hover,.csu-favorite-remove:focus-visible{background:#351a23!important;border-color:#7b3a4c!important}
  .csu-favorites-empty{background:linear-gradient(180deg,#171a20 0%,#12151a 100%)!important}
  .csu-favorites-empty__icon,.csu-compare__empty-icon{background:#34131d!important;border-color:#633140!important;color:#ff6b89!important}

  .csu-compare__count{background:#34131d!important;border-color:#633140!important;color:#ff7b96!important}
  .csu-compare__table thead th{background:#171a20!important;color:#eef1f5!important;border-color:#303641!important}
  .csu-compare__table thead th:first-child,.csu-compare__table tbody th{background:#1b1f26!important;color:#eef1f5!important;box-shadow:-5px 0 12px rgba(0,0,0,.2)!important}
  .csu-compare__table tbody tr:nth-child(even) td{background:#15181e!important}
  .csu-compare__table tbody td{color:#d8dde5!important;border-color:#2b313b!important}
  .csu-compare__table .csu-compare__spec-heading th{background:#20252d!important;color:#aeb6c2!important}
  .csu-compare__mobile-row{border-color:#2b313b!important}
  .csu-compare__mobile-label{color:#aeb6c2!important}
  .csu-compare__mobile-value{color:#eef1f5!important}
  .csu-compare-remove,.csu-compare__mobile-remove{background:#242932!important;color:#d9dee5!important}
  .csu-compare-remove:hover,.csu-compare-remove:focus-visible,.csu-compare__mobile-remove:hover,.csu-compare__mobile-remove:focus-visible{background:#351a23!important;color:#ff6b89!important;border-color:#7b3a4c!important}

  /* Plugin-generated product/card titles and controls. */
  .csu-product-card{background:#171a20!important;border-color:#303641!important;box-shadow:0 4px 18px rgba(0,0,0,.2)!important}
  .csu-product-card__title,.csu-product-card__body-link{color:#eef1f5!important}
  .csu-product-card__price,.csu-product-card__price ins{color:#ff6b89!important}
  .csu-product-card__price del{color:#89929f!important}
  .csu-card__media-actions .csu-card-favorite,.csu-card__media-actions .csu-compare-toggle{background:#1d222a!important;border-color:#343b47!important;color:#cdd3dc!important;box-shadow:none!important}
  .csu-card__media-actions .csu-card-favorite.is-active,.csu-card__media-actions .csu-compare-toggle.is-active{background:#34131d!important;border-color:#633140!important;color:#ff6b89!important}

  /* Footer: keep every heading and link readable; the footer is intentionally dark in both modes. */
  .cs-footer{background:#090c10!important;color:#eef1f5!important;border-color:#2b313b!important}
  .cs-footer h2,.cs-footer h3,.cs-footer-heading-row h2,.cs-footer-about strong{color:#f4f6f8!important}
  .cs-footer p,.cs-footer-nav,.cs-footer-nav a,.cs-footer-about,.cs-footer-bottom{color:#aeb6c2!important}
  .cs-footer-nav a:hover,.cs-footer-nav a:focus-visible{color:#fff!important;background:rgba(255,255,255,.06)!important}
  .cs-footer-toggle{background:#171b21!important;border-color:#343b47!important;color:#e8ecf1!important}
  .cs-footer-about{background:rgba(255,255,255,.035)!important;border-color:rgba(255,255,255,.1)!important}
  .cs-footer-bottom{border-color:rgba(255,255,255,.1)!important}

  /* Dialogs and native form controls. */
  .csu-report-dialog h2,.csu-price-history-dialog h2{color:#f2f4f7!important}
  .csu-report-dialog>p,.csu-report-status,.csu-price-history-note,.csu-price-history-empty{color:#a8b0bc!important}
  .csu-report-dialog label{color:#dce1e8!important}
  .csu-report-close,.csu-price-history-close{background:#242932!important;color:#e4e8ed!important;border-color:#343b47!important}
  .csu-report-dialog textarea{background:#111419!important;color:#eef1f5!important;border-color:#303641!important}
  .csu-price-history-chart{background:#111419!important}
}


/* 5.1.6 — single-product responsive hardening and mobile browser compatibility. */
.single-product .cs-single-product{width:min(100%,1240px)!important;margin-inline:auto!important;min-width:0!important;}
.single-product .cs-single-product__inner{align-items:start!important;}
.single-product .entry-summary{min-width:0!important;overflow-wrap:anywhere!important;}
.single-product .entry-summary .product_title{color:var(--csu-ink,#20232a)!important;}
.single-product .entry-summary .woocommerce-product-details__short-description,.single-product .entry-summary .product_meta{overflow-wrap:anywhere!important;}
@media(min-width:1101px){
  .single-product .entry-summary{position:sticky!important;top:calc(var(--cs-site-header-height-px,76px) + 16px)!important;align-self:start!important;}
}
@media(max-width:1100px){
  .single-product .cs-single-product__inner{grid-template-columns:1fr!important;}
  .single-product .entry-summary{position:static!important;}
}
@media(max-width:767px){
  .single-product .cs-content{padding-top:8px!important;padding-bottom:calc(18px + env(safe-area-inset-bottom))!important;}
  .single-product .cs-single-product{width:100%!important;}
  .single-product .cs-single-product__inner{gap:10px!important;}
  .single-product .entry-summary{margin-inline:0!important;}
  .single-product .entry-summary > *{overflow-wrap:anywhere!important;}
  .single-product .woocommerce-tabs{padding:14px!important;margin-top:12px!important;}
  .single-product .woocommerce-tabs ul.tabs{display:flex!important;gap:8px!important;overflow-x:auto!important;white-space:nowrap!important;scrollbar-width:none!important;-webkit-overflow-scrolling:touch!important;padding-bottom:8px!important;}
  .single-product .woocommerce-tabs ul.tabs::-webkit-scrollbar{display:none!important;}
  .single-product .woocommerce-tabs ul.tabs li{flex:0 0 auto!important;padding:0 0 8px!important;}
  .single-product .csu-product-gallery__track{-webkit-overflow-scrolling:touch!important;overscroll-behavior-x:contain!important;touch-action:pan-x!important;}
  .single-product .csu-product-gallery__viewport{min-height:0!important;max-height:none!important;aspect-ratio:1/1!important;}
  .single-product .csu-product-gallery__slide{padding:7px!important;}
  .single-product .csu-product-gallery__image{max-width:100%!important;max-height:100%!important;}
}
@media(max-width:380px){
  .single-product .entry-summary > .product_title{font-size:17px!important;}
  .single-product .csu-product-gallery__thumb{flex-basis:46px!important;width:46px!important;height:46px!important;min-width:46px!important;}
}

/* Dynamic viewport units avoid the mobile address-bar jump on Chrome Android/Safari. */
@supports(height:100dvh){
  .csu-report-modal,.csu-price-history-modal{min-height:100dvh!important;}
  .csu-native-search.is-open{min-height:100dvh!important;}
}
@supports(height:100svh){
  .csu-report-modal,.csu-price-history-modal{min-height:100svh!important;}
}
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;}
button,a,input,select,textarea{-webkit-tap-highlight-color:transparent;}

/* PWA/install prompt: reserve the fixed header lane on every mobile viewport. */
.csu-install-prompt.is-visible{top:calc(var(--cs-site-header-height-px,76px) + env(safe-area-inset-top,0px) + 10px)!important;}
@media(min-width:768px){.csu-install-prompt.is-visible{top:calc(var(--cs-site-header-height-px,76px) + 12px)!important;}}

/* 5.1.6 — final product dark-mode tokens; no legacy black headings remain. */
@media(prefers-color-scheme:dark){
  .single-product .entry-summary > .product_title,.single-product .entry-summary h1,.single-product .entry-summary h2,.single-product .entry-summary h3,.single-product .woocommerce-tabs h2,.single-product .woocommerce-tabs h3{color:#f2f4f7!important;}
  .single-product .entry-summary > .woocommerce-product-details__short-description,.single-product .entry-summary > .product_meta{color:#c1c8d2!important;}
  .single-product .entry-summary > .product_meta a{color:#ff6b89!important;}
  .single-product .entry-summary > .price del{color:#8f98a5!important;}
  .single-product .entry-summary > form.cart input,.single-product .entry-summary > form.cart select,.single-product .entry-summary > form.cart textarea{background:#111419!important;color:#eef1f5!important;border-color:#303641!important;}
  .single-product .woocommerce-tabs ul.tabs{border-color:#303641!important;}
  .single-product .woocommerce-tabs ul.tabs li a{color:#aeb6c2!important;}
  .single-product .woocommerce-tabs ul.tabs li.active a{color:#ff6b89!important;}
  .single-product .csu-product-gallery__viewport{background:#111419!important;border-color:#303641!important;box-shadow:0 8px 26px rgba(0,0,0,.28)!important;}
  .single-product .csu-product-gallery__thumb{background:#171a20!important;border-color:#343b47!important;}
  .single-product .csu-product-gallery__viewport .csu-slider-arrow{background:#1d222a!important;border-color:#343b47!important;color:#eef1f5!important;}
  .single-product .csu-related h2,.single-product .csu-related h3,.single-product .csu-related .csu-section-heading h2{color:#f2f4f7!important;}
}
