/* =====================================================================
   Hana Hoe Farm — self-contained stylesheet.
   Ports the original Tailwind v4 theme + the specific utility classes
   used by the app, so no Node/Tailwind build step is required.
   ===================================================================== */

/* ---------- Theme tokens (from the original index.css) ---------- */
:root {
    --primary: oklch(0.55 0.15 35);
    --primary-foreground: oklch(0.98 0.001 0);
    --radius: 0.5rem;
    --background: oklch(0.96 0.002 70);
    --foreground: oklch(0.20 0.01 35);
    --card: oklch(0.98 0.001 0);
    --card-foreground: oklch(0.20 0.01 35);
    --secondary: oklch(0.70 0.10 50);
    --secondary-foreground: oklch(0.98 0.001 0);
    --muted: oklch(0.85 0.005 70);
    --muted-foreground: oklch(0.45 0.05 35);
    --accent: oklch(0.60 0.12 45);
    --accent-foreground: oklch(0.98 0.001 0);
    --destructive: oklch(0.577 0.245 27.325);
    --destructive-foreground: oklch(0.985 0 0);
    --border: oklch(0.90 0.005 70);
    --input: oklch(0.92 0.004 70);
    --ring: oklch(0.55 0.15 35);
}

.dark {
    --primary: oklch(0.65 0.12 35);
    --primary-foreground: oklch(0.98 0.001 0);
    --background: oklch(0.15 0.01 35);
    --foreground: oklch(0.92 0.005 70);
    --card: oklch(0.22 0.01 35);
    --card-foreground: oklch(0.92 0.005 70);
    --secondary: oklch(0.50 0.10 50);
    --secondary-foreground: oklch(0.92 0.005 70);
    --muted: oklch(0.35 0.01 35);
    --muted-foreground: oklch(0.70 0.05 70);
    --accent: oklch(0.70 0.12 45);
    --accent-foreground: oklch(0.15 0.01 35);
    --destructive: oklch(0.704 0.191 22.216);
    --destructive-foreground: oklch(0.985 0 0);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.65 0.12 35);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    scroll-behavior: smooth;
}

html,
body {
    margin: 0;
    padding: 0;
}

ul, ol {
    list-style: none;
    margin: 0;
    padding: 0;
}

body {
    background: var(--background);
    color: var(--foreground);
    font-family: 'Merriweather', serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0;
}

p { margin: 0; }

img { display: block; max-width: 100%; }

/* Reset native button chrome (mirrors Tailwind preflight). */
button {
    background-color: transparent;
    background-image: none;
    border: 0;
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
}

button,
[role="button"],
input[type="button"],
input[type="submit"],
select {
    font-family: 'Poppins', sans-serif;
}

textarea {
    font-family: 'Poppins', sans-serif;
}

button:not(:disabled),
a[href],
[role="button"] {
    cursor: pointer;
}

a { color: inherit; text-decoration: none; }

/* ---------- Components ---------- */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.rustic-card {
    background: var(--card);
    color: var(--card-foreground);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Button base (replaces the shadcn <Button>); utilities below override colors/size. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border: none;
    border-radius: 0.375rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-outline {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--foreground);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--accent-foreground);
}

/* Text input (replaces the shadcn <Input>). */
.input {
    display: block;
    width: 100%;
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-family: 'Poppins', sans-serif;
}

.input:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 50%, transparent);
}

@media (min-width: 640px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding-left: 2rem; padding-right: 2rem; max-width: 1280px; }
}

/* =====================================================================
   Utilities (only those used by the app)
   ===================================================================== */

