/* 
   Hazsa Lastik - Custom Performance Styles
   Focusing on premium aesthetics and smooth transitions
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    /* DEFAULT DARK THEME */
    --brand-primary: #E10600;
    --brand-success: #28C76F;

    --brand-bg: #0F0F0F;
    --brand-surface: #121212;
    --brand-surface-alt: #1A1A1A;
    --brand-surface-hover: #2A2A2A;
    --brand-primary-hover: #261E1D;
    --brand-border: #2A2A2A;
    --brand-border-hover: #333333;

    --brand-text: #ffffff;
    --brand-text-muted: #9ca3af;
}

html.theme-light {
    --brand-primary: #E10600;
    --brand-success: #28C76F;

    --brand-bg: #F8FAFC;
    --brand-surface: #FFFFFF;
    --brand-surface-alt: #F1F5F9;
    --brand-surface-hover: #E2E8F0;
    --brand-primary-hover: #a80600;
    --brand-border: #E2E8F0;
    --brand-border-hover: #CBD5E1;

    --brand-text: #0F172A;
    --brand-text-muted: #64748B;
}

html.theme-red {
    --brand-primary: #ff4d4d;
    --brand-success: #28C76F;

    --brand-bg: #1a0f0f;
    --brand-surface: #2d1616;
    --brand-surface-alt: #3d1c1c;
    --brand-surface-hover: #4d2626;
    --brand-primary-hover: #c23c3c;

    --brand-border: #4d2626;
    --brand-border-hover: #663333;

    --brand-text: #ffffff;
    --brand-text-muted: #fca5a5;
}

html.theme-orange {
    --brand-primary: #f97316;
    --brand-success: #28C76F;

    --brand-bg: #1a140f;
    --brand-surface: #2d2016;
    --brand-surface-alt: #3d2c1c;
    --brand-surface-hover: #4d3626;
    --brand-primary-hover: #b35511;

    --brand-border: #4d3626;
    --brand-border-hover: #664d33;

    --brand-text: #ffffff;
    --brand-text-muted: #fdba74;
}

