/* ============================================================
   WooCart React SPA - Main Stylesheet
   Mobile-First, RTL-Ready, High Performance
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Variables / Design Tokens ---------- */
:root {
	--color-primary: #0d9488;
	--color-primary-dark: #0f766e;
	--color-primary-light: #14b8a6;
	--color-primary-bg: #f0fdfa;
	--color-secondary: #f59e0b;
	--color-accent: #ef4444;
	--color-dark: #1e293b;
	--color-gray-900: #0f172a;
	--color-gray-800: #1e293b;
	--color-gray-700: #334155;
	--color-gray-600: #475569;
	--color-gray-500: #64748b;
	--color-gray-400: #94a3b8;
	--color-gray-300: #cbd5e1;
	--color-gray-200: #e2e8f0;
	--color-gray-100: #f1f5f9;
	--color-gray-50: #f8fafc;
	--color-white: #ffffff;
	--color-success: #22c55e;
	--color-error: #ef4444;
	--color-warning: #f59e0b;

	--font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
	--font-arabic: 'Cairo', 'Segoe UI', Tahoma, sans-serif;

	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 20px;
	--radius-full: 9999px;

	--shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
	--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
	--shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
	--shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);

	--header-height: 60px;
	--bottom-nav-height: 0px;

	--z-header: 1000;
	--z-modal: 2000;
	--z-cart: 1500;
	--z-toast: 3000;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
	font-family: var(--font-family);
	background: var(--color-gray-50);
	color: var(--color-gray-800);
	line-height: 1.6;
	direction: rtl;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body.rtl { direction: rtl; }

#app { min-height: 100vh; }

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ---------- Utilities ---------- */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.text-center { text-align: center; }

/* ---------- Loading Spinner ---------- */
.spinner-container {
	display: flex; justify-content: center; align-items: center;
	padding: 48px 0;
}
.spinner {
	width: 40px; height: 40px;
	border: 3px solid var(--color-gray-200);
	border-top-color: var(--color-primary);
	border-radius: 50%;
	animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Skeleton Loader ---------- */
.skeleton { background: linear-gradient(90deg, var(--color-gray-200) 25%, var(--color-gray-100) 50%, var(--color-gray-200) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--radius-md); }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
	position: sticky; top: 0; z-index: var(--z-header);
	background: var(--color-white);
	border-bottom: 1px solid var(--color-gray-200);
	box-shadow: var(--shadow-sm);
	height: var(--header-height);
	display: flex; align-items: center;
	padding: 0 16px;
}

.header-inner {
	display: flex; align-items: center; justify-content: space-between;
	width: 100%; max-width: 1200px;
	margin: 0 auto;
	gap: 12px;
}

.header-logo {
	flex-shrink: 0;
	max-width: 120px;
}
.header-logo img { max-height: 40px; width: auto; }
.header-logo .logo-text {
	font-size: 18px; font-weight: 800;
	color: var(--color-primary-dark);
	white-space: nowrap;
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.btn-track {
	display: flex; align-items: center; gap: 6px;
	background: var(--color-primary);
	color: white;
	padding: 8px 14px;
	border-radius: var(--radius-full);
	font-size: 13px; font-weight: 600;
	transition: all 0.2s ease;
	white-space: nowrap;
}
.btn-track:active { transform: scale(0.96); background: var(--color-primary-dark); }
.btn-track svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-slider {
	position: relative;
	width: 100%;
	background: var(--color-gray-200);
	overflow: hidden;
}
.hero-slider-wrapper {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	max-height: 450px;
}
.hero-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity 0.8s ease;
	z-index: 1;
}
.hero-slide.active {
	opacity: 1;
	z-index: 2;
}
.hero-slide img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.hero-slide-content {
	position: absolute; bottom: 0; left: 0; right: 0;
	padding: 24px 16px;
	background: linear-gradient(transparent, rgba(0,0,0,0.7));
	color: white;
	z-index: 3;
}
.hero-slide-content h2 { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.hero-slide-content p { font-size: 14px; opacity: 0.9; }
.hero-dots {
	position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
	display: flex; gap: 8px; z-index: 10;
}
.hero-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: rgba(255,255,255,0.4);
	transition: all 0.3s;
	border: none; cursor: pointer;
}
.hero-dot.active { background: white; width: 24px; border-radius: 4px; }

