/* ============================================
   BusiBell - List Pages Animation Library
   Minimal, Elegant, Interactive
   Colors: Orange (#F06927), Black, White, Grey
   ============================================ */

/* ===== Scroll Reveal Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* ===== Floating Animations ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes floatRotate {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

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

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 5px 20px rgba(240, 105, 39, 0.2);
    }
    50% { 
        box-shadow: 0 8px 35px rgba(240, 105, 39, 0.4);
    }
}

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

@keyframes hexRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Page Header Enhancements ===== */
.page-header {
    position: relative;
    overflow: hidden;
}

/* Floating hexagon decorations */
.page-header::before {
    content: '';
    position: absolute;
    top: -60px;
    right: 5%;
    width: 200px;
    height: 230px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: floatRotate 8s ease-in-out infinite;
    z-index: 1;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: 8%;
    width: 150px;
    height: 173px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: floatRotate 10s ease-in-out infinite reverse;
    z-index: 1;
}

/* Additional hexagon elements via CSS - needs .header-hexagons wrapper in HTML */
.header-hex {
    position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: 1;
    pointer-events: none;
}

.header-hex-1 {
    width: 80px;
    height: 92px;
    background: linear-gradient(135deg, rgba(240, 105, 39, 0.3) 0%, rgba(240, 105, 39, 0.1) 100%);
    top: 20%;
    left: 15%;
    animation: float 5s ease-in-out infinite, pulse 3s ease-in-out infinite;
}

.header-hex-2 {
    width: 120px;
    height: 138px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.03) 100%);
    top: 60%;
    right: 12%;
    animation: floatRotate 7s ease-in-out infinite;
}

.header-hex-3 {
    width: 60px;
    height: 69px;
    background: linear-gradient(135deg, rgba(240, 105, 39, 0.25) 0%, rgba(240, 105, 39, 0.05) 100%);
    bottom: 25%;
    left: 25%;
    animation: float 4s ease-in-out 1s infinite;
}

.header-hex-4 {
    width: 100px;
    height: 115px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    top: 10%;
    right: 25%;
    animation: floatRotate 9s ease-in-out 0.5s infinite reverse;
}

.header-hex-5 {
    width: 50px;
    height: 58px;
    background: linear-gradient(135deg, rgba(240, 105, 39, 0.35) 0%, rgba(240, 105, 39, 0.1) 100%);
    bottom: 15%;
    right: 35%;
    animation: float 6s ease-in-out 2s infinite;
}

.header-hex-6 {
    width: 70px;
    height: 81px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
    top: 45%;
    left: 5%;
    animation: floatRotate 8s ease-in-out 1.5s infinite;
}

/* Glowing hexagon ring effect */
.header-hex-glow {
    width: 250px;
    height: 288px;
    background: transparent;
    border: 2px solid rgba(240, 105, 39, 0.2);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: pulseGlow 4s ease-in-out infinite, hexRotateSlow 20s linear infinite;
    z-index: 0;
}

.header-hex-glow-2 {
    width: 320px;
    height: 369px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: pulseGlow 5s ease-in-out 1s infinite, hexRotateSlow 25s linear infinite reverse;
    z-index: 0;
}

