/* Featured Products Carousel - Siêu mượt và đẹp mắt */

/* ============================================
   CAROUSEL CONTAINER
   ============================================ */
.featured-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   NAVIGATION BUTTONS
   ============================================ */
.carousel-btn {
    @apply w-10 h-10 rounded-full bg-white shadow-lg border border-gray-200 
           flex items-center justify-center text-gray-600 hover:text-blue-600 
           hover:border-blue-300 transition-all duration-300 disabled:opacity-50 
           disabled:cursor-not-allowed disabled:hover:text-gray-600 
           disabled:hover:border-gray-200;
}

.carousel-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.carousel-btn:active:not(:disabled) {
    transform: translateY(0);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-card {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

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

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

/* Featured badge */
.product-badge.featured {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 10;
    animation: pulse-glow 2s ease-in-out infinite alternate;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

/* ============================================
   BADGES & LABELS
   ============================================ */
.hot-badge {
    background: linear-gradient(45deg, #ff6b6b, #ffa500);
    animation: pulse-glow 2s ease-in-out infinite alternate;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    }
    to {
        box-shadow: 0 4px 25px rgba(255, 107, 107, 0.8);
    }
}

.discount-badge {
    background: linear-gradient(45deg, #e53e3e, #c53030);
    animation: bounce-subtle 2s ease-in-out infinite;
}

@keyframes bounce-subtle {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* ============================================
   DOTS NAVIGATION
   ============================================ */
.dot {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.dot:hover {
    background-color: #3b82f6;
    transform: scale(1.2);
}

.dot.active {
    background-color: #2563eb;
    width: 1.5rem;
}

/* ============================================
   LOADING SKELETON
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

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

/* ============================================
   TEXT UTILITIES
   ============================================ */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .carousel-btn {
        @apply w-8 h-8;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
    
    .featured-carousel .flex.items-center.justify-between {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

.zoom-in {
    animation: zoomIn 0.4s ease-out;
}

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

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

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

/* ============================================
   PERFORMANCE OPTIMIZATIONS
   ============================================ */
.featured-carousel * {
    will-change: transform;
}

.carousel-track {
    backface-visibility: hidden;
    perspective: 1000px;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .featured-carousel *,
    .product-card,
    .carousel-btn,
    .dot {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus styles for keyboard navigation */
.carousel-btn:focus,
.dot:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ============================================
   DARK MODE SUPPORT (Optional)
   ============================================ */
@media (prefers-color-scheme: dark) {
    .product-card {
        @apply bg-gray-800 border-gray-700;
    }
    
    .carousel-btn {
        @apply bg-gray-800 border-gray-700 text-gray-300;
    }
    
    .skeleton {
        background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
        background-size: 200% 100%;
    }
}