/**
 * MegaPrice Theme - Animations & Effects
 * Modern hover effects, transitions & animations
 */

/* =================================================================
   CSS VARIABLES - ANIMATION
   ================================================================= */

:root {
    /* Timing */
    --transition-fast: 150ms;
    --transition-normal: 250ms;
    --transition-slow: 400ms;
    --transition-slower: 600ms;
    
    /* Easing */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-glow: 0 0 40px rgba(255, 107, 53, 0.3);
    --shadow-glow-primary: 0 0 30px rgba(255, 107, 53, 0.4);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(255, 255, 255, 0.3);
    --glass-blur: blur(20px);
}

/* =================================================================
   BASE ANIMATIONS - KEYFRAMES
   ================================================================= */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

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

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

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

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

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

@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(255, 107, 53, 0.8);
    }
}

@keyframes borderDance {
    0%, 100% {
        clip-path: inset(0 0 98% 0);
    }
    25% {
        clip-path: inset(0 98% 0 0);
    }
    50% {
        clip-path: inset(98% 0 0 0);
    }
    75% {
        clip-path: inset(0 0 0 98%);
    }
}

/* =================================================================
   ANIMATION CLASSES
   ================================================================= */

.animated {
    animation-duration: var(--transition-slow);
    animation-fill-mode: both;
    animation-timing-function: var(--ease-out-expo);
}

.animated.fadeIn { animation-name: fadeIn; }
.animated.fadeInUp { animation-name: fadeInUp; }
.animated.fadeInDown { animation-name: fadeInDown; }
.animated.fadeInLeft { animation-name: fadeInLeft; }
.animated.fadeInRight { animation-name: fadeInRight; }
.animated.scaleIn { animation-name: scaleIn; }
.animated.scaleUp { animation-name: scaleUp; }
.animated.bounceIn { animation-name: bounceIn; }

/* Delay utilities */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* =================================================================
   RIPPLE EFFECT
   ================================================================= */

.btn,
.product-action,
.tab-button {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* =================================================================
   BUTTON EFFECTS
   ================================================================= */

.btn {
    position: relative;
    transition: all var(--transition-normal) var(--ease-out-expo);
    transform-style: preserve-3d;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn:hover::before {
    opacity: 1;
}

/* Primary Button */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(255, 107, 53, 0.3);
}

/* Shine effect on hover */
.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border: 2px solid currentColor;
    position: relative;
    z-index: 1;
}

.btn-ghost::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: -1;
}

.btn-ghost:hover::before {
    opacity: 0.1;
}

/* Icon Buttons */
.btn-icon {
    border-radius: 50%;
    transition: all var(--transition-normal) var(--ease-spring);
}

.btn-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* =================================================================
   PRODUCT CARD EFFECTS
   ================================================================= */

.product-card {
    background: var(--color-white);
    border-radius: 16px;
    overflow: hidden;
    transition: all var(--transition-normal) var(--ease-out-expo);
    transform-style: preserve-3d;
    will-change: transform, box-shadow;
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255,107,53,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.product-card:hover {
    box-shadow: var(--shadow-xl);
}

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

/* Product Image */
.product-image {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
}

.product-image img {
    transition: transform var(--transition-slow) var(--ease-out-expo);
}

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

/* Product Actions Overlay */
.product-actions {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: all var(--transition-normal) var(--ease-out-expo);
}

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

.product-action {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-spring);
    transform: translateY(10px);
}

.product-card:hover .product-action {
    transform: translateY(0);
}

.product-card:hover .product-action:nth-child(1) { transition-delay: 0ms; }
.product-card:hover .product-action:nth-child(2) { transition-delay: 50ms; }
.product-card:hover .product-action:nth-child(3) { transition-delay: 100ms; }

.product-action:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: scale(1.15) !important;
    box-shadow: var(--shadow-glow-primary);
}

.product-action.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.product-action.active svg {
    fill: currentColor;
}

/* Product Info */
.product-info {
    padding: 16px;
    position: relative;
}

.product-brand {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-light);
    margin-bottom: 4px;
    transition: color var(--transition-normal);
}

