/* =====================================================================
   Layout: topbar, nav, search, drawer, bottom bar, footer, spacing
   ===================================================================== */
body{display:flex;flex-direction:column;min-height:100dvh}
body::before{content:"";position:fixed;inset:0;z-index:-1;background:radial-gradient(48% 42% at 14% 4%,var(--fl-primary-soft),transparent 62%),radial-gradient(44% 40% at 92% 96%,color-mix(in srgb,var(--fl-accent) 12%,transparent),transparent 62%),var(--fl-bg);transition:background .3s}

.app__body{flex:1 1 auto;width:100%;outline:none}
.app__body .container{padding-block:14px var(--fl-gut)}

/* ---------- Topbar ---------- */
.topbar{position:sticky;top:0;z-index:var(--z-header);display:flex;align-items:center;gap:10px;height:var(--fl-header-h);padding-inline:var(--fl-gut);background:color-mix(in srgb,var(--fl-bg) 78%,transparent);backdrop-filter:saturate(160%) blur(16px);-webkit-backdrop-filter:saturate(160%) blur(16px);border-bottom:1px solid var(--fl-border-2)}
.brand{display:flex;align-items:center;gap:9px;color:var(--fl-text);font-weight:900;min-width:0;margin-inline-end:auto}
.brand .custom-logo{height:32px;width:auto;max-width:140px;object-fit:contain;display:block}
.brand img{max-height:32px;width:auto;max-width:140px;object-fit:contain}
.brand__name{font-size:17px;letter-spacing:-.2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar__actions{display:flex;align-items:center;gap:4px}

/* Resolved theme toggle */
.fl-theme__sun{display:none;align-items:center;justify-content:center}
html[data-theme="dark"] .fl-theme__sun{display:flex}
html[data-theme="dark"] .fl-theme__moon{display:none}
.fl-theme__moon{display:flex;align-items:center;justify-content:center}
.fl-theme .i{width:22px;height:22px}

/* ---------- Desktop nav + search ---------- */
.nav-desktop{display:none}
@media (min-width:992px){
  .brand .custom-logo{height:38px;max-width:180px}
  .brand img{max-height:38px;max-width:180px}
  .nav-desktop{display:block;flex:1 1 auto;margin-inline-start:6px}
  .nav-desktop ul{list-style:none;display:flex;gap:2px;align-items:center}
  .nav-desktop a{display:inline-flex;padding:9px 14px;border-radius:var(--fl-radius-pill);font-weight:700;font-size:14px;color:var(--fl-muted);transition:color .15s,background .15s}
  .nav-desktop a:hover{color:var(--fl-primary);background:var(--fl-primary-soft)}
  .nav-desktop .current-menu-item>a{color:var(--fl-primary);background:var(--fl-primary-soft)}
  .topbar__menu{display:none}
}
.topbar__menu{margin-inline-start:-6px}
.topbar__cart{position:relative}

/* ---------- Footer ---------- */
.app__foot{flex-shrink:0;margin-top:auto;background:var(--fl-bg-soft);border-top:1px solid var(--fl-border-2)}
.app__foot-inner{max-width:var(--fl-maxw);margin-inline:auto;padding:44px var(--fl-gut) 120px;text-align:center}
.app__foot-brand{display:flex;align-items:center;justify-content:center;font-weight:900;font-size:18px;color:var(--fl-text)}
.app__foot-about{color:var(--fl-muted);font-size:13.5px;max-width:380px;margin:12px auto 0;line-height:1.9}
.app__foot-sidebar{margin-top:22px;display:flex;justify-content:center;flex-wrap:wrap;gap:20px}
.app__foot-sidebar .widget{max-width:260px}
.app__foot-sidebar .widget__title{font-size:14px;margin:0 0 8px;color:var(--fl-text)}
.app__foot-sidebar ul{list-style:none;display:flex;flex-direction:column;gap:6px;font-size:13px;color:var(--fl-muted)}
.app__foot-sidebar a:hover{color:var(--fl-primary)}
.app__foot-pay{display:inline-flex;align-items:center;gap:7px;margin-top:22px;padding:9px 16px;border-radius:var(--fl-radius-pill);background:var(--fl-surface);border:1px solid var(--fl-border-2);font-size:12.5px;font-weight:700;color:var(--fl-muted)}
.app__foot-pay .i{width:16px;height:16px;color:var(--fl-success)}
.app__foot-copy{color:var(--fl-muted-2);font-size:12px;margin-top:22px}
@media (min-width:992px){
  .app__foot-inner{padding-bottom:48px}
}

/* ---------- Floating bottom bar (mobile) ---------- */
.bottom-bar{position:fixed;inset-inline:12px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:var(--z-header);display:flex;align-items:stretch;padding:5px;border-radius:20px;background:color-mix(in srgb,var(--fl-surface) 90%,transparent);backdrop-filter:blur(20px) saturate(170%);-webkit-backdrop-filter:blur(20px) saturate(170%);border:1px solid var(--fl-border-2);box-shadow:var(--fl-shadow-lg)}
.bottom-bar__item{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:3px 2px 4px;border-radius:15px;color:var(--fl-muted);font-size:9.5px;font-weight:700;position:relative;transition:color .22s,transform .15s}
.bottom-bar__item:active{transform:scale(.9)}
.bottom-bar__item:hover{color:var(--fl-text)}
.bottom-bar__item.is-active{color:var(--fl-primary)}
.bottom-bar__icon{position:relative;display:grid;place-items:center;width:42px;height:28px;border-radius:15px;transition:background .25s,color .25s,box-shadow .25s,transform .25s}
.bottom-bar__icon .i{width:19px;height:19px;transition:transform .25s}
.bottom-bar__item.is-active .bottom-bar__icon{background:var(--fl-grad);color:#fff;box-shadow:0 7px 16px -7px var(--fl-primary)}
.bottom-bar__item.is-active .bottom-bar__icon .i{transform:scale(1.1)}
.bottom-bar__label{position:relative;transition:color .2s;white-space:nowrap}
.bottom-bar__item.is-active .bottom-bar__label{font-weight:800}
.bottom-bar__icon .badge,.bottom-bar__icon .badge-count{top:-5px;inset-inline-end:-10px;min-width:16px;height:16px;font-size:9.5px;line-height:16px;padding:0 4px;box-shadow:none;border:2px solid var(--fl-surface)}
.bottom-bar__icon .badge.fl-bump,.bottom-bar__icon .badge-count.fl-bump{animation:flBump .45s cubic-bezier(.2,1.4,.4,1)}
.bottom-bar__item.is-active .bottom-bar__icon .badge,.bottom-bar__item.is-active .bottom-bar__icon .badge-count{border-color:color-mix(in srgb,var(--fl-primary) 60%,transparent)}
@media (min-width:992px){.bottom-bar{display:none}}

/* ---------- Drawer ---------- */
.drawer{position:fixed;inset-block:0;inset-inline-start:0;z-index:var(--z-drawer);width:min(84%,324px);background:var(--fl-surface);display:flex;flex-direction:column;border-inline-end:1px solid var(--fl-border-2);box-shadow:var(--fl-shadow-lg);transform:translateX(-108%);transition:transform .34s cubic-bezier(.22,.61,.36,1);visibility:hidden}
.drawer.is-open{transform:translateX(0);visibility:visible}
html[dir="rtl"] .drawer{inset-inline-start:auto;inset-inline-end:0;transform:translateX(108%);border-inline-end:none;border-inline-start:1px solid var(--fl-border-2)}
html[dir="rtl"] .drawer.is-open{transform:translateX(0)}
.drawer__grab{width:38px;height:4px;border-radius:var(--fl-radius-pill);align-self:center;margin:9px auto 2px;background:var(--fl-border-2)}
.drawer__head{display:flex;align-items:center;justify-content:space-between;padding:6px 6px 10px 14px}
.drawer__title{font-weight:900;font-size:16px}
.drawer__account{display:flex;align-items:center;gap:12px;margin:0 8px 14px;padding:12px;border-radius:var(--fl-radius);background:var(--fl-surface-2);border:1px solid var(--fl-border-2)}
.drawer__account-avatar{width:42px;height:42px;flex:none;border-radius:12px;display:grid;place-items:center;background:var(--fl-grad);color:#fff}
.drawer__account-avatar .i{width:22px;height:22px}
.drawer__account-meta{display:flex;flex-direction:column;min-width:0}
.drawer__account-name{font-weight:800;font-size:14px;color:var(--fl-text);line-height:1.4}
.drawer__nav{flex:1;overflow-y:auto;padding-inline:8px}
.drawer__list{list-style:none;display:flex;flex-direction:column;gap:3px}
.drawer__list a{display:flex;align-items:center;gap:13px;padding:12px 13px;border-radius:13px;font-weight:700;font-size:14.5px;color:var(--fl-text);transition:background .15s,color .15s,transform .1s}
.drawer__list a:hover{background:var(--fl-surface-2)}
.drawer__list .current-menu-item>a,.drawer__list a:hover{color:var(--fl-primary)}
.drawer__list a .i{width:20px;height:20px;color:var(--fl-muted)}
.drawer__list .current-menu-item>a .i,.drawer__list a:hover .i{color:var(--fl-primary)}
.drawer__list .sub-menu{list-style:none;padding-inline-start:14px}
.drawer__list .sub-menu a{font-size:13.5px;color:var(--fl-muted)}
.drawer__extra{margin-top:14px;padding-top:14px;border-top:1px solid var(--fl-border-2);display:flex;flex-direction:column;gap:3px}
.drawer__extra a{display:flex;align-items:center;gap:13px;padding:11px 13px;border-radius:13px;font-weight:700;font-size:14px;color:var(--fl-muted)}
.drawer__extra a:hover{color:var(--fl-primary);background:var(--fl-primary-soft)}
.drawer__x-icon{display:grid;place-items:center;width:20px}
.drawer__x-icon .i{width:20px;height:20px;color:var(--fl-primary)}
.drawer__foot{margin:12px 0 0;padding:12px 8px 16px;border-top:1px solid var(--fl-border-2)}
.drawer__logout{display:flex;align-items:center;gap:12px;padding:12px 13px;border-radius:13px;font-weight:700;font-size:14px;color:var(--fl-danger)}
.drawer__logout:hover{background:color-mix(in srgb,var(--fl-danger) 12%,transparent)}
.drawer__logout .i{width:19px;height:19px}
.overlay{position:fixed;inset:0;z-index:var(--z-overlay);background:rgba(2,6,23,.5);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);opacity:0;visibility:hidden;transition:opacity .28s,visibility .28s}
.overlay.is-open{opacity:1;visibility:visible}

/* ---------- Search overlay (mobile + desktop) ---------- */
.search-overlay{position:fixed;inset:0;z-index:var(--z-search);background:var(--fl-bg);display:flex;flex-direction:column;padding:var(--fl-gut);padding-top:calc(var(--fl-header-h) + var(--fl-gut) + 8px);transform:translateY(14px);opacity:0;visibility:hidden;transition:transform .3s,opacity .3s,visibility .3s}
.search-overlay.is-open{transform:translateY(0);opacity:1;visibility:visible}
.search-overlay__bar{display:flex;align-items:center;gap:8px}
.search-form--xl{flex:1;display:flex;align-items:center;gap:8px;background:var(--fl-surface);border:2px solid var(--fl-border-2);border-radius:var(--fl-radius);padding:8px 8px 8px 16px;transition:border-color .2s,box-shadow .2s}
.search-form--xl:focus-within{border-color:var(--fl-primary);box-shadow:0 0 0 4px var(--fl-primary-ring)}
.search-form--xl .i{width:22px;height:22px;color:var(--fl-muted);flex:none}
.search-form--xl input{flex:1;border:none;background:none;outline:none;padding:10px 8px;font-size:16px;color:var(--fl-text)}
.search-form--xl input::placeholder{color:var(--fl-muted-2)}
.search-form--xl .btn{padding:10px 20px;flex:none}
.search-overlay__close{flex:none}
.search-overlay__quick{margin-top:28px}
.search-overlay__hint{font-size:12px;font-weight:800;color:var(--fl-muted);margin-bottom:10px}

/* ---------- Breadcrumbs + toolbar + section head ---------- */
.crumbs{display:flex;align-items:center;gap:6px;padding:8px 0 0;font-size:12.5px;color:var(--fl-muted);flex-wrap:wrap;max-width:var(--fl-maxw);margin-inline:auto}
.crumbs a{display:inline-flex;align-items:center;gap:6px;color:var(--fl-muted)}
.crumbs a:hover{color:var(--fl-primary)}
.crumbs__sep{width:12px;height:12px;opacity:.6}
.crumbs span:last-child{color:var(--fl-text);font-weight:800}
.toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:6px 0 14px}
.toolbar__title{font-size:24px}
.toolbar .woocommerce-result-count{color:var(--fl-muted);font-size:13px;margin:0}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:26px 0 16px}
.section-head h2{font-size:19px}
.section-head a{display:inline-flex;align-items:center;gap:5px;font-size:13px;font-weight:800;color:var(--fl-primary)}
.section-head a .i{width:16px;height:16px}

