/* «تسوّق حسب المناسبة» (public/js/occasions.js): the banner's «اكتب اسمك» box and trust chips (and a shorter banner on
   phones), the occasion tiles, the «لمن؟» / budget chips, «آخر يوم للطلب» and the search that finds nothing. */

/* ---- the banner that builds itself, with «اكتب اسمك» ---------------------------------------------------------- */
.hb-stage:has(.hb-x){aspect-ratio:auto;min-height:clamp(340px,34vw,460px);max-height:none}
.hb-slide:has(.hb-x){position:relative}
.hb-slide:has(.hb-x) .hb-copy{display:flex;flex-direction:column;align-items:flex-start}
.hb-slide:has(.hb-x) .hb-title{font-size:clamp(28px,4.4vw,52px)}
.hb-slide:has(.hb-x) .hb-cta{order:3;margin-top:14px;padding:8px 20px;font-size:14.5px;background:transparent;color:inherit;border:1px solid currentColor;opacity:.92}
.hb-slide:has(.hb-x) .hb-x{order:2}
.hb-x{display:flex;flex-direction:column;gap:12px;margin-top:18px;width:min(100%,500px)}
.hb-name{display:flex;flex-direction:column;gap:6px}
.hb-name-t{font-size:13.5px;font-weight:600;opacity:.95}
.hb-name-row{display:flex;gap:6px;padding:5px;border-radius:999px;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.3)}
.hb-name-row input{flex:1;min-width:0;border:0;border-radius:999px;padding:10px 16px;background:var(--surface);color:var(--ink);font-size:16px}
.hb-name-row input::placeholder{color:var(--muted)}
.hb-name-row input:focus-visible{outline:3px solid var(--accent-ink);outline-offset:1px}
.hb-name-go{border:0;border-radius:999px;padding:10px 20px;background:var(--accent-ink);color:var(--accent);font-weight:800;white-space:nowrap;min-height:44px}
.hb-chips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.hb-chips li{font-size:12.5px;font-weight:600;line-height:1.3;padding:5px 11px;border-radius:999px;background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.26);white-space:nowrap}
@media (prefers-reduced-motion:no-preference){.hb-slide.with-fan .hb-x{animation:hb-rise .7s .65s cubic-bezier(.2,.8,.2,1) both}}

/* phones: the words beside a small fan, then the name box and the chips: the circles and pieces show on the first screen */
@media (max-width:760px){
 .hb-stage:has(.hb-x){min-height:0}
 .hb-slide:has(.hb-x){display:grid;grid-template-columns:minmax(0,1fr) 36%;grid-template-areas:"title fan" "sub fan" "opens opens" "x x";column-gap:10px;align-items:start;padding:18px 16px 16px}
 .hb-slide:has(.hb-x) .hb-copy{display:contents}
 .hb-slide:has(.hb-x) .hb-title{grid-area:title;font-size:clamp(22px,6.6vw,27px);line-height:1.2;align-self:end}
 .hb-slide:has(.hb-x) .hb-copy>p{grid-area:sub;font-size:13.5px;line-height:1.65;margin-top:6px}
 .hb-slide:has(.hb-x) .hb-opens{grid-area:opens}
 .hb-slide:has(.hb-x) .hb-cta{display:none}
 .hb-slide:has(.hb-x) .hb-x{grid-area:x;width:100%;margin-top:14px;gap:10px}
 .hb-slide:has(.hb-x) .hb-catfan,.hb-slide:has(.hb-x)>.hb-fan{grid-area:fan;align-self:stretch;min-height:128px;padding:0}
 .hb-slide:has(.hb-x) .hb-catfan .hb-fan{min-height:128px}
 .hb-slide:has(.hb-x) .hb-catname,.hb-slide:has(.hb-x) .hb-bars{display:none}
 .hb-slide:has(.hb-x) .hb-fan img,.hb-slide:has(.hb-x) .hb-fan.live img.pl,.hb-slide:has(.hb-x) .hb-fan.live img.pr,.hb-slide:has(.hb-x) .hb-fan.live img.pc,.hb-slide:has(.hb-x) .hb-fan.live img.ph{width:56%;border-width:3px;border-radius:12px}
 .hb-slide:has(.hb-x) .hb-fan.n3 img:nth-child(3){width:60%}
 .hb-name-t{font-size:12.5px}
 .hb-name-row input{padding:9px 14px}
 .hb-name-go{padding:9px 16px}
 .hb-chips{gap:5px}
 .hb-chips li{font-size:11.5px;padding:3px 9px}
 html[lang=en] .hb-slide:has(.hb-x) .hb-title{font-size:clamp(20px,5.6vw,23px)}
 html[lang=en] .hb-slide:has(.hb-x) .hb-copy>p{font-size:13px}
}

