/* =====================================================
   Teddy Baba- Main Stylesheet
   Modern General Store Design
   Brand: Deep Navy + Warm Coral/Orange + Cool Off-White
   ===================================================== */

/* CSS Variables */
:root {
    /* Brand */
    --primary: #F97316;          /* warm coral/orange — CTAs & highlights */
    --primary-dark: #C2410C;
    --primary-hover: #EA580C;
    --primary-light: #FFF1E6;    /* soft tint for badges / highlighted surfaces */
    --secondary: #0F172A;        /* deep navy — headers & brand */
    --secondary-light: #1E293B;
    --dark: #0F172A;
    --text: #1E293B;
    --text-light: #52606D;
    --text-muted: #94A3B8;
    --white: #ffffff;
    --bg: #FFFFFF;
    --bg-light: #F8FAFC;         /* cool off-white — cards & sidebars */
    --border: #E2E8F0;
    --border-light: #EEF2F6;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #FB923C 0%, #F97316 55%, #EA580C 100%);
    --gradient-navy: linear-gradient(135deg, #1E293B 0%, #0F172A 65%, #0B1220 100%);
    --gradient-hero: linear-gradient(120deg, rgba(15,23,42,0.92) 0%, rgba(15,23,42,0.55) 45%, rgba(15,23,42,0.15) 100%);
    --gradient-surface: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);

    /* Status (kept distinct from brand colour on purpose) */
    --success: #16A34A;
    --warning: #F59E0B;
    --danger: #DC2626;
    --info: #0284C7;

    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
    --shadow: 0 10px 24px rgba(15,23,42,0.08);
    --shadow-lg: 0 20px 45px rgba(15,23,42,0.14);
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --transition: all 0.3s ease;
    --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    /* fluid page width: 1400px up to ~1850px screens, then grows with the screen (max 2300px) */
    --container: clamp(1400px, 76vw, 2300px);
    --header-h: 80px;
    --nav-h: 52px;
}

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

html {
    scroll-behavior: smooth;
    /* 16px up to 1600px screens, then scales gently so text and spacing stay in proportion on XL / 4K screens */
    font-size: clamp(16px, 0.5vw + 8px, 26px);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    background: none;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

.main-content {
    flex: 1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--secondary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.2rem; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,115,22,0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-dark {
    background: var(--secondary);
    color: var(--white);
}

.btn-dark:hover {
    background: #000;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 8px 36px;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.badge-success { background: #F1F5F9; color: #C2410C; }
.badge-warning { background: #fff3cd; color: #856404; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-secondary { background: #e9ecef; color: #495057; }

/* Modern baseline refinements */
::selection { background: rgba(249,115,22,.18); color: #0B1220; }
body {
    font-family: var(--font);
    color: #0F172A;
    background: #fff;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(249,115,22,.22); outline-offset: 2px; }

/* =====================================================
   Teddy Baba Global loader
   ===================================================== */
.tb-page-loader {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: grid;
    place-items: center;
    background: #ffffff;
    opacity: 1;
    visibility: visible;
    transition: opacity .55s ease, visibility .55s ease;
}
.tb-page-loader.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.tb-loader-inner { position: relative; width: 150px; height: 150px; display:grid; place-items:center; }
.tb-loader-ring {
    position:absolute; inset:0; border-radius:50%;
    border:1px solid rgba(249,115,22,.12);
    border-top:2px solid var(--primary);
    border-right:2px solid rgba(249,115,22,.38);
    animation: tb-loader-spin 1.15s linear infinite;
}
.tb-loader-ring::after {
    content:''; position:absolute; inset:10px; border-radius:50%;
    border:1px solid rgba(249,115,22,.09);
    border-bottom:2px solid rgba(249,115,22,.45);
    animation: tb-loader-spin-reverse 1.7s linear infinite;
}
.tb-loader-logo {
    width:76px; height:76px; object-fit:contain;
    animation: tb-loader-logo 1.35s cubic-bezier(.2,.8,.2,1) infinite;
    filter: drop-shadow(0 10px 20px rgba(249,115,22,.16));
}
.tb-loader-glow {
    position:absolute; width:52px; height:52px; border-radius:50%;
    background:rgba(249,115,22,.08); filter:blur(16px);
    animation:tb-loader-glow 1.35s ease-in-out infinite;
}
.tb-loader-name {
    position:absolute; top:calc(100% + 18px); left:50%; transform:translateX(-50%);
    font-size:.7rem; font-weight:800; letter-spacing:.28em; color:#0F172A;
    white-space:nowrap; text-indent:.28em;
}
@keyframes tb-loader-spin { to { transform:rotate(360deg); } }
@keyframes tb-loader-spin-reverse { to { transform:rotate(-360deg); } }
@keyframes tb-loader-logo { 0%,100% { transform:scale(.94); opacity:.82; } 50% { transform:scale(1.04); opacity:1; } }
@keyframes tb-loader-glow { 0%,100% { transform:scale(.75); opacity:.35; } 50% { transform:scale(1.25); opacity:.75; } }
@media (prefers-reduced-motion: reduce) {
    .tb-loader-ring, .tb-loader-ring::after, .tb-loader-logo, .tb-loader-glow { animation:none; }
}