.product-card:hover .product-brand {
    color: var(--color-primary);
}

.product-title {
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
    transition: color var(--transition-normal);
}

.product-title a:hover {
    color: var(--color-primary);
}

/* Product Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    color: #ddd;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.star.filled {
    color: #ffc107;
}

.product-card:hover .star.filled {
    animation: pulse 0.5s ease;
}

/* Product Price */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.old-price {
    color: var(--color-text-light);
    text-decoration: line-through;
    font-size: 14px;
}

.current-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
    transition: transform var(--transition-normal);
}

.product-card:hover .current-price {
    transform: scale(1.05);
}

/* Discount Badge */
.discount-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

/* TOP Badge */
.top-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(251, 191, 36, 0.4);
}

.top-badge::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid rgba(251, 191, 36, 0.3);
    animation: pulse 2s infinite;
}

/* Offers Link */
.offers-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-text-light);
    transition: all var(--transition-normal);
    margin-top: 8px;
}

.offers-link:hover {
    color: var(--color-primary);
    gap: 8px;
}

.offers-link svg {
    transition: transform var(--transition-normal);
}

.offers-link:hover svg {
    transform: translateX(4px);
}

/* Compare Button */
.compare-prices-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    transition: all var(--transition-normal) var(--ease-out-expo);
}

/* =================================================================
   CATEGORY CARD EFFECTS
   ================================================================= */

.category-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-white);
    transition: all var(--transition-normal) var(--ease-out-expo);
}

.category-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.7) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    z-index: 1;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

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

.category-card img {
    transition: transform var(--transition-slow) var(--ease-out-expo);
}

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

.category-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    color: white;
    z-index: 2;
    transform: translateY(20px);
    opacity: 0;
    transition: all var(--transition-normal) var(--ease-out-expo);
}

.category-card:hover .category-content {
    transform: translateY(0);
    opacity: 1;
}

/* =================================================================
   SEARCH BOX EFFECTS
   ================================================================= */

.search-box {
    position: relative;
    transition: all var(--transition-normal);
}

.search-input {
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 14px 50px 14px 20px;
    width: 100%;
    font-size: 15px;
    transition: all var(--transition-normal) var(--ease-out-expo);
    background: var(--color-white);
}

.search-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.1);
    outline: none;
}

.search-input::placeholder {
    transition: opacity var(--transition-normal);
}

.search-input:focus::placeholder {
    opacity: 0.5;
}

.search-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-spring);
}

.search-btn:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-glow-primary);
}

/* Search Suggestions */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    margin-top: 8px;
    overflow: hidden;
    z-index: 100;
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    transition: all var(--transition-normal) var(--ease-out-expo);
}

.search-suggestions.active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    transition: background var(--transition-fast);
    border-bottom: 1px solid var(--color-border-light);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.active {
    background: var(--color-background);
}

.suggestion-item mark {
    background: rgba(255, 107, 53, 0.2);
    color: var(--color-primary);
    border-radius: 2px;
    padding: 0 2px;
}

.suggestion-image {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--color-background);
    flex-shrink: 0;
}

.suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.suggestion-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: var(--color-background);
    color: var(--color-primary);
    font-weight: 600;
    transition: all var(--transition-normal);
}

.suggestion-view-all:hover {
    background: var(--color-primary);
    color: white;
}

/* =================================================================
   OFFERS TABLE EFFECTS
   ================================================================= */

.offer-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr auto;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--color-white);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all var(--transition-normal) var(--ease-out-expo);
    border: 1px solid var(--color-border-light);
}

.offer-row:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.offer-row.featured {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.05) 0%, rgba(255, 107, 53, 0.02) 100%);
    border-color: var(--color-primary);
    position: relative;
}

.offer-row.featured::before {
    content: 'Najlepšia ponuka';
    position: absolute;
    top: -10px;
    left: 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vendor-logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all var(--transition-normal);
}

.offer-row:hover .vendor-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.offer-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.offer-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    transition: all var(--transition-normal) var(--ease-spring);
}

.offer-btn:hover {
    transform: scale(1.05);
}