/* Display / box */
.block { display: block; }
.hidden { display: none; }
.flex { display: flex; min-width: 0; min-height: 0; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.top-24 { top: 6rem; }
.right-0 { right: 0; }
.z-50 { z-index: 50; }

/* Sizing */
.min-h-screen { min-height: 100vh; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.h-12 { height: 3rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-24 { width: 6rem; }
.h-24 { height: 6rem; }
.h-64 { height: 18rem; }
.h-96 { height: 24rem; }
.max-h-64 { max-height: 16rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }

/* Spacing — padding */
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-24 { padding-top: 6rem; padding-bottom: 6rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.pt-8 { padding-top: 2rem; }
.pb-6 { padding-bottom: 1.5rem; }

/* Spacing — margin */
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-auto { margin-top: auto; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-12 { margin-top: 3rem; }
.mr-2 { margin-right: 0.5rem; }

/* Gap */
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* space-y */
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }

/* Typography */
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.text-5xl { font-size: 3rem; line-height: 1; }
.text-6xl { font-size: 3.75rem; line-height: 1; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.whitespace-pre-line { white-space: pre-line; }
.opacity-50 { opacity: 0.5; }
.opacity-60 { opacity: 0.6; }
.opacity-80 { opacity: 0.8; }
.opacity-100 { opacity: 1; }
.drop-shadow-md { filter: drop-shadow(0 4px 3px rgba(0,0,0,0.25)); }
.drop-shadow-lg { filter: drop-shadow(0 10px 8px rgba(0,0,0,0.30)); }

/* Borders / radius */
.border { border-width: 1px; border-style: solid; }
.border-b { border-bottom-width: 1px; border-bottom-style: solid; }
.border-t { border-top-width: 1px; border-top-style: solid; }
.border-border { border-color: var(--border); }
.border-destructive { border-color: var(--destructive); }
.border-accent { border-color: var(--accent); }
.border-background\/20 { border-color: color-mix(in oklab, var(--background) 20%, transparent); }
.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

/* Shadows */
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.15); }

/* Backgrounds */
.bg-background { background-color: var(--background); }
.bg-card { background-color: var(--card); }
.bg-foreground { background-color: var(--foreground); }
.bg-primary { background-color: var(--primary); }
.bg-accent { background-color: var(--accent); }
.bg-destructive { background-color: var(--destructive); }
.bg-accent\/10 { background-color: color-mix(in oklab, var(--accent) 10%, transparent); }
.bg-destructive\/10 { background-color: color-mix(in oklab, var(--destructive) 10%, transparent); }
.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.bg-cover { background-size: cover; }
.bg-center { background-position: center; }

/* Text colors */
.text-primary { color: var(--primary); }
.text-primary-foreground { color: var(--primary-foreground); }
.text-foreground { color: var(--foreground); }
.text-card-foreground { color: var(--card-foreground); }
.text-muted-foreground { color: var(--muted-foreground); }
.text-destructive { color: var(--destructive); }
.text-destructive-foreground { color: var(--destructive-foreground); }
.text-white { color: #fff; }
.text-background { color: var(--background); }
.text-green-600 { color: #16a34a; }

/* Object / overflow */
.object-cover { object-fit: cover; }
.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Transitions */
.transition-colors { transition: color 0.2s, background-color 0.2s, border-color 0.2s; }
.transition-opacity { transition: opacity 0.2s; }
.transition-transform { transition: transform 0.3s; }
.transition-shadow { transition: box-shadow 0.3s; }
.duration-300 { transition-duration: 0.3s; }

/* Animation */
.animate-spin { animation: hhf-spin 1s linear infinite; }
@keyframes hhf-spin { to { transform: rotate(360deg); } }

/* Hover / focus states */
.hover\:bg-primary\/90:hover { background-color: color-mix(in oklab, var(--primary) 90%, transparent); }
.hover\:bg-accent:hover { background-color: var(--accent); }
.hover\:bg-destructive\/10:hover { background-color: color-mix(in oklab, var(--destructive) 10%, transparent); }
.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:opacity-100:hover { opacity: 1; }
.hover\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgba(0,0,0,0.15), 0 8px 10px -6px rgba(0,0,0,0.15); }
.hover\:scale-105:hover { transform: scale(1.05); }
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 60%, transparent); }
.focus\:ring-primary:focus { box-shadow: 0 0 0 2px var(--primary); }

/* =====================================================================
   Responsive variants
   ===================================================================== */
@media (min-width: 640px) {
    .sm\:block { display: block; }
    .sm\:flex-row { flex-direction: row; }
}

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .md\:h-96 { height: 24rem; }
    .md\:py-12 { padding-top: 3rem; padding-bottom: 3rem; }
    .md\:py-24 { padding-top: 6rem; padding-bottom: 6rem; }
    .md\:text-2xl { font-size: 1.5rem; line-height: 2rem; }
    .md\:text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
    .md\:text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
    .md\:text-5xl { font-size: 3rem; line-height: 1; }
    .md\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:col-span-1 { grid-column: span 1 / span 1; }
    .lg\:col-span-2 { grid-column: span 2 / span 2; }
}

/* =====================================================================
   Add-to-cart notification (drops down at the cart icon)
   ===================================================================== */
.cart-anchor { position: relative; }

.cart-toast {
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    z-index: 60;
    width: 16rem;
    max-width: calc(100vw - 2rem);
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--card);
    color: var(--card-foreground);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
    animation: hhf-cart-drop 0.3s ease-out both;
}

