/*
 * Kate's Bistro — Mobile Product UI
 * Scope: WooCommerce single-product pages only.
 * Desktop is intentionally left unchanged.
 */

@media (max-width: 767px) {

	/* ---------- Product page rhythm ---------- */

	body.single-product .site-main,
	body.single-product main {
		overflow-x: hidden;
	}

	body.single-product .woocommerce-breadcrumb {
		margin: 0 0 14px;
		font-size: 11px;
		line-height: 1.45;
		letter-spacing: .01em;
		white-space: normal;
	}

	body.single-product div.product .woocommerce-product-gallery,
	body.single-product div.product div.images {
		margin-bottom: 22px;
	}

	body.single-product div.product .woocommerce-product-gallery img,
	body.single-product div.product div.images img {
		display: block;
		width: 100%;
		height: auto;
		border-radius: 4px;
	}

	/* ---------- Title + price ---------- */

	body.single-product div.product .product_title,
	body.single-product div.product .entry-title {
		margin: 0 0 8px;
		font-size: 26px;
		line-height: 1.18;
		letter-spacing: -0.02em;
	}

	body.single-product div.product p.price,
	body.single-product div.product span.price {
		margin: 0 0 18px;
		font-size: 18px;
		line-height: 1.3;
		font-weight: 650;
	}

	/* ---------- Quantity + Add to cart ---------- */

	body.single-product div.product form.cart {
		display: flex;
		align-items: stretch;
		gap: 10px;
		margin: 0 0 20px;
	}

	body.single-product div.product form.cart .quantity {
		flex: 0 0 96px;
		margin: 0;
	}

	body.single-product div.product form.cart .quantity,
	body.single-product div.product form.cart .quantity .qty,
	body.single-product div.product form.cart button.single_add_to_cart_button {
		min-height: 46px;
	}

	body.single-product div.product form.cart .quantity .qty {
		width: 100%;
		margin: 0;
		font-size: 16px;
		text-align: center;
	}

	body.single-product div.product form.cart button.single_add_to_cart_button {
		flex: 1 1 auto;
		margin: 0;
		padding: 0 14px;
		font-size: 15px;
		font-weight: 700;
		line-height: 1.2;
		white-space: normal;
	}

	/* ---------- Technical metadata ---------- */

	body.single-product div.product .product_meta {
		margin: 4px 0 20px;
		padding: 14px 0;
		border-top: 1px solid rgba(0,0,0,.08);
		border-bottom: 1px solid rgba(0,0,0,.08);
		font-size: 12px;
		line-height: 1.65;
	}

	/* Keep operational product details visible on mobile:
	   SKU, category, serving and any other direct product-meta rows. */
	body.single-product div.product .product_meta > span,
	body.single-product div.product .product_meta .sku_wrapper,
	body.single-product div.product .product_meta .posted_in {
		display: block !important;
		margin: 0 0 4px !important;
		visibility: visible !important;
		opacity: 1 !important;
	}

	body.single-product div.product .product_meta > span:last-child {
		margin-bottom: 0 !important;
	}


	/* ---------- WooCommerce tabs ---------- */

	body.single-product div.product .woocommerce-tabs {
		margin-top: 6px;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs {
		display: flex;
		align-items: stretch;
		gap: 0;
		margin: 0 0 22px;
		padding: 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: none;
		border-bottom: 1px solid rgba(0,0,0,.10);
	}

	body.single-product div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
		display: none;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs::before,
	body.single-product div.product .woocommerce-tabs ul.tabs::after {
		display: none !important;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs li {
		flex: 1 0 auto;
		min-width: 106px;
		margin: 0 !important;
		padding: 0 !important;
		border: 0 !important;
		border-radius: 0 !important;
		background: transparent !important;
		box-shadow: none !important;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs li::before,
	body.single-product div.product .woocommerce-tabs ul.tabs li::after {
		display: none !important;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs li a {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		padding: 8px 10px !important;
		font-size: 11px;
		line-height: 1.2;
		font-weight: 650;
		text-align: center;
		text-transform: uppercase;
		white-space: nowrap;
		opacity: .72;
		border-bottom: 2px solid transparent;
	}

	body.single-product div.product .woocommerce-tabs ul.tabs li.active a {
		opacity: 1;
		border-bottom-color: currentColor;
	}

	/* ---------- Long description ---------- */

	body.single-product .woocommerce-Tabs-panel--description {
		position: relative;
		margin: 0;
		padding: 0;
	}

	body.single-product .woocommerce-Tabs-panel--description p,
	body.single-product .woocommerce-Tabs-panel--description li {
		font-size: 15.5px;
		line-height: 1.68;
	}

	body.single-product .woocommerce-Tabs-panel--description p {
		margin: 0 0 16px;
	}

	body.single-product .woocommerce-Tabs-panel--description h2 {
		margin: 28px 0 12px;
		font-size: 24px;
		line-height: 1.22;
		letter-spacing: -0.015em;
	}

	body.single-product .woocommerce-Tabs-panel--description h3 {
		margin: 24px 0 10px;
		font-size: 20px;
		line-height: 1.28;
	}

	body.single-product .woocommerce-Tabs-panel--description .kb-description-inner {
		position: relative;
	}

	body.single-product .woocommerce-Tabs-panel--description.kb-readmore-ready:not(.is-expanded) .kb-description-inner {
		max-height: 390px;
		overflow: hidden;
	}

	body.single-product .woocommerce-Tabs-panel--description.kb-readmore-ready:not(.is-expanded) .kb-description-inner::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: 0;
		height: 78px;
		pointer-events: none;
		background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
	}

	body.single-product .kb-readmore-button {
		display: none;
		width: 100%;
		min-height: 44px;
		margin: 10px 0 4px;
		padding: 8px 14px;
		border: 1px solid rgba(0,0,0,.16);
		border-radius: 4px;
		background: transparent;
		font: inherit;
		font-size: 14px;
		font-weight: 700;
		line-height: 1.2;
		cursor: pointer;
	}

	body.single-product .woocommerce-Tabs-panel--description.kb-readmore-ready .kb-readmore-button {
		display: block;
	}

	/* ---------- Footer hand-off ---------- */

	body.single-product .woocommerce-tabs + * {
		margin-top: 28px;
	}
}

/* Desktop/tablet >= 768px: Read More wrapper is harmless and content remains fully visible. */
@media (min-width: 768px) {
	body.single-product .kb-readmore-button {
		display: none !important;
	}
	body.single-product .woocommerce-Tabs-panel--description .kb-description-inner {
		max-height: none !important;
		overflow: visible !important;
	}
}
