/* =============================================================
   default_v1 — Design tokens, reset, typography, utilities
   ============================================================= */

:root {
    /* Primary is injected by the storefront base layout from theme.style.primary_color.
       These are sensible fallbacks. */
    --primary:        #2563eb;
    --primary-hover:  #1d4ed8;
    --primary-soft:   rgba(37, 99, 235, .08);
    --primary-strong: rgba(37, 99, 235, .18);

    /* Neutrals */
    --ink-900: #0b1220;
    --ink-800: #0f172a;
    --ink-700: #1e293b;
    --ink-600: #334155;
    --ink-500: #475569;
    --ink-400: #64748b;
    --ink-300: #94a3b8;
    --ink-200: #cbd5e1;
    --ink-100: #e2e8f0;
    --ink-050: #f1f5f9;
    --ink-025: #f8fafc;
    --bg:      #ffffff;
    --surface: #ffffff;
    --canvas:  #fafbfc;

    /* Semantic */
    --success: #059669; --success-bg: #d1fae5; --success-fg: #065f46;
    --warning: #d97706; --warning-bg: #fef3c7; --warning-fg: #92400e;
    --danger:  #dc2626; --danger-bg:  #fee2e2; --danger-fg:  #991b1b;
    --info:    #2563eb; --info-bg:    #dbeafe; --info-fg:    #1d4ed8;

    /* Spacing scale */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --space-20: 80px;

    /* Radius */
    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;
    --r-xl: 20px;
    --r-pill: 999px;

    /* Type */
    --fz-11: 11px;
    --fz-12: 12px;
    --fz-13: 13px;
    --fz-14: 14px;
    --fz-15: 15px;
    --fz-16: 16px;
    --fz-18: 18px;
    --fz-20: 20px;
    --fz-24: 24px;
    --fz-30: 30px;
    --fz-36: 36px;
    --fz-44: 44px;
    --fz-56: 56px;

    --lh-tight: 1.15;
    --lh-snug:  1.35;
    --lh-base:  1.55;

    --fw-400: 400;
    --fw-500: 500;
    --fw-600: 600;
    --fw-700: 700;
    --fw-800: 800;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, .07), 0 1px 2px rgba(15, 23, 42, .04);
    --shadow-md: 0 6px 16px -4px rgba(15, 23, 42, .10), 0 2px 6px rgba(15, 23, 42, .05);
    --shadow-lg: 0 20px 40px -12px rgba(15, 23, 42, .18);

    /* Motion */
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --dur-fast: 120ms;
    --dur-base: 200ms;
    --dur-slow: 320ms;

    /* Layout */
    --container-max: 1240px;
    --header-h: 72px;
    --header-h-mobile: 64px;
    --z-header: 100;
    --z-drawer: 200;
    --z-modal: 400;
    --z-toast: 500;

    /* Font family */
    --ff-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
    --ff-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

/* =============================================================
   Reset
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--ff-sans);
    font-size: var(--fz-15);
    line-height: var(--lh-base);
    color: var(--ink-800);
    background: var(--canvas);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* Skip-link for accessibility */
.t-skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    background: var(--ink-900);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--r-sm);
    z-index: var(--z-toast);
}
.t-skip-link:focus { inset-inline-start: 12px; top: 12px; }

/* =============================================================
   Container + page shell
   ============================================================= */
.t-container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: var(--space-4);
}
@media (min-width: 768px) {
    .t-container { padding-inline: var(--space-6); }
}

.t-page {
    min-height: calc(100vh - var(--header-h));
    padding-block: var(--space-8);
}
@media (min-width: 768px) {
    .t-page { padding-block: var(--space-12); }
}

/* =============================================================
   Typography helpers
   ============================================================= */
.t-h1 { font-size: var(--fz-30); font-weight: var(--fw-800); line-height: var(--lh-tight); letter-spacing: -.01em; }
.t-h2 { font-size: var(--fz-24); font-weight: var(--fw-700); line-height: var(--lh-snug); }
.t-h3 { font-size: var(--fz-20); font-weight: var(--fw-700); line-height: var(--lh-snug); }
.t-h4 { font-size: var(--fz-18); font-weight: var(--fw-600); }
.t-eyebrow {
    font-size: var(--fz-12);
    font-weight: var(--fw-600);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--ink-400);
}
.t-lead { color: var(--ink-500); font-size: var(--fz-15); }
.t-muted { color: var(--ink-400); }

@media (min-width: 768px) {
    .t-h1 { font-size: var(--fz-44); }
    .t-h2 { font-size: var(--fz-30); }
    .t-h3 { font-size: var(--fz-24); }
}

/* =============================================================
   Utility — display + spacing
   ============================================================= */
.t-flex { display: flex; }
.t-grid { display: grid; }
.t-items-center { align-items: center; }
.t-justify-between { justify-content: space-between; }
.t-justify-center { justify-content: center; }
.t-gap-1 { gap: var(--space-1); }
.t-gap-2 { gap: var(--space-2); }
.t-gap-3 { gap: var(--space-3); }
.t-gap-4 { gap: var(--space-4); }
.t-gap-6 { gap: var(--space-6); }
.t-mt-2 { margin-top: var(--space-2); }
.t-mt-4 { margin-top: var(--space-4); }
.t-mt-6 { margin-top: var(--space-6); }
.t-mb-2 { margin-bottom: var(--space-2); }
.t-mb-4 { margin-bottom: var(--space-4); }
.t-mb-6 { margin-bottom: var(--space-6); }
.t-w-full { width: 100%; }
.t-text-center { text-align: center; }
.t-text-end { text-align: end; }

/* Visually hidden but accessible */
.t-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;
}

/* Scroll-to-top button */
.t-scroll-top {
    position: fixed;
    inset-block-end: 90px;
    inset-inline-end: 16px;
    width: 44px; height: 44px;
    border-radius: var(--r-pill);
    background: var(--ink-900); color: #fff;
    border: none;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0; pointer-events: none;
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
    z-index: var(--z-header);
}
.t-scroll-top.is-visible { opacity: 1; pointer-events: auto; }
.t-scroll-top:hover { transform: translateY(-2px); }

/* Floating buttons (cart / whatsapp) */
.t-fab {
    position: fixed;
    inset-inline-end: 16px;
    display: inline-flex;
    align-items: center; gap: 8px;
    padding: 12px 18px;
    border-radius: var(--r-pill);
    background: var(--primary); color: #fff;
    box-shadow: var(--shadow-md);
    font-weight: var(--fw-600); font-size: var(--fz-13);
    transition: transform var(--dur-base) var(--ease-out);
    z-index: 90;
}
.t-fab--whatsapp { background: #25D366; inset-block-end: 90px; }
.t-fab--cart     { inset-block-end: 24px; }
.t-fab:hover { transform: translateY(-2px); }
.t-fab .t-fab__label { display: none; }
@media (min-width: 768px) {
    .t-fab .t-fab__label { display: inline; }
}

/* Preview-mode hint */
.preview-mode body::before {
    content: "Preview mode";
    position: fixed;
    inset-block-start: 8px;
    inset-inline-start: 50%;
    transform: translateX(-50%);
    background: var(--ink-900); color: #fff;
    padding: 4px 10px; font-size: 11px; border-radius: var(--r-pill);
    z-index: var(--z-toast);
}
