/*
 * Coastal Blu Menus — front-end styles.
 * Scope is the menu section only: tab bar, notice bar, category banners and
 * item rows. The restaurant hero and switcher live in separate Elementor
 * pages and are not part of this stylesheet.
 */

.cbm {
	--cbm-max: 1400px;
	--cbm-gap: 18px;
	--cbm-radius: 24px;
	--cbm-bg: #E4F3FE;
	--cbm-surface: #FFFFFF;
	--cbm-blue: #1575A2;
	--cbm-navy: #34435D;
	--cbm-teal: #23B1BE;
	--cbm-grey: #636363;
	--cbm-border: #DDDDDD;
	--cbm-font-display: "Cormorant Garamond", Georgia, serif;
	--cbm-font-ui: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cbm,
.cbm *,
.cbm *::before,
.cbm *::after {
	box-sizing: border-box;
}

.cbm p {
	margin: 0;
}

.cbm ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- Elementor containment ---------- */

/* Let the section shrink inside Elementor's flex containers. Flex items
   default to min-width:auto, which propagates the intrinsic width of the
   scrolling tab bar up to the document. */
.elementor-widget-shortcode:has(.cbm),
.elementor-shortcode:has(.cbm) {
	min-width: 0;
	max-width: 100%;
}

.cbm,
.cbm-tabs-scroller,
.cbm__tabs,
.cbm__panel,
.cbm__inner,
.cbm__notice,
.cbm-category,
.cbm-category__items,
.cbm-item,
.cbm-item__body {
	min-width: 0;
}

.cbm {
	max-width: 100%;
	overflow-x: clip;
}

/* ---------- Tab bar ---------- */

.cbm .cbm-tabs-scroller {
	position: relative;
	min-width: 0;
	background: #FFFFFF;
}

/* Edge fades: shown only on the side that has more tabs. */
.cbm .cbm-tabs-scroller::before,
.cbm .cbm-tabs-scroller::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	width: 64px;
	pointer-events: none;
	opacity: 0;
	transition: opacity 200ms;
	z-index: 1;
}

.cbm .cbm-tabs-scroller::before {
	left: 0;
	background: linear-gradient(90deg, #FFFFFF, rgba(255, 255, 255, 0));
}

.cbm .cbm-tabs-scroller::after {
	right: 0;
	background: linear-gradient(270deg, #FFFFFF, rgba(255, 255, 255, 0));
}

.cbm .cbm-tabs-scroller.is-overflow-start::before,
.cbm .cbm-tabs-scroller.is-overflow-end::after {
	opacity: 1;
}

.cbm .cbm__tabs {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 26px;
	padding: 0 20px;
	background: #FFFFFF;
	overflow-x: auto;
	scroll-behavior: smooth;
	scroll-snap-type: x proximity;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.cbm .cbm__tabs::-webkit-scrollbar {
	display: none;
}

/* Centre the row when it fits; auto margins (unlike justify-content:center)
   never push the first tab out of reach when it overflows. */
.cbm .cbm__tabs > .cbm-tab:first-child {
	margin-left: auto;
}

.cbm .cbm__tabs > .cbm-tab:last-child {
	margin-right: auto;
}

/* ---------- Tab arrows ---------- */

.cbm .cbm-tabs-arrow,
.cbm .cbm-tabs-arrow:hover,
.cbm .cbm-tabs-arrow:focus,
.cbm .cbm-tabs-arrow:focus-visible,
.cbm .cbm-tabs-arrow:active {
	background: #FFFFFF;
	background-color: #FFFFFF;
	color: var(--cbm-teal);
	border: 1px solid var(--cbm-border);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cbm .cbm-tabs-arrow {
	appearance: none;
	-webkit-appearance: none;
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	cursor: pointer;
}

.cbm .cbm-tabs-arrow[hidden] {
	display: none;
}

.cbm .cbm-tabs-arrow--prev {
	left: 12px;
}

.cbm .cbm-tabs-arrow--next {
	right: 12px;
}

.cbm .cbm-tabs-arrow:focus-visible {
	outline: 2px solid var(--cbm-teal);
	outline-offset: 2px;
}

.cbm .cbm-tabs-arrow .cbm-icon {
	width: 16px;
	height: 16px;
}

.cbm-tab {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	scroll-snap-align: start;
	background-color: #FFFFFF;
	box-shadow: none;
	border-radius: 0;
	border: 0;
	border-bottom: 2px solid transparent;
	padding: 18px 2px;
	font-family: var(--cbm-font-ui);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--cbm-grey);
	white-space: nowrap;
	cursor: pointer;
}

/* Higher specificity via the .cbm ancestor beats the theme's Kit button
 * styles on hover/focus/active without resorting to !important. */
.cbm .cbm-tab,
.cbm .cbm-tab:hover,
.cbm .cbm-tab:focus,
.cbm .cbm-tab:focus-visible,
.cbm .cbm-tab:active {
	background-color: #FFFFFF;
	box-shadow: none;
	border-radius: 0;
	text-decoration: none;
}

.cbm-tab:hover,
.cbm-tab:focus-visible,
.cbm-tab.is-active {
	color: var(--cbm-teal);
	border-bottom-color: var(--cbm-teal);
}

/* ---------- Panel ---------- */

.cbm__panel {
	background: linear-gradient(180deg, #FFFFFF 0%, var(--cbm-bg) 55%);
	border-top: 1px solid var(--cbm-border);
	box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.06);
}

.cbm__inner {
	max-width: var(--cbm-max);
	margin: 0 auto;
	padding: 40px 20px 64px;
}

/* ---------- Notice bar ---------- */

.cbm__notice {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	background: #FFFFFF;
	border-radius: 999px;
	padding: 18px 30px;
	box-shadow: 0 1px 6px rgba(19, 68, 97, 0.12);
	margin-bottom: var(--cbm-gap);
}

.cbm__notice-text {
	font-family: var(--cbm-font-ui);
	font-size: 16px;
	color: var(--cbm-navy);
}

.cbm__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 18px;
	font-family: var(--cbm-font-ui);
	font-size: 14px;
	color: var(--cbm-navy);
}

.cbm__legend li {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.cbm-icon {
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
}

/* ---------- Category banner ---------- */

.cbm-category__banner {
	position: relative;
	min-height: 300px;
	border-radius: var(--cbm-radius);
	overflow: hidden;
	display: flex;
	align-items: center;
	margin-bottom: var(--cbm-gap);
}

.cbm-category__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
}

.cbm-category__banner::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
}

.cbm-category__banner-body {
	position: relative;
	z-index: 1;
	padding: 0 35px;
	max-width: 60%;
}

.cbm-category__title {
	font-family: var(--cbm-font-display);
	font-size: 55px;
	font-weight: 600;
	color: #FFFFFF;
	margin: 0;
}

.cbm-category__subtitle {
	font-family: var(--cbm-font-ui);
	font-size: 18px;
	font-weight: 400;
	color: #FFFFFF;
	text-transform: uppercase;
	letter-spacing: 2px;
	line-height: 1.5;
	margin-top: 16px;
}

/* ---------- Item rows ---------- */

.cbm-category__items {
	display: flex;
	flex-direction: column;
	gap: var(--cbm-gap);
}

.cbm-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	background: var(--cbm-surface);
	border-radius: var(--cbm-radius);
	padding: 28px 32px;
	box-shadow: 0 1px 6px rgba(19, 68, 97, 0.12);
}