/* ============================================================
   CATEGORIES SLIDER
   ============================================================ */
.categories-section { padding: 16px 0; background: var(--color-white); }

.categories-header {
	padding: 0 16px; margin-bottom: 12px;
	display: flex; align-items: center; justify-content: space-between;
}
.categories-header h2 {
	font-size: 16px; font-weight: 700;
	color: var(--color-gray-800);
}

.categories-scroll {
	display: flex; gap: 12px;
	overflow-x: auto; overflow-y: hidden;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	padding: 4px 16px;
	scrollbar-width: none;
}
.categories-scroll::-webkit-scrollbar { display: none; }

.category-chip {
	flex-shrink: 0;
	scroll-snap-align: start;
	display: flex; flex-direction: column; align-items: center; gap: 6px;
	min-width: 72px;
	cursor: pointer;
	transition: transform 0.2s;
}
.category-chip:active { transform: scale(0.94); }

.category-chip-img {
	width: 56px; height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--color-gray-100);
	display: flex; align-items: center; justify-content: center;
	font-size: 24px;
	border: 2px solid transparent;
	transition: all 0.2s;
}
.category-chip.active .category-chip-img {
	border-color: var(--color-primary);
	background: var(--color-primary-bg);
}
.category-chip-img img { width: 100%; height: 100%; object-fit: cover; }

.category-chip-name {
	font-size: 11px; font-weight: 500;
	color: var(--color-gray-600);
	text-align: center;
	max-width: 70px;
	overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.category-chip.active .category-chip-name { color: var(--color-primary); font-weight: 700; }

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-section { padding: 12px 0 80px; }

.products-header {
	padding: 0 16px; margin-bottom: 12px;
}
.products-header h2 {
	font-size: 16px; font-weight: 700;
	color: var(--color-gray-800);
}

.products-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	padding: 0 12px;
}

.product-card {
	background: var(--color-white);
	border-radius: var(--radius-lg);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	transition: transform 0.2s, box-shadow 0.2s;
	cursor: pointer;
	position: relative;
}
.product-card:active { transform: scale(0.97); }

.product-card-img {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--color-gray-100);
	display: flex;
	align-items: center;
	justify-content: center;
}
.product-card-img img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
}
.product-card-img .no-image {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--color-gray-300);
	gap: 4px;
}
.product-card-img .no-image svg {
	width: 48px;
	height: 48px;
	opacity: 0.5;
}
.product-card-img .no-image span {
	font-size: 11px;
	font-weight: 500;
}

.product-card-badge {
	position: absolute; top: 8px; right: 8px;
	background: var(--color-accent);
	color: white;
	font-size: 10px; font-weight: 700;
	padding: 3px 8px;
	border-radius: var(--radius-full);
	z-index: 1;
}

.product-card-body { padding: 10px 12px 12px; }

.product-card-category {
	font-size: 11px; color: var(--color-primary);
	font-weight: 600; text-transform: uppercase;
	margin-bottom: 2px;
}

.product-card-name {
	font-size: 13px; font-weight: 600;
	color: var(--color-gray-800);
	display: -webkit-box;
	-webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
	margin-bottom: 6px;
	line-height: 1.4;
	min-height: 36px;
}

.product-card-price {
	display: flex; align-items: center; gap: 6px;
	font-size: 15px; font-weight: 700;
	color: var(--color-primary-dark);
}
.product-card-price .regular-price {
	font-size: 12px; color: var(--color-gray-400);
	text-decoration: line-through;
	font-weight: 400;
}

.product-card-time {
	display: flex; align-items: center; gap: 4px;
	font-size: 11px; color: var(--color-gray-500);
	margin-top: 4px;
}

.product-card-add {
	position: absolute; bottom: 12px; left: 12px;
	width: 34px; height: 34px;
	border-radius: 50%;
	background: var(--color-primary);
	color: white;
	display: flex; align-items: center; justify-content: center;
	font-size: 20px; font-weight: bold;
	box-shadow: var(--shadow-md);
	transition: all 0.2s;
	border: none;
}
.product-card-add:active { transform: scale(0.9); background: var(--color-primary-dark); }

