/* =========================================================
   # BASE STYLES & LAYOUT
   ========================================================= */

/* --- UPDATE TERAKHIR: GLOBAL FONT HELVETICA --- */
/* Menerapkan Helvetica ke seluruh elemen website */
body, h1, h2, h3, h4, h5, h6, p, .section-title, input, button {
    font-family: 'Helvetica', 'Arial', sans-serif !important;
}

.main-content {
    position: relative;
}

.section-padding {
    padding: 60px 0;
}

.section-title {
    font-weight: 700;
    margin-bottom: 30px;
    text-align: left;
    text-transform: none;
}

/* =========================================================
   # HERO SECTION
   ========================================================= */

.hero-section {
    text-align: center;
    padding: 40px 0 30px 0;
}

.hero-section h1 {
    font-weight: 700;
    font-size: 3rem;
    max-width: 700px;
    margin: 15px auto;
}

.hero-section p {
    font-size: 1.1rem;
    color: #383b3d;
    max-width: 800px;
    margin: 15px auto;
}

/* --- Hero Search Bar (FINAL FIX: LEFT ALIGN & MINIMAL PADDING) --- */
.hero-search {
    max-width: 450px;
    margin: 25px auto;
    display: flex;
    border: 1px solid #00b8a9;
    border-radius: 50px;
    background-color: #00b8a9;
    overflow: hidden;
    position: relative;
}

.hero-search input.form-control {
    border: none;
    background: transparent;
    flex-grow: 1;
    
    /* Padding kiri diperkecil jadi 20px */
    padding: 12px 20px !important; 
    
    /* Paksa Rata Kiri */
    text-align: left !important; 
    
    color: white;
    font-size: 1rem;
    font-weight: 500;
    z-index: 2;
    position: relative;
}

.hero-search input::placeholder {
    color: transparent; /* Sembunyikan placeholder asli */
}

.hero-search input:focus {
    outline: none; box-shadow: none; background: transparent;
}

.hero-search button {
    border: none; background: transparent; color: white;
    padding-left: 10px; /* Perkecil juga padding tombol biar seimbang */
    padding-right: 20px;
    display: flex; align-items: center; border-radius: 0;
    z-index: 2;
}

/* --- Style Placeholder Palsu --- */
.responsive-placeholder {
    position: absolute;
    
    /* Samakan dengan padding input */
    left: 20px !important; 
    
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 500;
    pointer-events: none; 
    user-select: none;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    right: 50px;
    z-index: 1;
    
    /* Pastikan placeholder juga rata kiri */
    text-align: left !important;
}

/* Logic Ganti Teks Placeholder */
.responsive-placeholder::before {
    content: "Cari Produk Lelang/Merchandise/Seniman/Blog";
}

@media (max-width: 767px) {
    .responsive-placeholder::before {
        content: "Cari";
    }
}

/* Sembunyikan placeholder jika input di-klik atau ada isinya */
.hero-search input:focus + .responsive-placeholder,
.hero-search input:not(:placeholder-shown) + .responsive-placeholder {
    opacity: 0;
    visibility: hidden;
}

/* FIX: BROWSER AUTOFILL STYLE */
.hero-search input:-webkit-autofill,
.hero-search input:-webkit-autofill:hover, 
.hero-search input:-webkit-autofill:focus, 
.hero-search input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #00b8a9 inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   # SLIDER / CAROUSEL (DESKTOP)
   ========================================================= */

.slider-container {
    border-radius: 15px; 
    overflow: hidden; 
    position: relative; 
    width: 100%;
    aspect-ratio: 1440 / 600; 
}

.carousel-inner, .carousel-item {
    height: 100% !important; 
}

.carousel-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; 
    object-position: center !important; 
}

/* --- KOTAK NAVY STATIS (PERBAIKAN: FIXED WIDTH & MOBILE SAFE) --- */
.static-navy-box {
    position: absolute !important;
    bottom: 50px !important;  
    left: 60px !important;    
    z-index: 100 !important;  
    
    /* --- FIXED WIDTH DESKTOP --- */
    /* Lebar ditetapkan 550px agar konsisten, tidak berubah mengikuti teks */
    width: 600px !important; 
    
    padding: 25px !important;    
    border-radius: 10px !important;
    background-color: #0d1b2a !important; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.4) !important; 
    transition: opacity 0.2s ease-in-out !important;
}

.static-navy-box h3 {
    font-family: 'Helvetica', 'Arial', sans-serif !important;
    font-weight: 700 !important;
    font-size: 28px !important; 
    color: white !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    line-height: 1.2 !important;
}

