/* Shibbles Delivery Menus */
.shibbles {
	--shb-primary: #055c68;
	--shb-accent: #ed2224;
	--shb-ink: #1d2327;
	--shb-muted: #646970;
	--shb-line: #e7e3dc;
	--shb-bg: #ffffff;
	--shb-soft: #f7f4ef;
	--shb-radius: 14px;
	--shb-top: var(--wp-admin--admin-bar--height, 0px);
	color: var(--shb-ink);
	box-sizing: border-box;
}
.shibbles *, .shibbles *::before, .shibbles *::after { box-sizing: border-box; }
.shibbles button { font: inherit; cursor: pointer; }
.shb-icon { flex: none; vertical-align: middle; }

/* The menu header shows the restaurant name, so hide the theme's duplicate page title. */
.shibbles-menu-page .wp-block-post-title,
.shibbles-menu-page .entry-title,
.shibbles-menu-page .page-title,
.shibbles-menu-page .entry-header { display: none; }

/* ---------- Restaurants grid ---------- */
.shb-hub { margin: 0 auto 3rem; }
.shb-hub-title { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 1.25rem; color: var(--shb-primary); }
.shb-hub-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.shb-card {
	display: flex; flex-direction: column; background: var(--shb-bg); border: 1px solid var(--shb-line);
	border-radius: var(--shb-radius); overflow: hidden; text-decoration: none !important; color: inherit;
	transition: transform .18s ease, box-shadow .18s ease;
}
.shb-card:hover, .shb-card:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.shb-card-banner {
	position: relative; height: 150px; background: linear-gradient(135deg, var(--shb-primary), #0b3a41) center/cover no-repeat;
}
.shb-card-logo { position: absolute; left: 16px; bottom: -28px; }
.shb-card-body { padding: 2.25rem 1.1rem 1.1rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.shb-card-name { margin: 0; font-size: 1.2rem; line-height: 1.25; }
.shb-card-cuisine { margin: 0; color: var(--shb-muted); font-size: .92rem; }
.shb-card-meta { margin: .15rem 0 0; display: flex; flex-wrap: wrap; gap: .25rem .9rem; color: var(--shb-muted); font-size: .85rem; }
.shb-card-meta span { display: inline-flex; align-items: center; gap: .3rem; }
.shb-card-meta .shb-icon { width: 15px; height: 15px; }
.shb-card-cta { margin-top: auto; padding-top: .7rem; color: var(--shb-accent); font-weight: 600; font-size: .95rem; }

/* Logos (image or initials) */
.shb-card-logo, .shb-hero-logo {
	display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; overflow: hidden;
	background: #fff; border: 3px solid #fff; box-shadow: 0 2px 10px rgba(0,0,0,.15);
}
.shb-card-logo img, .shb-hero-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.is-initials { background: var(--shb-soft); color: var(--shb-primary); font-weight: 700; font-size: 1.3rem; letter-spacing: .02em; }

/* ---------- Restaurant menu ---------- */
.shb-menu { margin: 0 auto 6rem; }
.shb-hero { margin-bottom: 0; }
.shb-hero-banner {
	height: clamp(140px, 24vw, 260px); border-radius: var(--shb-radius);
	background: linear-gradient(135deg, var(--shb-primary) 0%, #0b3a41 100%) center/cover no-repeat;
}
.shb-hero-info { display: flex; gap: 1.25rem; align-items: flex-start; padding: 0 1rem; max-width: 900px; margin: 0 auto; }
.shb-hero-logo { width: 104px; height: 104px; margin-top: -52px; border-width: 4px; }
.shb-hero-logo.is-initials { font-size: 2rem; }
.shb-hero-text { padding-top: .8rem; min-width: 0; }
.shb-back { font-size: .85rem; color: var(--shb-muted); text-decoration: none; }
.shb-back:hover { color: var(--shb-primary); }
.shb-hero-name { margin: .1rem 0 .15rem; font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.1; color: var(--shb-ink); }
.shb-hero-cuisine { margin: 0; color: var(--shb-muted); }
.shb-hero-meta { margin: .35rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; color: var(--shb-muted); }
.shb-hero-meta span { display: inline-flex; align-items: center; gap: .35rem; }
.shb-hero-meta .shb-icon { width: 16px; height: 16px; }
.shb-hero-desc { margin: .6rem 0 0; max-width: 60ch; }

/* Sticky section nav */
.shb-nav {
	position: sticky; top: calc(var(--shb-top) + var(--shb-header, 0px)); z-index: 50; background: var(--shb-bg);
	border-bottom: 1px solid var(--shb-line); margin: 1.5rem 0 .5rem;
}
.shb-nav-inner { max-width: 900px; margin: 0 auto; display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; }
.shb-search {
	flex: none; display: flex; align-items: center; gap: .4rem; background: var(--shb-soft);
	border-radius: 999px; padding: .35rem .8rem; color: var(--shb-muted); width: 190px; margin: 0;
}
.shb-search input {
	border: 0 !important; background: transparent !important; outline: none; box-shadow: none !important;
	width: 100%; padding: .15rem 0 !important; font: inherit; font-size: .92rem; color: var(--shb-ink); min-height: 0;
}
.shb-nav-links { display: flex; gap: .35rem; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.shb-nav-links::-webkit-scrollbar { display: none; }
.shb-nav-links a {
	flex: none; padding: .4rem .85rem; border-radius: 999px; text-decoration: none; color: var(--shb-ink);
	font-size: .92rem; white-space: nowrap; transition: background .15s;
}
.shb-nav-links a:hover { background: var(--shb-soft); }
.shb-nav-links a.is-active { background: var(--shb-primary); color: #fff; }

/* Sections and item list */
.shb-section { max-width: 900px; margin: 0 auto; padding: 1.25rem 1rem 0; scroll-margin-top: calc(var(--shb-top) + var(--shb-header, 0px) + 70px); }
.shb-section-title { margin: 0 0 .25rem; font-size: 1.4rem; color: var(--shb-primary); }
.shb-section-desc { margin: 0 0 .5rem; color: var(--shb-muted); }
.shb-items { list-style: none; margin: 0; padding: 0; }
.shb-item {
	display: flex; gap: 1rem; justify-content: space-between; align-items: center;
	padding: 1rem 0; border-bottom: 1px solid var(--shb-line); margin: 0;
}
.shb-item:last-child { border-bottom: 0; }
.shb-item-text { min-width: 0; flex: 1; }
.shb-item-name { margin: 0 0 .2rem; font-size: 1.05rem; line-height: 1.3; font-weight: 600; }
.shb-item-desc {
	margin: 0 0 .4rem; color: var(--shb-muted); font-size: .92rem; line-height: 1.45;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shb-item-meta { display: flex; align-items: center; gap: .6rem; }
.shb-price { font-weight: 600; color: var(--shb-ink); }
.shb-price del { color: var(--shb-muted); font-weight: 400; margin-right: .3rem; }
.shb-price ins { text-decoration: none; color: var(--shb-accent); }
.shb-badge { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--shb-muted); background: var(--shb-soft); padding: .15rem .5rem; border-radius: 6px; }
.shb-item.is-soldout .shb-item-img { opacity: .45; filter: grayscale(.6); }

.shb-item-side { position: relative; flex: none; display: flex; align-items: center; }
.shb-item-img { width: 128px; height: 128px; border-radius: 12px; overflow: hidden; background: var(--shb-soft); }
.shb-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shb-item-img + .shb-add, .shb-item-img + .shb-choose { position: absolute; right: 6px; bottom: 6px; }

/* Add button and stepper */
.shb-add-btn, .shb-stepper {
	display: inline-flex; align-items: center; height: 38px; border-radius: 999px;
	box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
.shb-add-btn {
	gap: .3rem; padding: 0 1rem 0 .75rem; border: 0; background: #fff; color: var(--shb-ink);
	font-weight: 600; font-size: .92rem; text-decoration: none !important; transition: transform .12s ease, background .15s;
}
.shb-add-btn:hover { background: var(--shb-accent); color: #fff; }
.shb-add-btn:active { transform: scale(.95); }
.shb-item.no-image .shb-add-btn, .shb-item.no-image .shb-stepper { box-shadow: none; border: 1.5px solid var(--shb-line); }
.shb-choose { padding: 0 1rem; }
.shb-stepper { background: var(--shb-accent); color: #fff; padding: 0 .2rem; gap: 0; }
.shb-stepper button {
	display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: transparent; color: inherit;
	border-radius: 50%; padding: 0;
}
.shb-stepper button:hover { background: rgba(255,255,255,.18); }
.shb-qty { min-width: 1.6rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.shb-add[data-qty="0"] .shb-stepper { display: none; }
.shb-add:not([data-qty="0"]) .shb-add-btn { display: none; }
.shb-add.is-busy { opacity: .85; }

.shb-empty, .shb-no-results { color: var(--shb-muted); padding: 1.5rem 1rem; text-align: center; max-width: 900px; margin: 0 auto; }

/* ---------- Floating cart button ---------- */
.shb-cart-bar {
	position: fixed; z-index: 9990; right: 24px; bottom: 24px; display: flex; align-items: center; gap: .6rem;
	padding: .85rem 1.2rem; border: 0; border-radius: 999px; background: var(--shb-accent); color: #fff;
	font-weight: 600; font-size: 1rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: transform .2s ease, opacity .2s;
}
.shb-cart-bar:hover { transform: translateY(-2px); }
.shb-cart-bar[data-count="0"] { opacity: 0; pointer-events: none; transform: translateY(20px); }
.shb-cart-bar-count { background: #fff; color: var(--shb-accent); border-radius: 999px; min-width: 1.6rem; height: 1.6rem; display: grid; place-items: center; font-size: .85rem; padding: 0 .35rem; }
.shb-cart-bar-total { padding-left: .6rem; border-left: 1px solid rgba(255,255,255,.4); }
.no-float .shb-cart-bar { display: none; }
.shibbles-menu-page .no-float .shb-cart-bar { display: flex; }

/* ---------- Drawer ---------- */
.shb-overlay { position: fixed; inset: 0; z-index: 9995; background: rgba(15,20,25,.45); opacity: 0; transition: opacity .25s; }
.shb-drawer-open .shb-overlay { opacity: 1; }
.shb-drawer {
	position: fixed; z-index: 9996; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #fff;
	display: flex; flex-direction: column; transform: translateX(100%);
	outline: none; visibility: hidden; transition: transform .28s ease, visibility 0s linear .28s;
}
.shb-drawer-open .shb-drawer { transform: none; visibility: visible; box-shadow: -10px 0 40px rgba(0,0,0,.15); transition: transform .28s ease; }
.shb-drawer-open { overflow: hidden; }
.shb-drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--shb-line); margin-top: var(--shb-top); }
.shb-drawer-head h3 { margin: 0; font-size: 1.25rem; }
.shb-icon-btn { border: 0; background: var(--shb-soft); width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--shb-ink); padding: 0; }
.shb-drawer-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.shb-drawer-lines { flex: 1; overflow-y: auto; padding: .5rem 1.25rem; }
.shb-group + .shb-group { margin-top: .5rem; }
.shb-group-name { margin: .8rem 0 .2rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--shb-primary); }
.shb-group ul { list-style: none; margin: 0; padding: 0; }
.shb-line { display: flex; align-items: center; gap: .75rem; padding: .7rem 0; border-bottom: 1px solid var(--shb-line); }
.shb-line.is-busy { opacity: .55; }
.shb-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shb-line-name { font-weight: 600; }
.shb-line-meta { font-size: .85rem; color: var(--shb-muted); }
.shb-line-total { font-size: .92rem; color: var(--shb-muted); }
.shb-line-stepper { height: 34px; box-shadow: none; background: var(--shb-soft); color: var(--shb-ink); }
.shb-line-stepper button { width: 30px; height: 30px; }
.shb-line-stepper button:hover { background: rgba(0,0,0,.06); }
.shb-drawer-foot { padding: 1rem 1.25rem 1.25rem; border-top: 1px solid var(--shb-line); background: #fff; }
.shb-subtotal { display: flex; justify-content: space-between; font-size: 1.1rem; }
.shb-fine { margin: .25rem 0 .9rem; color: var(--shb-muted); font-size: .85rem; }
.shb-checkout {
	display: block; text-align: center; padding: .95rem; border-radius: 999px; background: var(--shb-accent);
	color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 1.05rem;
}
.shb-checkout:hover { filter: brightness(.94); }
.shb-link { color: var(--shb-primary); }
.shb-viewcart { display: block; text-align: center; margin-top: .7rem; font-size: .92rem; }
.shb-drawer-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--shb-muted); padding: 2rem; text-align: center; }
.shb-drawer-empty .shb-icon { width: 44px; height: 44px; opacity: .5; }

/* ---------- Toast ---------- */
.shb-toast {
	position: fixed; z-index: 9999; left: 50%; bottom: 96px; transform: translate(-50%, 12px); opacity: 0;
	background: #1d2327; color: #fff; padding: .7rem 1.1rem; border-radius: 10px; font-size: .95rem;
	box-shadow: 0 8px 24px rgba(0,0,0,.25); transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); text-align: center;
}
.shb-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.shb-toast.is-error { background: #8a1f11; }

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.shb-hero-banner { border-radius: 0; }
	.shb-hero-info { gap: .9rem; }
	.shb-hero-logo { width: 80px; height: 80px; margin-top: -40px; }
	.shb-nav-inner { flex-direction: column; align-items: stretch; gap: .5rem; padding: .5rem .75rem; }
	.shb-search { width: auto; }
	.shb-section { padding-left: .75rem; padding-right: .75rem; }
	.shb-item-img { width: 104px; height: 104px; }
	.shb-cart-bar { left: 12px; right: 12px; bottom: 12px; justify-content: center; }
	.shb-toast { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
	.shibbles *, .shb-drawer, .shb-overlay, .shb-toast { transition: none !important; }
}

/* ---------- Homepage ---------- */
.shibbles-home-page .wp-block-post-title,
.shibbles-home-page .entry-title,
.shibbles-home-page .page-title,
.shibbles-home-page .entry-header { display: none; }
.shb-home { margin: 0 auto 4rem; }
.shb-home-hero {
	background: var(--shb-primary); color: #fbf3e4; text-align: center;
	padding: clamp(2.5rem, 6vw, 4.5rem) 1.25rem clamp(2.75rem, 6vw, 4.75rem);
	background-image: repeating-conic-gradient(from 0deg at 50% 120%, rgba(255,255,255,.05) 0deg 8deg, transparent 8deg 16deg);
}
.shb-home-logo { width: min(420px, 78vw); height: auto; display: block; margin: 0 auto 1.25rem; }
.shb-home-title { margin: 0 auto .6rem; max-width: 20ch; font-size: clamp(1.8rem, 4.5vw, 2.9rem); line-height: 1.1; color: #fff; }
.shb-home-sub { margin: 0 auto 1.6rem; max-width: 54ch; font-size: 1.08rem; opacity: .92; }
.shb-home-cta {
	display: inline-block; background: var(--shb-accent); color: #fff !important; text-decoration: none !important;
	font-weight: 700; padding: .85rem 1.8rem; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.2);
}
.shb-home-cta:hover { filter: brightness(.95); }
.shb-home-restaurants, .shb-how { max-width: 1100px; margin: 0 auto; padding: 3rem 1.25rem 0; scroll-margin-top: calc(var(--shb-top) + 16px); }
.shb-home-h2 { text-align: center; margin: 0 0 1.5rem; font-size: clamp(1.4rem, 3vw, 1.9rem); color: var(--shb-primary); }
.shb-logo-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.shb-logo-tile {
	display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem;
	padding: 1.5rem 1rem 1.25rem; background: #fff; border: 1px solid var(--shb-line); border-radius: var(--shb-radius);
	text-decoration: none !important; color: inherit; transition: transform .18s ease, box-shadow .18s ease;
}
.shb-logo-tile:hover, .shb-logo-tile:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0,0,0,.10); }
.shb-logo-frame {
	width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; overflow: hidden;
	background: #fff; border: 1px solid var(--shb-line); margin-bottom: .6rem;
}
.shb-logo-frame img { width: 100%; height: 100%; object-fit: contain; padding: 12px; display: block; }
.shb-logo-frame .shb-logo-initials { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; }
.shb-logo-name { font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
.shb-logo-cuisine { color: var(--shb-muted); font-size: .9rem; }
.shb-logo-cta { margin-top: .4rem; color: var(--shb-accent); font-weight: 600; font-size: .95rem; }
.shb-how-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); counter-reset: shbstep; }
.shb-how-steps li { counter-increment: shbstep; background: var(--shb-soft); border-radius: var(--shb-radius); padding: 1.25rem 1.25rem 1.25rem 4rem; position: relative; display: flex; flex-direction: column; gap: .25rem; }
.shb-how-steps li::before {
	content: counter(shbstep); position: absolute; left: 1.1rem; top: 1.15rem; width: 2.1rem; height: 2.1rem; border-radius: 50%;
	background: var(--shb-primary); color: #fff; display: grid; place-items: center; font-weight: 700;
}
.shb-how-steps b { font-size: 1.05rem; }
.shb-how-steps span { color: var(--shb-muted); font-size: .95rem; }

/* ---------- Homepage: popular items ---------- */
.shb-popular { max-width: 1100px; margin: 0 auto; padding: 3rem 1.25rem 0; }
.shb-pop-grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .shb-pop-grid { grid-template-columns: repeat(2, 1fr); } }
.shb-pop-card { background: #fff; border: 1px solid var(--shb-line); border-radius: var(--shb-radius); overflow: hidden; display: flex; flex-direction: column; }
.shb-pop-img { position: relative; aspect-ratio: 4 / 3; background: var(--shb-soft); }
.shb-pop-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shb-pop-img .shb-add, .shb-pop-img .shb-choose { position: absolute; right: 8px; bottom: 8px; }
.shb-pop-body { padding: .7rem .85rem .85rem; display: flex; flex-direction: column; gap: .15rem; }
.shb-pop-rest { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--shb-primary); text-decoration: none !important; font-weight: 600; }
.shb-pop-name { font-weight: 600; line-height: 1.3; }
.shb-home-call { margin: 1.1rem 0 0; font-size: 1rem; opacity: .95; }
.shb-home-phone { color: #fff !important; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.shb-call { text-align: center; margin: .6rem 0 0; }
.shb-home-phone { white-space: nowrap; }
.shibbles .shb-nav-links a, .shibbles .shb-back, .shibbles .shb-logo-tile, .shibbles .shb-card { text-decoration: none !important; }

/* Real restaurant logos: show the whole logo on white, never cropped */
.shb-card-logo.has-img, .shb-hero-logo.has-img { border-radius: 16px; background: #fff; }
.shb-card-logo.has-img img, .shb-hero-logo.has-img img { object-fit: contain; padding: 4px; }
.shb-card-logo.has-img { width: 78px; height: 78px; bottom: -34px; }
.shb-hero-logo.has-img { width: 124px; height: 124px; margin-top: -62px; }
.shb-logo-frame:has(img) { border-radius: 18px; width: 170px; height: 170px; }
.shb-logo-frame img { padding: 6px; }
@media (max-width: 640px) { .shb-hero-logo.has-img { width: 96px; height: 96px; margin-top: -48px; } }
