/* PA i PUNT · app d'encàrrecs (inspiració Panem) */
body { background: #f3f0ea; }
.ah { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; height: 64px; padding: 0 12px; background: rgba(243, 240, 234, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink); }
.ah-ic { position: relative; display: grid; place-items: center; width: 42px; height: 42px; border: 0; background: none; color: var(--ink); border-radius: 50%; }
.ah-ic:hover { background: rgba(0, 0, 0, .05); }
.ah-logo img { height: 42px; width: auto; }
.ah-right { display: flex; justify-content: flex-end; }
.bag-n { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--orange); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.win { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; padding: 10px 16px; font-size: 13.5px; text-align: left; line-height: 1.35; }
.win.on { background: var(--mint); }
.win.off { background: #f6e3d4; }
.win .win-i { margin-left: auto; white-space: nowrap; font-weight: 600; opacity: .75; }
@media (max-width: 640px) { .win .win-i { display: none; } }

#view { min-height: 70vh; outline: none; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

/* ---- catàleg */
.cat-head { padding: 28px 16px 8px; max-width: 1400px; margin: 0 auto; }
.cat-head h1 { font-size: clamp(44px, 9vw, 84px); line-height: .95; margin: 0 0 10px; }
.cat-head p { margin: 0; max-width: 520px; color: var(--ink-2); }
.chips-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 16px; scrollbar-width: none; max-width: 1400px; margin: 0 auto; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: transparent; border-radius: 999px; padding: 8px 15px; font-size: 14px; }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bar { display: grid; grid-template-columns: 1fr 1fr 56px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); max-width: 1400px; margin: 0 auto; }
.bar button { border: 0; background: none; padding: 14px 8px; font-size: 14px; color: var(--ink-2); display: flex; align-items: center; justify-content: center; gap: 8px; }
.bar button + button { border-left: 1px solid var(--line); }
.bar .bar-ic svg rect { fill: var(--ink); }
.bar .x { font-size: 11px; background: var(--ink); color: #fff; border-radius: 50%; width: 18px; height: 18px; display: inline-grid; place-items: center; }

.grid { display: grid; gap: 22px 8px; padding: 12px 8px 40px; max-width: 1400px; margin: 0 auto; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-1 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.cols-2 { grid-template-columns: repeat(3, 1fr); } .grid.cols-1 { grid-template-columns: repeat(2, 1fr); } .grid { gap: 32px 14px; padding: 18px 16px 60px; } }
@media (min-width: 1100px) { .grid.cols-2 { grid-template-columns: repeat(4, 1fr); } .grid.cols-1 { grid-template-columns: repeat(3, 1fr); } }

.promo { display: flex; flex-direction: column; justify-content: space-between; aspect-ratio: 1; border-radius: 6px; background: var(--orange); color: #fff; padding: 16px; text-decoration: none; position: relative; overflow: hidden; }
.promo.promo-off { background: var(--sage); }
.promo-t { font-size: clamp(21px, 3.2vw, 32px); line-height: 1.05; }
.promo-l { font-size: 13px; font-weight: 700; }
.promo::after { content: ''; position: absolute; right: -40px; bottom: -40px; width: 140px; height: 140px; border-radius: 50%; background: rgba(255, 255, 255, .1); }

.card { text-decoration: none; display: block; }
.card-img { position: relative; aspect-ratio: 1; border-radius: 6px; overflow: hidden; background: #e8dfcf; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease, transform .6s ease; }
.card-img .alt { position: absolute; inset: 0; opacity: 0; }
@media (hover: hover) { .card:hover .card-img.two .alt { opacity: 1; } .card:hover .card-img img:first-child { transform: scale(1.03); } }
.tag { position: absolute; left: 8px; top: 8px; background: var(--paper); border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.tag-off { left: auto; right: 8px; background: var(--ink); color: var(--paper); }
.card-t { font-size: 20px; line-height: 1.1; margin-top: 10px; }
.card-s { font-size: 12.5px; color: var(--sage-d); margin-top: 3px; font-weight: 600; }
.card-p { font-size: 14px; margin-top: 4px; }
.card-p span { color: var(--ink-3); }
.cols-1 .card-t { font-size: 26px; }
.empty { text-align: center; padding: 40px; color: var(--ink-3); }

/* ---- fitxa */
.pd { max-width: 1240px; margin: 0 auto; }
@media (min-width: 900px) { .pd { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 32px 24px 60px; align-items: start; } .pd-media { position: sticky; top: 140px; } }
.pd-media { position: relative; }
.pd-slides { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #e8dfcf; }
@media (min-width: 900px) { .pd-slides { border-radius: 8px; } }
.pd-slides::-webkit-scrollbar { display: none; }
.pd-slides img { flex: 0 0 100%; aspect-ratio: 1; object-fit: cover; scroll-snap-align: start; }
.pd-dots { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; }
.pd-dots span { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .55); }
.pd-dots span.on { background: #fff; }
.pd-back { position: absolute; top: 12px; left: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(243, 240, 234, .9); display: grid; place-items: center; text-decoration: none; font-size: 18px; }
.pd-info { padding: 22px 16px 120px; }
@media (min-width: 900px) { .pd-info { padding: 8px 0 0; } }
.pd-info h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1; margin: 6px 0 10px; }
.pd-price { font-size: 19px; margin: 0; font-weight: 600; }
.pd-price span { color: var(--ink-3); font-weight: 400; font-size: 15px; }
.pd-short { color: var(--ink-2); margin: 10px 0 22px; font-size: 16.5px; }

.step { border-top: 1px solid var(--line); padding: 18px 0; }
.step-row { display: flex; align-items: center; justify-content: space-between; }
.step-h { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 12px; flex-wrap: wrap; }
.step-row .step-h { margin: 0; }
.step-h .n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-size: 12px; }
.step-h .hint { font-weight: 500; color: var(--ink-3); font-size: 13px; margin-left: auto; }
.step-note { margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); min-height: 1em; }
.dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.dates::-webkit-scrollbar { display: none; }
.date { flex: none; width: 74px; padding: 10px 4px 9px; border-radius: 12px; border: 1.5px solid var(--ink); background: #fff; display: flex; flex-direction: column; align-items: center; gap: 1px; transition: background .15s, color .15s, transform .15s; }
.date b { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.date span { font-family: var(--serif); font-size: 21px; line-height: 1.1; }
.date i { font-style: normal; font-size: 10px; color: var(--ink-3); }
.date.on { background: var(--ink); color: var(--paper); transform: translateY(-2px); }
.date.upcoming { border-style: dashed; border-color: var(--crust); background: transparent; color: var(--ink-3); }
.locs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.loc { border: 1.5px solid var(--ink); background: #fff; border-radius: 12px; padding: 12px; text-align: left; display: flex; flex-direction: column; }
.loc b { font-size: 15px; }
.loc span { font-size: 12px; color: var(--ink-3); }
.loc.on { background: var(--ink); color: var(--paper); }
.loc.on span { color: rgba(244, 240, 232, .7); }
.loc[disabled] { opacity: .35; border-style: dashed; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; background: #fff; }
.qty button { border: 0; background: none; width: 42px; height: 40px; font-size: 20px; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; }
.qty.sm button { width: 30px; height: 30px; font-size: 16px; }
.qty.sm output { min-width: 18px; font-size: 14px; }
.switch { display: flex; align-items: center; gap: 12px; padding: 4px 0 18px; font-size: 15px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { width: 44px; height: 26px; border-radius: 13px; background: var(--crust); position: relative; transition: background .2s; flex: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--sage); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: 2px; }
.pd-cta { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #f3f0ea 30%); z-index: 20; }
.pd-cta .btn { width: 100%; padding: 18px; font-size: 16px; background: #1f7a4d; }
.pd-cta .btn:hover { background: #17633d; }
@media (min-width: 900px) { .pd-cta { position: static; padding: 6px 0 22px; background: none; } }
.acc { border-top: 1px solid var(--line); padding: 4px 0; }
.acc summary { list-style: none; cursor: pointer; padding: 14px 0; font-weight: 700; display: flex; justify-content: space-between; }
.acc summary::after { content: '+'; font-weight: 400; font-size: 20px; line-height: 1; }
.acc[open] summary::after { content: '−'; }
.acc p { margin: 0 0 14px; color: var(--ink-2); font-size: 15px; }

/* ---- pàgines */
.pg { max-width: 860px; margin: 0 auto; padding: 28px 16px 60px; }
.pg.narrow { max-width: 620px; }
.pg h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 0 0 10px; }
.pg h2 { font-size: 30px; margin: 0 0 14px; }
.cg { background: #fff; border-radius: 16px; padding: 4px 16px 12px; margin: 18px 0; box-shadow: 0 1px 0 var(--line); }
.cg.bad { box-shadow: 0 0 0 2px var(--orange); }
.cg-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 0 10px; border-bottom: 1px solid var(--line); }
.cg-h b { font-size: 23px; display: block; line-height: 1.1; }
.cg-h span { font-size: 13px; color: var(--ink-3); }
.cg-t { background: var(--mint); color: var(--sage-d) !important; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.cg.bad .cg-t { background: #f6e3d4; color: var(--orange-d) !important; }
.warn { background: #f6e3d4; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin: 12px 0 0; }
.cg-sub { text-align: right; font-size: 13px; color: var(--ink-3); padding-top: 10px; }
.li { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.li img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #e8dfcf; }
.li-t { font-weight: 700; font-size: 15px; line-height: 1.2; }
.li-m { font-size: 13px; color: var(--ink-3); }
.li-loc { display: block; border: 0; background: none; padding: 2px 0; font-size: 13px; color: var(--ink-2); text-align: left; }
.li select { margin-top: 4px; font-size: 13px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--paper); max-width: 100%; }
.li-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 14px; }
.tot { display: flex; justify-content: space-between; align-items: baseline; font-size: 18px; padding: 14px 4px 4px; border-top: 2px solid var(--ink); margin-top: 8px; }
.tot b { font-size: 26px; }
.co { background: #fff; border-radius: 16px; padding: 22px 18px; margin: 24px 0; display: grid; gap: 14px; }
.co label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.co label small { font-weight: 400; color: var(--ink-3); }
.co input:not([type=checkbox]), .co textarea { border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 14px; background: var(--paper); font-size: 16px; font-weight: 400; }
.co input:focus, .co textarea:focus { outline: none; border-color: var(--ink); background: #fff; }
.co .chk { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 13.5px; color: var(--ink-2); }
.co .chk input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--ink); flex: none; }
.err { color: #b3261e; font-size: 14px; margin: 0; min-height: 0; }
.btn-block { width: 100%; padding: 18px; font-size: 16px; }
.btn-sm { padding: 10px 16px; font-size: 14px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

.thanks { text-align: center; }
.tk-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--sage); color: #fff; font-size: 34px; display: grid; place-items: center; margin: 10px auto 18px; }
.thanks .row { justify-content: center; }
.code { display: inline-block; margin: 16px 0; padding: 12px 22px; border-radius: 12px; background: var(--ink); color: var(--paper); font-size: 15px; letter-spacing: .04em; }
.code b { font-size: 24px; margin-left: 6px; }
.tk-g { background: #fff; border-radius: 12px; padding: 14px 16px; margin: 10px 0; text-align: left; }
.tk-g ul { margin: 8px 0 0; padding-left: 18px; color: var(--ink-2); }

.note { background: var(--mint); border-radius: 12px; padding: 12px 14px; font-size: 14px; margin: 12px 0; }
.lnk { border: 0; background: none; padding: 0; text-decoration: underline; color: var(--ink-2); }
.oc { background: #fff; border-radius: 16px; padding: 16px; margin: 16px 0; }
.oc-h { display: flex; justify-content: space-between; align-items: center; }
.oc-h span { display: block; font-size: 13px; color: var(--ink-3); }
.oc-g { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }
.oc-gh { display: flex; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 14.5px; }
.oc-g ul { margin: 8px 0; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.oc-g li.x { text-decoration: line-through; opacity: .5; }
.oc .btn { margin-top: 10px; }
.st { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; padding: 3px 9px; border-radius: 999px; background: var(--mint); color: var(--sage-d); white-space: nowrap; height: fit-content; }
.st-preparat { background: #fff1c9; color: #8a6400; }
.st-recollit { background: var(--paper-2); color: var(--ink-3); }
.st-cancelat { background: #f6e3d4; color: var(--orange-d); }

.how-now { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 12px; margin: 16px 0 24px; }
.how-now.on { background: var(--mint); }
.how-now.off { background: #f6e3d4; }
.how-steps { padding: 0; list-style: none; counter-reset: s; display: grid; gap: 14px; margin: 0 0 30px; }
.how-steps li { counter-increment: s; position: relative; padding-left: 52px; color: var(--ink-2); }
.how-steps li::before { content: counter(s, decimal-leading-zero) '/'; position: absolute; left: 0; top: -4px; font-family: var(--serif); font-size: 28px; color: var(--ink); }
.how-steps b { color: var(--ink); }
.how-t { width: 100%; border-collapse: collapse; margin-bottom: 14px; background: #fff; border-radius: 12px; overflow: hidden; }
.how-t th, .how-t td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.how-t th { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }

/* ---- calaix, fulls i avisos */
.scrim { position: fixed; inset: 0; background: rgba(20, 20, 19, .4); opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 40; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; bottom: 0; left: 0; width: min(340px, 86vw); background: var(--paper); z-index: 50; transform: translateX(-102%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); padding: 70px 26px 30px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.drawer.on { transform: none; }
.drawer a { font-family: var(--serif); font-size: 26px; text-decoration: none; padding: 4px 0; }
.drawer #drawerCats a { display: block; }
.drawer hr { border: 0; border-top: 1px solid var(--line); margin: 14px 0; width: 100%; }
.drawer .eyebrow { color: var(--ink-3); margin: 0 0 8px; }
.drawer-x { position: absolute; top: 16px; right: 16px; border: 0; background: none; font-size: 20px; width: 40px; height: 40px; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: var(--paper); border-radius: 22px 22px 0 0; padding: 10px 18px calc(24px + env(safe-area-inset-bottom)); transform: translateY(calc(100% + 60px)); visibility: hidden; transition: transform .3s cubic-bezier(.2, .8, .2, 1), visibility .3s; max-height: 80vh; overflow-y: auto; }
@media (min-width: 700px) { .sheet { left: 50%; width: 480px; margin-left: -240px; bottom: 20px; border-radius: 22px; } }
.sheet.on { transform: none; visibility: visible; }
.sheet-grab { width: 40px; height: 4px; border-radius: 2px; background: var(--crust); margin: 0 auto 14px; }
.sheet h3 { font-size: 28px; margin: 0 0 12px; }
.opt-list { display: grid; }
.opt { border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; padding: 14px 2px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.opt small { color: var(--ink-3); font-size: 13px; }
.opt.on { font-weight: 700; }
.opt.on::after { content: '✓'; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none; z-index: 60; background: var(--ink); color: var(--paper); border-radius: 16px; padding: 14px 18px; width: min(440px, calc(100vw - 24px)); font-size: 14.5px; transition: opacity .25s, transform .25s; box-shadow: var(--shadow); }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
@media (min-width: 900px) { .toast { bottom: 28px; } }
.toast-a { display: flex; gap: 10px; margin-top: 10px; }
.toast-a button, .toast-a a { flex: 1; text-align: center; border: 1px solid rgba(255, 255, 255, .35); background: none; color: var(--paper); border-radius: 999px; padding: 9px 10px; font-size: 13.5px; font-weight: 600; text-decoration: none; }
.toast-a a { background: var(--paper); color: var(--ink); }

.af { text-align: center; padding: 50px 16px 60px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--ink-2); }
.af-logo { height: 54px; width: auto; margin: 0 auto 16px; }
.af a { color: var(--ink); }
body[data-route=p] .af { padding-bottom: 120px; }
.bag-n[hidden]{display:none}