/* ============================================================
   PRODUCT MODAL
   ============================================================ */
.modal-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.6);
	z-index: var(--z-modal);
	display: flex; align-items: flex-end;
	animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.product-modal {
	background: var(--color-white);
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
	width: 100%; max-height: 90vh;
	overflow-y: auto;
	animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	padding-bottom: env(safe-area-inset-bottom, 16px);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-close {
	position: sticky; top: 0; z-index: 10;
	display: flex; justify-content: flex-end;
	padding: 12px 16px;
	background: var(--color-white);
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.modal-close-btn {
	width: 32px; height: 32px;
	border-radius: 50%;
	background: var(--color-gray-100);
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: var(--color-gray-600);
	transition: all 0.2s;
	border: none;
}
.modal-close-btn:active { background: var(--color-gray-200); }

.product-modal-gallery {
	position: relative;
	width: 100%;
	overflow: hidden;
	background: var(--color-gray-100);
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
}
.product-modal-gallery img {
	width: 100%;
	object-fit: cover;
	display: block;
}
.product-modal-gallery .no-image-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: var(--color-gray-300);
	gap: 8px;
	padding: 48px;
}
.product-modal-gallery .no-image-placeholder svg {
	width: 80px;
	height: 80px;
	opacity: 0.4;
}
.product-modal-gallery .no-image-placeholder span {
	font-size: 14px;
	font-weight: 500;
}

.gallery-dots {
	display: flex; justify-content: center; gap: 6px;
	position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
}
.gallery-dot {
	width: 6px; height: 6px;
	border-radius: 50%;
	background: rgba(255,255,255,0.5);
	border: none; cursor: pointer; transition: 0.3s;
}
.gallery-dot.active { background: white; width: 18px; border-radius: 3px; }

.product-modal-info { padding: 16px; }

.product-modal-category {
	font-size: 12px; color: var(--color-primary); font-weight: 600;
	text-transform: uppercase; margin-bottom: 4px;
}

.product-modal-name {
	font-size: 20px; font-weight: 700; margin-bottom: 8px;
	color: var(--color-gray-900);
}

.product-modal-price {
	font-size: 22px; font-weight: 800;
	color: var(--color-primary-dark);
	margin-bottom: 8px;
}
.product-modal-price .regular-price {
	font-size: 15px; color: var(--color-gray-400);
	text-decoration: line-through; font-weight: 400;
	margin-right: 8px;
}

.product-modal-time {
	display: inline-flex; align-items: center; gap: 6px;
	background: var(--color-primary-bg);
	color: var(--color-primary-dark);
	font-size: 13px; font-weight: 600;
	padding: 6px 12px; border-radius: var(--radius-full);
	margin-bottom: 16px;
}

.product-modal-desc {
	font-size: 14px; color: var(--color-gray-600);
	line-height: 1.8; margin-bottom: 16px;
}

/* Variations */
.product-variations { margin-bottom: 16px; }

.variation-group { margin-bottom: 12px; }
.variation-label {
	font-size: 13px; font-weight: 600;
	color: var(--color-gray-700);
	margin-bottom: 8px;
}
.variation-options { display: flex; flex-wrap: wrap; gap: 8px; }
.variation-option {
	padding: 8px 16px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-full);
	font-size: 13px; font-weight: 500;
	color: var(--color-gray-600);
	transition: all 0.2s;
	cursor: pointer;
	background: var(--color-white);
}
.variation-option.selected {
	border-color: var(--color-primary);
	background: var(--color-primary-bg);
	color: var(--color-primary-dark);
	font-weight: 700;
}

