/*
 * Gordo's ordering flow.
 *
 * Photo-forward and warm, built on the logo's palette (see site.css for the
 * tokens). Mobile first in the literal sense: every rule here is written for
 * a phone held one-handed, and the wide-screen layout is the media query.
 *
 * The running total is never more than a thumb away, and the primary action
 * sits in the bottom bar where the thumb already is.
 */

.gordos {
	--gordos-bar-height: 88px;

	box-sizing: border-box;
	max-width: 760px;
	margin: 0 auto;
	padding: 0 0 calc(var(--gordos-bar-height) + 1.5rem + var(--gordos-safe-bottom));
	color: var(--gordos-ink);
	font-size: 16px;
	line-height: 1.5;
}

.gordos *,
.gordos *::before,
.gordos *::after {
	box-sizing: inherit;
}

/* ---- status bar --------------------------------------------------------- */

.gordos__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6rem;
	padding: 0.75rem 0 1.25rem;
}

.gordos__state {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.35rem 0.8rem;
	border-radius: 999px;
	font-size: 0.82rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.gordos__state::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: currentColor;
}

.gordos__state[data-state="open"] {
	background: rgba(47, 125, 79, 0.12);
	color: var(--gordos-green);
}

.gordos__state[data-state="closing_soon"] {
	background: rgba(245, 166, 35, 0.2);
	color: #9a6206;
}

.gordos__state[data-state="closed"] {
	background: rgba(92, 46, 17, 0.1);
	color: var(--gordos-brown);
}

.gordos__countdown {
	color: var(--gordos-muted);
	font-size: 0.9rem;
	font-variant-numeric: tabular-nums;
}

/* ---- screens ------------------------------------------------------------ */

.gordos__screen {
	display: none;
}

.gordos__screen.is-active {
	display: block;
}

.gordos__section-title {
	margin: 2rem 0 1rem;
	color: var(--gordos-ink);
	font-size: 1.4rem;
	font-weight: 800;
	letter-spacing: -0.01em;
}

.gordos__screen > *:first-child > .gordos__section-title:first-child,
.gordos__section-title:first-child {
	margin-top: 0;
}

/* ---- menu items --------------------------------------------------------- */

.gordos__item {
	display: grid;
	grid-template-columns: 96px 1fr;
	gap: 1rem;
	align-items: start;
	margin-bottom: 0.9rem;
	padding: 0.9rem;
	background: #fff;
	border: 1px solid var(--gordos-line);
	border-radius: var(--gordos-radius);
	box-shadow: var(--gordos-shadow);
}

/* An item with no photo yet should not leave a 96px hole. */
.gordos__item:not(:has(.gordos__item-photo)) {
	grid-template-columns: 1fr;
}

.gordos__item-photo {
	width: 96px;
	height: 96px;
	border-radius: 14px;
	object-fit: cover;
	background: var(--gordos-cream-deep);
}

.gordos__item-body {
	min-width: 0;
}

.gordos__badge {
	display: inline-block;
	margin-bottom: 0.35rem;
	padding: 0.2rem 0.55rem;
	background: var(--gordos-amber);
	border-radius: 999px;
	color: var(--gordos-brown);
	font-size: 0.68rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.gordos__item-name {
	margin: 0 0 0.25rem;
	color: var(--gordos-ink);
	font-size: 1.02rem;
	font-weight: 800;
	line-height: 1.25;
}

.gordos__item-desc {
	margin: 0 0 0.5rem;
	color: var(--gordos-muted);
	font-size: 0.88rem;
	line-height: 1.45;
}

.gordos__item-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.6rem;
	/* The struck price is a third child on some rows and none on others, so
	   the row has to be allowed to wrap rather than squeeze the Add button. */
	flex-wrap: wrap;
}

/*
 * What a delivery app charges, and what you keep by not using one.
 *
 * Deliberately quiet: the struck number is muted and the saving is a small
 * green note, not a shouted red badge. The point is to be checkable, not to
 * pressure anyone.
 */
.gordos__price-was {
	display: inline-flex;
	align-items: baseline;
	gap: 0.4rem;
	/* Takes the space left between the price and the Add button, and drops to
	   its own line before anything gets crushed. */
	flex: 1 1 auto;
	min-width: 0;
	font-size: 0.85rem;
}

.gordos__price-was s {
	color: var(--gordos-muted);
	font-variant-numeric: tabular-nums;
	text-decoration-thickness: 1px;
}

.gordos__price-saving {
	color: var(--gordos-green);
	font-weight: 700;
	white-space: nowrap;
}

