/* =========================================
   1. GLOBAL STYLES
   ========================================= */
:root {
    --primary-color: #0d6efd; /* Biru Bootstrap */
    --secondary-color: #6c757d;
    --accent-color: #ffc107; /* Kuning Warning */
    --dark-bg: #212529;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --card-shadow: 0 4px 6px rgba(0,0,0,0.05);
    --card-hover-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
    padding-top: 0; /* Reset */
}

a {
    text-decoration: none;
    transition: all 0.2s ease-in-out;
}

/* Utility untuk memotong teks panjang (titik-titik...) */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3rem; /* Sesuaikan tinggi baris */
    line-height: 1.5rem;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */
.navbar {
    border-bottom: 1px solid #eee;
}

.navbar-brand {
    font-weight: 800;
    letter-spacing: 0.5px;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: #555;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

/* Search Bar Custom */
.input-group .form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Top Notification Bar */
.top-bar-notify {
    font-size: 0.85rem;
    letter-spacing: 0.3px;
}

/* =========================================
   3. HERO CAROUSEL
   ========================================= */
#heroCarousel .carousel-item {
    height: 450px; /* Tinggi banner di desktop */
    background-color: #333;
    background-position: center;
    background-size: cover;
    position: relative;
}

/* Overlay gelap di atas gambar banner agar teks terbaca */
#heroCarousel .carousel-item::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
}

.carousel-caption {
    bottom: 30%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
}

/* Mobile Adjustment untuk Carousel */
@media (max-width: 768px) {
    #heroCarousel .carousel-item {
        height: 250px;
    }
    .carousel-caption h1 {
        font-size: 1.5rem;
    }
}

/* =========================================
   4. PRODUCT CARD (HOME & CATALOG)
   ========================================= */
.product-card {
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px); /* Efek naik saat dihover */
    box-shadow: var(--card-hover-shadow)!important;
    border-color: transparent;
}

.product-img-wrapper {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: #fff;
    overflow: hidden;
}

.product-img-wrapper img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

/* Efek zoom gambar saat hover card */
.product-card:hover .product-img-wrapper img {
    transform: scale(1.08);
}

.card-body {
    padding: 1rem;
}

.badge-stock {
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
}

/* Stretched Link Fix (Agar tombol detail tetap bisa diklik terpisah jika perlu) */
.product-card .btn-detail {
    position: relative;
    z-index: 2;
}

/* =========================================
   5. PRODUCT DETAIL PAGE (PDP)
   ========================================= */
.detail-img-box {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    box-shadow: var(--card-shadow);
}

.price-comparison-box {
    border-left: 4px solid var(--primary-color);
    background-color: #fff;
    border-radius: 4px;
    box-shadow: var(--card-shadow);
}