.cart-toast-arrow {
    position: absolute;
    top: -0.4rem;
    right: 1rem;
    width: 0.8rem;
    height: 0.8rem;
    background: var(--card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}

.cart-toast-img {
    width: 3rem;
    height: 3rem;
    object-fit: cover;
    border-radius: 0.375rem;
    flex: 0 0 auto;
}

.cart-toast-body { min-width: 0; }
.cart-toast-msg {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
}
.cart-toast-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cart-toast-qty { font-size: 0.75rem; color: var(--muted-foreground); }

@keyframes hhf-cart-drop {
    0%   { opacity: 0; transform: translateY(-12px) scale(0.96); }
    60%  { opacity: 1; transform: translateY(3px) scale(1); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* =====================================================================
   Product card image gallery (shop page)
   ===================================================================== */
.pc-thumbs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.pc-thumb {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 0.375rem;
    overflow: hidden;
    border: 2px solid transparent;
    padding: 0;
    background: none;
    transition: border-color 0.15s;
}
.pc-thumb:hover { border-color: var(--muted-foreground); }
.pc-thumb.pc-thumb-active { border-color: var(--primary); }
.pc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Admin: product image rows (thumbnail radio + URL + preview) */
.admin-image-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.6rem;
}
.admin-image-row input[type="radio"] { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; }
.admin-image-preview {
    width: 2.75rem;
    height: 2.75rem;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    flex: 0 0 auto;
}
.admin-image-delete {
    flex: 0 0 auto;
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
    color: var(--destructive);
    border-color: var(--destructive);
    white-space: nowrap;
}

/* =====================================================================
   Checkout: selectable pickup / payment options
   ===================================================================== */
.opt-card {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}
.opt-card:hover { border-color: var(--ring); }
.opt-card.selected {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 7%, transparent);
}
.opt-card input[type="radio"] { margin-top: 0.25rem; width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.opt-title { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--foreground); }
.opt-sub { font-size: 0.85rem; color: var(--muted-foreground); }

.pickup-instructions {
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 0.5rem;
    background: color-mix(in oklab, var(--accent) 8%, transparent);
}

.maps-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}
.maps-link:hover { text-decoration: underline; }

.seg { display: inline-flex; gap: 0.5rem; flex-wrap: wrap; }
.seg-option {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 9999px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.15s, background-color 0.15s;
}
.seg-option:hover { border-color: var(--ring); }
.seg-option.selected {
    border-color: var(--primary);
    background: color-mix(in oklab, var(--primary) 10%, transparent);
    color: var(--primary);
    font-weight: 600;
}

/* =====================================================================
   Home-page ad banner
   ===================================================================== */
.ad-banner {
    background: var(--primary);
    color: var(--primary-foreground);
}

.ad-banner-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
}

.ad-banner-img {
    height: 2.5rem;
    width: auto;
    border-radius: 0.375rem;
    object-fit: cover;
}

.ad-banner-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
}

.ad-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-left: auto;
}

.ad-banner-link {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    background: color-mix(in oklab, var(--primary-foreground) 18%, transparent);
    border: 1px solid color-mix(in oklab, var(--primary-foreground) 45%, transparent);
    color: var(--primary-foreground);
    transition: background-color 0.15s;
}

.ad-banner-link:hover {
    background: color-mix(in oklab, var(--primary-foreground) 30%, transparent);
}

/* =====================================================================
   Admin area
   ===================================================================== */
.admin-shell {
    display: flex;
    min-height: 100vh;
    background: var(--background);
}

.admin-sidebar {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.5rem 1rem;
    background: var(--card);
    border-right: 1px solid var(--border);
}

.admin-brand {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary);
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

.admin-nav { display: flex; flex-direction: column; gap: 0.125rem; }

.admin-nav a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.375rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--foreground);
    transition: background-color 0.15s;
}