/* ---- «تسوّق حسب المناسبة»: the tiles ------------------------------------------------------------------------- */
.hm-occ.block{padding-block:26px 6px}
.hm-occ .sec-head{margin-bottom:14px}
.occ-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(168px,1fr));gap:12px}
.occ{--oc:var(--accent);position:relative;isolation:isolate;overflow:hidden;border:0;padding:0;border-radius:20px;cursor:pointer;aspect-ratio:4/5;display:flex;align-items:flex-end;text-align:start;font:inherit;color:#fff;background:var(--oc);transition:translate .2s,box-shadow .2s}
.occ:hover{translate:0 -2px;box-shadow:0 14px 28px -18px var(--oc)}
.occ-ph{position:absolute;inset:0;z-index:-2;display:grid;place-items:center}
.occ-ph img{width:100%;height:100%;object-fit:cover;transition:scale .5s}
.occ:hover .occ-ph img{scale:1.05}
.occ-ph b{font-size:62px;font-weight:400;line-height:1;translate:0 -22%}
.occ::after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(to top,color-mix(in srgb,var(--oc) 88%,#000) 0%,color-mix(in srgb,var(--oc) 62%,transparent) 34%,transparent 60%)}
.occ.no-pic::after{background:linear-gradient(to top,rgba(0,0,0,.28),transparent 55%)}
.occ-copy{display:flex;flex-direction:column;gap:1px;padding:12px 14px 13px;width:100%;min-width:0}
.occ-name{font:800 18px/1.3 var(--display);display:flex;gap:6px;align-items:center;text-shadow:0 1px 8px rgba(0,0,0,.25)}
.occ-ico{font-size:.95em}
.occ-copy small{font-size:12.5px;opacity:.95}
.occ-flag{position:absolute;top:10px;inset-inline-start:10px;font-style:normal;font-size:11.5px;font-weight:700;line-height:1.3;padding:4px 9px;border-radius:999px;background:rgba(255,255,255,.95);color:#16130f;box-shadow:0 4px 12px -6px rgba(0,0,0,.4)}
.occ[aria-pressed="true"]{box-shadow:0 0 0 3px var(--bg),0 0 0 6px var(--oc)}
.occ:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
@media (max-width:760px){
 .hm-occ.block{padding-block:20px 2px}
 .occ-row{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;margin-inline:-16px;padding:4px 16px 10px;scroll-padding-inline:16px;gap:10px;scrollbar-width:none}
 .occ-row::-webkit-scrollbar{display:none}
 .occ{flex:none;width:37vw;max-width:168px;aspect-ratio:3/4;scroll-snap-align:start;border-radius:16px}
 .occ-name{font-size:15.5px}
 .occ-copy{padding:10px 11px 11px}
 .occ-copy small{font-size:11.5px}
 .occ-ph b{font-size:48px}
}
@media (prefers-reduced-motion:reduce){.occ,.occ-ph img{transition:none}.occ:hover{translate:none}.occ:hover .occ-ph img{scale:none}}

/* ---- «لمن الهدية؟» and «حسب الميزانية» --------------------------------------------------------------------- */
.hm-shopfor{display:flex;flex-direction:column;gap:10px;padding-block:10px 4px}
.sf-row{display:flex;align-items:center;gap:12px;min-width:0}
.sf-t{flex:none;min-width:9.2em;font:700 15px/1.3 var(--display)}
.sf-chips{display:flex;gap:8px;flex-wrap:wrap;min-width:0}
.sf-chip{white-space:nowrap;min-height:40px}
@media (max-width:760px){
 .sf-row{flex-direction:column;align-items:stretch;gap:6px}
 .sf-t{font-size:14px;min-width:0}
 .sf-chips{flex-wrap:nowrap;overflow-x:auto;margin-inline:-16px;padding:2px 16px 4px;scrollbar-width:none}
 .sf-chips::-webkit-scrollbar{display:none}
}
/* the picked one in the products' bar, with its ✕ */
.cat-chip.on-chip .x-mark{opacity:.8;font-weight:400}
/* phones: the category chips in one row that slides (the results show right under the search), «⚙️ فلتر» always in reach */
@media (max-width:760px){
 .cat-bar{flex-wrap:nowrap;overflow-x:auto;margin-inline:-16px;padding:2px 16px 6px;scrollbar-width:none;scroll-padding-inline:16px}
 .cat-bar::-webkit-scrollbar{display:none}
 .cat-bar .cat-chip{flex:none;white-space:nowrap;min-height:40px}
 .cat-bar .filter-btn{order:-1}
}

/* ---- «آخر يوم للطلب» ------------------------------------------------------------------------------------------ */
.hm-dates{padding-block:14px 0}
.hd-band{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:4px 14px;padding:10px 16px;border-radius:16px;background:color-mix(in srgb,var(--hot) 9%,var(--surface));border:1px solid color-mix(in srgb,var(--hot) 32%,var(--line))}
.ob-note{margin:0;font-size:14px;line-height:1.6}
.ob-note b{font-weight:800;white-space:nowrap}
.hd-go{border:0;background:none;color:var(--accent);font:inherit;font-size:14px;font-weight:700;cursor:pointer;padding:6px 0;min-height:36px}
.ob-note.in-dlg{padding:8px 12px;border-radius:12px;background:color-mix(in srgb,var(--hot) 8%,var(--surface));border:1px solid color-mix(in srgb,var(--hot) 26%,var(--line));font-size:13.5px}
.ob-note.in-cart{display:block;font-size:13px;line-height:1.55;padding-top:6px;color:var(--ink)}
.ob-note.in-promo{margin-top:10px;font-size:14.5px;opacity:.96}
.ob-local{white-space:nowrap}
@media (max-width:760px){.hd-band{padding:9px 13px;border-radius:14px}.ob-note{font-size:13px}.hd-go{font-size:13px;min-height:32px;padding:2px 0}}

/* ---- the search that finds nothing ---------------------------------------------------------------------------- */
.cat-empty.de{grid-column:1/-1;text-align:center;padding:22px 4px 6px}
.de-title{font:800 clamp(20px,3vw,26px)/1.4 var(--display);margin:0}
.de-sub{color:var(--muted);margin:6px auto 0;max-width:46ch;font-size:14.5px}
.de-acts{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:16px}
.de-acts .btn{min-height:44px}
.de-more{margin-top:26px;text-align:start}
.de-more h3{font-size:18px;margin-bottom:12px}
.de-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}
@media (max-width:560px){.de-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* an occasion's own page (/k/grad: «هدايا تخرج بالاسم»), like a category's (seo.css) */
#products.o-on>.sec-head{display:none}