.gallery-thumb {
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.gallery-thumb:hover, .gallery-thumb.active {
    border-color: var(--primary-color);
}

/* =========================================
   6. B2B / CLIENT LOGOS
   ========================================= */
.grayscale-logos .client-logo-box {
    opacity: 0.6;
    filter: grayscale(100%);
    transition: all 0.4s ease;
    font-weight: bold;
    color: #ccc;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
}

.grayscale-logos .client-logo-box:hover {
    opacity: 1;
    filter: grayscale(0%);
    color: var(--dark-bg);
}

/* =========================================
   7. FOOTER & STICKY MOBILE
   ========================================= */
footer {
    background-color: #1a1e21;
    color: #adb5bd;
}

footer h5 {
    color: #fff;
}

footer a {
    color: #adb5bd;
}

footer a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Sticky Bottom Bar (Tombol WA Melayang di HP) */
.sticky-bottom-nav {
    z-index: 1050; /* Di atas elemen lain */
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* =========================================
   8. RESPONSIVE TWEAKS
   ========================================= */
@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .product-img-wrapper {
        height: 160px; /* Lebih kecil di HP */
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}

/* =========================================
   THEME OVERRIDE (RED THEME)
   ========================================= */
:root {
    --primary-color: #d32f2f; /* Merah Professional */
    --primary-hover: #b71c1c; /* Merah Gelap untuk Hover */
    --secondary-color: #6c757d;
    --accent-color: #ffc107; 
    --card-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

/* Override Bootstrap Primary (Biru jadi Merah) */
.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.border-primary { border-color: var(--primary-color) !important; }

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-primary:hover {
    background-color: var(--primary-hover) !important;
    border-color: var(--primary-hover) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}
.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* Styling Khusus Brand Logo Section */
.brand-box {
    transition: all 0.3s ease;
    border: 1px solid #eee;
    background: white;
}
.brand-box:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(211, 47, 47, 0.15);
}
.brand-logo-img {
    height: 50px; /* Tinggi logo konsisten */
    width: 100%;
    object-fit: contain;
    filter: grayscale(100%); /* Hitam putih dulu */
    opacity: 0.7;
    transition: all 0.3s;
}
.brand-box:hover .brand-logo-img {
    filter: grayscale(0%); /* Berwarna saat hover */
    opacity: 1;
}

/* =========================================
   BROADCAST SOLUTION SECTION
   ========================================= */
.bg-broadcast {
    /* Gradasi Hitam ke Abu Gelap (Nuansa Studio) */
    background: linear-gradient(180deg, #0f0f0f 0%, #1e1e1e 100%);
    color: white;
}

.solution-card {
    background: rgba(255, 255, 255, 0.03); /* Transparan dikit */
    border: 1px solid #333; /* Garis abu tipis */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Efek membal */
}

.solution-card:hover {
    border-color: var(--primary-color); /* Garis jadi MERAH saat hover */
    background: rgba(211, 47, 47, 0.05); /* Background jadi agak merah dikit */
    transform: translateY(-10px); /* Naik ke atas */
    box-shadow: 0 10px 30px rgba(211, 47, 47, 0.2); /* Bayangan merah */
}

.solution-card i {
    transition: transform 0.3s;
}

.solution-card:hover i {
    transform: scale(1.2); /* Icon membesar saat hover */
}

/* =========================================
   CLIENT MARQUEE (FIXED & RESPONSIVE)
   ========================================= */

/* 1. Container Utama: Sembunyikan yang meluber ke samping */
.client-marquee {
    overflow: hidden;
    position: relative;
    background: #fff;
    padding: 30px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

/* 2. Track (Jalur): Mengubah susunan dari Atas-Bawah jadi Samping (Flex) */
.client-track {
    display: flex;          /* KUNCI: Ini yang bikin logo sejajar horizontal */
    align-items: center;    /* Rata tengah vertikal */
    width: max-content;     /* Lebar menyesuaikan jumlah logo */
    animation: scroll-left 40s linear infinite; /* Animasi jalan */
}

/* Stop animasi saat mouse diarahkan */
.client-track:hover {
    animation-play-state: paused;
}

/* 3. Kotak Pembungkus Logo: Ukuran Tetap (Agar rapi) */
.client-item {
    flex: 0 0 auto;       /* Jangan menyusut */
    width: 180px;         /* Lebar kotak FIX */
    height: 90px;         /* Tinggi kotak FIX */
    margin: 0 20px;       /* Jarak antar logo */
    display: flex;        /* Flex lagi biar gambar di tengah kotak */
    align-items: center;
    justify-content: center;
}

/* 4. Gambar Logo: Paksa masuk ke dalam kotak (Contain) */
.client-item img {
    max-width: 100%;      /* Mentok lebar kotak */
    max-height: 100%;     /* Mentok tinggi kotak */
    width: auto;
    height: auto;
    object-fit: contain;  /* PENTING: Biar logo tidak gepeng/penyok */
    
    /* Efek Hitam Putih */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
}

/* Efek saat di-hover: Berwarna & Membesar dikit */
.client-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}

/* Definisi Animasi Gerak ke Kiri */
@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}