/* =========================================
   1. GLOBAL VARIABLES & BASE STYLES
========================================= */
:root {
    --primary-color: #0D6EFD;
    --secondary-color: #212529;
    --success-color: #198754;
    --bg-color: #F8F9FA;
    --card-bg: #FFFFFF;

    /* Warna Navbar Minimalis */
    --nav-link-color: #000000;
    --nav-link-hover: #333333;
    --dark-btn: #000000;
    --dark-btn-hover: #333333;
}

body {
    background-color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    color: var(--secondary-color);
    overflow-x: hidden;
}

img,
iframe,
video {
    max-width: 100%;
    height: auto;
}

/* =========================================
   2. FRONTEND: NAVBAR MINIMALIS (FLOATING PILL)
========================================= */
.nav-wrapper {
    position: absolute;
    /* Kunci perubahannya di sini (sebelumnya 'sticky') */
    top: 20px;
    left: 0;
    right: 0;
    /* Memastikan lebarnya penuh dari kiri ke kanan */
    width: 100%;
    z-index: 1030;
    padding: 0 15px;
}

.floating-navbar {
    background-color: #ffffff;
    border-radius: 50px;
    padding: 10px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 0 auto;
    max-width: 1100px;
    transition: all 0.3s ease;
}

.floating-navbar .nav-link {
    color: var(--nav-link-color) !important;
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.floating-navbar .nav-link:hover {
    color: var(--nav-link-hover) !important;
}

.btn-custom-dark {
    background-color: var(--dark-btn);
    color: #ffffff;
    border-radius: 50px;
    padding: 8px 24px;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    transition: background-color 0.3s ease;
}

.btn-custom-dark:hover {
    background-color: var(--dark-btn-hover);
    color: #ffffff;
}

/* =========================================
   3. BACKEND: ADMIN PANEL LAYOUT
========================================= */
.main-content {
    margin-left: 260px;
    padding: 20px;
    min-height: 100vh;
    background-color: var(--bs-tertiary-bg);
    transition: all 0.3s ease-in-out;
    width: 100%;
    padding-bottom: 80px;
    /* Menghindari tertutup footer */
}

.admin-footer {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 260px;
    z-index: 90;
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    transition: all 0.3s ease-in-out;
}

#mainContent.toggled .admin-footer {
    left: 0;
}

/* =========================================
   4. COMPONENTS (CARDS & BUTTONS)
========================================= */
.card-service {
    background-color: var(--card-bg);
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-service:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(13, 110, 253, 0.1);
}

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 8px;
    font-weight: 600;
}

/* Container Logo Slider */
.logo-slider {
    background-color: transparent;
    overflow: hidden;
    position: relative;
    width: 100%;
    padding: 10px 0;
}

/* Efek Fade Out di Pinggir Kiri & Kanan */
.logo-slider::before,
.logo-slider::after {
    background: none;
    content: "";
    height: 100%;
    position: absolute;
    width: 150px;
    z-index: 2;
    top: 0;
}

.logo-slider::before {
    left: 0;
}

.logo-slider::after {
    right: 0;
    transform: rotateZ(180deg);
}

/* Track Animasi */
.logo-slide-track {
    display: flex;
    align-items: center;
    width: calc(200px * 10);
    animation: scrollLogos 25s linear infinite;
}

.logo-slide-track:hover {
    animation-play-state: paused;
}

/* Item Logo */
.slide {
    width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: color 0.3s ease, transform 0.3s ease;
    cursor: pointer;
}

.slide:hover {
    color: #333333;
    transform: scale(1.05);
}

/* =========================================
   TESTIMONIAL HORIZONTAL SCROLL
========================================= */