/* Offer Filters */
.offer-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.offer-filter {
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.offer-filter:hover {
    border-color: var(--color-primary);
    background: rgba(255, 107, 53, 0.05);
}

.offer-filter.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* =================================================================
   TABS EFFECTS
   ================================================================= */

.tabs-nav {
    display: flex;
    gap: 4px;
    background: var(--color-background);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.tab-button {
    flex: 1;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out-expo);
    position: relative;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    transition: all var(--transition-normal) var(--ease-out-expo);
    transform: translateX(-50%);
}

.tab-button:hover {
    color: var(--color-primary);
}

.tab-button.active {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.tab-button.active::before {
    width: 40px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeInUp 0.4s var(--ease-out-expo);
}

/* =================================================================
   LIGHTBOX
   ================================================================= */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.lightbox-prev { left: -70px; }
.lightbox-next { right: -70px; }

.lightbox-nav:hover {
    background: var(--color-primary);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 14px;
}

/* =================================================================
   COMPARE BAR
   ================================================================= */

.compare-bar {
    position: fixed;
    bottom: -100px;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: bottom var(--transition-slow) var(--ease-out-expo);
}

.compare-bar.show {
    bottom: 0;
}

.compare-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.compare-items {
    display: flex;
    gap: 12px;
}

.compare-item {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--color-background);
    border: 2px dashed var(--color-border);
    position: relative;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.compare-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.compare-item:not(.compare-item-empty) {
    border-style: solid;
    border-color: var(--color-primary);
}

.compare-item-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.compare-item-remove:hover {
    transform: scale(1.2);
}

.compare-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* =================================================================
   TOAST NOTIFICATIONS
   ================================================================= */

.toast-notification {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--color-white);
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10001;
    transform: translateX(calc(100% + 24px));
    transition: transform var(--transition-slow) var(--ease-out-expo);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-success {
    border-left: 4px solid #22c55e;
}

.toast-success svg {
    color: #22c55e;
}

.toast-info {
    border-left: 4px solid #ff8c5a;
}

.toast-info svg {
    color: #ff8c5a;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error svg {
    color: #ef4444;
}

/* =================================================================
   LOADING STATES
   ================================================================= */

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner.large {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

.products-grid.loading {
    position: relative;
    pointer-events: none;
}

.products-grid.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* =================================================================
   SCROLL TO TOP
   ================================================================= */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal) var(--ease-out-expo);
    z-index: 999;
    box-shadow: var(--shadow-lg);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow-primary);
}

/* =================================================================
   COOKIE NOTICE
   ================================================================= */

.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    padding: 20px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform var(--transition-slow) var(--ease-out-expo);
}

.cookie-notice.show {
    transform: translateY(0);
}

/* =================================================================
   MOBILE MENU
   ================================================================= */

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85vw;
    height: 100%;
    background: var(--color-white);
    z-index: 10001;
    transform: translateX(-100%);
    transition: transform var(--transition-slow) var(--ease-out-expo);
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.mobile-category-header:hover {
    background: var(--color-background);
}

.mobile-category-header .toggle-icon {
    transition: transform var(--transition-normal);
}

.mobile-category-header.active .toggle-icon {
    transform: rotate(180deg);
}

.mobile-category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow) var(--ease-out-expo);
    background: var(--color-background);
}

/* =================================================================
   STICKY HEADER
   ================================================================= */

.site-header {
    transition: box-shadow var(--transition-normal);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    z-index: 999;
    transform: translateY(-100%);
    transition: transform var(--transition-normal) var(--ease-out-expo);
    box-shadow: var(--shadow-md);
}

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

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

/* =================================================================
   FILTER SIDEBAR MOBILE
   ================================================================= */

.filters-sidebar {
    transition: transform var(--transition-slow) var(--ease-out-expo);
}

@media (max-width: 991px) {
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 320px;
        max-width: 85vw;
        height: 100%;
        background: var(--color-white);
        z-index: 10001;
        transform: translateX(-100%);
        overflow-y: auto;
        box-shadow: var(--shadow-2xl);
    }
    
    .filters-sidebar.active {
        transform: translateX(0);
    }
    
    .filters-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 10000;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-normal);
    }
    
    .filters-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* =================================================================
   GALLERY EFFECTS
   ================================================================= */

