/*
Theme Name: Pastry App
Theme URI: https://example.com/pastry-app
Author: Your Shop
Author URI: https://example.com
Description: A mobile-app storefront for a pastry shop. Food-delivery app layout - sticky category rail, bottom tab bar, add-to-cart bottom sheets, a persistent cart bar and an Orders tab wired to Pastry Delivery & Live Tracking. Installable as a PWA. Built for WooCommerce.
Version: 1.12.0
Requires at least: 6.2
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pastry-app
Tags: e-commerce, one-column, custom-colors, custom-logo, custom-menu, translation-ready, block-styles
WooCommerce requires at least: 8.0
*/

/* -------------------------------------------------------------------------
 * This file holds design tokens and the base layer only.
 * Components live in assets/css/app.css, which is enqueued after this file.
 * ---------------------------------------------------------------------- */

:root {
	/* Brand. Overridable from Appearance > Customize > App design. */
	--pa-brand: #8f4957;
	--pa-brand-ink: #723240;
	--pa-brand-soft: #fff0f1;
	--pa-on-brand: #ffffff;

	/* Filled-button rose. The desktop comp fills buttons with
	 * primary-container and deepens to primary on hover, which is why the
	 * button fill is its own token rather than --pa-brand. */
	--pa-brand-btn: #d98695;
	--pa-brand-btn-ink: #8f4957;

	/* Neutrals */
	--pa-ink: #25181a;
	--pa-ink-2: #534345;
	--pa-muted: #857375;
	--pa-line: #d7c1c3;
	--pa-surface: #ffffff;
	--pa-canvas: #fff8f7;
	--pa-skeleton: #f5dddf;

	/* Footer band. The design footer is a light tinted surface, not a dark
	 * one (surface-container-highest with on-surface text). */
	--pa-footer-bg: #f5dddf;
	--pa-footer-ink: #25181a;

	/* Status */
	--pa-success: #43655f;
	--pa-success-soft: #c5eae3;
	--pa-warn: #b26a00;
	--pa-warn-soft: #fdf3e2;
	--pa-danger: #ba1a1a;
	--pa-danger-soft: #ffdad6;

	/* Radii - generous, app-like */
	--pa-r-sm: 10px;
	--pa-r: 14px;
	--pa-r-lg: 20px;
	--pa-r-xl: 28px;
	--pa-r-pill: 999px;

	/* Elevation - soft and warm, never grey */
	--pa-shadow-sm: 0 1px 2px rgba(67, 52, 54, 0.05);
	--pa-shadow: 0 4px 24px rgba(67, 52, 54, 0.07);
	--pa-shadow-lg: 0 -8px 30px rgba(67, 52, 54, 0.12);

	/* Rhythm */
	--pa-1: 4px;
	--pa-2: 8px;
	--pa-3: 12px;
	--pa-4: 16px;
	--pa-5: 20px;
	--pa-6: 24px;
	--pa-8: 32px;
	--pa-10: 40px;

	/* App chrome */
	--pa-topbar-h: 56px;
	--pa-tabbar-h: 58px;
	--pa-cartbar-h: 60px;
	--pa-tap: 44px;

	/* Fixed-layer z-index scale. Every fixed or sticky component consumes one
	 * of these tokens; no component may invent its own magic number.
	 * Hierarchy (low to high):
	 *   sticky CTA (20) < rails / sticky buy (30) < header (40)
	 *   < cart bar (55) < tab bar (60) < sheet + scrim (90) < toast (95)
	 *   < skip link (200). Values 1-2 inside components are local stacking
	 *   contexts and intentionally stay literal. */
	--pa-z-sticky-cta: 20;
	--pa-z-rail: 30;
	--pa-z-header: 40;
	--pa-z-cartbar: 55;
	--pa-z-tabbar: 60;
	--pa-z-sheet: 90;
	--pa-z-toast: 95;
	--pa-z-skip: 200;

	/* Content widths - the only three allowed measures.
	 * --pa-max-w    : single-column app content (menu, cart, checkout, account)
	 * --pa-content-max : standard desktop shell (header, sections, footer)
	 * --pa-content-wide: full-bleed shells (tracking map, hero) */
	--pa-max-w: 640px;
	--pa-content-max: 1180px;
	--pa-content-wide: 1320px;

	/* Typography. --pa-font-display is re-declared at runtime by
	 * Shop_Info::font_vars(); this is the documented fallback. */
	--pa-font-display: "Libre Caslon Text", Georgia, "Times New Roman", serif;

	/* Utility face: labels, navigation, chips, buttons. */
	--pa-font-ui: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
		"Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Safe areas - iPhone notch and home indicator */
	--pa-safe-top: env(safe-area-inset-top, 0px);
	--pa-safe-bottom: env(safe-area-inset-bottom, 0px);
	--pa-safe-left: env(safe-area-inset-left, 0px);
	--pa-safe-right: env(safe-area-inset-right, 0px);

	/* Body face. Re-declared at runtime by Shop_Info::font_vars(); this is
	 * the documented fallback for a cached or stripped head. */
	--pa-font: "Libre Caslon Text", Georgia, "Times New Roman", serif;

	--pa-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--pa-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ------------------------------------------------------------------ reset */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--pa-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--pa-ink);
	background: var(--pa-canvas);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Kill the 300ms tap flash and the blue highlight: the #1 tell of a website */
	-webkit-tap-highlight-color: transparent;
	/* Stop the whole page rubber-banding behind fixed chrome */
	overscroll-behavior-y: none;
}

/* Lock scroll while a bottom sheet is open, without losing position */
body.pa-locked {
	overflow: hidden;
	touch-action: none;
}

img,
svg,
video,
canvas {
	max-width: 100%;
	height: auto;
	display: block;
}

button,
input,
select,
textarea {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	border: 0;
	background: none;
	padding: 0;
}

a {
	color: var(--pa-brand);
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 var(--pa-2);
	line-height: 1.25;
	letter-spacing: -0.01em;
	font-weight: 700;
}

h1 {
	font-size: 26px;
}

h2 {
	font-size: 20px;
}

h3 {
	font-size: 17px;
}

p {
	margin: 0 0 var(--pa-4);
}

ul,
ol {
	margin: 0 0 var(--pa-4);
	padding-left: var(--pa-5);
}

hr {
	border: 0;
	border-top: 1px solid var(--pa-line);
	margin: var(--pa-6) 0;
}

/* Visible, branded focus for keyboard users only */
:focus-visible {
	outline: 2px solid var(--pa-brand);
	outline-offset: 2px;
}

.pa-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.pa-skip {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100;
}

.pa-skip:focus {
	left: var(--pa-3);
	top: calc(var(--pa-safe-top) + var(--pa-3));
	background: var(--pa-surface);
	padding: var(--pa-2) var(--pa-3);
	border-radius: var(--pa-r-sm);
	box-shadow: var(--pa-shadow);
}

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

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* Gilded Rose r15 – extra design tokens and h1 scale */
:root {
	--pa-surface-card: #fff;
	--pa-surface-low: #fff0f1;
	--pa-surface-container: #fbe2e5;
	--pa-margin-mobile: 16px;
	--pa-margin-desktop: 32px;
	--pa-gutter: 24px;
	--pa-font-ui: "Plus Jakarta Sans", system-ui, sans-serif;
	--pa-shadow-sm: 0 2px 8px -2px rgba(143, 73, 87, 0.14);
}

h1 {
	font-size: clamp(1.75rem, 5vw, 2.5rem);
}
