/* ============================================
   ক্যাটাগরি পেজ স্টাইল - বগুড়া বাজার থিম (আপডেটেড ও প্রিমিয়াম)
============================================ */

/* ========== হিরো সেকশন ========== */
.categories-hero {
    background: linear-gradient(135deg, #024823 0%, #017e3d 50%, #00632f 100%);
    padding: 60px 24px;
    border-radius: 24px;
    margin-top: 24px;
    margin-bottom: 40px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(1, 126, 61, 0.15);
}

/* ব্যাকগ্রাউন্ড গ্লো ইফেক্ট */
.categories-hero .hero-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.categories-hero .hero-glow-1 {
    width: 300px;
    height: 300px;
    background: #ffd700;
    top: -100px;
    right: -50px;
}

.categories-hero .hero-glow-2 {
    width: 250px;
    height: 250px;
    background: #00ff87;
    bottom: -80px;
    left: -50px;
}

/* গ্রিড ওভারলে প্যাটার্ন */
.categories-hero .hero-grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 0;
    pointer-events: none;
}

.categories-hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* প্রিমিয়াম ব্যাজ */
.categories-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    animation: pulseGlow 3s infinite;
}

.categories-hero-badge i {
    color: #ffd700;
}

.categories-hero-title {
    font-size: 38px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.categories-hero-title span {
    color: #ffd700;
    background: linear-gradient(120deg, #ffe066 0%, #facc15 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    position: relative;
}

.categories-hero-title span::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ffd700, transparent);
    border-radius: 2px;
}

.categories-hero-subtitle {
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 650px;
    margin: 0 auto 30px;
}

/* হিরো স্ট্যাটস পিল */
.categories-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 14px;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease;
}

.stat-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.stat-pill i {
    font-size: 16px;
    color: #ffd700;
}

.stat-pill span {
    font-size: 14px;
    font-weight: 500;
}

.stat-pill strong {
    color: #fff;
    font-weight: 700;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 215, 0, 0.05);
        border-color: rgba(255, 255, 255, 0.15);
    }
    50% {
        box-shadow: 0 4px 25px rgba(255, 215, 0, 0.15);
        border-color: rgba(255, 215, 0, 0.4);
    }
}

/* ========== টপ বার ========== */
.categories-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 30px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(229, 231, 235, 0.7);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.02);
}

.categories-top-bar .total-count {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #4b5563;
}

.categories-top-bar .total-count .count-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #e8f5e9;
    color: #00A65A;
    border-radius: 8px;
    font-size: 12px;
}

.categories-top-bar .total-count strong {
    color: #00A65A;
    font-weight: 700;
}

.categories-top-bar .sort-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
}

.categories-top-bar .sort-label {
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 6px;
}

.categories-top-bar .select-custom-wrapper {
    position: relative;
    display: inline-block;
}

.categories-top-bar .select-custom-wrapper select {
    padding: 8px 36px 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    background: white;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.3s ease;
}

.categories-top-bar .select-custom-wrapper select:hover {
    border-color: #00A65A;
}

.categories-top-bar .select-custom-wrapper select:focus {
    border-color: #00A65A;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 166, 90, 0.15);
}

/* ========== ক্যাটাগরি গ্রিড ও কার্ড ========== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(229, 231, 235, 0.7);
    position: relative;
}

/* FEATURED CATEGORY */
.category-card.featured-card {
    border-color: rgba(255, 215, 0, 0.4);
    background: linear-gradient(180deg, #ffffff 0%, #fffdf8 100%);
}

.category-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: #00A65A;
}

.category-card.featured-card:hover {
    border-color: #ffd700;
    box-shadow: 0 12px 30px rgba(255, 215, 0, 0.15);
}

/* FEATURED BADGE */
.category-card .featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: linear-gradient(135deg, #ffd700, #ffa500);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(255, 165, 0, 0.3);
    z-index: 5;
    animation: rotateStar 6s linear infinite;
}

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

/* ========== ব্যানার সহ ক্যাটাগরি ========== */
.category-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f8fafc;
}

.category-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.category-card:hover .category-banner-img {
    transform: scale(1.06);
}

.category-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    top: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 24px 20px;
    transition: all 0.4s ease;
}

.category-card:hover .category-banner-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, rgba(0, 0, 0, 0.15) 100%);
}

.category-banner-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    z-index: 2;
}

/* আইকন কন্টেইনার */
.category-card .category-icon-container {
    margin-bottom: 12px;
    transition: all 0.4s ease;
}

.category-card .category-icon-small {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    background: white;
    padding: 6px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.category-card .fallback-icon-small {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #00A65A;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 166, 90, 0.2);
}

.category-card.featured-card .fallback-icon-small {
    background: #ffd700;
    color: #1e1e2e;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.3);
}

.category-name-banner {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    transition: color 0.3s ease;
}

.category-count-banner {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    border-radius: 30px;
    font-weight: 500;
}

/* ========== ব্যানার ছাড়া ক্যাটাগরি ========== */
.category-no-banner {
    padding: 36px 20px;
    text-align: center;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.4s ease;
}

.category-no-banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.category-no-banner .category-icon-container {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #f8fafc;
    padding: 4px;
    margin-bottom: 16px;
    transition: all 0.4s ease;
    border: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.category-no-banner .category-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    transition: all 0.4s ease;
}

.category-no-banner .fallback-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #00A65A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-no-banner .fallback-icon i {
    font-size: 36px;
}