/* Wadah Utama Scroll */
/* Modifikasi agar scrollbar benar-benar hilang tapi tetap bisa di-scroll / swipe */
.testimonial-scroll-container {
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;

    /* TAMBAHKAN KODE INI UNTUK MENGHILANGKAN SCROLLBAR */
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

/* Chrome, Safari and Opera */
.testimonial-scroll-container::-webkit-scrollbar {
    display: none;
}

.testimonial-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.testimonial-scroll-container::-webkit-scrollbar-thumb {
    background: #d1d1d1;
    border-radius: 10px;
}

.testimonial-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Jarak antar kartu dan batas pinggir */
.testimonial-track {
    padding: 10px 5px;
    /* Mencegah shadow terpotong */
}

/* Desain Kartu Testimonial */
.testimonial-card {
    width: 320px;
    scroll-snap-align: center;
    background-color: #ffffff;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border 0.3s ease;
    border: 1px solid transparent !important;

    /* TAMBAHAN BARU: Memaksa semua isi kartu kembali normal (turun ke bawah) */
    white-space: normal !important;
}

/* Efek Hover (Meniru kartu yang aktif di gambar) */
.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(13, 110, 253, 0.2) !important;
    /* Garis biru/ungu samar */
}

/* =========================================
   MARKETPLACE COMPONENT STYLES
========================================= */

/* Efek Hover untuk Kategori */
.hover-primary {
    transition: all 0.3s ease;
}

.hover-primary:hover {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    border-color: var(--primary-color) !important;
}

.hover-primary:hover i {
    color: #ffffff !important;
}

/* Kartu Produk Marketplace */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

/* Memastikan gambar produk mengalami efek zoom tipis saat card di hover */
.product-card img {
    transition: transform 0.5s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* =========================================
   MEMBATASI TEKS REVIEW AGAR RAPI (LINE CLAMP)
========================================= */
.review-text {
    white-space: normal !important;
    word-break: break-word !important;
    /* Memaksa kata panjang dipotong ke baris baru */
    overflow-wrap: break-word !important;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    margin: 0 auto;
    /* Memastikan teks tetap berada di tengah (center) */
}

.flash-sale-sticker {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: #fff;
    padding: 5px 12px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 0.85rem;
    box-shadow: 0 4px 6px rgba(255, 65, 108, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    transform: rotate(-2deg);
    /* Memberikan efek miring artistik */
}

/* Efek kartu agar terlihat premium */
.blog-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.card-img-wrapper {
    overflow: hidden;
    height: 220px;
}

.card-img-wrapper img {
    transition: transform 0.5s ease;
}

.blog-card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.text-limit-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 1. Tombol Aktif (Background Hitam, Teks Putih) */
.pagination-black .page-item.active .page-link,
.pagination-black .page-item.active .page-link a {
    background-color: #212529 !important;
    border-color: #212529 !important;
    color: #ffffff !important;
}

/* 2. Tombol Tidak Aktif (Background Putih, Teks Hitam) */
.pagination-black .page-link,
.pagination-black .page-link a {
    background-color: #ffffff !important;
    border-color: #dee2e6 !important;
    color: #212529 !important;
    /* Memaksa teks menjadi hitam */
    text-decoration: none !important;
    /* Menghilangkan garis bawah pada link */
}

/* 3. Efek Hover (Saat kursor diarahkan ke tombol yang tidak aktif) */
.pagination-black .page-item:not(.active) .page-link:hover,
.pagination-black .page-item:not(.active) .page-link:hover a {
    background-color: #e9ecef !important;
    /* Sedikit abu-abu saat di-hover */
    border-color: #dee2e6 !important;
    color: #000000 !important;
    /* Teks tetap hitam pekat */
}

/* 4. Menghilangkan glow/outline biru saat tombol diklik */
.pagination-black .page-link:focus,
.pagination-black .page-link a:focus {
    box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.25) !important;
}

/* Menghilangkan glow/outline biru bawaan saat input diklik agar ilusi menyatu tidak rusak */
.search-seamless .form-control:focus {
    box-shadow: none !important;
    outline: none !important;
}

/* Styling untuk membuat form newsletter menyatu dan bulat */
.newsletter-wrapper {
    display: flex;
    padding: 4px;
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 50rem;
}

.newsletter-wrapper .form-control {
    border: none !important;
    background: transparent !important;
    padding-left: 20px;
    box-shadow: none !important;
}

.newsletter-wrapper .btn {
    border-radius: 50rem !important;
    padding: 8px 20px;
    font-weight: bold;
}

/* Efek halus saat kursor diarahkan ke link artikel */
.latest-post-item {
    transition: transform 0.2s ease, background-color 0.2s ease;
    padding: 8px;
    border-radius: 8px;
}

.latest-post-item:hover {
    background-color: #f8f9fa;
    transform: translateX(5px);
}

.latest-post-item:hover .post-title {
    color: #2e2e2e !important;
    /* Warna biru saat hover */
}

/* Styling khusus untuk Tag Pill */
.tag-pill {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    margin: 0.25rem;
    border-radius: 50rem;
    /* Bentuk kapsul */
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    background-color: #f8f9fa;
    /* Latar abu-abu sangat muda */
    color: #495057;
    border: 1px solid #e9ecef;
}

/* Efek saat kursor diarahkan ke tag */
.tag-pill:hover {
    background-color: #212529;
    /* Berubah menjadi hitam */
    color: #ffffff;
    border-color: #212529;
    transform: translateY(-2px);
    /* Sedikit naik saat di-hover */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Mengubah warna background menjadi hitam saat tab aktif (diklik/dipilih) */
#profileTab .nav-link.active {
    background-color: #212529 !important;
    /* Warna hitam pekat */
    color: #ffffff !important;
    /* Teks menjadi putih */
}

/* Tampilan teks tab saat tidak aktif (abu-abu gelap) */
#profileTab .nav-link {
    color: #495057;
    transition: all 0.3s ease;
    /* Transisi warna yang halus saat berpindah */
}

