/* Custom Fonts */
* {
    font-family: 'Barlow', sans-serif;
}

.font-display {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 0.05em;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Header scroll behavior */
header {
    transition: transform 0.3s ease-in-out;
}

header.header-hidden {
    transform: translateY(-100%);
}

header.header-visible {
    transform: translateY(0);
}

/* Navigation Links */
.nav-link {
    position: relative;
    color: #ffffff;
    font-weight: 600;
    padding: 0.625rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    transition: all 0.3s ease;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fbbf24;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.nav-link.active {
    background: linear-gradient(to right, #dc2626, #b91c1c);
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.5);
}

.nav-link.active:hover {
    background: linear-gradient(to right, #b91c1c, #991b1b);
    transform: translateY(-2px);
}

/* Product Cards */
.product-card {
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
}

.product-card-detailed {
    transition: all 0.3s ease;
}

.product-card-detailed:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Animations */
@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes pulse-slow {
    0%, 100% {
        opacity: 0.2;
    }
    50% {
        opacity: 0.3;
    }
}

.animate-fade-in-up {
    animation: fade-in-up 0.8s ease-out;
}

.animate-fade-in {
    animation: fade-in 1s ease-out;
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #dc2626;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #171717;
}

::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* Form Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Button Hover Effects */
button,
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(to right, #dc2626, #eab308);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Section Transitions */
section {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Image Hover Effects */
img {
    transition: transform 0.5s ease;
}

/* Card Shadow Hover */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Responsive Typography */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: 0.03em;
    }
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease;
}

#mobile-menu.menu-open {
    max-height: 600px;
    opacity: 1;
}

/* Hamburger icon rotation */
.rotate-90 {
    transform: rotate(90deg);
}

svg {
    transition: transform 0.3s ease;
}

/* Success/Error Messages */
.message-success {
    background-color: #dcfce7;
    color: #166534;
    border-color: #86efac;
}

.message-error {
    background-color: #fee2e2;
    color: #991b1b;
    border-color: #fca5a5;
}

/* Print Styles */
@media print {
    header,
    footer,
    nav {
        display: none;
    }
    
    body {
        font-size: 12pt;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Loading State */
.loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Custom Selection Colors */
::selection {
    background-color: #dc2626;
    color: #ffffff;
}

::-moz-selection {
    background-color: #dc2626;
    color: #ffffff;
}

/* Utilities */
.text-balance {
    text-wrap: balance;
}

.bg-pattern {
    background-image: url('data:image/svg+xml,%3Csvg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"%3E%3Cg fill="none" fill-rule="evenodd"%3E%3Cg fill="%23ffffff" fill-opacity="0.05"%3E%3Cpath d="M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z"/%3E%3C/g%3E%3C/g%3E%3C/svg%3E');
}

/* Backdrop Blur Support */
@supports (backdrop-filter: blur(10px)) {
    .backdrop-blur-nav {
        backdrop-filter: blur(10px);
        background-color: rgba(23, 23, 23, 0.9);
    }
}
