/* LokalFlow Storefront Polish V1.2 (20 Nov 2026)
 * Permanent full-bleed hero and meaningful compact catalogue spacing.
 * Visual-only; checkout, coupons, promotions, affiliate and voice ordering
 * remain unchanged.  Loaded after the base storefront CSS in order.php.
 */

/* A little more room for actual products, while retaining a readable header. */
.lf-shell{width:min(calc(100% - 32px),1120px)}
.lf-topbar-in{min-height:64px;padding:8px 0;gap:10px}
.lf-brand-id strong{font-size:1rem}
.lf-head-actions{gap:6px}
.lf-head-btn,.lf-lang{min-width:44px;height:44px;border-radius:12px}

/* Approved permanent full-width hero: edge-to-edge on all devices. */
.lf-shell > .lf-hero-carousel{
  position:relative;
  left:50%;
  width:100vw;
  max-width:none;
  margin:0 0 17px;
  transform:translateX(-50%);
  border-radius:0;
  box-shadow:none;
}
.lf-shell > .lf-hero-carousel .lf-hero-slide{
  aspect-ratio:auto;
  height:clamp(265px,34vw,540px);
}
.lf-hero-slide img{object-position:center center}

/* Consolidate ornamental white space without shrinking reading text. */
.lf-store{padding:7px 0 0}
.lf-store-status-only .lf-notices{margin-top:0}
.lf-notice-box{border-radius:12px}
.lf-notice-box summary{min-height:44px;padding:7px 11px}
#menu{padding-bottom:16px}
#mfilter,#menu.closed #mfilter{padding:4px 0 8px!important}
#mfilter input{height:48px;border-radius:14px;padding-left:44px;font-size:16px}
#mfilter::before{top:50%;left:16px;margin:0;transform:translateY(-50%)}
.lf-filter-rail{gap:7px;padding-bottom:10px}
.lf-filter-pill{min-height:44px;padding:0 13px;border-radius:999px}
.lf-catalog-head{margin:5px 0 9px}
.lf-catalog-head h2{font-size:1.52rem;margin-top:1px}
.lf-promo-strip{margin:2px 0 14px;padding:12px 14px;gap:10px;border-radius:14px}
.lf-promo-strip b{font-size:.94rem}
.lf-best{margin:2px 0 17px}
.lf-best-head{margin-bottom:9px}
.lf-best-rail{gap:9px}
.lf-best-body{padding:10px;gap:6px}
.lf-discover{margin:2px 0 17px}
.lf-discover-head{margin-bottom:9px}
.lf-video-rail{gap:9px}
#grid,#menu.closed #grid{gap:10px!important}
#grid .card,#grid.cmp .card{border-radius:16px}
#grid .card .in,#grid.cmp .card .in{padding:10px 11px 11px!important;gap:4px!important}
#grid .card .nm,#grid.cmp .card .nm{font-size:.9rem!important;line-height:1.26!important}
#grid .card .ds,#grid.cmp .card .ds{line-height:1.38!important}
#grid .card .bt,#grid.cmp .card .bt{padding-top:5px!important;gap:6px!important}
#grid .card .sale{padding:3px 7px!important;margin-top:1px}
#grid .card .add{padding-inline:10px!important}
#grid .card .pick{padding-inline:10px!important}
.lf-ownership-footer{margin-top:8px}

