/* ============================================================
   MiniFrancine — Main Styles
   Fonts: Bricolage Grotesque (headings), DM Sans (body)
   ============================================================ */

:root {
    /* Brand Colors */
    --primary-color: #FF6B6B;
    --primary-hover: #e85d5d;
    --primary-bg: #FFF5F5;

    /* Standard UI Colors */
    --color-foreground: #1A1A1A;
    --color-background: #F3F4F6;
    --color-surface: #FFFFFF;

    /* Semantic Colors */
    --color-success: #10B981;
    --color-success-hover: #059669;
    --color-success-bg: #F0FDF4;

    --color-danger: #EF4444;
    --color-danger-hover: #DC2626;
    --color-danger-bg: #FEF2F2;

    --color-warning: #F59E0B;
    --color-warning-hover: #D97706;
    --color-warning-bg: #FFFBEB;

    --color-info: #3B82F6;
    --color-info-hover: #2563EB;
    --color-info-bg: #EFF6FF;

    /* Grays & Borders */
    --color-gray-dark: #374151;
    --color-gray: #6B7280;
    --color-gray-light: #9CA3AF;
    --color-gray-lighter: #E5E7EB;
    --color-gray-soft: #F3F4F6;
    --color-gray-bg: #F9FAFB;
    --border-color: #E5E7EB;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--color-foreground);
    background: var(--color-background);
    min-height: 100vh;
    overflow-x: hidden;
}

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

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input {
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
}

/* --- Utilities --- */
.hidden {
    display: none !important;
}

.text-gray {
    color: var(--color-gray);
}

.text-green {
    color: var(--color-success);
}

/* --- Page Container --- */
.page {
    max-width: 1440px;
    margin: 0 auto;
    background: var(--color-surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#navbar-placeholder {
    min-height: 72px;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-surface);
}

#footer-placeholder {
    margin-top: auto;
    background: var(--color-foreground);
}

/* --- Preloader --- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-surface);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray-soft);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* --- Product Grid --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    width: 100%;
}

@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
    }
}