.admin-nav a:hover { background: var(--accent); color: var(--accent-foreground); }
.admin-nav a.active { background: var(--primary); color: var(--primary-foreground); }

.admin-logout { margin-top: auto; padding-top: 1rem; }

.admin-main {
    flex: 1 1 0%;
    min-width: 0;
    padding: 2rem;
    max-width: 900px;
}

.admin-main h1 { font-size: 1.9rem; margin-bottom: 0.5rem; }
.admin-main h2 { font-size: 1.35rem; margin-bottom: 1rem; }
.admin-subtitle { color: var(--muted-foreground); margin-bottom: 1.5rem; }

/* Forms */
.admin-field { margin-bottom: 1.15rem; }
.admin-field > label {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: var(--foreground);
}
.admin-field .hint { font-size: 0.78rem; color: var(--muted-foreground); margin-top: 0.3rem; }

.admin-input,
.admin-textarea,
.admin-select {
    display: block;
    width: 100%;
    border: 1px solid var(--input);
    background: var(--background);
    color: var(--foreground);
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
}
.admin-textarea { min-height: 7rem; resize: vertical; }
.admin-input:focus,
.admin-textarea:focus,
.admin-select:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--ring) 45%, transparent);
}

.admin-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.admin-row > * { flex: 1 1 200px; }

.admin-check { display: flex; align-items: center; gap: 0.5rem; }
.admin-check input { width: 1.1rem; height: 1.1rem; }
.admin-check label { font-weight: 600; font-size: 0.9rem; }

.admin-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 1.5rem; flex-wrap: wrap; }

/* Alerts */
.admin-alert { padding: 0.75rem 1rem; border-radius: 0.375rem; margin-bottom: 1.25rem; font-size: 0.9rem; }
.admin-alert-success {
    background: color-mix(in oklab, #16a34a 12%, transparent);
    border: 1px solid #16a34a;
    color: #15803d;
}
.admin-alert-error {
    background: var(--destructive-foreground);
    background: color-mix(in oklab, var(--destructive) 10%, transparent);
    border: 1px solid var(--destructive);
    color: var(--destructive);
}

/* Table */
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.7rem 0.75rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.admin-table th { font-family: 'Poppins', sans-serif; font-weight: 600; color: var(--muted-foreground); }
.admin-table td.num { text-align: right; }
.admin-thumb { width: 3rem; height: 3rem; object-fit: cover; border-radius: 0.375rem; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }

/* Login */
.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--background);
}
.admin-login-card { width: 100%; max-width: 380px; }

.admin-preview-img {
    max-height: 8rem;
    border-radius: 0.375rem;
    border: 1px solid var(--border);
    margin-top: 0.5rem;
}

@media (max-width: 640px) {
    .admin-shell { flex-direction: column; }
    .admin-sidebar { flex-basis: auto; border-right: none; border-bottom: 1px solid var(--border); }
    .admin-logout { margin-top: 1rem; }
    .admin-main { padding: 1.25rem; }
}

/* =====================================================================
   Training ad page (/training) — Granny's BakeShop Training Class
   ===================================================================== */
.tr-eyebrow {
    font-family: 'Poppins', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    margin: 0;
}
.tr-eyebrow-light { color: color-mix(in oklab, var(--secondary) 65%, white); }

.tr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 9999px;
    padding: 0.85rem 1.65rem;
    transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.tr-btn-solid { background: var(--primary); color: var(--primary-foreground); box-shadow: 0 10px 22px color-mix(in oklab, var(--primary) 35%, transparent); }
.tr-btn-solid:hover { transform: translateY(-2px); }
.tr-btn-ghost { background: transparent; border: 1.5px solid var(--border); color: var(--foreground); }
.tr-btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.tr-btn-cream { background: var(--primary-foreground); color: var(--primary); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18); }
.tr-btn-cream:hover { transform: translateY(-2px); }