@media(max-width:600px){
  /* Reduce side gutters ~43% versus the original 28px total on phones.
     The header remains a bit roomier than the catalogue. */
  .lf-shell{width:calc(100% - 16px)}
  .lf-topbar .lf-shell{width:calc(100% - 24px)}
  .lf-topbar-in{min-height:58px;padding:7px 0}
  .lf-brand-logo,.lf-brand-fallback{width:40px;height:40px;flex-basis:40px}
  .lf-head-btn,.lf-lang{min-width:44px;height:44px}
  .lf-shell > .lf-hero-carousel{margin:0 0 12px;border-radius:0}
  .lf-shell > .lf-hero-carousel .lf-hero-slide{height:clamp(205px,62vw,310px)}
  .lf-hero-controls{left:11px;right:11px;bottom:9px}
  .lf-hero-arrows button{width:44px;height:44px}
  .lf-hero-dots{gap:7px}
  .lf-store{padding:5px 0 0}
  #mfilter,#menu.closed #mfilter{padding:3px 0 7px!important}
  .lf-filter-rail{gap:6px;padding-bottom:8px}
  .lf-filter-pill{padding-inline:12px}
  .lf-catalog-head{margin:3px 0 8px}
  .lf-catalog-head h2{font-size:1.4rem}
  .lf-promo-strip{margin:2px 0 11px;padding:11px 12px}
  .lf-best,.lf-discover{margin-bottom:13px}
  #grid,#menu.closed #grid{gap:8px!important}
  #grid .card .in,#grid.cmp .card .in{padding:9px 9px 10px!important;gap:4px!important}
  #grid .card .nm,#grid.cmp .card .nm{font-size:.88rem!important}
  #grid .card .bt,#grid.cmp .card .bt{padding-top:4px!important}
  #grid .card .add{padding-inline:8px!important}
  #grid .card .pick{padding-inline:9px!important}
}

@media(max-width:360px){
  /* Narrow devices still show product prices and functional controls. */
  .lf-shell{width:calc(100% - 16px)}
  .lf-brand-id strong{font-size:.92rem}
  #grid,#menu.closed #grid{gap:7px!important}
  #grid .card .in,#grid.cmp .card .in{padding:8px!important}
  #grid .card .add em{display:none}
}

@media(prefers-reduced-motion:reduce){
  .lf-shell > .lf-hero-carousel{scroll-behavior:auto}
}

/* V1.2: actual density pass.  V1.1 mainly trimmed a handful of margins;
   square product/featured media still dominated page height.  These changes
   shorten media and repeated UI *without* compressing critical checkout UI. */

/* Header: slightly shorter while retaining large actionable controls. */
.lf-topbar-in{min-height:58px;padding:5px 0;gap:9px}
.lf-brand-id span{margin-top:1px}
.lf-head-actions{gap:5px}
.lf-head-btn,.lf-lang{height:44px;min-width:44px;border-radius:11px}

/* Get to catalogue sooner. Search uses a legible 16px font to prevent iOS zoom. */
.lf-store-status-only{padding:3px 0 0}
.lf-store-status-only .lf-notices{margin:0}
.lf-notice-box summary{min-height:44px;padding:6px 10px}
#menu{padding-bottom:16px}
#mfilter,#menu.closed #mfilter{padding:2px 0 5px!important}
#mfilter input{height:46px;border-radius:13px;padding-left:42px;font-size:16px}
#mfilter::before{margin:0;top:50%;left:15px;transform:translateY(-50%)}
.lf-filter-rail{gap:6px;padding-bottom:6px}
.lf-filter-pill{min-height:44px;padding:0 11px;font-size:.73rem;line-height:1.2}
.lf-catalog-head{margin:2px 0 6px;gap:9px}
.lf-catalog-head h2{font-size:1.35rem;line-height:1.12;margin-top:0}
.lf-eyebrow{font-size:.6rem}
.lf-count{font-size:.66rem}

/* Keep seller promo meaningful, not a tall interruption before products. */
.lf-promo-strip{padding:10px 12px;gap:8px;margin:1px 0 10px;border-radius:13px}
.lf-promo-strip b{font-size:.88rem;line-height:1.25}
.lf-promo-strip span{margin-top:2px;line-height:1.35}

/* Compact optional content blocks: no changes to video playback or sales data. */
.lf-best{margin:2px 0 12px}
.lf-best-head,.lf-discover-head{margin-bottom:7px}
.lf-best-head h2,.lf-discover-head h2{font-size:1.06rem;margin-top:0}
.lf-best-rail,.lf-video-rail{gap:8px;padding-bottom:3px}
.lf-best-media{aspect-ratio:5/4}
.lf-best-body{padding:9px;gap:5px}
.lf-best-card,.lf-video-card{border-radius:14px}
.lf-best-add,.lf-best-pick,.lf-best-sold{min-height:40px}
.lf-discover{margin:2px 0 12px}
.lf-video-card{aspect-ratio:4/5}
.lf-video-card-copy{left:10px;right:10px;bottom:10px}