@keyframes hexRotateSlow {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Particle-like small hexagons */
.header-hex-particle {
    width: 20px;
    height: 23px;
    background: rgba(240, 105, 39, 0.5);
    position: absolute;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: floatParticle 8s ease-in-out infinite;
}

.header-hex-particle:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.header-hex-particle:nth-child(2) { top: 70%; left: 20%; animation-delay: 1s; }
.header-hex-particle:nth-child(3) { top: 30%; right: 15%; animation-delay: 2s; }
.header-hex-particle:nth-child(4) { bottom: 20%; right: 10%; animation-delay: 3s; }
.header-hex-particle:nth-child(5) { top: 50%; left: 35%; animation-delay: 4s; }

@keyframes floatParticle {
    0%, 100% { 
        transform: translateY(0) scale(1);
        opacity: 0.5;
    }
    50% { 
        transform: translateY(-20px) scale(1.2);
        opacity: 0.8;
    }
}

.page-header h1 {
    animation: fadeInUp 0.8s ease-out forwards;
    position: relative;
    z-index: 10;
}

.page-header p {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    animation-fill-mode: forwards;
    position: relative;
    z-index: 10;
}

.page-header .hex-icon-lg {
    animation: scaleIn 0.6s ease-out forwards, float 3s ease-in-out 0.6s infinite;
    position: relative;
    z-index: 10;
}

.page-header .container {
    position: relative;
    z-index: 10;
}

/* ===== Card Grid Stagger Animation ===== */
.list-grid {
    perspective: 1000px;
}

.list-grid > * {
    opacity: 0;
    animation: slideUp 0.6s ease-out forwards;
}

.list-grid > *:nth-child(1) { animation-delay: 0.1s; }
.list-grid > *:nth-child(2) { animation-delay: 0.15s; }
.list-grid > *:nth-child(3) { animation-delay: 0.2s; }
.list-grid > *:nth-child(4) { animation-delay: 0.25s; }
.list-grid > *:nth-child(5) { animation-delay: 0.3s; }
.list-grid > *:nth-child(6) { animation-delay: 0.35s; }
.list-grid > *:nth-child(7) { animation-delay: 0.4s; }
.list-grid > *:nth-child(8) { animation-delay: 0.45s; }
.list-grid > *:nth-child(9) { animation-delay: 0.5s; }
.list-grid > *:nth-child(10) { animation-delay: 0.55s; }
.list-grid > *:nth-child(11) { animation-delay: 0.6s; }
.list-grid > *:nth-child(12) { animation-delay: 0.65s; }

/* ===== Enhanced Card Styles ===== */
.animated-card {
    position: relative;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

/* Hexagon decoration */
.animated-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 100px;
    height: 115px;
    background: linear-gradient(135deg, rgba(240, 105, 39, 0.15), rgba(240, 105, 39, 0.05));
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: 1;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    opacity: 0;
    transform: rotate(-15deg) scale(0.8);
}

/* Glow effect */
.animated-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(240, 105, 39, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 2;
}

.animated-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 8px 25px rgba(240, 105, 39, 0.15);
}

.animated-card:hover::before {
    opacity: 1;
    top: 15px;
    right: 15px;
    transform: rotate(10deg) scale(1);
}

.animated-card:hover::after {
    opacity: 1;
}

/* ===== Card Image Effects ===== */
.card-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

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

/* Image overlay gradient */
.card-image-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.animated-card:hover .card-image-wrapper::after {
    opacity: 1;
}

/* Shimmer loading effect */
.card-image-wrapper.loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e8e8e8 50%, 
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ===== Badge Animations ===== */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #F06927, #d55a1f);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 25px;
    z-index: 10;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 15px rgba(240, 105, 39, 0.4);
}

.card-badge.badge-featured {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #1a1a1a;
}

