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

/* ── Ambient Background Orbs ── */
.popular-page::before,
.popular-page::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: -1;
    animation: pop-orb-float 8s ease-in-out infinite;
}

.popular-page::before {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.12) 0%, transparent 70%);
    top: -5%;
    left: 15%;
}

.popular-page::after {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 70%);
    bottom: -5%;
    right: 10%;
    animation-delay: -4s;
}

body.dark-theme .popular-page::before {
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
}

body.dark-theme .popular-page::after {
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1) 0%, transparent 70%);
}

@keyframes pop-orb-float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -20px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 15px) scale(0.95);
    }
}

@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;
    max-width: 1000px;
    margin: 0 auto;
}

.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;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.popular-stat-card {
    /* Glassmorphism Light Mode */
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: box-shadow 0.3s, transform 0.3s;
}

.popular-stat-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
}

.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;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.podium-card {
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    /* Glassmorphism Light Mode */
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    transition: box-shadow 0.3s, transform 0.3s;
    text-decoration: none;
    display: block;
    color: inherit;
}

.podium-card:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    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;
    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;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

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

.popular-product-card {
    /* Glassmorphism Light Mode */
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.8) inset;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 16px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
    text-decoration: none;
    display: block;
    color: inherit;
    position: relative;
}

.popular-product-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.85) inset;
    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;
    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 {
    /* Glassmorphism Dark Mode */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(0, 212, 170, 0.04);
}

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

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

body.dark-theme .podium-card {
    /* Glassmorphism Dark Mode */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(0, 212, 170, 0.04);
}

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

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

body.dark-theme .popular-product-card {
    /* Glassmorphism Dark Mode */
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.04) inset,
        0 32px 64px rgba(0, 0, 0, 0.35),
        0 0 80px rgba(0, 212, 170, 0.04);
}

body.dark-theme .popular-product-card:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.3),
        0 1px 0 rgba(255, 255, 255, 0.05) inset;
}

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;
    }
}

/* ===================================================
   POPÜLER ÜRÜNLER SAYFASI — MODERN SKELETON
   =================================================== */
.popular-skeleton-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: #f0f0f0;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    transition: opacity 0.4s ease;
}

body.dark-theme .popular-skeleton-overlay {
    background: #141414;
}

.csk-header {
    height: 120px;
    border-radius: 20px;
    background: linear-gradient(90deg, #e2e8f0 25%, #d1d9e6 50%, #e2e8f0 75%);
    background-size: 400% 100%;
    animation: popSkeleton 1.5s ease-in-out infinite;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto 36px;
    flex-shrink: 0;
}

body.dark-theme .csk-header {
    background: linear-gradient(90deg, #1e293b 25%, #2d3f55 50%, #1e293b 75%);
    background-size: 400% 100%;
}

.csk-box {
    border-radius: 10px;
    background: linear-gradient(90deg, #e2e8f0 25%, #d1d9e6 50%, #e2e8f0 75%);
    background-size: 400% 100%;
    animation: popSkeleton 1.5s ease-in-out infinite;
    height: 20px;
}

body.dark-theme .csk-box {
    background: linear-gradient(90deg, #1e293b 25%, #2d3f55 50%, #1e293b 75%);
    background-size: 400% 100%;
}

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

    100% {
        background-position: -200% 0;
    }
}