/* This is the key change: image/media height and text block density.
   Two lines of title preserved. Descriptions are teasers; buyer can open
   the existing detail overlay for the full product description. */
#grid,#menu.closed #grid{gap:8px!important}
#grid .card,#grid.cmp .card{border-radius:14px}
#grid .card .img,#grid.cmp .card .img,
#grid .card .noimg,#grid.cmp .card .noimg{aspect-ratio:5/4!important}
#grid .card .in,#grid.cmp .card .in{padding:9px 10px 10px!important;gap:4px!important}
#grid .card .nm,#grid.cmp .card .nm{
  display:-webkit-box!important;
  -webkit-box-orient:vertical!important;
  -webkit-line-clamp:2!important;
  line-clamp:2;
  overflow:hidden!important;
  font-size:.89rem!important;
  line-height:1.25!important;
}
#grid .card .ds,#grid.cmp .card .ds{
  -webkit-line-clamp:1!important;
  line-clamp:1;
  max-height:1.4em!important;
  font-size:.69rem!important;
}
#grid .card .sale{margin-top:0;padding:3px 7px!important}
#grid .card .bt,#grid.cmp .card .bt{padding-top:3px!important;gap:5px!important}
#grid .card .pr,#grid.cmp .card .pr{font-size:.88rem!important}
/* No reduction to CTA hit areas: visual trim comes from whitespace/media. */
#grid .card .add{min-height:44px!important;min-width:44px!important;padding:0 9px!important}
#grid .card .pick{min-height:44px!important;padding:8px 10px!important}
#grid .card .step button{min-width:36px;min-height:36px}
/* A two-column card at 320px cannot fit a long currency + quantity/pick
   row side by side. Wrap only when necessary instead of clipping controls. */
#grid .card .bt,#grid.cmp .card .bt{flex-wrap:wrap!important;row-gap:5px!important}
#grid .card .bt .pr,#grid.cmp .card .bt .pr{min-width:0;max-width:100%;overflow-wrap:anywhere}
#grid .card .bt .step,#grid.cmp .card .bt .step{flex-shrink:0;margin-left:auto}
#grid .card .bt .pick,#grid.cmp .card .bt .pick{margin-left:auto}

/* Optional footer review cards, only when reviews are present. Body-injected
   review stylesheet comes later in the DOM, so these rules use !important. */
.lf-reviews-storefront{margin:14px 0!important;padding:15px!important}
.lf-review-highlights{gap:8px!important;margin-top:10px!important}
.lf-review-highlight{padding:11px!important}
.lf-ownership-footer{margin-top:6px}

@media(max-width:600px){
  .lf-topbar-in{min-height:54px;padding:4px 0}
  .lf-brand-logo,.lf-brand-fallback{width:38px;height:38px;flex-basis:38px;border-radius:11px}
  .lf-head-btn,.lf-lang{height:44px;min-width:44px}
  .lf-shell > .lf-hero-carousel{margin:0 0 8px}
  .lf-store-status-only{padding-top:2px}
  #mfilter,#menu.closed #mfilter{padding:1px 0 4px!important}
  .lf-filter-rail{gap:5px;padding-bottom:4px}
  .lf-filter-pill{padding:0 10px}
  .lf-catalog-head{margin:2px 0 5px}
  .lf-catalog-head h2{font-size:1.25rem}
  .lf-promo-strip{padding:9px 10px;margin:1px 0 9px}
  .lf-best,.lf-discover{margin-bottom:10px}
  .lf-best-rail{grid-auto-columns:minmax(144px,40vw)}
  .lf-video-rail{grid-auto-columns:minmax(136px,39vw)}
  #grid,#menu.closed #grid{gap:7px!important}
  #grid .card .in,#grid.cmp .card .in{padding:8px 9px 9px!important;gap:3px!important}
  #grid .card .nm,#grid.cmp .card .nm{font-size:.86rem!important}
  #grid .card .ds,#grid.cmp .card .ds{font-size:.66rem!important}
  #grid .card .bt,#grid.cmp .card .bt{padding-top:3px!important}
}
@media(max-width:360px){
  /* Preserve price/quantity and 44px actions at the smallest viewport. */
  #grid .card .in,#grid.cmp .card .in{padding:8px!important}
  #grid .card .nm,#grid.cmp .card .nm{font-size:.82rem!important}
  #grid .card .pick{font-size:.65rem!important;padding-inline:8px!important}
}
@media(prefers-reduced-motion:reduce){
  #grid .card{animation:none}
}

