/**
 * OCTANE SKI - Custom Styles
 * Additional styles to complement Tailwind CSS
 */

/* ==========================================================================
   Root Variables
   ========================================================================== */
:root {
    --color-octane-black: #0a0a0a;
    --color-octane-gray: #1a1a1a;
    --color-octane-light: #f5f5f5;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ==========================================================================
   Links e botões: reabilitados
   ========================================================================== */
a, button {
    pointer-events: auto !important;
    cursor: pointer !important;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

@keyframes slide-up {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes slide-down {
    from {
        opacity: 1;
        transform: translate(-50%, 0);
    }
    to {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
}

@keyframes pulse-slow {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

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

.animate-slide-up {
    animation: slide-up 0.3s ease-out forwards;
}

.animate-slide-down {
    animation: slide-down 0.3s ease-out forwards;
}

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

/* ==========================================================================
   Hero Section
   ========================================================================== */
#home {
    position: relative;
    min-height: 100vh;
}

#home img {
    /* Removido efeito de transição */
}

#home img.loaded {
    /* Removido efeito de animação */
}

/* Gradient overlay for better text readability */
#home::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    pointer-events: none;
    z-index: 1;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */
#header {
    transition: var(--transition-smooth);
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
}

/* ==========================================================================
   Product Cards
   ========================================================================== */
.product-card {
    transition: var(--transition-smooth);
}

.product-card:hover {
    z-index: 10;
}

/* Image hover effect */
.product-card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img {
    transform: scale(1.1);
}

/* Loading skeleton */
.product-card.loading {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #f0f0f0 40%,
        #f0f0f0 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   WhatsApp Floating Button
   ========================================================================== */
#whatsapp-float {
    transition: var(--transition-smooth);
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

#whatsapp-float:hover {
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

#whatsapp-float:active {
    transform: scale(0.95);
}

/* Back to Top removed - styles intentionally deleted */

/* ==========================================================================
   Toast Notifications
   ========================================================================== */
.octane-toast {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    animation: slide-up 0.3s ease-out;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer a {
    transition: var(--transition-smooth);
}

footer a:hover {
    transform: translateY(-2px);
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.scroll-animate {
    /* Removido efeito de descida no scroll */
}

.scroll-animate.visible {
    /* Removido efeito de descida no scroll */
}

/* ==========================================================================
   Loading States
   ========================================================================== */
.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-left-color: var(--color-octane-black);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   Category Filters
   ========================================================================== */
.category-filter {
    cursor: pointer;
}

.category-filter.active {
    background: var(--color-octane-black) !important;
    color: white !important;
    border-color: var(--color-octane-black) !important;
}

.category-filter:not(.active):hover {
    background: #f5f5f5 !important;
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--color-octane-gray);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-octane-black);
}

/* ==========================================================================
   Selection
   ========================================================================== */
::selection {
    background: var(--color-octane-black);
    color: white;
}

::-moz-selection {
    background: var(--color-octane-black);
    color: white;
}

/* ==========================================================================
   Focus States
   ========================================================================== */
a:focus,
button:focus {
    outline: 2px solid var(--color-octane-black);
    outline-offset: 2px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Responsive Utilities
   ========================================================================== */
@media (max-width: 768px) {
    .product-card {
        font-size: 0.875rem;
    }

    #whatsapp-float {
        width: 56px;
        height: 56px;
    }

    #back-to-top {
        width: 48px;
        height: 48px;
    }
}

/* Mobile card sizing tweaks to match reference */
@media (max-width: 420px) {
    #products-grid {
        gap: 0.5rem;
        grid-auto-rows: auto;
    }

    /* Reduce inner padding on product cards */
    .product-card .p-4 {
        padding: 0.5rem !important;
    }

    /* Slightly smaller fonts to fit tighter cards */
    .product-card h3 {
        font-size: 0.95rem !important;
        line-height: 1.1 !important;
        min-height: unset !important;
    }

    .product-card p,
    .product-card .text-2xl {
        font-size: 0.9rem !important;
    }

    /* Make favorite button smaller */
    .product-card button[aria-label="Adicionar aos favoritos"] {
        width: 2rem !important;
        height: 2rem !important;
    }

    /* Ensure images stay cover and fit new card sizes */
    .product-card .aspect-square {
        aspect-ratio: 1/1;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    #header,
    #whatsapp-float,
    footer {
        display: none;
    }

    .product-card {
        break-inside: avoid;
    }
}

/* ==========================================================================
   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;
}

/* Reduce motion for users who prefer it */
@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;
    }
}

/* ==========================================================================
   Dark Mode Support (Future Enhancement)
   ========================================================================== */
@media (prefers-color-scheme: dark) {
    /* Placeholder for dark mode styles */
    /* Can be implemented later if needed */
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

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

/* ==========================================================================
   Badge Styles
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
}

.badge-new {
    background: var(--color-octane-black);
    color: white;
}

.badge-exclusive {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.badge-discount {
    background: #ef4444;
    color: white;
}

/* ==========================================================================
   Grid Improvements
   ========================================================================== */
#products-grid {
    gap: 1.5rem;
}

@media (min-width: 640px) {
    #products-grid {
        gap: 2rem;
    }
}

/* ==========================================================================
   Performance Optimizations
   ========================================================================== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

/* GPU acceleration for smooth animations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}
