/* Spacious homepage sections: Shop by Category / Shop by Brand / Top Selling.
   Loaded after style.css. Header, hero and trust strip are untouched. */
.ref-section,.ref-products{padding-left:4%;padding-right:4%}
.ref-section{padding-top:64px}
.ref-products{margin-top:72px;padding-top:64px;padding-bottom:72px}
.ref-section-head{margin-bottom:30px}
.ref-section-head h2{font-size:28px;letter-spacing:-.6px}
.ref-section-head a{font-size:14px;font-weight:700;gap:8px;padding:9px 16px;border-radius:999px;background:#f3f5f8;transition:background .2s}
.ref-section-head a:hover{background:#ffe9b8}

/* Category: soft rounded tiles, 6 per row, two lines */
.category-ref-grid{grid-template-columns:repeat(6,1fr);gap:28px 26px}
.category-ref-grid a.spotlight-card{height:auto;aspect-ratio:1/.88;border-radius:22px;background:#eaf3f6;border:0;box-shadow:0 2px 0 rgba(16,36,58,.04)}
.category-ref-grid img{object-fit:cover;border-radius:22px}

/* Brand: roomy white tiles, 6 per row, two lines */
.brands-ref{padding-top:80px}
.brand-ref-grid{grid-template-columns:repeat(6,1fr);gap:22px}
.brand-ref-grid a.spotlight-card{height:auto;aspect-ratio:1.6/1;border-radius:20px;background:#f7f9fb;border:1px solid #e6ebf0;padding:16px;display:grid;place-items:center}
.brand-ref-grid img{width:100%;height:100%;object-fit:contain}

/* Top selling: 4 per row, two lines, breathing room around text */
.product-ref-grid{grid-template-columns:repeat(4,1fr);gap:28px 26px}
.product-ref-grid a.spotlight-card{border-radius:22px;border:1px solid #f0e7d2;background:#fff;display:flex;flex-direction:column}
.product-ref-grid img{height:auto;aspect-ratio:1/.9;object-fit:cover}
.product-ref-grid a>div{padding:18px 20px 22px;display:grid;gap:6px}
.product-ref-grid b{font-size:16px;line-height:1.3}
.product-ref-grid small{font-size:13px}
.product-ref-grid strong{font-size:20px;margin-top:4px}

@media(max-width:1100px){
 .category-ref-grid,.brand-ref-grid{grid-template-columns:repeat(4,1fr)}
 .product-ref-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:760px){
 .ref-section{padding-top:40px}.ref-products{margin-top:44px;padding-top:40px;padding-bottom:44px}
 .ref-section,.ref-products{padding-left:16px;padding-right:16px}
 .ref-section-head h2{font-size:22px}.ref-section-head a{font-size:12px;padding:7px 12px}
 .category-ref-grid,.brand-ref-grid{grid-template-columns:repeat(3,1fr);gap:14px 12px}
 .category-ref-grid a.spotlight-card{border-radius:16px}.category-ref-grid img{border-radius:16px}
 .brand-ref-grid a.spotlight-card{padding:10px;border-radius:14px}
 .product-ref-grid{grid-template-columns:repeat(2,1fr);gap:14px 12px}
 .product-ref-grid a.spotlight-card{border-radius:16px}.product-ref-grid a>div{padding:12px 12px 16px}.product-ref-grid b{font-size:14px}
}

/* ---------- Mobile fixes: nav strip + hero ---------- */
@media(max-width:760px){
 .ref-nav{display:flex;flex-wrap:nowrap;gap:8px;padding:10px 12px;overflow-x:auto;scrollbar-width:none;background:#fff;border-top:1px solid #eef1f4}
 .ref-nav::-webkit-scrollbar{display:none}
 .ref-nav>a,.ref-nav>a:first-child{flex:none;height:38px;padding:0 14px;font-size:13px;white-space:nowrap;background:#f3f5f8;border-radius:999px;gap:6px}
 .ref-nav>a.active{background:#ffb82e}
 .ref-nav .arrow{display:none}
 .ref-hero{height:auto;min-height:0;padding:30px 18px 18px;display:flex;flex-direction:column}
 .hero-photo{position:absolute;inset:0}
 .hero-copy-ref{position:relative;left:auto;top:auto;z-index:2}
 .hero-copy-ref h1{font-size:34px;line-height:1.1}
 .hero-copy-ref p{font-size:14px;margin:14px 0 22px}
 .ref-hero-buttons{display:flex;flex-direction:column;gap:12px}
 .ref-hero-btn{width:100%;height:auto;min-height:62px;padding:12px 16px;gap:12px}
 .ref-hero-btn>span:nth-child(2){flex:1;min-width:0}
 .ref-hero-btn b{font-size:15px;white-space:nowrap}
 .ref-hero-btn small{font-size:12px;white-space:nowrap;display:block;margin-top:2px}
 .delivery-card-ref{position:relative;right:auto;bottom:auto;top:auto;width:100%;margin-top:26px;z-index:2}
}

/* ---------- Mobile: airy header, menu, hero, trust strip ---------- */
@media(max-width:760px){
 .ref-main{padding:14px 18px 12px;gap:14px 10px}
 .ref-logo img{width:170px;height:52px}
 .ref-account{gap:14px}
 .ref-search{height:50px;border-radius:16px;box-shadow:0 6px 20px rgba(16,36,58,.08);border:1px solid #eef1f4;padding-left:16px}
 .ref-search button{border-radius:12px;height:38px;padding:0 20px}

 .ref-nav{padding:14px 18px 16px;gap:10px;border-top:0;scroll-snap-type:x proximity;
  -webkit-mask-image:linear-gradient(90deg,#000 88%,transparent);mask-image:linear-gradient(90deg,#000 88%,transparent)}
 .ref-nav>a,.ref-nav>a:first-child{height:42px;padding:0 18px;font-size:13.5px;gap:8px;scroll-snap-align:start;background:#f4f6f9}
 .ref-nav>a.active{box-shadow:0 6px 16px rgba(255,184,46,.45)}

 .ref-hero{padding:38px 22px 26px}
 .hero-copy-ref{width:100%;max-width:none}
 .hero-copy-ref h1{font-size:33px;line-height:1.12;letter-spacing:-1px}
 .hero-copy-ref p{font-size:14.5px;line-height:1.55;margin:18px 0 28px;max-width:330px;color:rgba(255,255,255,.88)}
 .hero-copy-ref p br{display:none}
 .ref-hero-buttons{gap:14px}
 .ref-hero-btn{min-height:66px;padding:14px 18px;border-radius:18px}
 .delivery-card-ref{margin-top:30px;border-radius:20px;padding:16px 18px;box-shadow:0 14px 34px rgba(0,0,0,.22)}

 .trust-strip{grid-template-columns:1fr 1fr;gap:0}
 .trust-strip>div{display:grid;grid-template-columns:auto 1fr;column-gap:12px;row-gap:3px;align-items:center;padding:20px 16px}
 .trust-strip .material-symbols-rounded{grid-row:1/3;font-size:28px}
 .trust-strip b{font-size:13px;line-height:1.25}
 .trust-strip small{font-size:11px;line-height:1.35;color:#667587}

 .ref-section{padding-top:44px}
 .ref-section-head{margin-bottom:22px}
}

/* ---------- Mobile menu: no sideways scroll, centred, equal columns ---------- */
@media(max-width:760px){
 .ref-nav{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;overflow:visible;-webkit-mask-image:none;mask-image:none;padding:12px 10px 14px;justify-content:stretch}
 .ref-nav>a,.ref-nav>a:first-child{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;min-width:0;width:auto;height:auto;min-height:64px;padding:9px 2px;gap:4px;font-size:11px;line-height:1.2;font-weight:700;white-space:normal;border-radius:16px}
 .ref-nav>a .material-symbols-rounded{font-size:22px}
 .ref-nav .arrow{display:none}
}

/* ---------- Mobile: app-style bottom tab bar instead of the top menu ---------- */
@media(max-width:760px){
 .ref-header{-webkit-backdrop-filter:none;backdrop-filter:none;transform:none;filter:none}
 body.reference-home{padding-bottom:84px}
 .ref-nav{position:fixed;left:0;right:0;bottom:0;top:auto;z-index:60;display:grid;grid-template-columns:repeat(5,1fr);gap:0;overflow:visible;-webkit-mask-image:none;mask-image:none;background:#fff;padding:8px 6px calc(8px + env(safe-area-inset-bottom));border-top:1px solid #e8ecf0;box-shadow:0 -10px 28px rgba(16,36,58,.09);-webkit-backdrop-filter:none;backdrop-filter:none}
 .ref-nav>a,.ref-nav>a:first-child{background:none;box-shadow:none;min-height:0;justify-content:flex-start;padding:5px 2px;border-radius:12px;font-size:10.5px;font-weight:700;color:#667587;gap:3px}
 .ref-nav>a .material-symbols-rounded{font-size:25px;color:#8a97a5}
 .ref-nav>a.active{background:#fff4d6;box-shadow:none;color:#0b1f31}
 .ref-nav>a.active .material-symbols-rounded{color:#f39c00;font-variation-settings:'FILL' 1}
}

/* ---------- Mobile bottom bar: always fully visible ---------- */
@media(max-width:760px){
 body.reference-home{padding-bottom:112px}
 .ref-nav{bottom:0;padding:10px 6px calc(22px + env(safe-area-inset-bottom));min-height:84px}
 .ref-nav>a,.ref-nav>a:first-child{padding:6px 2px 4px;font-size:10.5px;line-height:1.2;overflow:visible}
}

/* ---------- Same look as the store page bottom bar ---------- */
.lb-s{display:none}
@media(max-width:760px){
 .lb-f{display:none}.lb-s{display:inline}
 .ref-nav{padding:8px 4px calc(16px + env(safe-area-inset-bottom));min-height:0;border-top:1px solid #e2e7ec;box-shadow:none;background:#fff}
 .ref-nav>a,.ref-nav>a:first-child,.ref-nav>a.active{background:none;box-shadow:none;border-radius:0;min-height:0;padding:4px 0;gap:2px;font-size:12px;font-weight:700;color:#667587}
 .ref-nav>a .material-symbols-rounded{font-size:24px;color:#667587}
 .ref-nav>a.active,.ref-nav>a.active .material-symbols-rounded{color:#10243a}
 .ref-nav>a.active .material-symbols-rounded{font-variation-settings:'FILL' 1}
 body.reference-home{padding-bottom:88px}
}

/* ---------- Mobile bottom menu: same as store page (Home / Categories / Cart / Account) ---------- */
.m-nav{display:none}
@media(max-width:760px){
 .ref-header .ref-nav{display:none!important}
 body.reference-home{padding-bottom:84px!important}
 .m-nav{position:fixed;bottom:0;left:50%;transform:translateX(-50%);width:100%;max-width:520px;background:#fff;border-top:1px solid #e2e7ec;display:flex;padding:8px 0 calc(8px + env(safe-area-inset-bottom));z-index:60}
 .m-nav a{flex:1;text-align:center;font-size:12px;font-weight:700;color:#667587;text-decoration:none}
 .m-nav a.on{color:#10243a}
 .m-nav .i{font-family:'Material Symbols Rounded';font-size:24px;line-height:1;display:block;margin:0 auto 2px}
 .m-nav a.on .i{font-variation-settings:'FILL' 1}
}

/* ---------- Mobile header: logo + Owner / Login / Cart must never overlap ---------- */
@media(max-width:760px){
 .ref-main{grid-template-columns:minmax(0,1fr) auto}
 .ref-logo{min-width:0}
 .ref-logo img{width:100%;max-width:170px;height:auto;object-fit:contain}
 .ref-account{gap:2px}
 .ref-account a{min-width:46px}
}
@media(max-width:360px){
 .ref-main{padding-left:12px;padding-right:12px;gap:12px 6px}
 .ref-account a{min-width:42px}
}

/* ---------- Trust strip: title stacked over its line, beside the icon, on every screen ---------- */
.trust-strip>div{display:grid;grid-template-columns:auto 1fr;column-gap:12px;row-gap:2px;align-items:center;align-content:center}
.trust-strip .material-symbols-rounded{grid-row:1/3}
.trust-strip small{margin-top:0}
@media(min-width:761px){
 .trust-strip b{font-size:13px;line-height:1.25}
 .trust-strip small{font-size:11px;line-height:1.35}
}
@media(min-width:761px) and (max-width:1100px){
 .trust-strip>div{padding:14px 16px}
}

/* ---------- Tablets: hero buttons share the row, delivery pill stays clear of the headline ---------- */
@media(min-width:761px) and (max-width:1200px){
 .hero-copy-ref{width:min(560px,62%)}
 .hero-copy-ref h1{font-size:34px}
 .ref-hero-buttons{gap:12px}
 .ref-hero-btn{flex:1 1 0;width:auto;min-width:0;padding:0 14px;gap:10px}
 .ref-hero-btn>span:nth-child(2){min-width:0}
 .ref-hero-btn b,.ref-hero-btn small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
 .delivery-card-ref{right:2%;top:12px;width:auto;max-width:34%;padding:9px 14px;border-radius:12px;gap:10px;align-items:center}
 .delivery-card-ref>.material-symbols-rounded{font-size:30px}
 .delivery-card-ref b{font-size:14px}
 .delivery-card-ref small{font-size:10.5px;margin-top:2px}
}
