/* Delivery area pages (page-templates/template-delivery.php). Builds on blog.css (hero, content, CTA). */

#page.dlv{padding-top:0}
.dhero{min-height:clamp(360px,40vw,500px)}
.dhero .bhero-img{object-position:center 55%}
.dhero h1{max-width:16ch}
.dhero-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:26px}
.btn.ghost{background:rgba(255,255,255,.12);color:#fff;box-shadow:inset 0 0 0 1.5px rgba(255,255,255,.7);backdrop-filter:blur(4px)}
.btn.ghost:hover{background:rgba(255,255,255,.22)}

/* Facts strip, pulled up over the hero */
.dfacts{list-style:none;margin:-38px 0 0;padding:0;position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));background:var(--surface);border:1px solid var(--line);border-radius:20px;box-shadow:0 18px 44px rgba(18,38,26,.13);overflow:hidden}
.dfacts li{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;column-gap:14px;align-items:center;padding:20px 22px}
.dfacts li+li{border-left:1px solid var(--line)}
.dfacts .i{grid-row:1/3;width:44px;height:44px;padding:10px;border-radius:14px;background:#e8f3eb;stroke:var(--brand);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.dfacts li:nth-child(2) .i{background:#fff4d6;stroke:#a77a10}
.dfacts li:nth-child(3) .i{background:#e6f0fb;stroke:#2563a8}
.dfacts li:nth-child(4) .i{background:#f3e9f7;stroke:#7a3f98}
.dfacts b{font:700 16px var(--f-head);line-height:1.2}
.dfacts span{color:var(--muted);font-size:14px}

/* City cards */
.dareas{margin-top:56px}
.dareas h2{font-size:clamp(26px,3vw,34px);margin-bottom:22px}
.dgrid-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}
.dcard{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:transform .25s,box-shadow .25s}
.dcard:hover{transform:translateY(-4px);box-shadow:0 18px 40px rgba(18,38,26,.13)}
.dcard-ph{position:relative;display:block;aspect-ratio:16/10;overflow:hidden;background:linear-gradient(135deg,#1f5a38,#0f2a1d)}
.dcard-ph img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .7s cubic-bezier(.2,.8,.2,1)}
.dcard:hover .dcard-ph img{transform:scale(1.06)}
.dcard-ph::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 45%,rgba(8,22,14,.78))}
.dcard-t{position:absolute;left:16px;bottom:12px;z-index:1;display:flex;align-items:center;gap:6px;color:#fff;font:800 24px var(--f-head)}
.dcard-t .i{width:20px;height:20px;stroke:var(--gold);fill:none;stroke-width:2.2}
.dcard-b{display:flex;flex-direction:column;gap:6px;padding:16px 18px 18px}
.dcard-b b{font-size:16px}
.dcard-b small{color:var(--muted);font-size:14px;line-height:1.45}
.dcard-b .bmore{margin-top:4px;font-size:14px}
.dcard:hover .bmore span{transform:translateX(4px)}

/* Content beside the summary card */
.dbody{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:52px;margin-top:52px;align-items:start}
.dbody .bp-body{max-width:none}
.dside{position:sticky;top:calc(var(--navh,52px) + 16px)}
.dsum{background:linear-gradient(160deg,#0f2a1d,#1f5a38);color:#fff;border-radius:20px;padding:22px;box-shadow:0 18px 40px rgba(18,38,26,.18)}
.dsum-h{display:flex;align-items:center;gap:8px;font:800 19px var(--f-head)}
.dsum-h .i{width:20px;height:20px;stroke:var(--gold);fill:none;stroke-width:2.2;flex:none}
.dsum dl{display:grid;grid-template-columns:auto 1fr;gap:10px 14px;margin:16px 0 0;font-size:14.5px}
.dsum dt{color:#a9c7b3}
.dsum dd{margin:0;font-weight:600;text-align:right}
.dsum-l{margin:18px 0 8px;color:#a9c7b3;font-size:13px;letter-spacing:.1em;text-transform:uppercase;font-weight:700}
.dchips{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.dchips li{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.18);border-radius:999px;padding:4px 10px;font-size:13px}
.dsum .btn{display:block;text-align:center;margin-top:20px}

/* Live status pill: the text and colour follow Vancouver time (assets/delivery.js) */
.dlive{display:inline-flex;align-items:center;gap:8px;padding:6px 12px 6px 10px;border-radius:999px;background:#e8f3eb;color:var(--brand);font:700 12.5px/1.2 var(--f-body);letter-spacing:.02em}
.dlive i{flex:none;width:8px;height:8px;border-radius:50%;background:var(--brand-m);animation:dlive 1.8s ease-out infinite}
.dlive.is-later{background:#fff4d6;color:#8a5d00}
.dlive.is-later i{background:var(--gold);animation:none}
@keyframes dlive{0%{box-shadow:0 0 0 0 rgba(47,158,92,.6)}75%,100%{box-shadow:0 0 0 9px rgba(47,158,92,0)}}

/* Hero: the city photo stays; "Tonight's top picks" sits on it as a white card (3 random best sellers, assets/delivery.js) */
.dhero.has-picks .bhero-in{display:grid;grid-template-columns:minmax(0,1fr) minmax(330px,380px);gap:48px;align-items:center}
.dpicks{padding:18px;border-radius:22px;background:var(--surface);color:var(--ink);box-shadow:0 30px 60px -22px rgba(0,0,0,.55)}
.dpicks-h{margin:10px 0 12px;font:800 21px/1.15 var(--f-head)}
.dpicks ul{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.dpicks li:nth-child(n+4){display:none}
.dpk{display:grid;grid-template-columns:62px minmax(0,1fr) auto;align-items:center;gap:13px;padding:7px 12px 7px 7px;border:1px solid var(--line);border-radius:16px;background:#faf8f3;transition:border-color .2s,box-shadow .2s,transform .2s}
.dpk:hover{border-color:var(--gold);box-shadow:0 10px 24px -14px rgba(18,38,26,.45);transform:translateX(3px)}
.dpk-ph{display:grid;place-items:center;width:62px;height:62px;overflow:hidden;border-radius:12px;background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.dpk-ph img,.dpk-ph svg{width:100%;height:100%;object-fit:contain}
.dpk-b{display:grid;gap:2px;min-width:0}
.dpk-b small{overflow:hidden;color:var(--gold-d);font:700 11px var(--f-body);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;text-overflow:ellipsis}
.dpk-b b{overflow:hidden;font:700 15.5px/1.25 var(--f-head);white-space:nowrap;text-overflow:ellipsis}
.dpk-pr{font-size:14.5px;font-weight:700}
.dpk-pr em{color:var(--muted);font-style:normal;font-weight:500}
.dpk-pr s{margin-left:4px;color:var(--muted);font-weight:500}
.dpk-go{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--gold);color:#1a1300;font-weight:800;transition:transform .2s}
.dpk:hover .dpk-go{transform:translateX(2px)}
.dpicks-all{display:block;margin-top:12px;color:var(--brand);font-size:14px;font-weight:700;text-align:center}
.dpicks-all:hover{color:var(--ink)}

/* Tonight's menu: a white panel pulled up under the city photo, with tabs of product rows */
.dmenu{position:relative;z-index:2;margin-top:-38px;padding:28px 30px 22px;border:1px solid var(--line);border-radius:24px;background:var(--surface);box-shadow:0 22px 50px -24px rgba(18,38,26,.3);scroll-margin-top:calc(var(--navh,60px) + 16px)}
.dmenu::before{content:"";position:absolute;top:-1px;left:-1px;right:-1px;height:5px;border-radius:24px 24px 0 0;background:linear-gradient(90deg,var(--gold),#f7d36b 45%,var(--brand-m))}
.dmenu-top{display:flex;align-items:flex-end;justify-content:space-between;gap:24px}
.dmenu h2{margin:12px 0 6px;font-size:clamp(28px,3.4vw,40px);line-height:1.08}
.dmenu-top p{max-width:62ch;margin:0;color:var(--muted)}
.dmenu-all{flex:none}
.dtabs{display:flex;gap:8px;margin:20px 0 16px;padding-bottom:2px;overflow-x:auto;scrollbar-width:none}
.dtabs::-webkit-scrollbar{display:none}
.dtabs button{flex:none;padding:10px 18px;border:1px solid var(--line);border-radius:999px;background:var(--bg);color:var(--ink);font:700 14px var(--f-body);cursor:pointer;transition:background .2s,color .2s,border-color .2s}
.dtabs button:hover{border-color:var(--brand);color:var(--brand)}
.dtabs button[aria-selected="true"]{border-color:var(--brand);background:var(--brand);color:#fff}
.dtabs button:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.dmenu .card .ph{background:#f4f2ec!important} /* warm neutral behind the product photos instead of the green */
.dpanel-more{display:inline-flex;gap:6px;margin-top:12px;color:var(--brand);font-weight:700}
.dpanel-more span{transition:transform .2s}
.dpanel-more:hover span{transform:translateX(4px)}
.dfacts.is-after{margin-top:28px}

/* Background videos (hero + city cards): they fade in over the photo once playing; reduced motion and Save-Data
   keep the photo (assets/delivery.js never sets the src there). Phones get a 9:16 hero file. */
.dvid{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity .8s ease;pointer-events:none}
.dhero .dvid{z-index:-2;object-position:center 50%}
.dhero.has-vid.is-playing::before{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,rgba(8,22,14,.5) 0%,rgba(8,22,14,0) 26%,rgba(8,22,14,0) 70%,rgba(8,22,14,.55) 100%)}
.is-playing>.dvid{opacity:1}
.dcard-ph .dvid{transition:opacity .8s ease,transform .7s cubic-bezier(.2,.8,.2,1)}
.dcard:hover .dcard-ph .dvid{transform:scale(1.06)}
.dvid-ui{position:absolute;top:14px;right:16px;z-index:2;display:none;align-items:center;gap:10px}
.dhero.is-playing .dvid-ui,.dhero.is-paused .dvid-ui{display:flex}
.dvid-cap{color:rgba(255,255,255,.78);font-size:12px;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.dvid-btn{position:relative;flex:none;width:32px;height:32px;border:1px solid rgba(255,255,255,.4);border-radius:50%;background:rgba(8,22,14,.55);color:#fff;cursor:pointer}
.dvid-btn:hover{background:rgba(8,22,14,.8)}
.dvid-btn:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.dvid-btn i::before,.dvid-btn i::after{content:"";position:absolute;top:10px;width:3px;height:10px;background:currentColor;border-radius:1px}
.dvid-btn i::before{left:11px}
.dvid-btn i::after{left:16px}
.dhero.is-paused .dvid-btn i::before{left:12px;width:0;height:0;background:none;border-style:solid;border-width:5.5px 0 5.5px 9px;border-color:transparent transparent transparent currentColor;border-radius:0}
.dhero.is-paused .dvid-btn i::after{display:none}

@media(max-width:1100px){
	.dhero.has-picks .bhero-in{grid-template-columns:minmax(0,1fr);gap:24px}
	.dpicks{max-width:560px}
}
@media(max-width:980px){
	.dfacts{grid-template-columns:repeat(2,minmax(0,1fr))}
	.dfacts li:nth-child(3){border-left:0}
	.dfacts li:nth-child(n+3){border-top:1px solid var(--line)}
	.dgrid-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
	.dbody{grid-template-columns:minmax(0,1fr);gap:28px;margin-top:40px}
	.dside{position:static;order:-1}
}
@media(max-width:720px){
	.dhero{min-height:0}
	.dhero .bhero-in{padding-bottom:70px}
	.dhero.has-vid.is-playing::before{display:none} /* the phone overlay (blog.css) is already a top-to-bottom gradient */
	.dvid-ui{top:12px;right:12px;gap:8px}
	.dvid-cap{max-width:calc(100vw - 84px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:11px}
	.dhero-cta .btn{flex:1 1 auto;text-align:center}
	.dfacts li{padding:16px 14px;column-gap:10px}
	.dfacts .i{width:38px;height:38px;padding:8px;border-radius:12px}
	.dfacts b{font-size:14.5px}
	.dfacts span{font-size:12.5px}
	.dgrid-cards{grid-template-columns:minmax(0,1fr);gap:16px}
	.dareas{margin-top:40px}
	.dpicks{padding:14px}
	.dpicks-h{margin:8px 0 10px;font-size:19px}
	.dpk{grid-template-columns:54px minmax(0,1fr) auto;gap:11px}
	.dpk-ph{width:54px;height:54px}
	.dmenu{padding:22px 16px 18px;border-radius:20px}
	.dmenu::before{border-radius:20px 20px 0 0}
	.dmenu h2{font-size:26px}
	.dmenu .rail{margin-inline:-16px}
	.dmenu .rail-track{padding-inline:16px;scroll-padding-inline:16px}
	.dmenu-top{flex-direction:column;align-items:flex-start;gap:0}
	.dmenu-all{display:none}
}
@media(max-width:420px){
	.dfacts li{grid-template-columns:1fr;row-gap:8px}
	.dfacts .i{grid-row:auto}
}
@media(prefers-reduced-motion:reduce){.dcard,.dcard-ph img,.dcard .bmore span,.dtabs button,.dpanel-more span,.dpk,.dpk-go{transition:none}.dcard:hover,.dpk:hover,.dpk:hover .dpk-go{transform:none}.dcard:hover .dcard-ph img{transform:none}.dlive i{animation:none}.dvid,.dvid-ui{display:none!important}}
