/* ===== POPULAR PRODUCTS PAGE ===== */
.popular-page {
    padding: 40px;
    box-sizing: border-box;
    margin-left: 260px;
    margin-top: 72px;
    transition: margin-left 0.3s ease;
}

@media (min-width: 769px) {
    body.sidebar-collapsed .popular-page {
        margin-left: 64px;
    }
}

@media (max-width: 768px) {
    .popular-page {
        margin-left: 0;
    }
}

/* Page Header */
.popular-page-header {
    margin-bottom: 40px;
}

.popular-page-header-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.popular-page-title-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.popular-page-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #10b981;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.popular-page-eyebrow i {
    font-size: 14px;
    animation: fire-shake 0.8s ease-in-out infinite alternate;
}

@keyframes fire-shake {
    from {
        transform: rotate(-10deg) scale(1);
    }

    to {
        transform: rotate(10deg) scale(1.1);
    }
}

.popular-page-h1 {
    font-size: 36px;
    font-weight: 800;
    color: #111827;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.popular-page-subtitle {
    color: #6b7280;
    font-size: 15px;
    max-width: 500px;
}

/* Filter Row */
.popular-filter-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.popular-filter-btn {
    padding: 9px 20px;
    border-radius: 100px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #4b5563;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}

.popular-filter-btn:hover,
.popular-filter-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

.popular-filter-btn i {
    font-size: 12px;
}

/* Stats Row */
.popular-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.popular-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 24px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.popular-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.popular-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.popular-stat-data {
    flex: 1;
}

.popular-stat-number {
    font-size: 26px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    margin-bottom: 4px;
}

.popular-stat-label {
    font-size: 12px;
    color: #9ca3af;
    font-weight: 500;
}

.popular-stat-trend {
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.popular-stat-trend.up {
    color: #10b981;
}

.popular-stat-trend.down {
    color: #ef4444;
}

/* Top 3 Podium */
.popular-podium {
    display: grid;
    grid-template-columns: 1fr 1.15fr 1fr;
    gap: 16px;
    margin-bottom: 48px;
    align-items: end;
}

.podium-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    background: #fff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.35s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.podium-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    color: inherit;
}

.podium-card.gold {
    border-top: 3px solid #f59e0b;
}

.podium-card.silver {
    border-top: 3px solid #94a3b8;
}

.podium-card.bronze {
    border-top: 3px solid #cd7c50;
}

.podium-rank-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 900;
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.podium-card.gold .podium-rank-badge {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
}

.podium-card.silver .podium-rank-badge {
    background: linear-gradient(135deg, #cbd5e1, #94a3b8);
    color: #fff;
}

.podium-card.bronze .podium-rank-badge {
    background: linear-gradient(135deg, #d97706, #cd7c50);
    color: #fff;
}

.podium-card-img {
    width: 100%;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 56px;
    min-height: 160px;
}

.podium-card.gold .podium-card-img {
    min-height: 200px;
    font-size: 70px;
}

.podium-card-body {
    padding: 18px;
}

.podium-card-cat {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    margin-bottom: 6px;
}

.podium-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 10px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.podium-card.gold .podium-card-name {
    font-size: 18px;
}

.podium-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.podium-card-price {
    font-size: 18px;
    font-weight: 800;
    color: #10b981;
}

.podium-card-sales {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Product List */
.popular-list {
    margin-bottom: 48px;
}

.popular-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.popular-product-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.popular-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.popular-product-rank {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.popular-product-img {
    width: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    position: relative;
}

.popular-product-body {
    padding: 16px;
}

.popular-product-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.popular-product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
}

.popular-product-price {
    font-size: 15px;
    font-weight: 800;
    color: #10b981;
}

.popular-product-sales {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Pagination */
.popular-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 0;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.page-btn:hover,
.page-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    text-decoration: none;
}

/* Dark Theme */
body.dark-theme .popular-page-h1 {
    color: #f1f5f9;
}

body.dark-theme .popular-page-subtitle {
    color: #9ca3af;
}

body.dark-theme .popular-filter-btn {
    background: #1e1e1e;
    border-color: #333;
    color: #d1d5db;
}

body.dark-theme .popular-filter-btn:hover,
body.dark-theme .popular-filter-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

body.dark-theme .popular-stat-card {
    background: #1e1e1e;
    border-color: #2a2a2a;
}

body.dark-theme .popular-stat-number {
    color: #f1f5f9;
}

body.dark-theme .popular-stat-label {
    color: #6b7280;
}

body.dark-theme .podium-card {
    background: #1e1e1e;
    border-color: #2a2a2a;
}

body.dark-theme .podium-card-name {
    color: #f1f5f9;
}

body.dark-theme .podium-card-footer {
    border-color: #2a2a2a;
}

body.dark-theme .popular-product-card {
    background: #1e1e1e;
    border-color: #2a2a2a;
}

body.dark-theme .popular-product-name {
    color: #f1f5f9;
}

body.dark-theme .popular-product-meta {
    border-color: #2a2a2a;
}

body.dark-theme .popular-product-img {
    background: #252525;
}

body.dark-theme .podium-card-img {
    background: #252525;
}

body.dark-theme .page-btn {
    background: #1e1e1e;
    border-color: #333;
    color: #d1d5db;
}

body.dark-theme .page-btn:hover,
body.dark-theme .page-btn.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .popular-page {
        padding: 20px 16px;
    }

    .popular-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .popular-podium {
        grid-template-columns: 1fr;
    }

    .popular-page-h1 {
        font-size: 26px;
    }

    .popular-page-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}