/* Hero */
.tr-hero {
    position: relative;
    overflow: hidden;
    padding: 4.5rem 0 4rem;
    background:
        radial-gradient(55% 85% at 88% 6%, color-mix(in oklab, var(--secondary) 26%, transparent), transparent 60%),
        radial-gradient(70% 80% at -5% 105%, color-mix(in oklab, var(--primary) 14%, transparent), transparent 55%),
        var(--background);
}
.tr-hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.75rem; align-items: center; }
.tr-hero-title {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-size: clamp(2.6rem, 6.2vw, 4.6rem);
    line-height: 0.98;
    letter-spacing: -0.02em;
    color: var(--foreground);
    margin: 0.9rem 0 1.1rem;
}
.tr-hero-sub { font-size: 1.15rem; line-height: 1.6; color: color-mix(in oklab, var(--foreground) 78%, transparent); max-width: 34rem; }
.tr-hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 1.9rem; }
.tr-hero-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 1.7rem; margin-top: 1.9rem; font-family: 'Poppins', sans-serif; font-size: 0.85rem; color: var(--muted-foreground); }
.tr-hero-meta li { position: relative; }
.tr-hero-meta li + li::before { content: "•"; position: absolute; left: -0.95rem; color: var(--primary); }
.tr-hero-seal { display: flex; justify-content: center; }

/* Certification seal */
.tr-seal-svg { width: clamp(200px, 62%, 330px); height: auto; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.14)); animation: tr-seal-in 0.7s ease-out both; }
.tr-seal-ring  { fill: none; stroke: var(--primary); stroke-width: 2.5; }
.tr-seal-ring2 { fill: none; stroke: var(--primary); stroke-width: 1; stroke-dasharray: 2 4.5; opacity: 0.6; }
.tr-seal-disc  { fill: color-mix(in oklab, var(--secondary) 14%, var(--card)); }
.tr-seal-arc   { fill: var(--primary); font-family: 'Poppins', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 3px; }
.tr-seal-emoji { font-size: 30px; }
.tr-seal-big   { fill: var(--foreground); font-family: 'Playfair Display', serif; font-weight: 900; font-size: 23px; letter-spacing: 1px; }
.tr-seal-sub   { fill: var(--primary); font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12px; letter-spacing: 5px; }
@keyframes tr-seal-in { from { opacity: 0; transform: rotate(-9deg) scale(0.9); } to { opacity: 1; transform: none; } }

/* Pitch — dark interlude */
.tr-pitch { background: var(--foreground); color: var(--background); padding: 4rem 0; }
.tr-pitch-inner { max-width: 52rem; }
.tr-pitch-title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(1.9rem, 4.4vw, 3rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0.6rem 0 1rem; color: var(--background); }
.tr-pitch-body { font-size: 1.18rem; line-height: 1.6; color: color-mix(in oklab, var(--background) 82%, transparent); max-width: 44rem; }

/* Shared section headings */
.tr-section-title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 2.85rem); line-height: 1.08; letter-spacing: -0.01em; margin: 0.35rem 0 0; color: var(--foreground); }
.tr-section-sub { color: var(--muted-foreground); font-size: 1.05rem; margin-top: 0.65rem; max-width: 42rem; }

/* Outcomes grid */
.tr-learn { padding: 4.75rem 0; }
.tr-learn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-top: 2.25rem; }
.tr-learn-card { background: var(--card); border: 1px solid var(--border); border-radius: 0.85rem; padding: 1.6rem; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05); transition: transform 0.18s ease, box-shadow 0.18s ease; }
.tr-learn-card:hover { transform: translateY(-4px); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.10); }
.tr-learn-icon { display: inline-flex; align-items: center; justify-content: center; width: 3rem; height: 3rem; border-radius: 0.7rem; background: color-mix(in oklab, var(--primary) 12%, transparent); font-size: 1.5rem; margin-bottom: 0.95rem; }
.tr-learn-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.25rem; margin-bottom: 0.4rem; color: var(--foreground); }
.tr-learn-body { color: var(--muted-foreground); font-size: 0.95rem; line-height: 1.55; }

/* At-a-glance stats */
.tr-stats-section { background: color-mix(in oklab, var(--primary) 8%, var(--background)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.4rem 0; }
.tr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; text-align: center; }
.tr-stat { display: flex; flex-direction: column; gap: 0.2rem; }
.tr-stat-value { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(2rem, 5vw, 3rem); color: var(--primary); line-height: 1; }
.tr-stat-label { font-family: 'Poppins', sans-serif; font-size: 0.82rem; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: 0.05em; }

