/* ENTEBHOOMI home page: compact "Shop by Catalog" row at the very top + calmer automatic ads */

/* ---- Shop by Catalog: small round-icon chips, above the category icons ---- */
.hd-catwrap.hd-reserve{min-height:46px}  /* = real row height (40px chip + 2px + 4px rail padding); was 80px, which left a big empty gap above the category icons on phones / in the app */
body[data-page="home"] #featuredCatalogs.cc{
  display:block;background:transparent!important;border:0!important;box-shadow:none!important;border-radius:0!important;
  padding:0 0 2px!important;margin:0!important;overflow:visible!important;
}
body[data-page="home"] #featuredCatalogs.cc[hidden]{display:none!important}
/* the global "hide until the page has settled" rule would blank this row for a second; it is at the top, so show it at once */
body[data-page="home"]:not(.home-settled) #featuredCatalogs.cc{visibility:visible!important;animation:none!important}
body[data-page="home"] #featuredCatalogs .cc-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 2px 6px;margin:0}
body[data-page="home"] #featuredCatalogs .cc-title{margin:0;font:800 .95rem/1.2 'Work Sans',system-ui,sans-serif;letter-spacing:-.02em;color:var(--tk-ink,var(--eb57-text-18221c,#18221C));background:none;-webkit-text-fill-color:currentColor;animation:none}
body[data-page="home"] #featuredCatalogs .cc-title small{font-weight:600;font-size:.72rem;color:var(--eb57-text-748078,#748078);margin-left:7px;letter-spacing:0}
body[data-page="home"] #featuredCatalogs .cc-seeall{border:0;background:transparent;box-shadow:none;color:var(--tk-primary,var(--eb57-text-16834a,#16834A));font:700 .78rem 'Work Sans',system-ui,sans-serif;padding:6px 2px 6px 10px;cursor:pointer}
body[data-page="home"] #featuredCatalogs .cc-rail{display:flex;gap:8px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;padding:2px 2px 8px;margin:0;scrollbar-width:none;-webkit-overflow-scrolling:touch}
body[data-page="home"] #featuredCatalogs .cc-rail::-webkit-scrollbar{display:none}
body[data-page="home"] #featuredCatalogs .cc-chip{
  flex:0 0 auto;display:inline-flex;align-items:center;gap:7px;height:40px;padding:4px 14px 4px 4px;margin:0;
  border-radius:999px;border:1px solid var(--tk-line,var(--eb57-border-e7eee8,#E7EEE8));background:var(--eb57-surface-ffffff,#fff);box-shadow:0 1px 3px var(--eb57-shadow-12301f-50000,rgba(18,48,31,.05));
  color:var(--tk-ink,var(--eb57-text-18221c,#18221C));font:700 .78rem/1 'Work Sans',system-ui,sans-serif;white-space:nowrap;cursor:pointer;scroll-snap-align:start;
  transition:transform .15s ease,box-shadow .15s ease;
}
body[data-page="home"] #featuredCatalogs .cc-chip:active{transform:scale(.96)}
body[data-page="home"] #featuredCatalogs .cc-ico{width:32px;height:32px;flex:0 0 32px;border-radius:50%;overflow:hidden;background:var(--tk-tint,var(--eb57-surface-eaf5ee,#EAF5EE));
  display:grid;place-items:center;font:800 .95rem/1 'Work Sans',system-ui,sans-serif;color:var(--tk-deep,var(--eb57-text-126b3d,#126B3D))}
body[data-page="home"] #featuredCatalogs .cc-ico img{width:100%;height:100%;object-fit:cover;display:block}
@media(min-width:900px){
  .hd-catwrap.hd-reserve{min-height:0}
}
/* both top rows glide sideways by themselves (assets/auto-scroll.js): no snapping, so the glide is smooth */
body[data-page="home"] #featuredCatalogs .cc-rail,body[data-page="home"] #homeCats{scroll-snap-type:none!important;overflow-x:auto;scrollbar-width:none}
body[data-page="home"] #featuredCatalogs .cc-rail>*,body[data-page="home"] #homeCats>*{scroll-snap-align:none}

/* ---- automatic ads: they appear together with the page (no late pop-in) ---- */
body[data-page="home"]:not(.home-settled) .hd-autoad{visibility:hidden}
.hd-autoad{animation:hdAdIn .35s ease both}
@keyframes hdAdIn{from{opacity:0}to{opacity:1}}
@media(prefers-reduced-motion:reduce){.hd-autoad{animation:none}}

/* ---- product showcases between the ads: 8 products (2 columns x 4 rows on a phone, 4 x 2 on a tablet, 1 row of 8 on a computer) ---- */
body[data-page="home"] .hd-show .hd-grid .hd-tile:nth-child(-n+8){display:flex!important}
body[data-page="home"] .hd-show .hd-grid .hd-tile:nth-child(n+9){display:none!important}

/* ---- smaller product tiles in those grids (they were too big) ---- */
body[data-page="home"] .hd-show{margin:0 0 12px}
body[data-page="home"] .hd-show .hd-head{margin:0 2px 8px;gap:9px}
body[data-page="home"] .hd-show .hd-ico{flex-basis:34px;width:34px;height:34px;border-radius:11px;font-size:1.15rem}
body[data-page="home"] .hd-show .hd-ht h3{font-size:1rem}
body[data-page="home"] .hd-show .hd-ht small{font-size:.7rem;margin-top:1px}
body[data-page="home"] .hd-show .hd-all{padding:5px 11px;font-size:.74rem}
body[data-page="home"] .hd-show .hd-grid{gap:8px}
body[data-page="home"] .hd-show .hd-tile{gap:2px;border-radius:12px;padding:0 0 8px;box-shadow:0 1px 4px var(--eb57-shadow-193724-50000,rgba(25,55,36,.05))}
body[data-page="home"] .hd-show .hd-pic{aspect-ratio:4/3}
body[data-page="home"] .hd-show .hd-name{padding:6px 8px 0;font-size:.76rem;line-height:1.25;min-height:2.5em}
body[data-page="home"] .hd-show .hd-sub{padding:0 8px;font-size:.64rem}
body[data-page="home"] .hd-show .hd-price{padding:0 8px;font-size:.86rem}
body[data-page="home"] .hd-show .hd-price small{font-size:.64rem}
body[data-page="home"] .hd-show .hd-off{top:5px;left:5px;padding:2px 6px;font-size:.58rem;border-radius:6px}
body[data-page="home"] .hd-show .hd-noimg{font-size:1.8rem}
/* phones: 2 columns x 4 rows (every grid, "Fresh from ..." included) */
@media(max-width:640px){
  body[data-page="home"] .hd-show .hd-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* tablets: 4 columns x 2 rows */
@media(min-width:641px) and (max-width:1099px){
  body[data-page="home"] .hd-show .hd-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* computers: all 8 in one compact row */
@media(min-width:1100px){
  body[data-page="home"] .hd-show .hd-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:10px}
  body[data-page="home"] .hd-show .hd-name{font-size:.78rem}
}

/* grids between the ads: products only, no catalog card heading */
body[data-page="home"] .hd-show--plain{margin:0 0 10px}

/* ---- automatic ads: product photo (sharp, full size) on one side, text on the other; the side alternates ---- */
.hd-ad--flip{flex-direction:row-reverse}
body[data-page="home"] .hd-autoad .hd-ad{min-height:130px;max-height:none}
/* the photo fills its panel (it never decides the ad's height, so a square photo cannot make a tall ad) */
body[data-page="home"] .hd-autoad .hd-ad:not(.hd-ad--brand) .hd-ad-img{position:relative;background:var(--eb57-surface-eaf2ec,#EAF2EC);min-height:130px}
body[data-page="home"] .hd-autoad .hd-ad:not(.hd-ad--brand) .hd-ad-img img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
@media(min-width:900px){
  body[data-page="home"] .hd-autoad .hd-ad{min-height:200px;border-radius:20px;box-shadow:0 6px 24px var(--eb57-shadow-12301f-80000,rgba(18,48,31,.08))}
  body[data-page="home"] .hd-autoad .hd-ad:not(.hd-ad--brand) .hd-ad-img{flex:0 0 32%;max-width:none}
  body[data-page="home"] .hd-autoad .hd-ad-body{padding:24px 44px;gap:6px}
  body[data-page="home"] .hd-autoad .hd-ad-eyebrow{font-size:.78rem}
  body[data-page="home"] .hd-autoad .hd-ad-title{font-size:1.75rem;-webkit-line-clamp:2}
  body[data-page="home"] .hd-autoad .hd-ad-line{font-size:1rem}
  body[data-page="home"] .hd-autoad .hd-ad-row{margin-top:10px;gap:16px}
  body[data-page="home"] .hd-autoad .hd-ad-row b{font-size:1.3rem}
  body[data-page="home"] .hd-autoad .hd-ad-row i{font-size:.92rem;padding:10px 24px}
  body[data-page="home"] .hd-autoad .hd-ad-tag{top:12px;right:14px;font-size:.66rem;padding:3px 9px}
}

/* ---- tighter spacing at the top: search -> catalog chips -> category icons -> banner ---- */
body[data-page="home"] #hdTopCats{margin-top:8px}
body[data-page="home"] #hdTopCats #featuredCatalogs.cc{padding:0!important}
body[data-page="home"] #hdTopCats #featuredCatalogs .cc-rail{padding:2px 2px 4px}
body[data-page="home"] #hdTopCats #homeCats.hm-cats{padding:2px 12px 4px!important;gap:8px!important}
body[data-page="home"] #heroCarousel{margin-top:6px!important}
@media(min-width:641px){
  body[data-page="home"] #hdTopCats #homeCats.hm-cats{padding:4px 2px 6px!important;gap:10px!important}
  body[data-page="home"] #heroCarousel{margin-top:10px!important}
}

/* smaller grids (a franchise with few products): 4 or 6 products, laid out evenly instead of leaving gaps */
@media(min-width:641px) and (max-width:1099px){
  body[data-page="home"] .hd-show[data-n="6"] .hd-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(min-width:1100px){
  body[data-page="home"] .hd-show[data-n="4"] .hd-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
  body[data-page="home"] .hd-show[data-n="6"] .hd-grid{grid-template-columns:repeat(6,minmax(0,1fr))}
}

/* ---- phones: ONE side gutter (12px) for banner, catalog chips, category icons and the blocks below ----
   Before: the banner sat 16px from the edge, the chips 14px and the category icons 24px, and the page blocks 11px,
   so the home looked padded and uneven. The two icon rows now start at the same 12px line and scroll to the screen edge. */
@media(max-width:640px){
  body[data-page="home"] .layout{padding:8px 12px 0!important}
  body[data-page="home"] .hero{width:calc(100% - 24px)!important;margin:8px 12px 0!important}
  body[data-page="home"] #hdTopCats{width:100%!important;margin:6px 0 0!important}
  body[data-page="home"] #hdTopCats #featuredCatalogs .cc-rail{padding:2px 12px 4px}
  body[data-page="home"] #hdTopCats #homeCats.hm-cats{padding:2px 12px 4px!important;gap:8px!important}
  body[data-page="home"] #catalogViewer .cvx-body{padding:12px 12px calc(150px + env(safe-area-inset-bottom,0px))}
  body[data-page="home"] #catalogViewer .cvx-subcats{padding:10px 12px}
}
