/**
 * Single Shop Mall - Animations & Shelf/Slider Styles
 * Flipkart/Meesho Style Effects
 */

/* ===== Announcement Bar (Sliding Text) ===== */
.announcement-bar {
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    overflow: hidden;
    padding: 0.4rem 0;
    position: relative;
}

.announcement-slider {
    display: flex;
    animation: scrollText 40s linear infinite;
    white-space: nowrap;
}

.announcement-slider span {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.announcement-slider span i {
    font-size: 0.85rem;
}

@keyframes scrollText {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.announcement-bar:hover .announcement-slider {
    animation-play-state: paused;
}

/* ===== Product Shelf / Horizontal Scroll ===== */
.product-shelf {
    position: relative;
    overflow: hidden;
}

.product-shelf-inner {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 0.5rem 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.product-shelf-inner::-webkit-scrollbar { display: none; }

.product-shelf .shelf-item {
    flex: 0 0 180px;
    min-width: 180px;
}

@media (max-width: 576px) {
    .product-shelf .shelf-item {
        flex: 0 0 150px;
        min-width: 150px;
    }
}

/* Shelf Navigation Arrows */
.shelf-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s;
    color: var(--dark);
}

.shelf-nav:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.shelf-nav-left { left: 0; }
.shelf-nav-right { right: 0; }

/* ===== Deal of the Day / Flash Sale Banner ===== */
.deal-banner {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.deal-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(37,99,235,0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.deal-banner .deal-title {
    color: #fff;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.deal-banner .deal-subtitle {
    color: var(--gray-300);
    font-size: 0.82rem;
}

.deal-banner .deal-timer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.deal-timer .timer-box {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 0.4rem 0.6rem;
    text-align: center;
    min-width: 45px;
}

.deal-timer .timer-box .num {
    display: block;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.deal-timer .timer-box .label {
    display: block;
    color: var(--gray-400);
    font-size: 0.6rem;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ===== Product Highlight / Pulse Animation ===== */
.product-card.highlight {
    animation: highlightPulse 2s ease-in-out infinite;
    border-color: var(--primary);
}

@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.2); }
    50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, 0); }
}

/* ===== Sale Badge (simplified - no flash) ===== */

/* ===== Trending / Hot Label ===== */
.trending-label {
    position: absolute;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #ef4444, #f97316);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 10px 3px 6px;
    border-radius: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 3;
}

.trending-label::after {
    content: '🔥';
    margin-left: 3px;
}

/* ===== New Arrival Ribbon ===== */
.new-ribbon {
    position: absolute;
    top: 12px;
    left: -30px;
    background: var(--primary);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 30px;
    transform: rotate(-45deg);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
}

/* ===== Scroll Reveal Animation ===== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Offer Strip / Marquee ===== */
.offer-strip {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
}

.offer-strip-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    background: #f59e0b;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.8rem;
}

.offer-strip-text {
    flex: 1;
    overflow: hidden;
}

.offer-strip-text .marquee {
    display: inline-block;
    animation: marquee 20s linear infinite;
    white-space: nowrap;
    font-size: 0.8rem;
    font-weight: 500;
    color: #92400e;
}

@keyframes marquee {
    0% { transform: translateX(50%); }
    100% { transform: translateX(-100%); }
}

.offer-strip:hover .marquee {
    animation-play-state: paused;
}

/* ===== Category Shelf (Circle Icons) ===== */
.category-shelf {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding: 0.5rem 0 1rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.category-shelf::-webkit-scrollbar { display: none; }

.category-shelf-item {
    flex: 0 0 auto;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.category-shelf-item:hover { transform: translateY(-3px); }

.category-shelf-item .cat-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    border: 2px solid var(--gray-200);
    overflow: hidden;
    margin: 0 auto 0.4rem;
    transition: var(--transition);
}

.category-shelf-item:hover .cat-icon {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.category-shelf-item .cat-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-shelf-item .cat-name {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-600);
}

.category-shelf-item.active-cat .cat-icon {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37,99,235,0.2);
}

.category-shelf-item.active-cat .cat-name {
    color: #2563eb;
    font-weight: 600;
}

/* ===== Countdown Timer ===== */
.countdown {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.countdown-item {
    background: var(--dark);
    color: #fff;
    border-radius: 4px;
    padding: 0.2rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.countdown-sep {
    color: var(--dark);
    font-weight: 700;
}

/* ===== Floating Labels on Products ===== */
.float-label {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(0,0,0,0.75);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 8px;
    border-radius: 3px;
    font-weight: 500;
    z-index: 2;
}

/* ===== Skeleton Loading ===== */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-img { width: 100%; aspect-ratio: 1; }
.skeleton-text { height: 12px; margin-bottom: 8px; }
.skeleton-text-sm { height: 10px; width: 60%; }

/* ===== Fade In Up Animation ===== */
.fade-in-up {
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Bounce on Add to Cart ===== */
.cart-bounce {
    animation: cartBounce 0.5s ease;
}

@keyframes cartBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ===== Image Zoom on Hover ===== */
.img-zoom-container {
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.img-zoom-container img {
    transition: transform 0.4s ease;
}

.img-zoom-container:hover img {
    transform: scale(1.08);
}