/* The week — signature itinerary */
.tr-week { padding: 4.75rem 0; }
.tr-days { max-width: 52rem; margin-top: 2.25rem; }
.tr-day { display: grid; grid-template-columns: 92px 1fr; gap: 1.5rem; padding: 1.4rem 0; border-top: 1px solid var(--border); align-items: baseline; }
.tr-day:first-child { border-top: none; padding-top: 0.2rem; }
.tr-day-dow { font-family: 'Poppins', sans-serif; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 700; font-size: 0.95rem; color: var(--primary); padding-top: 0.2rem; }
.tr-day-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1.4rem; line-height: 1.2; color: var(--foreground); }
.tr-day-blurb { color: var(--muted-foreground); font-size: 0.98rem; margin-top: 0.35rem; line-height: 1.55; }
.tr-day-flag { display: inline-block; vertical-align: middle; margin-right: 0.55rem; background: var(--primary); color: var(--primary-foreground); font-family: 'Poppins', sans-serif; font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; padding: 0.22rem 0.6rem; border-radius: 9999px; position: relative; top: -0.15em; }
.tr-day.is-market { background: color-mix(in oklab, var(--primary) 8%, transparent); border: 1px solid color-mix(in oklab, var(--primary) 25%, transparent); border-radius: 0.85rem; padding: 1.25rem; margin: 0.5rem 0; }
.tr-day.is-market + .tr-day { border-top: none; }

/* Certificate */
.tr-cert-section { padding: 4.25rem 0 5.25rem; }
.tr-cert { max-width: 40rem; margin: 0 auto; text-align: center; position: relative; background: color-mix(in oklab, var(--secondary) 10%, var(--card)); border: 1px solid color-mix(in oklab, var(--primary) 40%, transparent); border-radius: 1rem; padding: 3.25rem 2rem; box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09); }
.tr-cert::before { content: ""; position: absolute; inset: 11px; border: 1px solid color-mix(in oklab, var(--primary) 28%, transparent); border-radius: 0.7rem; pointer-events: none; }
.tr-cert-kicker { font-family: 'Poppins', sans-serif; text-transform: uppercase; letter-spacing: 0.18em; font-size: 0.75rem; color: var(--muted-foreground); margin: 0; }
.tr-cert-name { font-family: 'Playfair Display', serif; font-weight: 900; font-size: clamp(1.9rem, 4.6vw, 2.8rem); line-height: 1.05; margin: 0.55rem 0 0; color: var(--foreground); }
.tr-cert-rule { display: flex; align-items: center; justify-content: center; gap: 0.9rem; margin: 1.15rem 0; color: var(--primary); }
.tr-cert-rule::before, .tr-cert-rule::after { content: ""; height: 1px; width: 3rem; background: color-mix(in oklab, var(--primary) 45%, transparent); }
.tr-cert-motto { font-family: 'Playfair Display', serif; font-style: italic; font-size: 1.2rem; line-height: 1.5; color: var(--foreground); max-width: 30rem; margin: 0 auto; }

/* Admissions CTA */
.tr-cta { background: var(--primary); color: var(--primary-foreground); padding: 4.75rem 0; text-align: center; }
.tr-cta-inner { max-width: 46rem; margin: 0 auto; }
.tr-cta-title { font-family: 'Playfair Display', serif; font-weight: 800; font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.1; color: var(--primary-foreground); margin: 0; }
.tr-cta-body { font-size: 1.1rem; line-height: 1.6; margin: 1rem auto 1.9rem; color: color-mix(in oklab, var(--primary-foreground) 88%, transparent); max-width: 38rem; }
.tr-cta-contact { margin-top: 1.3rem; font-family: 'Poppins', sans-serif; font-size: 0.9rem; color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); }

/* Responsive */
@media (max-width: 860px) {
    .tr-hero-inner { grid-template-columns: 1fr; gap: 2rem; }
    .tr-hero-seal { justify-content: flex-start; }
    .tr-learn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
    .tr-learn-grid { grid-template-columns: 1fr; }
    .tr-stats { grid-template-columns: repeat(2, 1fr); gap: 1.6rem 1rem; }
    .tr-day { grid-template-columns: 1fr; gap: 0.35rem; }
    .tr-day-dow { padding-top: 0; }
    .tr-day.is-market { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
    .tr-seal-svg { animation: none; }
    .tr-btn:hover, .tr-learn-card:hover { transform: none; }
}
