/**
 * File: 'limited-stock-widget.css'
 * Purpose: Styles for the Limited Stock horizontal scrollable widget
 * Developer: John Adeyemi (https://www.johnadeyemi.com)
 * 
 * Features:
 * - Dark, attractive gradient background
 * - Smooth horizontal scrolling
 * - Elegant product cards with hover effects
 * - Left/right navigation arrows
 * - Responsive design
 */


/* ============================================
   LIMITED STOCK SECTION - MAIN CONTAINER
   ============================================ */
.limited-stock-section {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

/* Decorative background elements */
.limited-stock-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.03) 0%, transparent 50%);
    animation: pulse-bg 15s ease-in-out infinite;
}

@keyframes pulse-bg {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}


/* ============================================
   SECTION HEADER
   ============================================ */
.limited-stock-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.limited-stock-header h2 {
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.limited-stock-header h2 i {
    color: #ff6b6b;
    margin-right: 12px;
    animation: flame-flicker 1.5s ease-in-out infinite;
}

@keyframes flame-flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

.limited-stock-subtitle {
    color: #a0a0a0;
    font-size: 1rem;
    margin: 0;
    font-weight: 400;
}

.limited-stock-subtitle span {
    color: #ff6b6b;
    font-weight: 600;
}


/* ============================================
   SCROLLABLE WRAPPER
   ============================================ */
.limited-stock-wrapper {
    position: relative;
    padding: 0 60px;
    z-index: 2;
}

/* Scroll container */
.limited-stock-scroll-container {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 20px 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.limited-stock-scroll-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}


/* ============================================
   NAVIGATION ARROWS
   ============================================ */
.limited-stock-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: all 0.3s ease;
}

.limited-stock-arrow:hover {
    background: linear-gradient(135deg, #ff5252 0%, #d32f2f 100%);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.limited-stock-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

.limited-stock-arrow:disabled {
    background: #3a3a5a;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.limited-stock-arrow:disabled:hover {
    transform: translateY(-50%) scale(1);
}

.limited-stock-arrow-left {
    left: 10px;
}

.limited-stock-arrow-right {
    right: 10px;
}


/* ============================================
   PRODUCT CARDS
   ============================================ */
.limited-stock-card {
    flex: 0 0 auto;
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.limited-stock-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.3);
}

/* Urgency badge */
.limited-stock-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: linear-gradient(135deg, #ff6b6b 0%, #d32f2f 100%);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5);
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 2px 10px rgba(255, 107, 107, 0.5); }
    50% { box-shadow: 0 2px 20px rgba(255, 107, 107, 0.8); }
}

/* Deal badge */
.limited-stock-deal-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #00c853 0%, #00a843 100%);
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    z-index: 5;
    box-shadow: 0 2px 10px rgba(0, 200, 83, 0.4);
}

/* Image container */
.limited-stock-image-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
}

.limited-stock-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
    padding: 10px;
}

.limited-stock-card:hover .limited-stock-image-container img {
    transform: scale(1.08);
}

/* Quick action overlay */
.limited-stock-quick-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 100%);
    padding: 30px 15px 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.limited-stock-card:hover .limited-stock-quick-actions {
    opacity: 1;
}

.limited-stock-quick-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.limited-stock-quick-btn:hover {
    background: #ff6b6b;
    color: #ffffff;
    transform: scale(1.15);
}

/* Card body */
.limited-stock-card-body {
    padding: 18px;
}

.limited-stock-category {
    color: #888;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.limited-stock-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.limited-stock-rating {
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.limited-stock-rating .text-warning {
    color: #ffc107 !important;
}

.limited-stock-rating .text-muted {
    font-size: 0.75rem;
}

/* Price section */
.limited-stock-price-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.limited-stock-current-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: #ff6b6b;
}

.limited-stock-original-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
}

/* Add to cart button */
.limited-stock-add-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.limited-stock-add-btn:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #d32f2f 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.limited-stock-add-btn:active {
    transform: translateY(0);
}


/* ============================================
   EMPTY STATE
   ============================================ */
.limited-stock-empty {
    text-align: center;
    padding: 60px 20px;
    color: #a0a0a0;
}

.limited-stock-empty i {
    font-size: 4rem;
    color: #ff6b6b;
    opacity: 0.5;
    margin-bottom: 20px;
}

.limited-stock-empty h4 {
    color: #ffffff;
    margin-bottom: 10px;
}

.limited-stock-empty p {
    font-size: 0.95rem;
}


/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 992px) {
    .limited-stock-wrapper {
        padding: 0 50px;
    }
    
    .limited-stock-card {
        width: 240px;
    }
    
    .limited-stock-arrow {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 768px) {
    .limited-stock-section {
        padding: 40px 0;
    }
    
    .limited-stock-header h2 {
        font-size: 1.6rem;
    }
    
    .limited-stock-wrapper {
        padding: 0 45px;
    }
    
    .limited-stock-card {
        width: 220px;
    }
    
    .limited-stock-image-container {
        height: 170px;
    }
    
    .limited-stock-arrow {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .limited-stock-arrow-left {
        left: 5px;
    }
    
    .limited-stock-arrow-right {
        right: 5px;
    }
}

@media (max-width: 576px) {
    .limited-stock-header h2 {
        font-size: 1.3rem;
        letter-spacing: 1px;
    }
    
    .limited-stock-subtitle {
        font-size: 0.85rem;
    }
    
    .limited-stock-wrapper {
        padding: 0 40px;
    }
    
    .limited-stock-scroll-container {
        gap: 16px;
        padding: 15px 5px;
    }
    
    .limited-stock-card {
        width: 200px;
    }
    
    .limited-stock-image-container {
        height: 150px;
    }
    
    .limited-stock-card-body {
        padding: 14px;
    }
    
    .limited-stock-name {
        font-size: 0.9rem;
    }
    
    .limited-stock-current-price {
        font-size: 1.1rem;
    }
    
    .limited-stock-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
}