.product-gallery .main-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    cursor: zoom-in;
}

.product-gallery .main-image img {
    transition: transform var(--transition-slow) var(--ease-out-expo);
    transform-origin: center center;
}

.product-gallery .thumbnail {
    border: 2px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition-normal);
    opacity: 0.6;
}

.product-gallery .thumbnail:hover {
    opacity: 1;
}

.product-gallery .thumbnail.active {
    border-color: var(--color-primary);
    opacity: 1;
}

.zoom-button {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal) var(--ease-spring);
}

.zoom-button:hover {
    transform: scale(1.1);
    background: var(--color-primary);
    color: white;
}

/* =================================================================
   NEWSLETTER FORM
   ================================================================= */

.newsletter-form {
    display: flex;
    gap: 12px;
    max-width: 400px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid var(--color-border);
    border-radius: 10px;
    transition: all var(--transition-normal);
}

.newsletter-form input:focus {
    border-color: var(--color-primary);
    outline: none;
}

.newsletter-form input.error {
    border-color: #ef4444;
    animation: shake 0.5s;
}

.newsletter-success {
    text-align: center;
    padding: 20px;
    animation: bounceIn 0.6s;
}

.newsletter-success svg {
    color: #22c55e;
    margin-bottom: 12px;
}

/* =================================================================
   VIEW TOGGLE
   ================================================================= */

.view-toggle {
    display: flex;
    gap: 4px;
    background: var(--color-background);
    padding: 4px;
    border-radius: 8px;
}

.view-toggle-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
    color: var(--color-text-light);
}

.view-toggle-btn:hover {
    color: var(--color-primary);
}

.view-toggle-btn.active {
    background: var(--color-white);
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Grid view */
.products-grid.view-grid .product-card {
    /* default grid styles */
}

/* List view */
.products-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.products-grid.view-list .product-card {
    display: grid;
    grid-template-columns: 200px 1fr auto;
    gap: 20px;
    align-items: center;
}

.products-grid.view-list .product-image {
    aspect-ratio: 1;
}

.products-grid.view-list .product-actions {
    position: static;
    opacity: 1;
}

.products-grid.view-list .product-action {
    transform: none;
}

/* =================================================================
   QUICKVIEW MODAL
   ================================================================= */

.quickview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.quickview-modal.active {
    opacity: 1;
    visibility: visible;
}

.quickview-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.quickview-container {
    position: relative;
    background: var(--color-white);
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.4s var(--ease-out-expo);
}

.quickview-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--color-background);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-normal);
}

.quickview-close:hover {
    background: var(--color-primary);
    color: white;
    transform: rotate(90deg);
}

.quickview-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* =================================================================
   HOVER GRADIENT BORDER
   ================================================================= */

.hover-border-gradient {
    position: relative;
}

.hover-border-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-primary), #f97316, #fbbf24);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.hover-border-gradient:hover::before {
    opacity: 1;
}

/* =================================================================
   AVAILABILITY BADGES
   ================================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: #d97706;
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: #ff6b35;
}

/* Pulsing dot for "in stock" */
.badge-success::before {
    content: '';
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* =================================================================
   PRICE WATCH WIDGET
   ================================================================= */

.price-watch {
    background: linear-gradient(135deg, var(--color-background) 0%, rgba(255, 107, 53, 0.05) 100%);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--color-border);
    transition: all var(--transition-normal);
}

.price-watch:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-md);
}

.price-watch-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    margin-bottom: 8px;
}

.price-watch-title svg {
    color: var(--color-primary);
}

/* =================================================================
   RESPONSIVE ADJUSTMENTS
   ================================================================= */

@media (max-width: 768px) {
    .toast-notification {
        left: 16px;
        right: 16px;
        bottom: 80px;
    }
    
    .compare-bar-inner {
        flex-direction: column;
        gap: 16px;
    }
    
    .compare-items {
        justify-content: center;
    }
    
    .lightbox-nav {
        display: none;
    }
    
    .offer-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

/* =================================================================
   REDUCED MOTION
   ================================================================= */

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