.category-card:hover .category-no-banner .category-icon-container {
    border-color: #00A65A;
    transform: scale(1.05);
}

.category-card.featured-card:hover .category-no-banner .category-icon-container {
    border-color: #ffd700;
}

.category-no-banner .category-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e1e2e;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.category-card:hover .category-no-banner .category-name {
    color: #00A65A;
}

/* পণ্য কাউন্ট ব্যাজ (ব্যানার ছাড়া) */
.category-no-banner .category-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #64748b;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.category-card:hover .category-no-banner .category-count-badge {
    background: #e8f5e9;
    color: #00A65A;
}

/* রাইট অ্যারো বাটন (Hover) */
.category-card .category-card-arrow {
    position: absolute;
    bottom: -15px;
    background: #00A65A;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 166, 90, 0.3);
    z-index: 4;
}

.category-card.featured-card .category-card-arrow {
    background: #ffd700;
    color: #1e1e2e;
    box-shadow: 0 4px 10px rgba(255, 215, 0, 0.4);
}

.category-card:hover .category-card-arrow {
    opacity: 1;
    bottom: 12px;
    transform: translateY(0);
}

/* ========== লোড মোর ========== */
.load-more-container {
    text-align: center;
    margin-top: 20px;
}

.load-more-btn {
    padding: 12px 32px;
    background: white;
    border: 2px solid #00A65A;
    border-radius: 30px;
    color: #00A65A;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.load-more-btn:hover {
    background: #00A65A;
    color: white;
    transform: translateY(-2px);
}

/* ========== খালি স্টেট ========== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(229, 231, 235, 0.6);
    max-width: 500px;
    margin: 40px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

.empty-state .empty-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: #1e1e2e;
    font-weight: 700;
    margin-bottom: 10px;
}

.empty-state p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

/* ============================================
   রেসপন্সিভ
============================================ */

/* ট্যাবলেট (1024px এর নিচে) */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* মোবাইল (768px এর নিচে) */
@media (max-width: 768px) {
    .categories-hero {
        padding: 40px 20px;
        border-radius: 20px;
        margin-top: 12px;
        margin-bottom: 24px;
    }

    .categories-hero-title {
        font-size: 28px;
    }

    .categories-hero-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }

    .categories-hero-badge {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 16px;
    }

    .categories-hero-stats {
        gap: 12px;
    }

    .stat-pill {
        padding: 8px 16px;
        border-radius: 10px;
    }

    .stat-pill span {
        font-size: 12px;
    }

    .categories-top-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 16px;
    }

    .categories-top-bar .sort-wrapper {
        justify-content: space-between;
    }

    .categories-top-bar .select-custom-wrapper {
        flex-grow: 1;
    }

    .categories-top-bar .select-custom-wrapper select {
        width: 100%;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .category-banner {
        aspect-ratio: 4 / 3;
    }

    .category-banner-overlay {
        padding: 20px 16px 16px;
    }

    .category-name-banner {
        font-size: 15px;
    }

    .category-card .category-icon-small {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        padding: 4px;
    }

    .category-card .fallback-icon-small {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 14px;
    }

    .category-no-banner {
        padding: 24px 16px;
        min-height: 180px;
    }

    .category-no-banner .category-icon-container {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }

    .category-no-banner .fallback-icon i {
        font-size: 28px;
    }

    .category-no-banner .category-name {
        font-size: 14px;
    }

    .category-no-banner .category-count-badge {
        padding: 4px 10px;
        font-size: 11px;
    }
}

/* ছোট মোবাইল (480px এর নিচে) */
@media (max-width: 480px) {
    .categories-hero-title {
        font-size: 22px;
    }

    .categories-hero-subtitle {
        font-size: 13px;
    }

    .categories-hero-stats {
        flex-direction: column;
        align-items: stretch;
    }

    .stat-pill {
        justify-content: center;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .category-banner {
        aspect-ratio: 1 / 1;
    }

    .category-banner-overlay {
        padding: 12px 12px 12px;
    }

    .category-name-banner {
        font-size: 13px;
        margin: 2px 0 1px;
    }

    .category-count-banner {
        font-size: 10px;
    }

    .category-card .category-icon-small {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        padding: 3px;
    }

    .category-card .fallback-icon-small {
        width: 28px;
        height: 28px;
        border-radius: 6px;
        font-size: 12px;
    }

    .category-no-banner {
        padding: 16px 10px;
        min-height: 160px;
    }

    .category-no-banner .category-icon-container {
        width: 60px;
        height: 60px;
    }

    .category-no-banner .fallback-icon i {
        font-size: 24px;
    }

    .category-no-banner .category-name {
        font-size: 13px;
    }

    .category-no-banner .category-count-badge {
        padding: 4px 8px;
        font-size: 10px;
    }

    .category-card:hover .category-card-arrow {
        bottom: 8px;
    }
}
