/* css for layout */

/* @layer base: matches the layer name Tailwind's own Preflight declares
   (tailwind-input.css's `@import url("tailwindcss")`). CSS cascade layers rule:
   an unlayered declaration always beats a layered one, regardless of
   specificity or source order - so a bare, unlayered `* { padding: 0 }`
   here silently wins over EVERY Tailwind padding/margin utility site-wide
   (`px-*`, `py-*`, `p-*`, `m-*`, including the token-based `px-(--space-3,
   ...)` form), no matter how that utility is written. Wrapping this reset
   in the same `base` layer Tailwind uses lets its `utilities` layer (which
   Tailwind's own `@layer theme, base, components, utilities;` statement
   always orders after `base`) win as intended. Bootstrap stays unlayered
   and keeps winning over this reset exactly as before (e.g. `.btn`'s own
   padding), so nothing non-Tailwind changes. Found while building I3: the
   new storefront's filter chips/search bar rendered with zero padding
   despite correct classes and a correctly compiled tailwind.css. */
@layer base {
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	background-attachment: fixed;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	color: var(--gray-700);
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.app-container {
	flex: 1;
	display: flex;
	flex-direction: column;
	background: var(--light);
	overflow: visible;
	/* Changed from hidden to visible to fix dropdown clipping */
	min-height: 100vh;
}

@media (max-width: 992px) {
	body {
		background: var(--light);
	}
}

/*
 * .main-content is the SINGLE SOURCE of every page's outer padding (the gutter
 * between the header and footer). Do NOT add left/top padding — or a
 * centering `margin-x` gutter — to a page's outermost content wrapper; it will
 * stack on top of this and break the consistent spacing across templates.
 * Page wrappers may keep `max-width` + `margin: 0 auto` (centering only) and
 * their own INNER card padding. Full-bleed pages opt out via
 * `.page-<name> .main-content { padding: 0 }` (see .page-landing below).
 *
 * padding-y: 4.25rem (68px) at all breakpoints.
 * padding-x: 1.125rem mobile (<768) / 3.125rem md (>=768) /
 *           5rem xl (>=1280) / 11.25rem 2xl (>=1536).
 */
.main-content {
	flex: 1;
	min-height: 100vh;
	padding: 4.25rem 1.125rem;
	background: var(--light);
	overflow-y: auto;
}

/* Tablet (Tailwind md) */
@media (min-width: 768px) {
	.main-content {
		padding: 4.25rem 3.125rem;
	}
}

/* Desktop (Tailwind xl) */
@media (min-width: 1280px) {
	.main-content {
		padding: 4.25rem 5rem;
	}
}

/* Large desktop (Tailwind 2xl) */
@media (min-width: 1536px) {
	.main-content {
		padding: 4.25rem 11.25rem;
	}
}

/* Quick Sale is a till, not a landing page: on phones the 4.25rem vertical
   padding clears nothing (the navbar is in flow) and only pushes the products
   down, so trim it. */
@media (max-width: 900px) {
	body.page-quick-sale .main-content {
		padding-top: 0.75rem;
		padding-bottom: 0.75rem;
	}
}

/* Full-bleed pages (e.g. landing hero) opt out of the outer padding. */
.page-landing .main-content {
	padding: 0;
}