.cbm-item__body {
	flex: 1 1 auto;
}

.cbm-item__title {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-family: var(--cbm-font-display);
	font-size: 26px;
	font-weight: 500;
	color: var(--cbm-blue);
	margin: 0;
}

.cbm-item__markers {
	display: inline-flex;
	gap: 3px;
}

.cbm-item__description {
	font-family: var(--cbm-font-ui);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.6;
	color: var(--cbm-navy);
	margin-top: 6px;
}

.cbm-item__price {
	font-family: var(--cbm-font-ui);
	font-size: 32px;
	font-weight: 700;
	color: var(--cbm-teal);
	flex: 0 0 auto;
	white-space: nowrap;
}

.cbm-category[hidden] {
	display: none;
}

/* ---------- Tablet ---------- */

@media (max-width: 1024px) {
	.cbm-category__title {
		font-size: 46px;
	}

	.cbm-category__banner {
		min-height: 260px;
	}

	.cbm-category__banner-body {
		max-width: 75%;
	}

	.cbm__notice {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
}

/* ---------- Mobile ---------- */

@media (max-width: 767px) {
	.cbm .cbm__tabs {
		gap: 20px;
	}

	.cbm .cbm-tabs-arrow {
		display: none;
	}

	.cbm .cbm__inner {
		padding: 28px 16px 44px;
	}

	.cbm .cbm__notice {
		flex-direction: column;
		align-items: center;
		text-align: center;
		border-radius: 24px;
		padding: 18px 22px;
	}

	.cbm .cbm__legend {
		justify-content: center;
	}

	.cbm .cbm-category__banner {
		min-height: 200px;
	}

	.cbm .cbm-category__banner-body {
		max-width: 100%;
		padding: 0 22px;
		text-align: center;
	}

	.cbm .cbm-category__title {
		font-size: 38px;
	}

	.cbm .cbm-category__subtitle {
		font-size: 15px;
	}

	.cbm .cbm-item {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 10px;
		padding: 20px;
	}

	.cbm .cbm-item__title {
		justify-content: center;
		font-size: 24px;
	}

	.cbm .cbm-item__description {
		font-size: 14px;
	}

	.cbm .cbm-item__price {
		font-size: 26px;
	}

	.cbm .cbm-item__title,
	.cbm .cbm-item__description,
	.cbm .cbm-category__title {
		overflow-wrap: break-word;
	}

	.cbm .cbm__tabs {
		overscroll-behavior-x: contain;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cbm .cbm__tabs {
		scroll-behavior: auto;
	}

	.cbm * {
		transition: none !important;
	}
}