/* Item Baris (Grid System) */
.navy-item {
    display: grid;
    /* Grid Desktop: Ikon | Label (Diperkecil) | Titik2 | Isi */
    /* Ubah 210px menjadi 140px */
    grid-template-columns: 25px 140px 10px 1fr; 
    align-items: center; 
    margin-bottom: 8px;
    font-size: 18px; 
    color: white;
}

.navy-item i {
    text-align: center;
    width: 20px;
}

.navy-item .ni-label {
    font-weight: 600;
    white-space: nowrap; 
}

.navy-item .ni-sep {
    text-align: center;
    font-weight: 600;
}

.navy-item .ni-value {
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap; /* Desktop: satu baris */
}

/* Lokasi (Baris Bawah) */
.navy-location-box {
    display: flex;
    align-items: flex-start;
    margin-top: 15px;
    color: #cccccc;
    font-size: 14px;
    line-height: 1.4;
}

.navy-location-box i {
    margin-right: 10px;
    margin-top: 3px; 
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Style Overlay Lama (Fallback) */
.hero-overlay-box {
    position: absolute; bottom: 25px; left: 25px;
    background-color: rgba(13, 27, 42, 0.9);
    color: white; padding: 25px;
    border-radius: 10px; max-width: 400px; z-index: 10;
}

.hero-overlay-box h4 { font-weight: 700; }

.hero-overlay-box .btn-detail {
    background-color: white; color: black; border: none;
    border-radius: 50px; padding: 8px 25px;
    font-weight: 600; margin-top: 10px;
}

/* =========================================================
   # OWL DOTS
   ========================================================= */
.owl-carousel {
    touch-action: pan-y; /* Hanya izinkan scroll vertikal pada sentuhan */
    overscroll-behavior-x: none; /* Kunci navigasi histori browser */
}

.owl-theme .owl-dots {
    text-align: center; margin-top: 30px;
    display: flex; justify-content: center; align-items: center; 
}

.owl-theme .owl-dots .owl-dot {
    outline: none; display: inline-block; margin: 0 4px; 
}

.owl-theme .owl-dots .owl-dot span {
    width: 6px !important; height: 6px !important;  
    border-radius: 50%; background: #6CC4C4 !important;
    display: inline-flex; vertical-align: middle; 
    transition: all 0.3s ease; opacity: 1; margin: 0; 
}

.owl-theme .owl-dots .owl-dot.active span {
    width: 15px !important; height: 15px !important; 
    background: #0D1B2A !important; border-radius: 50%; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    display: inline-flex; vertical-align: middle; margin: 0; 
}

/* =========================================================
   # AUCTION CARD (LELANG)
   ========================================================= */

a.card-auction {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.card-auction {
    padding: 45px;
    border: 1px solid #dee2e6;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background-color: white;
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer; 
    position: relative;
    transition: all 0.3s ease; 
}

a.card-auction * {
    pointer-events: none;
}

@media (hover: hover) {
    .card-auction:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
        border-color: transparent;
    }
    .card-auction:hover h5 { color: #00b8a9; }
    .card-auction:hover .btn-visual { 
        background-color: #212529; color: white; 
        border-color: #212529;
    }
}

.card-auction:active {
    background-color: #f8f9fa;
    transform: scale(0.98);
}

.card-auction img {
    width: 100%; height: 300px; object-fit: cover;
}

.card-auction .card-body {
    padding: 20px; text-align: center;
    display: flex; flex-direction: column; flex-grow: 1;
}

.card-auction .card-body h5 {
    font-weight: 600; font-size: 1.1rem; margin-top: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: #212529; transition: color 0.3s ease;
}

.card-auction .card-body p {
    font-size: 0.95rem; color: #6c757d; margin-bottom: 20px; flex-grow: 1;
}

.btn-visual {
    border-radius: 50px; padding: 8px 30px; font-weight: 600;
    align-self: center; margin-top: auto;
    border: 1px solid #212529; 
    color: #212529; 
    background: white;
    transition: all 0.3s ease;
    display: inline-block;
    pointer-events: none; 
}

/* =========================================================
   # LIHAT SEMUA LINK
   ========================================================= */

.see-all-text {
    font-weight: 700; text-decoration: underline;
    color: #212529; font-size: 1rem; transition: color 0.3s ease;
    cursor: pointer;
}

.see-all-text:hover {
    color: #00b8a9; text-decoration: underline;
}

/* =========================================================
   # MERCHANDISE SECTION (FIXED HEIGHT & RATA)
   ========================================================= */

.merch-section {
    background-color: #fff; border: none; 
}

/* FIX: Equal Height Columns for Owl Carousel */
#merch-carousel .owl-stage {
    display: flex;
    flex-wrap: wrap;
}

#merch-carousel .owl-item {
    display: flex;
    height: auto !important;
}