.card-badge.badge-new {
    background: linear-gradient(135deg, #10B981, #059669);
}

.card-badge.badge-hot {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    animation: pulseGlow 1.5s ease-in-out infinite;
}

/* Hexagonal badge */
.hex-badge-float {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 50px;
    height: 58px;
    background: linear-gradient(135deg, #F06927, #d55a1f);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 5px 20px rgba(240, 105, 39, 0.4);
}

.hex-badge-float i {
    color: #fff;
    font-size: 1.2rem;
}

/* ===== Card Content Animations ===== */
.card-content {
    padding: 24px;
    position: relative;
    z-index: 3;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.animated-card:hover .card-title {
    color: #F06927;
}

.card-title a {
    color: inherit;
    text-decoration: none;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

.card-meta i {
    color: #F06927;
    transition: transform 0.3s ease;
}

.animated-card:hover .card-meta i {
    transform: scale(1.2);
}

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

/* ===== Interactive Tags ===== */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.card-tag {
    padding: 5px 12px;
    background: #f5f5f5;
    color: #666;
    font-size: 0.8rem;
    border-radius: 15px;
    transition: all 0.3s ease;
    cursor: default;
}

.card-tag:hover {
    background: #F06927;
    color: #fff;
    transform: translateY(-2px);
}

/* ===== Card Footer with Stats ===== */
.card-footer-stats {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    margin-top: 16px;
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #888;
    font-size: 0.85rem;
}

.stat-item i {
    color: #F06927;
    font-size: 0.9rem;
}

/* ===== Animated Buttons ===== */
.btn-animated {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #F06927, #d55a1f);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    text-decoration: none;
}

.btn-animated::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.btn-animated:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(240, 105, 39, 0.4);
    color: #fff;
}

.btn-animated:hover::before {
    left: 100%;
}

.btn-animated i {
    transition: transform 0.3s ease;
}

.btn-animated:hover i {
    transform: translateX(-3px);
}

/* Secondary button */
.btn-animated-outline {
    background: transparent;
    border: 2px solid #F06927;
    color: #F06927;
}

.btn-animated-outline:hover {
    background: #F06927;
    color: #fff;
}

/* ===== Rating Stars Animation ===== */
.rating-stars {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rating-stars i {
    color: #FFD700;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.rating-stars i:hover {
    transform: scale(1.3) rotate(10deg);
}

.rating-value {
    background: #1a1a1a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-right: 8px;
}

/* ===== Price Tag Animation ===== */
.price-tag {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

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

.price-current {
    color: #F06927;
    font-size: 1.4rem;
    font-weight: 800;
    transition: transform 0.3s ease;
}

.animated-card:hover .price-current {
    transform: scale(1.1);
}

.price-unit {
    color: #888;
    font-size: 0.8rem;
    font-weight: normal;
}

/* ===== Filter Sidebar Animations ===== */
.filters-card {
    animation: fadeInLeft 0.6s ease-out forwards;
}

.filter-group {
    position: relative;
    overflow: hidden;
}

.filter-item {
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 4px 0;
    padding: 12px;
}

.filter-item:hover {
    background: rgba(240, 105, 39, 0.05);
    transform: translateX(5px);
}

.filter-item:hover .filter-dot {
    transform: scale(1.5);
}

.filter-dot {
    transition: transform 0.3s ease;
}

/* Animated checkbox */
.filter-checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.filter-checkbox-wrapper input[type="checkbox"]:checked {
    background: #F06927;
    border-color: #F06927;
}

.filter-checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 12px;
    font-weight: bold;
}

/* ===== Pagination Animations ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.page-link-animated {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-link-animated:hover {
    background: #F06927;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(240, 105, 39, 0.3);
}

.page-link-animated.active {
    background: #1a1a1a;
    color: #fff;
}

/* ===== Empty State Animation ===== */
.empty-state {
    text-align: center;
    padding: 80px 40px;
    animation: fadeInUp 0.8s ease-out forwards;
}

.empty-state-icon {
    width: 120px;
    height: 138px;
    background: linear-gradient(135deg, #f5f5f5, #eee);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    animation: float 3s ease-in-out infinite;
}

.empty-state-icon i {
    font-size: 3rem;
    color: #ccc;
}

.empty-state h3 {
    color: #1a1a1a;
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.empty-state p {
    color: #888;
    font-size: 1rem;
}

/* ===== Loading Skeleton ===== */
.skeleton-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.skeleton-image {
    height: 220px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-content {
    padding: 24px;
}

.skeleton-line {
    height: 16px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-line.short {
    width: 60%;
}

.skeleton-line.medium {
    width: 80%;
}

/* ===== Scroll Progress Indicator ===== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, #F06927, #d55a1f);
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ===== Floating Action Button ===== */
.fab-scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #F06927, #d55a1f);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 8px 25px rgba(240, 105, 39, 0.4);
    z-index: 1000;
}

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

.fab-scroll-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 35px rgba(240, 105, 39, 0.5);
}

.fab-scroll-top i {
    font-size: 1.2rem;
}

/* ===== Counter Animation ===== */
.counter-animate {
    font-weight: 700;
    color: #F06927;
}

/* ===== Tooltip ===== */
.tooltip-hover {
    position: relative;
}

.tooltip-hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    padding: 8px 14px;
    background: #1a1a1a;
    color: #fff;
    font-size: 0.8rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tooltip-hover:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 991px) {
    .filters-card {
        position: relative;
        top: 0;
        margin-bottom: 30px;
    }
    
    .animated-card:hover {
        transform: translateY(-8px);
    }
}

@media (max-width: 576px) {
    .animated-card {
        border-radius: 16px;
    }
    
    .animated-card:hover {
        transform: translateY(-5px) scale(1.01);
    }
    
    .card-image-wrapper {
        height: 180px;
    }
    
    .card-content {
        padding: 18px;
    }
    
    .card-title {
        font-size: 1.1rem;
    }
    
    .btn-animated {
        width: 100%;
        justify-content: center;
    }
    
    .fab-scroll-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        left: 20px;
    }
    
    .page-header::before,
    .page-header::after {
        display: none;
    }
}

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