/* V1.2.1 micro-polish — 20 Nov 2026
 * Screenshot feedback: smaller header controls and search, less-rounded,
 * slimmer category chips. Pure CSS; hero, colours, cart and checkout untouched.
 * Keep finger-sized hit areas by extending small visible button hitboxes. */

/* Search and language controls: 38/40px visual boxes with 44px effective hit areas. */
.lf-head-actions{gap:9px!important}
.lf-head-btn,.lf-lang{
  position:relative;
  box-sizing:border-box;
  height:38px;
  min-width:38px;
  border-radius:10px;
  padding:0;
  box-shadow:0 5px 15px -14px var(--sh);
}
.lf-head-btn{width:38px}
.lf-head-btn svg{width:17px;height:17px}
.lf-lang{width:40px;min-width:40px;padding:0 3px;font-size:.69rem;letter-spacing:0}
.lf-head-btn::after,.lf-lang::after{
  content:"";position:absolute;inset:-3px;
}

/* Main search: short but still readable with 16px type (no iPhone focus zoom). */
#mfilter input{
  box-sizing:border-box;
  height:42px;
  border-radius:12px;
  padding:0 13px 0 39px;
  font-size:16px;
}
#mfilter::before{
  left:12px;
  top:50%;
  margin:0;
  transform:translateY(-50%);
  font-size:1.16rem;
}

/* Category chips: rounded rectangles, not bubbles. A pseudo-element widens
 * the effective touch region without making the visible chips oversized. */
.lf-filter-rail{align-items:center;gap:9px;padding:4px 0 6px}
.lf-filter-pill{
  position:relative;
  box-sizing:border-box;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:36px;
  min-height:36px;
  padding:0 12px;
  border-radius:11px;
  line-height:1.2;
}
.lf-filter-pill::after{content:"";position:absolute;inset:-4px}

/* Retain a distinct keyboard focus for all compact controls. */
.lf-head-btn:focus-visible,.lf-lang:focus-visible,
.lf-filter-pill:focus-visible,#mfilter input:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}
@media(max-width:600px){
  .lf-topbar-in{gap:8px}
  .lf-head-actions{gap:9px!important}
  .lf-head-btn,.lf-lang{height:38px;min-width:38px;border-radius:10px}
  .lf-lang{width:40px;min-width:40px}
  #mfilter input{height:42px;border-radius:12px}
  .lf-filter-rail{gap:9px;padding:4px 0 6px}
  .lf-filter-pill{height:36px;min-height:36px;padding:0 11px;border-radius:10px}
}
@media(max-width:360px){
  .lf-head-actions{gap:8px!important}
  .lf-filter-pill{padding-inline:10px}
}

/* V1.2.2 (20 Nov 2026) — notice / search breathing room.
 * Founder feedback: the store note, header and search field read as one
 * crowded block on storefronts without hero banners (e.g. digital sellers).
 * This patch changes only the gaps BETWEEN blocks; compact control sizes,
 * category chips, catalogue, carousel and checkout are unchanged. */

/* Notice exists but no hero: 12px from sticky header to notice. */
main.lf-shell > .lf-store-status-only{
  padding-top:12px;
  padding-bottom:0;
}
/* When a hero is present its own margin already supplies some space. */
main.lf-shell > .lf-hero-carousel + .lf-store-status-only{
  padding-top:7px;
}
/* Always give the search a clear separation from the notice. */
main.lf-shell > .lf-store-status-only + #menu{
  margin-top:14px;
}
/* No notice, no hero: search does not stick to the bottom of the header. */
main.lf-shell > #menu:first-child{
  margin-top:12px;
}
/* Hero only: avoid redundant spacing under the banner. */
main.lf-shell > .lf-hero-carousel + #menu{
  margin-top:4px;
}