#merch-carousel .item {
    width: 100%;
    display: flex; 
}

.card-merch {
    border: none; border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc 80%, #e3e9f3 100%);
    overflow: hidden; position: relative;
    transition: all 0.3s ease; 
    
    /* FIX: Tinggi card dipaksa penuh mengikuti container */
    height: 100%; 
    width: 100%;
    
    display: flex; flex-direction: column;
    box-shadow: 0 4px 16px rgba(5,26,54,0.08), 0 1.5px 4px rgba(5,26,54,0.10);
    touch-action: manipulation;
}

@media (hover: hover) {
    .card-merch:hover {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 8px 20px rgba(5,26,54,0.15);
    }
    .card-merch:hover .merch-img-wrapper img {
        transform: scale(1.05);
    }
}

.merch-img-wrapper {
    position: relative; 
    height: 250px; /* Tinggi gambar tetap */
    overflow: hidden;
    background-color: #fff; display: flex; align-items: center;
    justify-content: center; border-bottom: 1px solid rgba(0,0,0,0.03);
    flex-shrink: 0; 
}

.merch-img-wrapper img {
    width: 100%; height: 100%; object-fit: contain;
    padding: 10px; transition: transform 0.3s ease;
}

.discount-badge {
    position: absolute; top: 0; left: 0; z-index: 2;
    background: linear-gradient(90deg, #ff5858 60%, #ffb347 100%);
    color: #fff; font-weight: bold; font-size: 0.8rem;
    padding: 4px 12px; border-bottom-right-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); pointer-events: none;
}

.favorite-icon-home {
    position: absolute; bottom: 10px; right: 10px;
    width: 60px !important; height: 60px !important;
    cursor: pointer; z-index: 10;
    transition: transform 0.2s; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2)); 
    pointer-events: auto !important;
}

.favorite-icon-home:hover { transform: scale(1.2); }

.card-merch .card-body {
    padding: 15px; 
    text-align: left;
    display: flex; 
    flex-direction: column;
    flex-grow: 1; /* Body mengisi sisa ruang yang ada */
}

.merch-title {
    font-size: 1rem; 
    font-weight: 600; 
    color: #051A36;
    margin-bottom: 8px; 
    
    /* FIX: Membatasi Judul & Memberi Tinggi Pasti */
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Maksimal 2 baris */
    -webkit-box-orient: vertical;
    overflow: hidden; 
    text-decoration: none; 
    line-height: 1.4; 
    
    /* Height Fixed = line-height (1.4) * 2 baris * 16px font ~ 46px */
    height: 46px; 
}

