/* ==========================================================================
   Cafe Bloom — Desktop Store Layout (≥900px)
   Mobile keeps the app shell; desktop is a normal full-width store.
   Author: Mohamed Amjad — http://mohamed-amjad.com/
   ========================================================================== */

@media (min-width: 900px) {
	/* Remove phone-frame / app chrome */
	body.cafe-bloom-app {
		display: block;
		padding: 0;
		background: var(--cb-bg);
	}

	.cb-app {
		max-width: none;
		width: 100%;
		min-height: 100dvh;
		border-radius: 0;
		overflow: visible;
		box-shadow: none;
		background: transparent;
	}

	.cb-mobile-only {
		display: none !important;
	}

	.cb-desktop-nav,
	.cb-desktop-signin {
		display: flex;
	}

	.cb-store-footer {
		display: block;
	}

	/* Promo bar as normal site strip */
	.cb-promo-bar {
		position: relative;
		top: auto;
		justify-content: center;
		gap: 16px;
		font-size: 14px;
		padding: 10px 24px;
	}

	/* Sticky stack: header then category bar (promo is not sticky on desktop) */
	body.cafe-bloom-app {
		--cb-sticky-header-top: 0px;
	}

	body.cafe-bloom-app.admin-bar {
		--cb-sticky-header-top: 32px;
	}

	/* Store header — full viewport width */
	.cb-header,
	body.cafe-bloom-app .cb-header,
	body.cafe-bloom-app.admin-bar .cb-header {
		position: sticky;
		top: var(--cb-sticky-header-top);
		z-index: 40;
		display: flex;
		align-items: center;
		gap: 28px;
		height: 76px;
		min-height: 76px;
		max-height: 76px;
		width: 100%;
		max-width: none;
		margin: 0;
		padding: 0 40px;
		background: var(--cb-surface);
		border-bottom: 1px solid var(--cb-border);
		grid-template-columns: unset;
		box-sizing: border-box;
		overflow: hidden;
	}

	/* Promo is not sticky on desktop; keep it flush under admin bar */
	body.admin-bar.cafe-bloom-app .cb-promo-bar {
		top: auto;
	}

	.cb-brand {
		flex: 0 1 auto;
		width: auto;
		max-width: min(240px, 22vw);
		align-items: center;
		justify-content: var(--cb-logo-justify-desktop, flex-start);
		text-align: var(--cb-logo-align-desktop, left);
	}

	.cb-brand .cb-brand-logo {
		max-width: 100%;
	}

	.cb-brand .cb-brand-logo img {
		height: var(--cb-logo-h-desktop, 54px);
		width: var(--cb-logo-width-desktop, auto);
		max-width: min(100%, var(--cb-logo-mw-desktop, 220px));
		max-height: 52px;
		object-fit: contain;
	}

	.cb-brand__text {
		align-items: flex-start;
	}

	.cb-brand__name {
		font-size: 1.6rem;
	}

	.cb-brand__tag {
		max-width: none;
	}

	.cb-desktop-nav {
		flex: 1;
		align-items: center;
		justify-content: center;
		gap: 8px;
	}

	.cb-desktop-nav a,
	.cb-desktop-nav__btn {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 10px 16px;
		border-radius: 999px;
		border: 0;
		background: transparent;
		color: var(--cb-muted);
		font-weight: 600;
		font-size: 14px;
		cursor: pointer;
		transition: background 0.15s ease, color 0.15s ease;
	}

	.cb-desktop-nav a:hover,
	.cb-desktop-nav__btn:hover {
		color: var(--cb-text);
		background: var(--cb-bg);
	}

	.cb-desktop-nav a.is-active {
		color: var(--cb-primary);
		background: var(--cb-highlight);
	}

	.cb-desktop-nav__btn svg {
		width: 16px;
		height: 16px;
		color: var(--cb-primary);
	}

	.cb-header-actions {
		display: flex;
		align-items: center;
		gap: 12px;
		margin-left: auto;
	}

	.cb-desktop-signin {
		font-weight: 600;
		color: var(--cb-text);
		padding: 8px 12px;
		border: 0;
		background: transparent;
		cursor: pointer;
		font: inherit;
	}

	.cb-cart-link {
		width: 48px;
		height: 48px;
		border: 1px solid var(--cb-border);
		border-radius: 14px;
		background: var(--cb-surface);
	}

	.cb-profile-chip {
		width: 44px;
		height: 44px;
	}

	.cb-profile-chip--guest svg {
		width: 22px;
		height: 22px;
	}

	/* Hide mobile app tabs — desktop uses header nav */
	.cb-tabs {
		display: none;
	}

	/* Main store width */
	.cb-main {
		max-width: 1280px;
		margin: 0 auto;
		padding: 28px 40px 64px;
		min-height: 60vh;
	}

	/* Checkout uses full viewport width */
	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-main {
		max-width: none;
		width: 100%;
		margin: 0;
		padding: 24px 40px 64px;
		box-sizing: border-box;
	}

	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-page,
	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-woo-page,
	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-content,
	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-entry,
	body.woocommerce-checkout:not(.woocommerce-order-received) .woocommerce {
		max-width: none !important;
		width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		float: none !important;
		box-sizing: border-box;
		padding-left: 0;
		padding-right: 0;
	}

	.cb-checkout-flow .cb-main {
		padding-bottom: 64px;
	}

	.cb-hello {
		display: flex;
		margin: 0 0 16px;
		padding: 4px 0 16px;
		border: 0;
		border-radius: 0;
		background: transparent;
		box-shadow: none;
		max-height: none;
		overflow: visible;
	}

	.cb-hello.is-leaving {
		max-height: 0;
		box-shadow: none;
	}

	.cb-hello__accent {
		display: none;
	}

	.cb-hello__text {
		display: block;
	}

	.cb-hello__greet {
		display: block;
		margin: 0 0 6px;
		max-width: none;
		font-size: 14px;
		letter-spacing: normal;
		white-space: normal;
	}

	.cb-hello__title {
		display: block;
		font-family: var(--cb-font-display);
		font-size: 2rem;
		line-height: 1.2;
		white-space: normal;
	}

	.cb-hello__title::before {
		display: none;
	}

	.cb-hello__close {
		width: 40px;
		height: 40px;
	}

	.cb-home .cb-loyalty-bar {
		border-top: 0;
		padding-top: 18px;
		background: linear-gradient(180deg, var(--cb-highlight), var(--cb-surface));
	}

	/* Loyalty as store banner */
	.cb-loyalty-bar {
		border-radius: var(--cb-radius);
		border: 1px solid var(--cb-border);
		margin-bottom: 20px;
		padding: 18px 24px 14px;
	}

	.cb-loyalty-bar__track-wrap {
		padding: 12px 16px 28px;
	}

	.cb-loyalty-bar__marks {
		left: 16px;
		right: 16px;
	}

	.cb-loyalty-bar__val {
		font-size: 12px;
	}

	.cb-loyalty-bar__points {
		font-size: 18px;
	}

	/* Toolbar + categories */
	.cb-toolbar {
		padding: 0 0 16px;
	}

	.cb-search {
		max-width: 420px;
	}

	/* Category pills — stick flush under header (same sticky stack vars) */
	.cb-cats-wrap,
	body.cafe-bloom-app .cb-cats-wrap,
	body.cafe-bloom-app.admin-bar .cb-cats-wrap {
		overflow: visible;
		position: sticky;
		top: calc(var(--cb-sticky-header-top, 0px) + var(--cb-desktop-header-h, 76px));
		z-index: 38;
		width: 100vw;
		max-width: none;
		margin: 0 calc(50% - 50vw) 12px;
		padding: 14px 40px;
		background: var(--cb-surface);
		border: 0;
		border-bottom: 1px solid var(--cb-border);
		border-radius: 0;
		box-shadow: none;
		box-sizing: border-box;
	}

	.cb-cats {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		gap: 10px;
		width: 100%;
		max-width: 100%;
		padding: 0;
		overflow: visible;
		cursor: default;
		scrollbar-width: none;
		background: transparent;
	}

	.cb-cats__spacer {
		display: none;
	}

	.cb-cat {
		padding: 9px 16px;
		font-size: 13.5px;
	}

	.cb-menu-list {
		padding: 0;
	}

	.cb-cat-head {
		margin: 32px 0 18px;
	}

	.cb-cat-title {
		font-size: 1.5rem;
		margin: 0;
		font-family: var(--cb-font-display);
	}

	/* Product layouts — list vs grid must look different */
	#cb-products[data-view="list"] .cb-products,
	.cb-products--list {
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	#cb-products[data-view="grid"] .cb-products,
	.cb-products--grid {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 24px;
	}

	#cb-products[data-view="list"] .cb-product,
	.cb-products--list .cb-product {
		grid-template-columns: 140px 1fr;
		align-items: stretch;
		padding: 14px;
		background: var(--cb-surface);
		border: 1px solid var(--cb-border);
		border-radius: var(--cb-radius);
		box-shadow: var(--cb-shadow-sm);
		transition: transform 0.18s ease, box-shadow 0.18s ease;
	}

	#cb-products[data-view="grid"] .cb-product,
	.cb-products--grid .cb-product {
		grid-template-columns: 1fr;
		padding: 14px;
		background: var(--cb-surface);
		border: 1px solid var(--cb-border);
		border-radius: var(--cb-radius);
		box-shadow: var(--cb-shadow-sm);
		transition: transform 0.18s ease, box-shadow 0.18s ease;
	}

	#cb-products[data-view="list"] .cb-product:hover,
	#cb-products[data-view="grid"] .cb-product:hover,
	.cb-products--list .cb-product:hover,
	.cb-products--grid .cb-product:hover {
		transform: translateY(-3px);
		box-shadow: var(--cb-shadow);
	}

	#cb-products[data-view="list"] .cb-product__media,
	.cb-products--list .cb-product__media {
		margin-bottom: 0;
		border-radius: var(--cb-radius-sm);
		max-height: 140px;
	}

	#cb-products[data-view="grid"] .cb-product__media,
	.cb-products--grid .cb-product__media {
		border-radius: var(--cb-radius-sm);
		margin-bottom: 12px;
		max-height: none;
	}

	#cb-products[data-view="list"] .cb-product__price,
	#cb-products[data-view="grid"] .cb-product__price,
	.cb-products--list .cb-product__price,
	.cb-products--grid .cb-product__price {
		text-align: left;
		font-size: 1.05rem;
		color: var(--cb-primary);
	}

	.cb-product__add {
		width: 40px;
		height: 40px;
	}

	/* Hide sticky mobile cart bar */
	.cb-bottom-cart {
		display: none !important;
	}

	/* Rewards / orders / profile pages */
	.cb-rewards,
	.cb-orders,
	.cb-profile,
	.cb-page {
		padding: 0;
		max-width: 860px;
	}

	.cb-profile {
		max-width: 720px;
		margin: 0 auto;
	}

	.cb-profile__hero {
		padding-top: 12px;
	}

	.cb-rewards-card {
		padding: 32px;
	}

	.cb-rewards-how {
		margin-top: 36px;
	}

	.cb-rewards-how__head {
		margin-bottom: 18px;
	}

	.cb-rewards-how__head h2 {
		font-size: 1.7rem;
	}

	.cb-rewards-steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 16px;
	}

	.cb-rewards-step {
		grid-template-columns: 1fr;
		grid-template-areas:
			"icon"
			"title"
			"text";
		gap: 10px;
		padding: 22px 20px 20px;
		min-height: 100%;
	}

	.cb-rewards-step__num {
		top: 14px;
		right: 16px;
		font-size: 0.95rem;
	}

	.cb-rewards-step__icon {
		width: 48px;
		height: 48px;
	}

	.cb-rewards-step__title {
		padding-right: 24px;
		align-self: start;
		font-size: 1.08rem;
	}

	.cb-order-list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}

	.cb-order-list--profile {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	/* Cart & checkout full store pages */
	.woocommerce-cart .cb-woo-page {
		max-width: 980px;
		padding: 20px 40px 48px;
	}

	.woocommerce-checkout .cb-woo-page,
	.cb-checkout-flow .cb-woo-page,
	body.woocommerce-checkout:not(.woocommerce-order-received) .cb-page {
		max-width: none;
		width: 100%;
		padding: 0;
		margin: 0;
		box-sizing: border-box;
	}

	.cb-cart-app {
		max-width: 820px;
		margin: 0 auto;
		background: var(--cb-surface);
		border: 1px solid var(--cb-border);
		border-radius: var(--cb-radius-lg);
		padding: 28px;
		box-shadow: var(--cb-shadow-sm);
	}

	.cb-checkout-app {
		max-width: none;
		width: 100%;
		margin: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		padding: 0;
		box-shadow: none;
	}

	.cb-checkout-grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 28px;
		align-items: start;
		width: 100%;
	}

	.cb-checkout-grid__main {
		background: var(--cb-surface);
		border: 1px solid var(--cb-border);
		border-radius: var(--cb-radius-lg);
		padding: 28px;
		box-shadow: var(--cb-shadow-sm);
	}

	.cb-checkout-grid__aside {
		position: sticky;
		top: calc(88px + var(--cb-safe-top, 0px));
	}

	.cb-checkout-grid__aside .cb-bill {
		margin: 0;
		padding: 24px;
		border-radius: var(--cb-radius-lg);
		box-shadow: var(--cb-shadow-sm);
	}

	.cb-cart-app__head h1 {
		font-size: 2rem;
	}

	.cb-cart-card {
		grid-template-columns: 110px minmax(0, 1fr) auto;
		padding: 16px;
		gap: 16px;
	}

	.cb-cart-items {
		padding: 0;
	}

	.cb-bill {
		border-radius: var(--cb-radius);
		margin-top: 0;
		margin-left: 0;
		margin-right: 0;
		max-width: none;
		width: 100%;
	}

	.cb-bottom-cta {
		position: static;
		transform: none;
		left: auto;
		bottom: auto;
		width: 100%;
		margin: 24px 0 0;
	}

	.woocommerce-cart.cb-checkout-flow .cb-main {
		padding-bottom: 64px;
	}

	.cb-pay-toggle {
		max-width: none;
		width: 100%;
	}

	.woocommerce-checkout .cb-checkout-coupon {
		margin-bottom: 18px;
	}

	/* Modal — true center on desktop (no mobile bottom offset) */
	.cb-modal {
		width: min(440px, calc(100vw - 48px)) !important;
		bottom: 0 !important;
		max-height: min(85vh, 85dvh);
	}

	/* Sidebar only used on mobile — keep off-canvas if opened by resize edge case */
	.cb-sidebar {
		max-width: 360px;
	}

	/* Store footer — dark brand band */
	.cb-store-footer {
		position: relative;
		margin-top: 64px;
		overflow: hidden;
		color: rgba(255, 255, 255, 0.86);
		background:
			radial-gradient(900px 420px at 0% 0%, rgba(255, 255, 255, 0.10), transparent 55%),
			radial-gradient(700px 380px at 100% 100%, rgba(196, 92, 38, 0.22), transparent 50%),
			linear-gradient(165deg, color-mix(in srgb, var(--cb-primary) 88%, #061410) 0%, color-mix(in srgb, var(--cb-primary) 72%, #020807) 100%);
		border-top: 0;
	}

	.cb-store-footer__glow {
		position: absolute;
		inset: auto -10% -40% auto;
		width: 420px;
		height: 420px;
		border-radius: 50%;
		background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 68%);
		pointer-events: none;
	}

	.cb-store-footer__inner {
		position: relative;
		z-index: 1;
		max-width: 1280px;
		margin: 0 auto;
		padding: 56px 40px 40px;
		display: grid;
		grid-template-columns: 1.45fr 0.9fr 1fr 1.05fr;
		gap: 40px 32px;
		align-items: start;
		width: 100%;
	}

	.cb-store-footer__logo {
		margin-bottom: 14px;
	}

	.cb-store-footer__logo .cb-brand-logo img,
	.cb-store-footer__logo img,
	.cb-store-footer__logo .custom-logo {
		height: var(--cb-logo-h-desktop, 54px);
		max-height: var(--cb-logo-h-desktop, 54px);
		width: var(--cb-logo-width-desktop, auto);
		max-width: var(--cb-logo-mw-desktop, 240px);
		filter: none;
	}

	.cb-store-footer__name {
		font-family: var(--cb-font-display);
		font-size: 1.75rem;
		font-weight: 700;
		letter-spacing: -0.02em;
		color: #fff;
		display: block;
		line-height: 1.15;
	}

	.cb-store-footer__tag {
		display: block;
		margin-top: 6px;
		font-size: 11px;
		font-weight: 600;
		letter-spacing: 0.14em;
		text-transform: uppercase;
		color: rgba(255, 255, 255, 0.55);
	}

	.cb-store-footer__about {
		margin: 16px 0 0;
		max-width: 34ch;
		font-size: 14.5px;
		line-height: 1.6;
		color: rgba(255, 255, 255, 0.72);
	}

	.cb-store-footer__social {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		margin-top: 22px;
	}

	.cb-store-footer__social-link {
		display: grid;
		place-items: center;
		width: 42px;
		height: 42px;
		border-radius: 12px;
		color: #fff;
		background: rgba(255, 255, 255, 0.08);
		border: 1px solid rgba(255, 255, 255, 0.12);
		transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
	}

	.cb-store-footer__social-link:hover {
		background: rgba(255, 255, 255, 0.16);
		border-color: rgba(255, 255, 255, 0.28);
		transform: translateY(-2px);
		color: #fff;
	}

	.cb-store-footer__social-link svg {
		width: 18px;
		height: 18px;
	}

	.cb-store-footer__heading {
		margin: 0 0 16px;
		font-size: 12px;
		font-weight: 700;
		letter-spacing: 0.16em;
		text-transform: uppercase;
		color: rgba(255, 255, 255, 0.5);
	}

	.cb-store-footer__nav {
		display: flex;
		flex-direction: column;
		gap: 12px;
	}

	.cb-store-footer__nav a {
		color: rgba(255, 255, 255, 0.88);
		font-weight: 500;
		font-size: 15px;
		width: fit-content;
		transition: color 0.15s ease, transform 0.15s ease;
	}

	.cb-store-footer__nav a:hover {
		color: #fff;
		transform: translateX(3px);
	}

	.cb-store-footer__list {
		list-style: none;
		margin: 0;
		padding: 0;
		display: flex;
		flex-direction: column;
		gap: 14px;
	}

	.cb-store-footer__list li {
		display: flex;
		align-items: flex-start;
		gap: 10px;
		font-size: 14.5px;
		line-height: 1.5;
		color: rgba(255, 255, 255, 0.82);
	}

	.cb-store-footer__list a {
		color: rgba(255, 255, 255, 0.88);
		font-weight: 500;
	}

	.cb-store-footer__list a:hover {
		color: #fff;
	}

	.cb-store-footer__icon {
		flex: 0 0 auto;
		display: grid;
		place-items: center;
		width: 20px;
		height: 20px;
		margin-top: 1px;
		color: rgba(255, 255, 255, 0.55);
	}

	.cb-store-footer__icon svg {
		width: 18px;
		height: 18px;
	}

	.cb-store-footer__hours {
		flex-wrap: nowrap;
	}

	.cb-store-footer__hours span:last-child {
		white-space: nowrap;
	}

	.cb-store-footer__bar {
		position: relative;
		z-index: 1;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		background: rgba(0, 0, 0, 0.18);
	}

	.cb-store-footer__bar-inner {
		max-width: 1280px;
		margin: 0 auto;
		padding: 16px 40px;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 16px;
		flex-wrap: wrap;
		text-align: center;
	}

	.cb-store-footer__copy {
		margin: 0;
		font-size: 13px;
		color: rgba(255, 255, 255, 0.55);
	}

	@media (max-width: 1100px) {
		.cb-store-footer__inner {
			grid-template-columns: 1.2fr 1fr 1fr;
		}

		.cb-store-footer__col:last-child {
			grid-column: 2 / -1;
		}
	}

	@media (max-width: 900px) {
		.cb-store-footer__inner {
			grid-template-columns: 1fr 1fr;
			padding: 40px 24px 28px;
			gap: 28px;
		}

		.cb-store-footer__brand {
			grid-column: 1 / -1;
		}

		.cb-store-footer__bar-inner {
			padding: 14px 24px;
		}
	}

	/* Single product — full store layout */
	.single-product .cb-main,
	.single-product .cb-woo-page {
		padding: 24px 40px 48px;
		max-width: 1280px;
	}

	.cb-single-product__grid {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: 36px;
		align-items: stretch;
		padding: 28px;
	}

	.cb-single-product__media {
		aspect-ratio: 1;
		min-height: 420px;
	}

	.cb-single-product__summary {
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 8px 8px 8px 4px;
	}

	.cb-single-product__summary .product_title {
		font-size: 2.2rem;
	}

	.cb-single-product__summary .price {
		font-size: 1.7rem;
	}

	.cb-single-product__summary form.cart {
		max-width: 420px;
	}

	.cb-related {
		max-width: 1280px;
		margin-top: 32px;
		padding: 0 40px 24px;
	}

	.cb-related__head h2 {
		font-size: 1.5rem;
	}

	.cb-related__card {
		flex-basis: 220px;
	}

	.cb-related__slider {
		gap: 16px;
	}

	.cb-reviews {
		padding: 56px 40px 52px;
	}

	.cb-reviews__slide {
		flex: 0 0 calc(50% - 10px);
		max-width: calc(50% - 10px);
		padding: 22px 24px 24px;
	}

	.cb-reviews__quote p {
		font-size: 16px;
	}

	.cb-reviews__track {
		gap: 20px;
	}
}

@media (min-width: 1200px) {
	#cb-products[data-view="grid"] .cb-products,
	.cb-products--grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
