/* Vote Page Specific Styles */

/* ========================================
   CURSOR TRAIL EFFECT
   ======================================== */
.cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, rgba(255, 107, 157, 0.1) 30%, transparent 70%);
    transform: translate(-50%, -50%);
    transition: opacity 0.5s ease-out;
    opacity: 0;
    mix-blend-mode: screen;
    filter: blur(40px);
}

[data-theme="dark"] .cursor-trail {
    background: radial-gradient(circle, rgba(148, 163, 184, 0.12) 0%, rgba(100, 116, 139, 0.08) 30%, transparent 70%);
}

.cursor-trail.active {
    opacity: 1;
    transition: opacity 0.3s ease-in;
}

/* ========================================
   THEME SYSTEM
   ======================================== */

/* Light Theme (Default) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-accent: #f3e8ff;
    --text-primary: #171717;
    --text-secondary: #737373;
    --border-color: #e5e5e5;
    --card-bg: #ffffff;
}

/* Dark Theme - Gray/Desaturated */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #171717;
    --bg-accent: #2a2a2a;
    --text-primary: #e5e5e5;
    --text-secondary: #a3a3a3;
    --border-color: #262626;
    --card-bg: #171717;
    --accent-primary: #94a3b8;
    --accent-secondary: #64748b;
}

[data-theme="dark"] body {
    background-color: #0a0a0a;
    color: #fafafa;
}

[data-theme="dark"] nav {
    background-color: rgba(10, 10, 10, 0.8);
    border-color: #262626;
}

[data-theme="dark"] .bg-white {
    background-color: #171717;
}

[data-theme="dark"] .text-neutral-800 {
    color: #fafafa;
}

[data-theme="dark"] .text-neutral-600 {
    color: #a3a3a3;
}

[data-theme="dark"] .border-neutral-100 {
    border-color: #262626;
}

[data-theme="dark"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #1a1a1a, #2a2a2a);
}

[data-theme="dark"] .bg-gradient-to-r {
    background: linear-gradient(to right, #94a3b8, #64748b) !important;
}

[data-theme="dark"] .text-primary-500,
[data-theme="dark"] .text-primary-600 {
    color: #94a3b8 !important;
}

[data-theme="dark"] .border-primary-500,
[data-theme="dark"] .border-primary-600 {
    border-color: #94a3b8 !important;
}

[data-theme="dark"] .bg-primary-500,
[data-theme="dark"] .bg-primary-600 {
    background-color: #94a3b8 !important;
}

[data-theme="dark"] footer {
    background-color: #000000;
}

/* Ocean Theme */
[data-theme="ocean"] {
    --bg-primary: #f0f9ff;
    --bg-secondary: #e0f2fe;
    --bg-accent: #bae6fd;
    --text-primary: #0c4a6e;
    --text-secondary: #075985;
    --border-color: #7dd3fc;
    --card-bg: #ffffff;
}

[data-theme="ocean"] body {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #bae6fd 100%);
}

[data-theme="ocean"] nav {
    background-color: rgba(240, 249, 255, 0.8);
    border-color: #7dd3fc;
}

[data-theme="ocean"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #e0f2fe, #7dd3fc, #38bdf8);
}

[data-theme="ocean"] .bg-gradient-to-r {
    background: linear-gradient(to right, #0ea5e9, #06b6d4) !important;
}

[data-theme="ocean"] .text-primary-600 {
    color: #0284c7;
}

[data-theme="ocean"] .border-primary-600 {
    border-color: #0284c7;
}

/* Sunset Theme */
[data-theme="sunset"] {
    --bg-primary: #fff7ed;
    --bg-secondary: #ffedd5;
    --bg-accent: #fed7aa;
    --text-primary: #7c2d12;
    --text-secondary: #9a3412;
    --border-color: #fdba74;
    --card-bg: #ffffff;
}

[data-theme="sunset"] body {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 50%, #fed7aa 100%);
}

[data-theme="sunset"] nav {
    background-color: rgba(255, 247, 237, 0.8);
    border-color: #fdba74;
}

[data-theme="sunset"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, #ffedd5, #fdba74, #fb923c);
}

[data-theme="sunset"] .bg-gradient-to-r {
    background: linear-gradient(to right, #f97316, #ec4899) !important;
}

[data-theme="sunset"] .text-primary-600 {
    color: #ea580c;
}

[data-theme="sunset"] .border-primary-600 {
    border-color: #ea580c;
}

/* ========================================
   FILTER BUTTONS
   ======================================== */
.filter-btn {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    color: #737373;
}

.filter-btn:hover {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
    border-color: #a855f7;
}

.filter-btn.active {
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.3);
}

[data-theme="dark"] .filter-btn {
    background: rgba(255, 255, 255, 0.05);
    color: #a3a3a3;
}

[data-theme="dark"] .filter-btn:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #94a3b8;
    border-color: #94a3b8;
}

[data-theme="dark"] .filter-btn.active {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    box-shadow: 0 4px 15px rgba(148, 163, 184, 0.3);
}

/* ========================================
   PRODUCT CARDS
   ======================================== */
.product-card {
    background: white;
    border-radius: 24px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.05), rgba(255, 107, 157, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #a855f7;
}

.product-card:hover::before {
    opacity: 1;
}

[data-theme="dark"] .product-card {
    background: #1a1a1a;
    border-color: #262626;
}

[data-theme="dark"] .product-card::before {
    background: linear-gradient(135deg, rgba(148, 163, 184, 0.05), rgba(100, 116, 139, 0.05));
}

[data-theme="dark"] .product-card:hover {
    background: #202020;
    box-shadow: 0 20px 40px rgba(148, 163, 184, 0.3);
    border-color: #94a3b8;
}

/* Product Image Container */
.product-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Vote Badge */
.vote-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.vote-badge i {
    color: #a855f7;
}

/* Category Badge */
.category-badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    color: white;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Info */
.product-info {
    padding: 24px;
}

.product-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #171717;
}