.merch-title:hover { color: #00b8a9; text-decoration: none; }

.merch-price-box {
    /* Mendorong harga selalu ke paling bawah card */
    margin-top: auto; 
    display: flex; align-items: baseline;
    flex-wrap: wrap; gap: 5px;
}

.merch-price {
    color: #00b8a9; font-weight: 700; font-size: 1rem;
}

.merch-price-slash {
    text-decoration: line-through; color: #adb5bd; font-size: 0.8rem;
}

/* Responsive Fix khusus Merch */
@media (max-width: 767px) {
    .merch-img-wrapper { height: 180px; } /* Gambar lebih kecil di HP */
    .card-merch .card-body { padding: 12px; }
    .merch-title { 
        font-size: 0.95rem; 
        height: 44px; /* Sesuaikan tinggi judul di HP */
    }
}

/* =========================================================
   # BLOG CARD STYLES
   ========================================================= */

.blog-section { background-color: #ffffff; }

a.card-blog {
    text-decoration: none !important;
    color: inherit !important;
    display: flex;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.card-blog {
    padding: 45px; background-color: white;
    border: 1px solid #dee2e6;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.08);
    border-radius: 6px; overflow: hidden;
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

a.card-blog * {
    pointer-events: none;
}

@media (hover: hover) {
    .card-blog:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 10px 25px rgba(5, 26, 54, 0.15);
        border-color: transparent;
    }
    .card-blog:hover h5 { color: #00b8a9; }
    .card-blog:hover .btn-visual { 
        background-color: #212529; color: white; 
        border-color: #212529;
    }
}

.card-blog:active {
    background-color: #f8f9fa;
    transform: scale(0.98);
}

.card-blog img {
    width: 100%; height: 220px; object-fit: cover;
}

.card-blog .card-body {
    padding: 25px; display: flex;
    flex-direction: column; flex-grow: 1;
}

.card-blog h5 {
    font-weight: 600; color: #212529; transition: color 0.3s ease;
}

.card-blog p {
    font-size: 0.95rem; color: #6c757d;
    display: -webkit-box; -webkit-line-clamp: 3;
    -webkit-box-orient: vertical; overflow: hidden;
    flex-grow: 1; margin-bottom: 15px;
}

.blog-slider .owl-stage { 
    display: flex; padding-bottom: 15px; 
}

.blog-slider .owl-item {
     height: auto; 
}

.blog-slider .item.d-flex { 
    width: 100%; height: 100%; 
}

/* =========================================================
   # RESPONSIVE (MOBILE ADJUSTMENTS)
   ========================================================= */

@media (max-width: 991px) { /* Tablet & Mobile */
    
    /* 1. TAMPILKAN KOTAK NAVY */
    .static-navy-box {
        display: block !important; 
        left: 50% !important;
        transform: translateX(-50%) !important; 
        bottom: 15px !important; 
        
        /* MOBILE: Gunakan % agar pas di layar kecil */
        width: 92% !important; 
        max-width: none !important;
        padding: 15px !important; 
    }

    /* 2. UKURAN FONT MOBILE */
    .static-navy-box h3 {
        font-size: 16px !important; 
        margin-bottom: 12px !important;
    }

    /* 3. ITEM GRID MOBILE */
    /* 3. ITEM GRID MOBILE */
    .navy-item {
        /* Ikon (20px) | Label (85px) | Titik Dua (10px) | Isi (Sisa) */
        grid-template-columns: 20px 85px 10px 1fr; 
        
        font-size: 11px;
        margin-bottom: 6px;
        
        /* PENTING: Gunakan center agar titik dua sejajar dengan baris pertama teks */
        align-items: center; 
    }

    .navy-item .ni-sep {
        text-align: left; 
        display: flex;
        align-items: center;
        
        /* Tambahkan ini */
        padding-left: 4px;  /* Memberi jarak dari teks "Lelang Online" */
        padding-right: 4px; /* Memberi jarak dari teks tanggal/isi */
    }
    
    /* Izinkan teks wrap (turun baris) di mobile */
    .navy-item .ni-label {
        white-space: normal;
        line-height: 1.2;
    }

    .navy-item .ni-value {
        line-height: 1.3;
        white-space: normal; 
        word-break: break-word;
    }
    
    .navy-location-box {
        font-size: 10px;
        margin-top: 10px;
    }
    
    .navy-location-box i {
        width: 15px;
        margin-right: 5px;
    }

    .d-block.d-md-none.bg-dark {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .hero-section h1 { font-size: 2.2rem; margin: 10px 0; }
    .hero-section p { font-size: 0.95rem; }
    
    /* Mobile Search Margin */
    .hero-search { max-width: 280px; margin: 20px auto; }
    
    .slider-container { 
        aspect-ratio: 800 / 1000 !important; 
    }

    .hero-overlay-box {
        left: 40px; right: 40px; bottom: 20px; 
        max-width: none; padding: 14px 17px; text-align: center;
    }
    .hero-overlay-box h4 { font-size: 1.1rem; margin-bottom: 2px; }
    .hero-overlay-box p { font-size: 0.75rem; margin-bottom: 8px; }
    .hero-overlay-box .btn-detail { padding: 4px 12px; font-size: 0.75rem; }

    .header-flex { flex-direction: row !important; align-items: baseline !important; }
    .section-title { font-size: 1.5rem; margin-bottom: 20px; }
    .see-all-text { font-size: 0.9rem; }

    /* --- CARD STYLE --- */
    
    .blog-slider .owl-stage, 
    #auction-carousel .owl-stage {
        display: flex !important;
    }
    
    .blog-slider .owl-item,
    #auction-carousel .owl-item {
        display: flex;
        height: auto;
    }
    
    .card-auction, .card-blog { 
        padding: 15px; 
        margin-bottom: 15px;
        height: 100% !important; 
        display: flex !important;
        flex-direction: column !important;
    }

    .card-auction img { height: 300px; }
    .card-blog img { height: 150px; }
    
    .card-auction .card-body, .card-blog .card-body { 
        padding: 15px; 
        display: flex !important;
        flex-direction: column !important;
        flex: 1 !important; 
        text-align: left !important; 
        align-items: flex-start !important; 
    }

    .card-auction .card-body h5 { font-size: 1rem; }
    .card-blog h5 { font-size: 1.05rem; }
    
    .card-auction .card-body p, .card-blog p { 
        font-size: 0.85rem; 
        margin-bottom: 15px;
        flex-grow: 1; 
        text-align: left !important; 
    }

    .btn-visual {
        font-size: 0.9rem; 
        padding: 7px 25px; 
        background-color: white; 
        color: #212529; 
        border: 1px solid #212529;
        margin-top: auto !important; 
        align-self: center !important; 
        display: inline-block;
    }
}