/* Quantity */
.quantity-row {
	display: flex; align-items: center; gap: 12px;
	margin-bottom: 16px;
}
.quantity-label { font-size: 13px; font-weight: 600; color: var(--color-gray-700); }
.quantity-control {
	display: flex; align-items: center;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-full);
	overflow: hidden;
}
.quantity-btn {
	width: 36px; height: 36px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: var(--color-gray-600);
	background: var(--color-gray-50);
	border: none; cursor: pointer;
}
.quantity-btn:active { background: var(--color-gray-200); }
.quantity-value {
	width: 40px; text-align: center;
	font-size: 15px; font-weight: 700;
	border: none; background: transparent;
	color: var(--color-gray-800);
}

/* Add to cart button in modal */
.btn-add-to-cart {
	width: 100%;
	padding: 14px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--radius-lg);
	font-size: 16px; font-weight: 700;
	transition: all 0.2s;
	display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-add-to-cart:active { background: var(--color-primary-dark); transform: scale(0.98); }
.btn-add-to-cart:disabled { opacity: 0.5; cursor: not-allowed; }

/* ============================================================
   FLOATING CART BUTTON
   ============================================================ */
.floating-cart-btn {
	position: fixed; bottom: 20px; right: 20px;
	width: 56px; height: 56px;
	border-radius: 50%;
	background: var(--color-primary);
	color: white;
	display: flex; align-items: center; justify-content: center;
	box-shadow: var(--shadow-xl);
	z-index: var(--z-cart);
	border: none; cursor: pointer;
	transition: all 0.2s;
}
.floating-cart-btn:active { transform: scale(0.9); }

.cart-count {
	position: absolute; top: -4px; right: -4px;
	min-width: 22px; height: 22px;
	border-radius: 11px;
	background: var(--color-accent);
	color: white;
	font-size: 11px; font-weight: 700;
	display: flex; align-items: center; justify-content: center;
	padding: 0 5px;
	box-shadow: var(--shadow-md);
}

/* ============================================================
   CART PANEL (Slide-in)
   ============================================================ */
.cart-panel-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.5);
	z-index: var(--z-cart);
	animation: fadeIn 0.2s ease;
}

.cart-panel {
	position: fixed; top: 0; right: 0; bottom: 0;
	width: 100%; max-width: 400px;
	background: var(--color-white);
	z-index: calc(var(--z-cart) + 1);
	display: flex; flex-direction: column;
	animation: slideRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	box-shadow: var(--shadow-xl);
}
@keyframes slideRight { from { transform: translateX(100%); } to { transform: translateX(0); } }

.cart-panel-header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px;
	border-bottom: 1px solid var(--color-gray-200);
}
.cart-panel-header h2 {
	font-size: 18px; font-weight: 700;
}
.close-panel {
	width: 32px; height: 32px;
	border-radius: 50%;
	background: var(--color-gray-100);
	display: flex; align-items: center; justify-content: center;
	font-size: 18px; color: var(--color-gray-600);
	border: none;
}

.cart-panel-body {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
}

.cart-empty {
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 48px 16px; text-align: center;
	color: var(--color-gray-500);
}
.cart-empty svg { width: 64px; height: 64px; opacity: 0.3; margin-bottom: 16px; }
.cart-empty p { font-size: 15px; }

.cart-item {
	display: flex; gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--color-gray-100);
	align-items: flex-start;
}
.cart-item-img {
	width: 64px; height: 64px;
	border-radius: var(--radius-md);
	overflow: hidden;
	background: var(--color-gray-100);
	flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
	font-size: 13px; font-weight: 600;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	color: var(--color-gray-800);
}
.cart-item-meta {
	font-size: 11px; color: var(--color-gray-500);
	margin-top: 2px;
}
.cart-item-price {
	font-size: 14px; font-weight: 700;
	color: var(--color-primary-dark);
	margin-top: 4px;
}
.cart-item-actions { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.cart-item-remove {
	font-size: 12px; color: var(--color-accent);
	font-weight: 600; border: none; background: none; cursor: pointer;
}
.cart-item-qty {
	display: flex; align-items: center; gap: 4px;
	font-size: 13px;
}
.cart-item-qty button {
	width: 24px; height: 24px;
	border-radius: 50%;
	background: var(--color-gray-100);
	font-size: 14px; border: none;
	display: flex; align-items: center; justify-content: center;
}

.cart-panel-footer {
	padding: 16px;
	border-top: 1px solid var(--color-gray-200);
}
.cart-total {
	display: flex; justify-content: space-between; align-items: center;
	margin-bottom: 12px;
	font-size: 16px; font-weight: 700;
}
.cart-total-amount { color: var(--color-primary-dark); font-size: 20px; }

.btn-checkout {
	width: 100%;
	padding: 14px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--radius-lg);
	font-size: 16px; font-weight: 700;
	transition: all 0.2s;
}
.btn-checkout:active { background: var(--color-primary-dark); transform: scale(0.98); }