/* ---------- Sticky buy (mobile) ---------- */
.sticky-buy{position:fixed;inset-inline:14px;bottom:calc(var(--fl-bottombar-h) + env(safe-area-inset-bottom) + 18px);z-index:var(--z-buy);display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:18px;background:color-mix(in srgb,var(--fl-surface) 94%,transparent);backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);border:1px solid var(--fl-border-2);box-shadow:var(--fl-shadow-lg)}
.sticky-buy__price{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;line-height:1.15;min-width:0;flex:none}
.sticky-buy__now{font-weight:900;font-size:20px;color:var(--fl-text);white-space:nowrap}
.sticky-buy__old{font-size:12px;color:var(--fl-muted);text-decoration:line-through;text-decoration-thickness:1.5px;font-weight:600}
.sticky-buy__off{display:inline-block;font-size:11px;font-weight:800;color:#fff;background:var(--fl-danger);border-radius:var(--fl-radius-pill);padding:1px 7px;margin-top:2px;width:max-content}
.sticky-buy__oos-price{font-weight:900;font-size:18px;color:var(--fl-danger)}
.sticky-buy .btn{flex:1}
.sticky-buy .i{width:18px;height:18px}
.sticky-buy__qty{flex:none;border-radius:11px;background:var(--fl-surface-2);border:1px solid var(--fl-border-2)}
.sticky-buy__qty .product-qty__input{width:46px;height:42px;font-size:15px;font-weight:800}
.sticky-buy__qty .product-qty__btn{width:32px;height:42px;font-size:17px}
.sticky-buy__add{flex:1 1 auto;min-width:0;height:48px;padding:0 16px;border-radius:14px;border:none;display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--fl-grad,#e01646);color:#fff;font-weight:800;font-size:14px;box-shadow:0 8px 18px -8px var(--fl-primary);cursor:pointer;transition:transform .12s,box-shadow .18s,background .18s,opacity .18s;white-space:nowrap}
.sticky-buy__add:active{transform:scale(.97)}
.sticky-buy__add .i{width:20px;height:20px;flex:none}
.sticky-buy__add.is-loading .i{animation:fl-spin .8s linear infinite}
.sticky-buy__add.is-loading,.sticky-buy__add.is-disabled{opacity:.55;pointer-events:none;cursor:not-allowed;filter:saturate(.6)}
.sticky-buy__add.is-added{background:var(--fl-success)!important;box-shadow:0 8px 18px -8px var(--fl-success)!important}
@media (max-width:419px){
  .sticky-buy{gap:7px;padding:8px 10px;border-radius:15px}
  .sticky-buy__now{font-size:15px}
  .sticky-buy__old{font-size:10.5px}
  .sticky-buy__off{font-size:9.5px;padding:0 5px}
  .sticky-buy__oos-price{font-size:14px}
  .sticky-buy__qty{border-radius:9px}
  .sticky-buy__qty .product-qty__input{width:32px;height:32px;font-size:12.5px}
  .sticky-buy__qty .product-qty__btn{width:24px;height:32px;font-size:12px}
  .sticky-buy__add{height:34px;padding:0 9px;border-radius:10px;font-size:11px;gap:4px}
  .sticky-buy__add .i{width:14px;height:14px}
  .sticky-buy .i{width:14px;height:14px}
}
@media (min-width:992px){.sticky-buy{display:none}}

/* ---------- Scroll behavior ---------- */
.no-scroll{overflow:hidden!important}
