/* /assets/css/featured.css */
/* Featured Businesses Section Styles */

/* ============================================= */
/* FEATURED SECTION CONTAINER */
/* ============================================= */
.featured-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.05) 0%, rgba(255, 165, 0, 0.05) 100%);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.featured-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    z-index: 1;
}

/* ============================================= */
/* FEATURED HEADER */
/* ============================================= */
.featured-header {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.featured-header h2 {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.featured-icon {
    font-size: 1.8rem;
    animation: starTwinkle 2s ease-in-out infinite;
}

@keyframes starTwinkle {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.featured-location {
    font-size: 1rem;
    background: rgba(255, 215, 0, 0.1);
    color: #996515;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.featured-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin: 0;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

/* ============================================= */
/* FEATURED GRID (DESKTOP) */
/* ============================================= */
.featured-grid.desktop-featured {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 1rem;
}

/* Hide mobile carousel on desktop */
@media (min-width: 1025px) {
    .featured-carousel.mobile-featured {
        display: none;
    }
}

/* ============================================= */
/* FEATURED CARD STYLES */
/* ============================================= */
.featured-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    height: 100%;
}

.featured-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

/* Featured Badge */
.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.featured-badge::after {
    content: '★';
    font-size: 0.9rem;
    animation: starSpin 3s linear infinite;
}

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

/* Featured Expiry Notice */
.featured-expiry {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(220, 53, 69, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

/* Featured Card Header */
.featured-card-header {
    display: flex;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem;
    position: relative;
    z-index: 1;
}

.featured-card-header .seller-profile-pic {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.featured-card-header .seller-info h5 {
    font-weight: 700;
    margin: 0;
    color: var(--text-dark);
    font-size: 1rem;
    line-height: 1.3;
}

.featured-card-header .seller-info p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Featured Image */
.featured-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.featured-image .no-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.featured-image .placeholder-icon {
    font-size: 3.5rem;
    color: #FFD700;
    opacity: 0.5;
    margin-bottom: 0.5rem;
}

.featured-image .placeholder-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
    text-align: center;
}

/* Featured Content */
.featured-content {
    padding: 1.5rem;
    color:#111111;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

.featured-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9rem;
}

.featured-meta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
    font-size: 0.85rem;
}

.featured-location,
.featured-address {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-location::before {
    content: "📍";
}

.featured-address::before {
    content: "🏠";
}

/* ============================================= */
/* FEATURED CAROUSEL (MOBILE) */
/* ============================================= */
.featured-carousel.mobile-featured {
    display: none;
    position: relative;
    margin: 0 auto;
    max-width: 100%;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .featured-grid.desktop-featured {
        display: none;
    }
    
    .featured-carousel.mobile-featured {
        display: block;
    }
}

.carousel-container {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 100%;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 10px;
    box-sizing: border-box;
}

/* Carousel Navigation */
.carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0 1rem;
}

.carousel-prev,
.carousel-next {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
}

.carousel-prev:hover,
.carousel-next:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 165, 0, 0.4);
}

.carousel-prev:active,
.carousel-next:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 215, 0, 0.3);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.carousel-dot:hover {
    background: rgba(255, 215, 0, 0.6);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: #FFD700;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ============================================= */
/* FEATURED ITEMS IN REGULAR LISTINGS */
/* ============================================= */
.featured-item {
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 249, 229, 0.95) 100%) !important;
}

.featured-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF8C00);
    border-radius: 2px 2px 0 0;
}

.featured-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 215, 0, 0.05) 100%);
    pointer-events: none;
    border-radius: 16px;
}

.featured-item:hover {
    border-color: #FFD700 !important;
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.15) !important;
}

.featured-item-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 800;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(255, 165, 0, 0.3);
}

.featured-item-badge::after {
    content: '★';
    font-size: 0.8rem;
}