/* Efek hover: latar belakang sedikit abu-abu saat kursor diarahkan ke tab yang tidak aktif */
#profileTab .nav-link:hover:not(.active) {
    background-color: #e9ecef;
    color: #000000;
}

/* Responsif untuk Layar HP */
@media (max-width: 768px) {
    .testimonial-card {
        width: 280px;
        /* Dipersempit sedikit di layar kecil */
    }
}

/* Pergerakan Animasi */
@keyframes scrollLogos {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-200px * 5));
    }
}

/* Penyesuaian HP */
@media (max-width: 768px) {
    .card-body {
        padding: 15px !important;
    }

    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    h1,
    h3 {
        font-size: 1.5rem !important;
    }

    .slide {
        width: 150px;
        font-size: 1.2rem;
    }

    .logo-slide-track {
        width: calc(150px * 10);
    }

    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(calc(-150px * 5));
        }
    }
}


/* =========================================
   5. RESPONSIVE DESIGN (TABLET & MOBILE)
========================================= */

/* Untuk Tablet dan HP (< 992px) */
@media (max-width: 991.98px) {

    /* Admin Area */
    .admin-footer {
        left: 0;
    }

    /* Navbar Frontend Area */
    .floating-navbar {
        border-radius: 20px;
        /* Lengkungan dikurangi agar dropdown tidak aneh */
        padding: 15px 20px;
    }

    .floating-navbar .navbar-collapse {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f0f0f0;
    }

    .floating-navbar .nav-link {
        margin: 8px 0;
        font-size: 0.95rem;
    }

    .mobile-action-area {
        margin-top: 15px;
        justify-content: flex-start !important;
        /* Supaya ikon keranjang & tombol rata kiri di HP */
    }
}

/* =========================================
   6. CAROUSEL & TABS MOBILE OPTIMIZATIONS
========================================= */
.carousel-img-custom-height {
    width: 100% !important;
    height: 450px;
}

@media (max-width: 768px) {
    .carousel-img-custom-height {
        height: auto !important;
        aspect-ratio: 16 / 9;
        object-fit: cover !important;
    }

    /* Nav Pills Scroll Horizontal untuk Mobile (#productTab, #profileTab, #categoryFilterScroll) */
    #productTab,
    #profileTab,
    #categoryFilterScroll {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 5px;
    }

    #productTab::-webkit-scrollbar,
    #profileTab::-webkit-scrollbar,
    #categoryFilterScroll::-webkit-scrollbar {
        display: none;
    }

    #productTab .nav-item,
    #profileTab .nav-item,
    #categoryFilterScroll .btn {
        flex-shrink: 0;
    }

    #productTab .nav-link,
    #profileTab .nav-link {
        white-space: nowrap;
    }
}