/* ============================================================
   CHECKOUT STEPS MODAL
   ============================================================ */
.checkout-modal {
	position: fixed; inset: 0;
	z-index: calc(var(--z-modal) + 1);
	display: flex; align-items: flex-end;
}

.checkout-content {
	background: var(--color-white);
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	padding-bottom: env(safe-area-inset-bottom, 16px);
}

.checkout-header {
	position: sticky; top: 0; z-index: 5;
	display: flex; align-items: center; justify-content: space-between;
	padding: 16px;
	background: var(--color-white);
	border-bottom: 1px solid var(--color-gray-200);
	border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}
.checkout-header h2 { font-size: 18px; font-weight: 700; }

.checkout-steps-progress {
	display: flex; align-items: center;
	padding: 16px;
	gap: 8px;
}
.step-dot {
	width: 28px; height: 28px;
	border-radius: 50%;
	background: var(--color-gray-200);
	color: var(--color-gray-500);
	display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 700;
	transition: all 0.3s;
	flex-shrink: 0;
}
.step-dot.active { background: var(--color-primary); color: white; }
.step-dot.done { background: var(--color-success); color: white; }
.step-line {
	flex: 1; height: 2px;
	background: var(--color-gray-200);
	border-radius: 1px;
}
.step-line.done { background: var(--color-success); }

.checkout-body { padding: 16px; }

.checkout-step-title {
	font-size: 16px; font-weight: 700;
	margin-bottom: 16px;
	color: var(--color-gray-900);
}

/* Delivery type options */
.delivery-options { display: flex; flex-direction: column; gap: 10px; }
.delivery-option {
	display: flex; align-items: center; gap: 12px;
	padding: 16px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-lg);
	cursor: pointer;
	transition: all 0.2s;
}
.delivery-option.selected {
	border-color: var(--color-primary);
	background: var(--color-primary-bg);
}
.delivery-option-icon {
	width: 48px; height: 48px;
	border-radius: var(--radius-md);
	background: var(--color-gray-100);
	display: flex; align-items: center; justify-content: center;
	font-size: 24px;
}
.delivery-option-text { flex: 1; }
.delivery-option-text h4 { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.delivery-option-text p { font-size: 12px; color: var(--color-gray-500); }

/* Form inputs */
.form-group { margin-bottom: 14px; }
.form-label {
	display: block; font-size: 13px; font-weight: 600;
	color: var(--color-gray-700); margin-bottom: 6px;
}
.form-input {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-lg);
	font-size: 15px;
	transition: border-color 0.2s;
	outline: none;
	background: var(--color-white);
	color: var(--color-gray-800);
}
.form-input:focus { border-color: var(--color-primary); }
.form-input::placeholder { color: var(--color-gray-400); }

/* Payment methods */
.payment-methods { display: flex; flex-direction: column; gap: 10px; }
.payment-method {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 16px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-lg);
	cursor: pointer;
	transition: all 0.2s;
}
.payment-method.selected {
	border-color: var(--color-primary);
	background: var(--color-primary-bg);
}
.payment-method-radio {
	width: 20px; height: 20px;
	border-radius: 50%;
	border: 2px solid var(--color-gray-300);
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
}
.payment-method.selected .payment-method-radio {
	border-color: var(--color-primary);
}
.payment-method.selected .payment-method-radio::after {
	content: '';
	width: 10px; height: 10px;
	border-radius: 50%;
	background: var(--color-primary);
}