/* ============================================= */
/* FEATURED COUNT BADGE */
/* ============================================= */
.featured-count {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
    color: #996515;
    padding: 6px 14px;
    border-radius: 15px;
    font-weight: 700;
    margin-left: 12px;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.featured-count::before {
    content: '⭐';
    font-size: 0.9rem;
}

/* ============================================= */
/* RESPONSIVE DESIGN */
/* ============================================= */
@media (max-width: 1200px) {
    .featured-grid.desktop-featured {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .featured-section {
        padding: 1.5rem;
    }
    
    .featured-header h2 {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .featured-section {
        padding: 1.5rem 1rem;
        border-radius: 16px;
        margin-bottom: 1.5rem;
    }
    
    .featured-header {
        margin-bottom: 1.5rem;
    }
    
    .featured-header h2 {
        font-size: 1.5rem;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .featured-location {
        margin-left: 0;
        font-size: 0.9rem;
    }
    
    .featured-subtitle {
        font-size: 0.9rem;
        padding: 0 0.5rem;
    }
    
    .featured-badge {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.7rem;
    }
    
    .featured-expiry {
        top: 12px;
        left: 12px;
        padding: 4px 10px;
        font-size: 0.65rem;
    }
    
    .featured-card-header {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    
    .featured-card-header .seller-profile-pic {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .featured-image {
        height: 160px;
    }
    
    .featured-content {
        padding: 1.25rem;
    }
    
    .featured-title {
        font-size: 1.1rem;
    }
    
    .featured-description {
        font-size: 0.85rem;
        -webkit-line-clamp: 2;
    }
    
    .carousel-nav {
        margin-top: 1.25rem;
        gap: 0.75rem;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .featured-section {
        padding: 1.25rem 0.75rem;
        border-radius: 14px;
    }
    
    .featured-header h2 {
        font-size: 1.3rem;
    }
    
    .featured-location {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }
    
    .featured-icon {
        font-size: 1.3rem;
    }
    
    .featured-card {
        border-width: 1.5px;
    }
    
    .featured-card-header {
        padding: 1rem 1rem 0.75rem;
    }
    
    .featured-image {
        height: 140px;
    }
    
    .featured-content {
        padding: 1rem;
    }
    
    .featured-title {
        font-size: 1rem;
    }
    
    .featured-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
        padding-top: 0.75rem;
        margin-top: 0.75rem;
    }
    
    .carousel-nav {
        margin-top: 1rem;
        padding: 0 0.5rem;
    }
    
    .carousel-slide {
        padding: 0 8px;
    }
    
    .featured-item-badge {
        padding: 4px 10px;
        font-size: 0.65rem;
    }
}

@media (max-width: 360px) {
    .featured-section {
        padding: 1rem 0.5rem;
    }
    
    .featured-header h2 {
        font-size: 1.2rem;
    }
    
    .featured-subtitle {
        font-size: 0.85rem;
    }
    
    .featured-card-header .seller-profile-pic {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
        margin-right: 8px;
    }
    
    .featured-card-header .seller-info h5 {
        font-size: 0.9rem;
    }
    
    .featured-card-header .seller-info p {
        font-size: 0.8rem;
    }
    
    .featured-image {
        height: 130px;
    }
    
    .carousel-prev,
    .carousel-next {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

/* ============================================= */
/* ANIMATIONS */
/* ============================================= */
@keyframes featuredSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-section {
    animation: featuredSlideIn 0.6s ease-out;
}

/* Individual card animations */
.featured-card {
    animation: featuredCardAppear 0.4s ease-out;
    animation-fill-mode: both;
}

.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }
.featured-card:nth-child(4) { animation-delay: 0.4s; }
.featured-card:nth-child(5) { animation-delay: 0.5s; }
.featured-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes featuredCardAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================= */
/* LOADING STATES */
/* ============================================= */
.featured-section.loading {
    opacity: 0.7;
    pointer-events: none;
}

.featured-section.loading .featured-card {
    animation: shimmer 2s infinite linear;
    background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
    background-size: 200% 100%;
}

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

/* ============================================= */
/* ACCESSIBILITY */
/* ============================================= */
.featured-card:focus,
.carousel-prev:focus,
.carousel-next:focus,
.carousel-dot:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .featured-section,
    .featured-card,
    .featured-card:hover,
    .featured-badge::after,
    .featured-image img,
    .carousel-container,
    .carousel-prev,
    .carousel-next,
    .carousel-dot {
        animation: none !important;
        transition: none !important;
    }
    
    .featured-card:hover {
        transform: none;
    }
    
    .featured-card:hover .featured-image img {
        transform: none;
    }
}

/* ============================================= */
/* DARK MODE SUPPORT */
/* ============================================= */
@media (prefers-color-scheme: dark) {
    .featured-section {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 165, 0, 0.1) 100%);
        border-color: rgba(255, 215, 0, 0.3);
    }
    
    .featured-card {
        background: rgba(30, 30, 30, 0.95);
        border-color: rgba(255, 215, 0, 0.4);
    }
    
    .featured-item {
        background: linear-gradient(135deg, rgba(30, 30, 30, 0.95) 0%, rgba(50, 40, 0, 0.95) 100%) !important;
    }
    
    .featured-image .no-image-placeholder {
        background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    }
    
    .featured-image .placeholder-text {
        color: #a0aec0;
    }
    
    .featured-meta {
        border-top-color: rgba(255, 215, 0, 0.3);
    }
    
    .featured-count {
        background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 165, 0, 0.15) 100%);
        border-color: rgba(255, 215, 0, 0.4);
        color: #FFD700;
    }
}

/* ============================================= */
/* TEXT COLOR FIXES FOR DARK BACKGROUND */
/* ============================================= */
.featured-card-header .seller-info h5,
.featured-title,
.featured-description,
.featured-location,
.featured-address {
    color: #111111 !important; /* White text for dark background */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Specific adjustments */
.featured-card-header .seller-info h5 {
    color: #ffffff !important;
    font-weight: 700;
}

.featured-title {
    color: #1d1b1b !important;
    font-weight: 800;
}

.featured-description {
    color: rgba(17, 3, 3, 0.9) !important; /* Slightly transparent white */
}

.featured-location,
.featured-address {
    color: rgba(14, 13, 13, 0.8) !important; /* More transparent for secondary info */
}

/* Adjust badge colors for better contrast */
.featured-badge {
    color: #333333 !important; /* Keep dark text for gold badge */
}

/* Adjust placeholder text color */
.featured-image .placeholder-text {
    color: rgba(255, 255, 255, 0.7) !important;
}