[data-theme="dark"] .product-title {
    color: #fafafa;
}

.product-description {
    color: #737373;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

[data-theme="dark"] .product-description {
    color: #a3a3a3;
}

/* Price Display */
.price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 20px;
}

.current-price {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.original-price {
    font-size: 1.25rem;
    color: #a3a3a3;
    text-decoration: line-through;
}

/* Vote Button */
.vote-button {
    width: 100%;
    padding: 16px;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid #a855f7;
    color: #a855f7;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.vote-button:hover {
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(168, 85, 247, 0.4);
}

.vote-button.voted {
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
    color: white;
    border-color: transparent;
}

.vote-button.voted i {
    animation: vote-bounce 0.6s ease;
}

@keyframes vote-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

[data-theme="dark"] .vote-button {
    background: #1a1a1a;
    border-color: #a855f7;
}

[data-theme="dark"] .vote-button:hover {
    background: linear-gradient(135deg, #a855f7, #FF6B9D);
}

/* ========================================
   ASYMMETRIC GRID LAYOUT
   ======================================== */
.products-grid-asymmetric {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

.products-grid-asymmetric .product-card:nth-child(3n+1) {
    grid-column: span 5;
}

.products-grid-asymmetric .product-card:nth-child(3n+2) {
    grid-column: span 7;
}

.products-grid-asymmetric .product-card:nth-child(3n+3) {
    grid-column: span 12;
}

@media (max-width: 1024px) {
    .products-grid-asymmetric .product-card {
        grid-column: span 6 !important;
    }
}

@media (max-width: 768px) {
    .products-grid-asymmetric .product-card {
        grid-column: span 12 !important;
    }
}

/* ========================================
   HOVER GLOW EFFECT
   ======================================== */
.hover-glow {
    position: relative;
    overflow: hidden;
}

.hover-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.4), transparent);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

.hover-glow:hover::after {
    width: 400px;
    height: 400px;
    opacity: 1;
}

/* ========================================
   MODAL STYLES
   ======================================== */
#vote-modal .modal-content {
    animation: modal-slide-up 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modal-slide-up {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Price Input Styling */
.price-input-container {
    position: relative;
    margin: 24px 0;
}

.price-input {
    width: 100%;
    padding: 16px 20px 16px 40px;
    border: 2px solid #e5e5e5;
    border-radius: 16px;
    font-size: 1.125rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.price-input:focus {
    outline: none;
    border-color: #a855f7;
    box-shadow: 0 0 0 4px rgba(168, 85, 247, 0.1);
}

.price-input::placeholder {
    color: #a3a3a3;
}

.price-symbol {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    font-weight: 600;
    color: #737373;
}

/* ========================================
   THEME SWITCHER
   ======================================== */
.theme-switcher-container {
    position: relative;
}

#theme-options {
    animation: dropdown-fade-in 0.3s ease;
}

@keyframes dropdown-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.theme-option {
    cursor: pointer;
}

.theme-option:active {
    transform: scale(0.95);
}

/* ========================================
   LOADING STATES
   ======================================== */
.skeleton-card {
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ========================================
   MOBILE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
    .product-card {
        border-radius: 20px;
    }

    .product-image {
        height: 200px;
    }

    .product-info {
        padding: 20px;
    }

    .product-title {
        font-size: 1.25rem;
    }

    .current-price {
        font-size: 1.5rem;
    }

    .vote-button {
        padding: 14px;
        font-size: 0.95rem;
    }

    .cursor-trail {
        display: none; /* Disable on mobile */
    }
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 300ms;
    transition-timing-function: ease-in-out;
}

/* Preserve specific transitions */
.product-card,
.vote-button,
.filter-btn,
.product-image img {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.vote-button:focus-visible,
.filter-btn:focus-visible,
.price-input:focus-visible {
    outline: 3px solid rgba(168, 85, 247, 0.5);
    outline-offset: 2px;
}

/* 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;
    }
    
    .cursor-trail {
        display: none;
    }
}