/* ==========================================================================
   CSS Variables & Utility Classes (shared across all sites)
   ========================================================================== */

/* Global Box Sizing & Overflow Control */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* CSS Variables — defaults are CasKompare (orange) theme */
:root {
    --color-primary: #E38200;
    --color-primary-hover: #c97200;
    --color-secondary: #204c88;
    --color-accent: #f3ba22;
    --color-footer-bg: #E6E3D2;
    --color-footer-text: gray;
    --color-footer-link: gray;
    --font-nav: inherit;

    /* Neutrals */
    --color-dark: #1a1a2e;
    --color-muted: #718096;
    --bg-gray-50: #f8fafc;
    --bg-gray-100: #f1f5f9;
    --bg-gray-200: #e2e8f0;
    --border-gray-200: #e2e8f0;

    /* Aliases (used by whiskey.css) */
    --primary: var(--color-primary);
    --primary-hover: var(--color-primary-hover);
    --secondary: var(--color-secondary);
    --dark: var(--color-dark);
    --muted: var(--color-muted);
    --text-dark: var(--color-dark);
    --text-muted: var(--color-muted);
}

/* Container utility */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

@media (max-width: 640px) {
    .container {
        max-width: 100%;
    }

    .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Spacing utilities */
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.p-3 { padding: 0.75rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-auto { margin-left: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }

/* Grid utilities */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:text-5xl { font-size: 3rem; line-height: 1; }
}

/* Flexbox utilities */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-1 { flex: 1 1 0%; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-baseline { align-items: baseline; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.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-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-primary { color: var(--color-primary); }
.text-secondary { color: var(--color-secondary); }
.text-dark { color: var(--color-dark); }
.text-muted { color: var(--color-muted); }
.text-white { color: white; }
.leading-relaxed { line-height: 1.625; }
.whitespace-nowrap { white-space: nowrap; }

/* Background utilities */
.bg-white { background-color: white; }
.bg-gray-50 { background-color: var(--bg-gray-50); }
.bg-gray-100 { background-color: var(--bg-gray-100); }
.bg-gray-200 { background-color: var(--bg-gray-200); }
.bg-primary { background-color: var(--color-primary); }
.bg-primary\/10 { background-color: rgba(227, 130, 0, 0.1); }
.bg-primary\/5 { background-color: rgba(227, 130, 0, 0.05); }
.bg-secondary\/10 { background-color: rgba(32, 76, 136, 0.1); }
.bg-secondary\/5 { background-color: rgba(32, 76, 136, 0.05); }
.bg-amber-100 { background-color: #fef3c7; }
.bg-amber-50 { background-color: #fffbeb; }
.bg-orange-50 { background-color: #fff7ed; }
.bg-purple-50 { background-color: #faf5ff; }
.bg-green-100 { background-color: #d1fae5; }

/* Gradient utilities */
.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}
.from-gray-100 { --tw-gradient-from: var(--bg-gray-100); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(241, 245, 249, 0)); }
.to-gray-50 { --tw-gradient-to: var(--bg-gray-50); }
.from-primary\/10 { --tw-gradient-from: rgba(227, 130, 0, 0.1); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(227, 130, 0, 0)); }
.to-secondary\/10 { --tw-gradient-to: rgba(32, 76, 136, 0.1); }
.from-primary\/5 { --tw-gradient-from: rgba(227, 130, 0, 0.05); --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(227, 130, 0, 0)); }
.to-secondary\/5 { --tw-gradient-to: rgba(32, 76, 136, 0.05); }
.from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0)); }
.to-indigo-600 { --tw-gradient-to: #4f46e5; }
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.from-amber-50 { --tw-gradient-from: #fffbeb; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 251, 235, 0)); }
.to-orange-50 { --tw-gradient-to: #fff7ed; }

/* Border utilities */
.border { border-width: 1px; }
.border-2 { border-width: 2px; }
.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-gray-200 { border-color: var(--border-gray-200); }
.border-primary { border-color: var(--color-primary); }
.border-primary\/20 { border-color: rgba(227, 130, 0, 0.2); }
.border-purple-200 { border-color: #e9d5ff; }
.border-amber-200 { border-color: #fde68a; }

/* Rounded utilities */
.rounded-full { border-radius: 9999px; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }

/* Shadow utilities */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-primary\/20 { box-shadow: 0 10px 15px -3px rgba(227, 130, 0, 0.2), 0 4px 6px -2px rgba(227, 130, 0, 0.1); }

/* Width utilities */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-2 { width: 0.5rem; }
.w-4 { width: 1rem; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-12 { width: 3rem; }
.w-16 { width: 4rem; }

/* Height utilities */
.h-full { height: 100%; }
.h-auto { height: auto; }
.h-2 { height: 0.5rem; }
.h-3 { height: 0.75rem; }
.h-4 { height: 1rem; }
.h-5 { height: 1.25rem; }
.h-6 { height: 1.5rem; }

/* Overflow utilities */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }

/* Position utilities */
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.top-6 { top: 1.5rem; }
.right-6 { right: 1.5rem; }

/* Z-index utilities */
.z-40 { z-index: 40; }

/* Space utilities */
.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; }

/* Transition utilities */
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

/* Hover states */
.hover\:bg-primary:hover { background-color: var(--color-primary); }
.hover\:bg-primary\/90:hover { background-color: rgba(227, 130, 0, 0.9); }
.hover\:bg-gray-200:hover { background-color: var(--bg-gray-200); }
.hover\:text-dark:hover { color: var(--color-dark); }
.hover\:text-primary:hover { color: var(--color-primary); }
.hover\:text-primary\/80:hover { color: rgba(227, 130, 0, 0.8); }

/* Text color utilities */
.text-green-800 { color: #166534; }
.text-amber-800 { color: #92400e; }
.text-purple-600 { color: #9333ea; }
.text-purple-900 { color: #581c87; }

/* Object fit utilities */
.object-contain { object-fit: contain; }

/* Inline utilities */
.inline { display: inline; }