.gordos__price {
	color: var(--gordos-ink);
	font-size: 1.05rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.gordos__add {
	min-height: 40px;
	padding: 0 1.1rem;
	background: var(--gordos-red);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-size: 0.92rem;
	font-weight: 700;
	cursor: pointer;
}

.gordos__add:hover,
.gordos__add:focus-visible {
	background: var(--gordos-red-dark);
}

.gordos__qty {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	padding: 3px;
	background: var(--gordos-cream-deep);
	border-radius: 999px;
}

.gordos__qty button {
	width: 36px;
	height: 36px;
	background: #fff;
	border: 1px solid var(--gordos-line);
	border-radius: 50%;
	color: var(--gordos-brown);
	font-size: 1.15rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
}

.gordos__qty button:hover,
.gordos__qty button:focus-visible {
	border-color: var(--gordos-red);
	color: var(--gordos-red);
}

.gordos__qty span {
	min-width: 26px;
	font-weight: 800;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

@media (min-width: 620px) {
	.gordos__item {
		grid-template-columns: 132px 1fr;
	}

	.gordos__item-photo {
		width: 132px;
		height: 132px;
	}
}

/* ---- dates and slots ---------------------------------------------------- */

.gordos__dates {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding-bottom: 0.4rem;
	overflow-x: auto;
	/* Dates run off the edge on a phone; snap so they land on a whole chip. */
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.gordos__date {
	flex: 0 0 auto;
	min-height: 48px;
	padding: 0 1.1rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 14px;
	color: var(--gordos-brown);
	font-size: 0.92rem;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	scroll-snap-align: start;
}

.gordos__date[aria-pressed="true"] {
	background: var(--gordos-red);
	border-color: var(--gordos-red);
	color: #fff;
}

.gordos__slot-grid {
	display: grid;
	gap: 0.6rem;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}

.gordos__slot {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	min-height: 60px;
	padding: 0.6rem 0.8rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 14px;
	color: var(--gordos-ink);
	font-size: 0.95rem;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}

.gordos__slot[aria-pressed="true"] {
	background: var(--gordos-red);
	border-color: var(--gordos-red);
	color: #fff;
}

.gordos__slot:disabled {
	background: var(--gordos-cream-deep);
	color: var(--gordos-muted);
	cursor: not-allowed;
	opacity: 0.65;
}

.gordos__slot-left {
	font-size: 0.74rem;
	font-weight: 700;
	color: var(--gordos-red);
}

.gordos__slot[aria-pressed="true"] .gordos__slot-left {
	color: rgba(255, 255, 255, 0.9);
}

/* ---- form --------------------------------------------------------------- */

.gordos__form {
	display: grid;
	gap: 1.1rem;
}

.gordos__form > label {
	display: block;
	color: var(--gordos-brown);
	font-size: 0.88rem;
	font-weight: 700;
}

.gordos__form input[type="text"],
.gordos__form input[type="tel"],
.gordos__form select {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	/* 16px or iOS zooms the page when the field takes focus. */
	min-height: 52px;
	padding: 0 0.9rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 14px;
	color: var(--gordos-ink);
	font-size: 16px;
	font-family: inherit;
}

.gordos__form input:focus-visible,
.gordos__form select:focus-visible {
	border-color: var(--gordos-red);
	outline: 2px solid rgba(232, 73, 29, 0.25);
	outline-offset: 1px;
}

.gordos__check {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.85rem 1rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 14px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
}

.gordos__check input {
	width: 22px;
	height: 22px;
	accent-color: var(--gordos-red);
	flex: 0 0 auto;
}

.gordos__help {
	margin: 0 0 0.8rem;
	color: var(--gordos-muted);
	font-size: 0.88rem;
	line-height: 1.45;
}

.gordos__error {
	margin: 0;
	padding: 0.8rem 1rem;
	background: rgba(232, 73, 29, 0.1);
	border-radius: 12px;
	color: var(--gordos-red-dark);
	font-size: 0.92rem;
	font-weight: 600;
}

/* ---- delivery: the map -------------------------------------------------- */

.gordos__delivery {
	margin: 0;
	padding: 1.1rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: var(--gordos-radius);
}

.gordos__delivery legend {
	padding: 0 0.4rem;
	color: var(--gordos-ink);
	font-size: 1.05rem;
	font-weight: 800;
}

.gordos__delivery > label {
	display: block;
	margin-top: 1rem;
	color: var(--gordos-brown);
	font-size: 0.88rem;
	font-weight: 700;
}

.gordos__delivery input[type="text"] {
	display: block;
	width: 100%;
	margin-top: 0.35rem;
	min-height: 52px;
	padding: 0 0.9rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 14px;
	font-size: 16px;
	font-family: inherit;
	color: var(--gordos-ink);
}

.gordos-map {
	position: relative;
	overflow: hidden;
	border-radius: var(--gordos-radius);
	border: 1.5px solid var(--gordos-line);
	background: var(--gordos-cream-deep);
}

.gordos-map__canvas {
	/* Tall enough to recognise a block of your own neighbourhood. */
	height: 300px;
	width: 100%;
}

@media (min-width: 620px) {
	.gordos-map__canvas {
		height: 380px;
	}
}

/*
 * The pin sits dead centre and never moves — the map slides under it.
 * translate(-50%, -100%) puts the pin's POINT on the centre pixel, not its
 * middle, so what the customer sees as "the spot" is the spot we send.
 */
.gordos-map__pin {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 500;
	transform: translate(-50%, -100%);
	pointer-events: none;
	filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
	transition: transform 0.14s ease;
}

/* Lift the pin while the map moves — the small hop reads as "not placed yet". */
.gordos-map.is-moving .gordos-map__pin {
	transform: translate(-50%, -100%) translateY(-8px);
}

.gordos-map.is-outside .gordos-map__pin svg path {
	fill: #8a8a8a;
}

.gordos-map__locate {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 600;
	min-height: 40px;
	padding: 0 0.9rem;
	background: #fff;
	border: 1px solid var(--gordos-line);
	border-radius: 999px;
	box-shadow: var(--gordos-shadow);
	color: var(--gordos-brown);
	font-family: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	cursor: pointer;
}

.gordos-map__locate:disabled {
	opacity: 0.6;
	cursor: progress;
}

.gordos-map__readout {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
	padding: 0.75rem 1rem;
	background: #fff;
	border-top: 1.5px solid var(--gordos-line);
	font-size: 0.95rem;
}

.gordos-map__readout strong {
	font-weight: 800;
}

.gordos-map__readout span {
	color: var(--gordos-muted);
	font-size: 0.85rem;
}

.gordos-map__readout[data-kind="ok"] strong {
	color: var(--gordos-green);
}

.gordos-map__readout[data-kind="out"] {
	background: rgba(232, 73, 29, 0.08);
}

.gordos-map__readout[data-kind="out"] strong {
	color: var(--gordos-red-dark);
}

.gordos-map__readout[data-kind="pending"] strong {
	color: var(--gordos-muted);
}

/* Leaflet's own chrome, toned down to match. */
.gordos-map .leaflet-control-attribution {
	font-size: 10px;
	background: rgba(255, 255, 255, 0.8);
}

.gordos-map .leaflet-control-zoom a {
	color: var(--gordos-brown);
}

@media (prefers-reduced-motion: reduce) {
	.gordos-map__pin,
	.gordos-map.is-moving .gordos-map__pin {
		transition: none;
		transform: translate(-50%, -100%);
	}
}

/* ---- cart bar ----------------------------------------------------------- */

.gordos__cart {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9980;
	padding: 0.75rem 1rem calc(0.75rem + var(--gordos-safe-bottom));
	background: rgba(255, 255, 255, 0.97);
	border-top: 1px solid var(--gordos-line);
	box-shadow: 0 -6px 24px rgba(92, 46, 17, 0.1);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.gordos__cart[hidden] {
	display: none;
}

.gordos__cart > * {
	max-width: 760px;
	margin: 0 auto;
}

.gordos__nudge {
	margin-bottom: 0.5rem;
	padding: 0.45rem 0.8rem;
	background: var(--gordos-amber);
	border-radius: 10px;
	color: var(--gordos-brown);
	font-size: 0.85rem;
	font-weight: 700;
	text-align: center;
}

.gordos__totals {
	margin-bottom: 0.6rem;
}

.gordos__totals-row {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	color: var(--gordos-muted);
	font-size: 0.88rem;
	font-variant-numeric: tabular-nums;
}

.gordos__totals-row--total {
	margin-top: 0.2rem;
	color: var(--gordos-ink);
	font-size: 1.15rem;
	font-weight: 800;
}

.gordos__totals-note {
	color: var(--gordos-muted);
	font-size: 0.78rem;
}

.gordos__cta {
	display: block;
	width: 100%;
	min-height: 54px;
	background: var(--gordos-red);
	border: 0;
	border-radius: 999px;
	color: #fff;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 800;
	cursor: pointer;
}

.gordos__cta:hover:not(:disabled),
.gordos__cta:focus-visible:not(:disabled) {
	background: var(--gordos-red-dark);
}

.gordos__cta:disabled {
	background: var(--gordos-line);
	color: var(--gordos-muted);
	cursor: not-allowed;
}

/* ---- confirmation and status ------------------------------------------- */

.gordos__done {
	padding: 1.5rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: var(--gordos-radius);
	box-shadow: var(--gordos-shadow);
	text-align: center;
}

.gordos__done h2 {
	margin: 0 0 0.5rem;
	color: var(--gordos-green);
	font-size: 1.5rem;
	font-weight: 800;
}

.gordos__done p {
	margin: 0 0 0.35rem;
	color: var(--gordos-muted);
}

.gordos__total {
	margin-top: 0.75rem !important;
	color: var(--gordos-ink) !important;
	font-size: 1.4rem;
}

.gordos__support {
	display: inline-flex;
	align-items: center;
	min-height: 48px;
	margin-top: 1rem;
	padding: 0 1.3rem;
	background: #25d366;
	border-radius: 999px;
	color: #fff;
	font-weight: 700;
	text-decoration: none;
}

.gordos--status {
	padding-bottom: 2rem;
}

.gordos--status .gordos__meta {
	color: var(--gordos-muted);
}

.gordos__lines {
	margin: 1rem 0;
	padding: 0;
	list-style: none;
}

.gordos__lines li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--gordos-line);
}

/* ---- sticky category chips ---------------------------------------------- */

.gordos__cats {
	position: sticky;
	top: 0;
	z-index: 20;
	display: flex;
	gap: 0.5rem;
	margin: 0 -1rem 0.5rem;
	padding: 0.7rem 1rem;
	overflow-x: auto;
	scrollbar-width: none;
	/*
	 * A translucent blurred backdrop rather than a solid colour: the app is
	 * dropped into whatever theme the client runs, and a hardcoded cream
	 * painted the theme's content column as a visible slab. This reads as
	 * pinned over anything underneath it.
	 */
	background: rgba(255, 255, 255, 0.85);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	-webkit-overflow-scrolling: touch;
}

/* Browsers without backdrop-filter get an honest solid bar, not a see-through
   one with text sliding under it. */
@supports not (backdrop-filter: blur(1px)) {
	.gordos__cats {
		background: #fff;
	}
}

.gordos__cats::-webkit-scrollbar {
	display: none;
}

.gordos__cat {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	min-height: 40px;
	padding: 0 1rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 999px;
	color: var(--gordos-brown);
	font-size: 0.9rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gordos__cat[aria-current="true"] {
	background: var(--gordos-brown);
	border-color: var(--gordos-brown);
	color: #fff;
}

.gordos__section {
	scroll-margin-top: 80px;
}

/* ---- "add something to it?" --------------------------------------------- */

.gordos__upsell {
	margin-bottom: 1.5rem;
	padding-bottom: 0.25rem;
}

.gordos__upsell .gordos__section-title {
	margin-top: 0;
	font-size: 1.15rem;
}

.gordos__upsell-rail {
	display: flex;
	gap: 0.7rem;
	margin: 0 -1rem;
	padding: 0.25rem 1rem 0.5rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.gordos__upsell-rail::-webkit-scrollbar {
	display: none;
}

.gordos__upsell-tile {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	width: 132px;
	padding: 0.6rem;
	background: #fff;
	border: 1.5px solid var(--gordos-line);
	border-radius: 16px;
	box-shadow: var(--gordos-shadow);
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	scroll-snap-align: start;
	transition: border-color 0.15s ease, transform 0.12s ease;
}

.gordos__upsell-tile:hover,
.gordos__upsell-tile:focus-visible {
	border-color: var(--gordos-red);
	transform: translateY(-2px);
}

.gordos__upsell-tile img {
	width: 100%;
	height: 76px;
	margin-bottom: 0.25rem;
	border-radius: 10px;
	object-fit: cover;
	background: var(--gordos-cream-deep);
}

.gordos__upsell-name {
	color: var(--gordos-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.25;
}

.gordos__upsell-price {
	color: var(--gordos-red);
	font-size: 0.85rem;
	font-weight: 800;
}

@media (prefers-reduced-motion: reduce) {
	.gordos__cat,
	.gordos__upsell-tile {
		transition: none;
	}

	.gordos__upsell-tile:hover,
	.gordos__upsell-tile:focus-visible {
		transform: none;
	}
}