html.theme-blue {
    --brand-primary: #3b82f6;
    --brand-success: #28C76F;

    --brand-bg: #0f141a;
    --brand-surface: #16202d;
    --brand-surface-alt: #1c2c3d;
    --brand-surface-hover: #263a4d;
    --brand-primary-hover: #275baf;

    --brand-border: #263a4d;
    --brand-border-hover: #334d66;

    --brand-text: #ffffff;
    --brand-text-muted: #93c5fd;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--brand-bg);
    color: var(--brand-text-muted);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Glassmorphism */
.glass {
    background: rgba(18, 18, 18, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.glass-dark {
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

.animate-slide-in-right {
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes pulse-soft {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.animate-pulse-soft {
    animation: pulse-soft 2s infinite ease-in-out;
}

/* Text & Gradients */
.text-gradient {
    background: linear-gradient(135deg, #fff 0%, #E10600 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-red {
    background: linear-gradient(to right, #E10600, #FF4D4D);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Custom UI Elements */
.custom-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23666'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

/* Nav Link Effects */
.nav-link::after {
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--brand-dark);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brand-primary);
}

/* Product Card Special Hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Number Input Reset */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Selection */
::selection {
    background: var(--brand-primary);
    color: white;
}

/* Theme overrides for colored backgrounds */
.bg-brand-primary .text-brand-text,
.bg-brand-success .text-brand-text,
.bg-blue-600 .text-brand-text,
.bg-cyan-600 .text-brand-text,
.bg-purple-600 .text-brand-text,
button.bg-brand-primary,
button.bg-brand-success,
button.bg-blue-600,
button.bg-cyan-600,
button.bg-purple-600 {
    color: #ffffff !important;
}

.theme-light .bg-brand-primary .text-brand-text,
.theme-light .bg-brand-success .text-brand-text,
.theme-light .bg-blue-600 .text-brand-text,
.theme-light .bg-cyan-600 .text-brand-text,
.theme-light .bg-purple-600 .text-brand-text {
    color: #ffffff !important;
}

.text-gradient {
    background: linear-gradient(135deg, var(--brand-text) 0%, #E10600 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ========== Season Icon Badge ========== */
.season-icon-badge {
    position: absolute;
    top: -14px;
    left: -14px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease;
    animation: seasonBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.season-icon-badge:hover {
    transform: scale(1.18) rotate(-8deg);
}

.season-icon-badge svg {
    width: 26px;
    height: 26px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Winter badge */
.season-icon-badge.season-winter {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8, #7dd3fc);
    border: 2px solid rgba(125, 211, 252, 0.5);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.35),
        0 0 30px rgba(56, 189, 248, 0.15);
}

.season-icon-badge.season-winter:hover {
    box-shadow: 0 6px 28px rgba(14, 165, 233, 0.5),
        0 0 40px rgba(56, 189, 248, 0.25);
}

.season-icon-badge.season-winter svg {
    color: #ffffff;
}

/* Summer badge */
.season-icon-badge.season-summer {
    background: linear-gradient(135deg, #f59e0b, #fbbf24, #fde68a);
    border: 2px solid rgba(253, 230, 138, 0.5);
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35),
        0 0 30px rgba(251, 191, 36, 0.15);
}

.season-icon-badge.season-summer:hover {
    box-shadow: 0 6px 28px rgba(245, 158, 11, 0.5),
        0 0 40px rgba(251, 191, 36, 0.25);
}

.season-icon-badge.season-summer svg {
    color: #ffffff;
}

/* ========== Dual Season Badges (4 Mevsim) ========== */
.season-dual-badges {
    position: absolute;
    top: -14px;
    left: -14px;
    z-index: 20;
    width: 72px;
    height: 72px;
}

.season-dual-badges .season-icon-badge {
    position: absolute;
}

/* Back badge: snowflake at top-left */
.season-dual-badges .season-dual-back {
    top: 0;
    left: 0;
    width: 44px;
    height: 44px;
    z-index: 20;
    animation: seasonBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.season-dual-badges .season-dual-back svg {
    width: 22px;
    height: 22px;
}

/* Front badge: sun overlapping below-right */
.season-dual-badges .season-dual-front {
    top: 22px;
    left: 22px;
    width: 44px;
    height: 44px;
    z-index: 21;
    animation: seasonBadgePop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s forwards;
    opacity: 0;
}

.season-dual-badges .season-dual-front svg {
    width: 22px;
    height: 22px;
}

.season-dual-badges:hover .season-dual-back {
    transform: scale(1.12) translate(-3px, -3px);
}

.season-dual-badges:hover .season-dual-front {
    transform: scale(1.12) translate(3px, 3px);
}

@keyframes seasonBadgePop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(20deg);
    }

    60% {
        transform: scale(1.15) rotate(-5deg);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Subtle spin for winter snowflake */
.season-icon-badge.season-winter svg {
    animation: snowflakeSpin 8s linear infinite;
}

@keyframes snowflakeSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Subtle spin for summer sun */
.season-icon-badge.season-summer svg {
    animation: snowflakeSpin 8s linear infinite;
}

/* Theme Toggle Icons */
html:not(.theme-light) .theme-icon-sun {
    display: block;
}

html.theme-light .theme-icon-moon {
    display: block;
}

/* ========== Dashboard Season Filter Buttons ========== */
.dash-season-btn {
    background: var(--brand-surface-alt, #1a1a1a);
    border-color: var(--brand-border, #2a2a2a);
    color: var(--brand-text-muted, #666);
}

.dash-season-btn:hover {
    border-color: var(--brand-primary, #e63946);
    color: var(--brand-text, #fff);
}

.dash-season-btn.active {
    background: var(--brand-primary, #e63946);
    border-color: var(--brand-primary, #e63946);
    color: #fff;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.25);
}