/* Location preview */
.location-preview {
	background: var(--color-gray-50);
	border-radius: var(--radius-lg);
	padding: 12px;
	margin-bottom: 12px;
	font-size: 13px;
	color: var(--color-gray-600);
}
.location-preview a {
	color: var(--color-primary);
	font-weight: 600;
}

/* Checkout actions */
.checkout-actions {
	display: flex; gap: 10px;
	margin-top: 20px;
}
.btn-back {
	flex: 0 0 auto;
	padding: 12px 20px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-lg);
	font-size: 14px; font-weight: 600;
	color: var(--color-gray-600);
	background: white;
}
.btn-next {
	flex: 1;
	padding: 12px 20px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--radius-lg);
	font-size: 14px; font-weight: 700;
	transition: all 0.2s;
}
.btn-next:active { background: var(--color-primary-dark); }
.btn-next:disabled { opacity: 0.5; }

/* ============================================================
   SUCCESS MODAL
   ============================================================ */
.success-modal {
	position: fixed; inset: 0;
	z-index: calc(var(--z-modal) + 2);
	background: rgba(0,0,0,0.6);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s;
}

.success-content {
	background: var(--color-white);
	border-radius: var(--radius-xl);
	padding: 32px 24px;
	text-align: center;
	width: 100%;
	max-width: 360px;
	animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes scaleIn { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-icon {
	width: 72px; height: 72px;
	border-radius: 50%;
	background: var(--color-success);
	color: white;
	display: flex; align-items: center; justify-content: center;
	font-size: 36px;
	margin: 0 auto 20px;
}

.success-content h3 {
	font-size: 20px; font-weight: 700; margin-bottom: 8px;
	color: var(--color-gray-900);
}
.success-content p { font-size: 14px; color: var(--color-gray-500); margin-bottom: 12px; }

.order-number {
	display: inline-block;
	padding: 10px 24px;
	background: var(--color-primary-bg);
	color: var(--color-primary-dark);
	font-size: 18px; font-weight: 800;
	border-radius: var(--radius-full);
	margin-bottom: 16px;
}

.btn-close-success {
	padding: 12px 32px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--radius-lg);
	font-size: 15px; font-weight: 700;
	margin-top: 8px;
}

/* ============================================================
   ORDER TRACKING MODAL
   ============================================================ */
.tracking-modal-overlay {
	position: fixed; inset: 0;
	background: rgba(0,0,0,0.6);
	z-index: var(--z-modal);
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	animation: fadeIn 0.2s;
}

.tracking-modal {
	background: var(--color-white);
	border-radius: var(--radius-xl);
	width: 100%; max-width: 400px;
	animation: scaleIn 0.3s;
	padding: 24px;
}

.tracking-modal-header {
	display: flex; align-items: center; justify-content: space-between;
	margin-bottom: 20px;
}
.tracking-modal-header h2 { font-size: 18px; font-weight: 700; }

.tracking-form { margin-bottom: 20px; }
.tracking-form .form-input { margin-bottom: 12px; }

.btn-track-submit {
	width: 100%;
	padding: 12px;
	background: var(--color-primary);
	color: white;
	border: none;
	border-radius: var(--radius-lg);
	font-size: 15px; font-weight: 700;
}
.btn-track-submit:active { background: var(--color-primary-dark); }

.tracking-result {
	padding: 16px;
	border-radius: var(--radius-lg);
	background: var(--color-gray-50);
}

.tracking-status {
	display: flex; align-items: center; gap: 8px;
	font-size: 14px; font-weight: 600;
	margin-bottom: 8px;
}
.tracking-status-dot {
	width: 12px; height: 12px;
	border-radius: 50%;
	flex-shrink: 0;
}
.tracking-status-dot.pending { background: var(--color-warning); }
.tracking-status-dot.processing { background: #3b82f6; }
.tracking-status-dot.completed { background: var(--color-success); }
.tracking-status-dot.cancelled { background: var(--color-accent); }

.tracking-detail {
	font-size: 13px; color: var(--color-gray-600);
	margin-top: 4px;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */
.toast {
	position: fixed; bottom: 90px; left: 50%; transform: translateX(-50%);
	background: var(--color-gray-900);
	color: white;
	padding: 12px 24px;
	border-radius: var(--radius-full);
	font-size: 14px; font-weight: 600;
	z-index: var(--z-toast);
	animation: toastIn 0.3s ease;
	box-shadow: var(--shadow-lg);
	white-space: nowrap;
}
@keyframes toastIn { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
	padding: 12px 16px;
	background: var(--color-white);
	position: sticky; top: var(--header-height); z-index: 10;
}
.search-input-wrapper {
	position: relative;
	display: flex; align-items: center;
}
.search-input-wrapper svg {
	position: absolute; right: 14px;
	width: 18px; height: 18px;
	color: var(--color-gray-400);
	pointer-events: none;
}
.search-input {
	width: 100%;
	padding: 10px 42px 10px 16px;
	border: 2px solid var(--color-gray-200);
	border-radius: var(--radius-full);
	font-size: 14px;
	outline: none;
	background: var(--color-gray-50);
	color: var(--color-gray-800);
	transition: border-color 0.2s;
}
.search-input:focus { border-color: var(--color-primary); background: var(--color-white); }
.search-input::placeholder { color: var(--color-gray-400); }

/* ============================================================
   RESPONSIVE - TABLET (768px+) 
   ============================================================ */
@media (min-width: 768px) {
	:root { --header-height: 68px; }

	.products-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 0 16px; }

	.product-card-name { font-size: 14px; }
	.product-card-price { font-size: 16px; }

	.hero-slider-wrapper { max-height: 480px; }
	.hero-slide-content { padding: 32px 24px; }
	.hero-slide-content h2 { font-size: 28px; }

	.categories-scroll { padding: 4px 24px; justify-content: center; }

	.product-modal { max-width: 600px; margin: 0 auto; border-radius: var(--radius-xl); }
	.product-modal-gallery { aspect-ratio: 4/3; }

	.cart-panel { max-width: 420px; }

	/* Center modals on tablet+ */
	.modal-overlay { align-items: center; }
	.modal-overlay.closing { align-items: center; }
	.product-modal { border-radius: var(--radius-xl); margin: 0 auto; max-height: 92vh; }
	.checkout-modal { align-items: center; }
	.checkout-content { border-radius: var(--radius-xl); margin: 0 auto; max-height: 90vh; }
	.tracking-modal-overlay { align-items: center; }

	.search-bar { padding: 12px 24px; }
}

/* ============================================================
   RESPONSIVE - DESKTOP (1024px+)
   ============================================================ */
@media (min-width: 1024px) {
	.products-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0 24px; max-width: 1200px; margin: 0 auto; }

	.hero-slider-wrapper { max-height: 520px; }
	.hero-slide-content { max-width: 1200px; margin: 0 auto; left: 50%; transform: translateX(-50%); width: 100%; }

	.header-inner { padding: 0; }

	.categories-section { max-width: 1200px; margin: 0 auto; }

	.search-bar { max-width: 1200px; margin: 0 auto; left: 0; right: 0; }

	.product-modal { max-width: 720px; }
	.product-modal-body { display: flex; gap: 20px; align-items: flex-start; }
	.product-modal-gallery { flex: 0 0 40%; aspect-ratio: 1/1; border-radius: var(--radius-lg); overflow: hidden; }
	.product-modal-info { flex: 1; overflow-y: auto; max-height: 75vh; }

	.product-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

	/* Desktop modal polish */
	.checkout-content { max-width: 600px; }
	.tracking-modal { max-width: 480px; }
}

/* ============================================================
   SAFE AREA for notched phones
   ============================================================ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
	.floating-cart-btn { bottom: calc(20px + env(safe-area-inset-bottom)); }
	.toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}

/* ============================================================
   CLOSING ANIMATIONS
   ============================================================ */
.product-modal.slide-down { animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideDown { from { transform: translateY(0); } to { transform: translateY(100%); } }
.cart-panel.slide-out { animation: slideOutRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes slideOutRight { from { transform: translateX(0); } to { transform: translateX(100%); } }
.modal-overlay.closing { animation: fadeOut 0.3s ease forwards; }
@keyframes fadeOut { from { opacity: 1; } to { opacity: 0; } }
