/*
 * BITERO mobile layer (Task 10).
 *
 * Loaded ONLY for phones: bitero-ordering.php enqueues this file with
 * media="(max-width: 767.98px)", and every rule below is also wrapped in
 * the same media query. Tablet (768px and up) and desktop never see any of
 * it. Nothing here deletes content: the rules only change spacing and
 * visibility, and every hidden element stays in the markup.
 *
 * Rollback: remove the `bitero-mobile` enqueue in bitero-ordering.php or
 * delete this file. Pre-change backups: D:\Biteora\qa\mobile-redesign\
 * backup-2026-11-16\.
 *
 * Sections are scoped by their Elementor element id so a rule can never
 * leak onto another page.
 */
@media (max-width: 767.98px) {

	/* ------------------------------------------------------------------
	 * 1. Homepage hero card (Elementor container 7a9f0c0, banner widget
	 *    cbac0fd) — step 1 of the approved sequence.
	 *
	 * Before: the card was ~944px tall at 390px wide. 300px of that was the
	 * theme's 150px top and bottom padding, and ~300px was the large pizza
	 * photo stacked under the text.
	 * After: the photo column is hidden on phones (the image and its
	 * markup are untouched, so tablet and desktop still show it), and the
	 * padding is reduced. Heading, description and Order Now stay.
	 * ------------------------------------------------------------------ */
	.elementor-element-7a9f0c0 .hero-section.hero-1 {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.elementor-element-7a9f0c0 .hero-section.hero-1 .hero-image {
		display: none;
	}

	/* Also collapse the now-empty photo column so it leaves no gap. */
	.elementor-element-7a9f0c0 .hero-section.hero-1 .row > [class*="col-"]:has(> .hero-image) {
		display: none;
	}

	/* The "50% OFF" scribble (shape-5, discount.png, z-index 11) is anchored
	   to the photo's position; on the shorter card it landed on top of the
	   description text. Hidden on phones only (found in the first visual
	   check). The other decorative shapes do not touch the text. */
	.elementor-element-7a9f0c0 .hero-section.hero-1 .shape-5 {
		display: none;
	}

	/* ------------------------------------------------------------------
	 * 2. Three product cards under the hero (Elementor container 2a4206c;
	 *    grid b9ee7a8; cards 9d1ecf7 Vegetarischer Burger, c86047c Chicken
	 *    Roll, a5a1741 Pizza Prosciutto e Funghi).
	 *
	 * They are real BITERO products with the same prices as WooCommerce, so
	 * they are kept. On phones the grid becomes one horizontal swipe row
	 * (CSS scroll-snap; no JavaScript), each card shrinks from ~380px to
	 * ~210px tall, and the next card peeks in to show it scrolls. Product
	 * name, description and price stay readable. Nothing is removed: the
	 * big "Burger"/"Pizza" watermark words (0ef4865, 0afcbff) are hidden
	 * only because they were clipped at the card edge and cost 125px each.
	 * ------------------------------------------------------------------ */
	.elementor-element-b9ee7a8 {
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: stretch;
		gap: 12px !important;
		overflow-x: auto;
		overflow-y: hidden;
		scroll-snap-type: x mandatory;
		scroll-padding-left: 10px;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		scrollbar-width: none;
		padding-bottom: 8px;
	}
	.elementor-element-b9ee7a8::-webkit-scrollbar {
		display: none;
	}

	.elementor-element-b9ee7a8 > .elementor-element {
		flex: 0 0 min(80%, 300px) !important;
		width: auto !important;
		max-width: none !important;
		min-width: 0;
		height: auto !important;
		min-height: 0 !important;
		scroll-snap-align: start;
		padding: 16px 16px !important;
		position: relative;
		overflow: hidden;
	}

	/* Titles span the card width; description and price sit left of the
	   product photo. */
	.elementor-element-b9ee7a8 .elementor-element-d87f086,
	.elementor-element-b9ee7a8 .elementor-element-a66299e,
	.elementor-element-b9ee7a8 .elementor-element-5c76178 {
		width: 100% !important;
		max-width: 100% !important;
		text-align: left !important;
	}
	.elementor-element-b9ee7a8 .elementor-element-d87f086 .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-a66299e .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-5c76178 .elementor-heading-title {
		font-size: 22px !important;
		line-height: 1.12 !important;
		text-align: left !important;
	}

	.elementor-element-b9ee7a8 .elementor-element-3662acf,
	.elementor-element-b9ee7a8 .elementor-element-c190dd3,
	.elementor-element-b9ee7a8 .elementor-element-a1bc340,
	.elementor-element-b9ee7a8 .elementor-element-e31fefe,
	.elementor-element-b9ee7a8 .elementor-element-01ce992,
	.elementor-element-b9ee7a8 .elementor-element-073801a {
		width: auto !important;
		/* stop short of the product photo (visible width ~106px + gap) so text
		   never runs under it, at every phone width */
		max-width: calc(100% - 94px) !important;
		text-align: left !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	.elementor-element-b9ee7a8 .elementor-element-3662acf .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-c190dd3 .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-a1bc340 .elementor-heading-title {
		font-size: 14px !important;
		line-height: 1.3 !important;
		text-align: left !important;
	}
	.elementor-element-b9ee7a8 .elementor-element-e31fefe .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-a5e7760 .elementor-heading-title,
	.elementor-element-b9ee7a8 .elementor-element-073801a .elementor-heading-title {
		font-size: 24px !important;
		line-height: 1.15 !important;
		text-align: left !important;
	}
	.elementor-element-b9ee7a8 .elementor-element-01ce992 {
		justify-content: flex-start !important;
		padding-top: 4px !important;
	}

	/* Product photos: pinned bottom-right and smaller. */
	.elementor-element-b9ee7a8 .elementor-element-cdb0a1d,
	.elementor-element-b9ee7a8 .elementor-element-4d8f3df,
	.elementor-element-b9ee7a8 .elementor-element-fc32c1f {
		position: absolute !important;
		inset: auto -6px -10px auto !important;
		width: 112px !important;
		max-width: none !important;
		transform: none !important;
		margin: 0 !important;
	}

	/* Watermark words: hidden on phones only. */
	.elementor-element-b9ee7a8 .elementor-element-0ef4865,
	.elementor-element-b9ee7a8 .elementor-element-0afcbff {
		display: none !important;
	}

	/* ------------------------------------------------------------------
	 * 3. Homepage: gap under the three cards (demo sections restored).
	 *
	 * Food slider section (a55cbac, genuine BITERO products): it kept its
	 * desktop padding of 120px top / 90px bottom on phones, which is the big
	 * blank gap under the three cards. Reduced on phones only.
	 *
	 * The nine sections below the menu tabs are Foodis DEMO content awaiting
	 * redesign. They were briefly hidden on phones and are now restored (see
	 * the note after the padding rule). Only the food-slider padding below
	 * remains from this block.
	 * ------------------------------------------------------------------ */
	.elementor-element-a55cbac {
		padding-top: 36px !important;
		padding-bottom: 32px !important;
	}

	/* RESTORED (2026-11-17, owner request): the nine Foodis demo sections that
	   were hidden on phones are visible again. The display:none rule for
	   7685b47, 93023ed, a5db046, 5bab275, ede7e54, c679321, b4fd0b5, 33c0e40
	   and 3cefea1 was removed; nothing else here changed. The sections stay
	   in their original order and are still demo content awaiting redesign
	   into genuine BITERO content. Pre-restoration copy in
	   D:/Biteora/qa/mobile-redesign/backup-2026-11-16/ (file
	   bitero-mobile.css.PRE-RESTORATION-v1.0.9.css). */

	/* ------------------------------------------------------------------
	 * 4. Menu page (Elementor post 4104, widget bitero-menu-order).
	 * Everything is scoped to .bitero-menu-order so the homepage's own
	 * menu-tab widget is not touched. The markup is unchanged; only layout
	 * changes, so the Task 6 (Add to Cart) and Task 7 (Order Now) scripts
	 * keep working exactly as before.
	 * ------------------------------------------------------------------ */

	/* 4a. The eight category tabs: ONE swipeable row, sticky under the
	   header. The mobile header bar is 92px tall; the nav is in normal flow,
	   so it pushes content down instead of covering it. */
	.bitero-menu-order .nav {
		position: sticky;
		top: 92px;
		z-index: 40;
		display: flex;
		flex-wrap: nowrap;
		justify-content: flex-start;
		gap: 8px;
		margin: 0 -12px 6px;
		padding: 10px 12px;
		overflow-x: auto;
		overflow-y: hidden;
		overscroll-behavior-x: contain;
		scroll-snap-type: x proximity;
		scroll-padding-left: 12px;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		background-color: #f3f0e9;
		box-shadow: 0 6px 10px -8px rgba(0, 0, 0, 0.25);
	}
	.bitero-menu-order .nav::-webkit-scrollbar {
		display: none;
	}
	.bitero-menu-order .nav .nav-item {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}
	.bitero-menu-order .nav .nav-item .nav-link {
		height: 44px;
		line-height: 41px;
		padding: 0 18px;
		font-size: 15px;
		white-space: nowrap;
	}

	/* 4b. Compact product card: thumbnail left; name + price; two-line
	   description; stepper + Add to Cart on one row; Order Now secondary. */
	.bitero-menu-order .tab-content .row {
		--bs-gutter-y: 0;
		row-gap: 0;
	}
	.bitero-menu-order .food-menu-wrapper.style-2 {
		margin-left: 0;
	}
	.bitero-menu-order .food-menu-items {
		display: grid;
		grid-template-columns: 72px minmax(0, 1fr);
		column-gap: 12px;
		align-items: start;
		margin: 0;
		padding: 14px 0;
		border-bottom: 1.5px dashed rgba(30, 29, 35, 0.15);
	}
	.bitero-menu-order .food-menu-items .thumb {
		width: 72px;
		height: 72px;
		border-radius: 50%;
		overflow: hidden;
	}
	.bitero-menu-order .food-menu-items .thumb img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		display: block;
	}
	.bitero-menu-order .food-menu-items .content {
		width: auto;
		min-width: 0;
	}
	.bitero-menu-order .food-menu-items .content .title {
		border-bottom: 0;
		padding: 0 68px 0 0;
		margin: 0 0 2px;
		font-size: 17px;
		line-height: 1.25;
	}
	.bitero-menu-order .food-menu-items .content .price {
		font-size: 17px;
		top: 0;
		right: 0;
	}
	.bitero-menu-order .food-menu-items .content p {
		margin: 0 0 10px;
		font-size: 14px;
		line-height: 1.35;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}

	/* 4c. Controls: 44px touch targets; 16px input text (stops iOS zoom). */
	.bitero-menu-order .bitero-qty-controls {
		margin-top: 0;
		gap: 8px;
	}
	/* The widget's own stylesheet (bitero-menu-order.css) loads after this
	   file at the same specificity, so these three selectors are one class
	   more specific. */
	.bitero-menu-order .bitero-qty-controls .bitero-qty-btn {
		width: 44px;
		height: 44px;
		line-height: 44px;
		font-size: 20px;
	}
	.bitero-menu-order .bitero-qty-controls .bitero-qty-input {
		width: 44px;
		height: 44px;
		font-size: 16px;
	}
	.bitero-menu-order .bitero-qty-controls .bitero-qty {
		flex: 0 0 auto;
	}
	.bitero-menu-order .bitero-add-to-cart,
	.bitero-menu-order .bitero-order-now {
		height: 44px;
		line-height: 41px;
		padding: 0 16px;
		font-size: 15px;
	}
	.bitero-menu-order .bitero-qty-controls .bitero-add-to-cart {
		flex: 1 1 96px;
		min-width: 0;
		padding: 0 10px;
	}
	/* Order Now: secondary (outlined) on its own full-width row. One class
	   more specific than the widget's own rule, which loads after this file
	   and would otherwise keep the solid green background (green text on a
	   green fill = unreadable). Text uses a darker green for contrast. */
	.bitero-menu-order .bitero-qty-controls .bitero-order-now {
		flex: 1 1 100%;
		background-color: transparent;
		color: #0a5c2c;
		border: 1.5px solid var(--theme2);
	}
	.bitero-menu-order .bitero-qty-controls .bitero-order-now:hover,
	.bitero-menu-order .bitero-qty-controls .bitero-order-now:focus-visible {
		background-color: rgba(0, 131, 62, 0.1);
		color: #0a5c2c;
	}
	.bitero-menu-order .bitero-qty-controls .bitero-order-now:disabled {
		background-color: transparent;
	}
	.bitero-menu-order .bitero-cart-message {
		min-height: 0;
	}
	.bitero-menu-order .bitero-cart-message:empty {
		display: none;
	}

	/* ------------------------------------------------------------------
	 * 5. Sticky bottom cart bar (built by bitero-cart-bar.js, only when
	 * the cart has items). It never covers the end of the page: the script
	 * sets --bitero-cart-bar-h and a body class that reserve the space.
	 * z-index 1005: above the header (1000), below the mini-cart (1010).
	 * ------------------------------------------------------------------ */
	body.bitero-has-cart-bar {
		padding-bottom: var(--bitero-cart-bar-h, 72px);
	}
	body.bitero-has-cart-bar .back-to-top {
		bottom: calc(var(--bitero-cart-bar-h, 72px) + 16px) !important;
	}

	.bitero-cart-bar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 1005;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
		background: #fff;
		border-radius: 16px 16px 0 0;
		box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.14);
		box-sizing: border-box;
	}
	.bitero-cart-bar[hidden] {
		display: none;
	}
	.bitero-cart-bar * {
		box-sizing: border-box;
	}
	.bitero-cart-bar__summary {
		flex: 1 1 auto;
		min-width: 0;
		min-height: 44px;
		display: flex;
		align-items: center;
		gap: 10px;
		padding: 0;
		border: 0;
		background: transparent;
		color: var(--header);
		text-align: left;
		cursor: pointer;
	}
	.bitero-cart-bar__count {
		flex: 0 0 auto;
		min-width: 30px;
		height: 30px;
		padding: 0 6px;
		border-radius: 15px;
		background: var(--theme);
		color: var(--header);
		font-size: 15px;
		font-weight: 700;
		line-height: 30px;
		text-align: center;
	}
	.bitero-cart-bar__text {
		display: flex;
		flex-direction: column;
		min-width: 0;
		line-height: 1.2;
	}
	.bitero-cart-bar__label {
		font-size: 13px;
		color: rgba(30, 29, 35, 0.65);
	}
	.bitero-cart-bar__subtotal {
		font-size: 18px;
		font-weight: 700;
		color: var(--theme2);
		white-space: nowrap;
	}
	.bitero-cart-bar .bitero-cart-bar__order {
		flex: 0 0 auto;
		height: 44px;
		line-height: 41px;
		padding: 0 22px;
		font-size: 16px;
		background-color: var(--theme2);
		border-color: var(--theme2);
		color: #fff;
	}
	.bitero-cart-bar button:focus-visible,
	.bitero-cart-bar a:focus-visible {
		outline: 3px solid var(--theme2);
		outline-offset: 2px;
	}
}

/* Final UX correction: the German label "In den Warenkorb" is longer than "Add to Cart"; keep it on one line and never clipped. */
@media (max-width: 767px) {
	.bitero-menu-order .bitero-qty-controls .bitero-add-to-cart {
		flex: 1 1 auto;
		white-space: nowrap;
		font-size: 14px;
		padding: 0 8px;
		overflow: visible;
		text-overflow: clip;
	}
	.bitero-menu-order .bitero-qty-controls .bitero-order-now {
		text-transform: none;
	}
}
@media (max-width: 380px) {
	.bitero-menu-order .bitero-qty-controls { gap: 6px; }
	.bitero-menu-order .bitero-qty-controls .bitero-qty-btn { width: 40px; height: 44px; }
	.bitero-menu-order .bitero-qty-controls .bitero-qty-input { width: 38px; }
}
