/*
 * File: index.css
 * Deskripsi: Revisi gaya visual untuk tampilan yang lebih modern, elegan, dan profesional.
 */

/* ================== General Styles & Typography ================== */
body {
    /* Menggunakan font stack yang modern */
    font-family: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #f8f9fa; /* Latar belakang lebih terang */
    color: #212529;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.book-viewer{
	  background-color: rgba(255,255,255,0.8);
}
/* ================== Modal Styles - Khusus Penampil Buku ================== */

/* Hapus definisi .modal-content-buku yang terpisah agar tidak menimpa .modal-buku-viewer */

.modal-content-buku.modal-buku-viewer {
    /* MENGATUR LEBAR DAN TINGGI MODAL MENJADI 90% DARI VIEWPORT */
    max-width: 90vw; /* Atur lebar maksimum 90% dari Viewport Width */
    width: 90vw;     /* Pastikan lebar menjadi 90% */
    height: 90vh;    /* Atur tinggi menjadi 90% dari Viewport Height */
      background-color: rgba(0,0,0,0.2);
    padding: 1px;
    /* PENGATURAN SCROLLBAR: Dihilangkan untuk V-bar dan H-bar */
    overflow-y: hidden;
	overflow-x: hidden;
    
    /* Pergeseran (hanya berlaku di Desktop/Tablet) */
    transform: translate(10px, -10px); 
    position: relative; /* Penting untuk posisi tombol tutup X */
}

/* Pastikan elemen book-viewer mengisi 100% dari modal-content */
.modal-content-buku.modal-buku-viewer .book-viewer {
    width: 100%;
    height: 100%;
}
 
/* STYLING TOMBOL TUTUP X (DIPERBESAR) */
.close-button-buku {
    /* Membuat tanda X jauh lebih besar */
    font-size: 2.5em; /* Ukuran ini sekitar 40px, agar mudah diklik */
    
    /* Posisikan di pojok kanan atas modal */
    position: absolute;
    top: 5px;
    right: 15px;
    
    /* Gaya visual agar terlihat seperti tombol interaktif */
    color: #a0aec0; /* Warna awal abu-abu terang */
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001; /* Pastikan di atas iframe */

    /* ================================================= */
    /* >>> PATCH: BORDER LINGKARAN MERAH SOLID <<< */
	color: #e53e3e; /* Warna merah saat di-hover */
	background-color: #ffffff; /* Warna latar belakang merah solid */
   
    border-radius: 50%; /* Membuat bentuk lingkaran */
    padding-left:15px; /* Menyesuaikan padding agar lingkaran terlihat baik */
    padding-right:15px;
	padding-bottom:5px;
	border: none; /* Hapus border agar tidak ada garis ganda */
    /* ================================================= */
}

.close-button-buku:hover,
.close-button-buku:focus {
    background-color: #e53e3e; /* Warna latar belakang merah solid */
    color: white; /* Warna teks (tanda X) diubah menjadi putih */
}


/* ================== Header & Navigation ================== */

.page-title {
    /* UBAHAN: Diubah menjadi rata kanan dan padding horizontal ditambahkan */
    text-align: right; 
    padding: 30px 40px; 
    font-size: 2.5em; /* Ukuran lebih besar */
    font-weight: 700;
    color: #2d3748;
    background-color: #ffffff;
    border-bottom: 1px solid #dee2e6;
    letter-spacing: -0.5px;
}

.tab-content {
    background-color: #fff;
    padding: 40px; /* Padding lebih luas */
    border-radius: 16px; /* Radius lebih besar untuk kesan lembut */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); /* Bayangan lebih halus dan menyebar */
    margin: 40px auto;
    width: 90%;
    max-width: 1400px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 40px;
    background-color: #1a202c; /* Header dibuat lebih gelap untuk kontras */
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.header-left img {
    height: 48px;
    margin-right: 15px;
    border-radius: 50%; /* Logo dibuat bulat */
    border: 2px solid #000000; /* Border warna primer */
}

.header-left .logo-text {
    font-size: 1.8em;
    font-weight: 800;
    color: #fff;
}

.header-right .menu-icon {
    font-size: 1.7em;
    margin-left: 28px;
    cursor: pointer;
    color: #e2e8f0;
    transition: color 0.3s ease, transform 0.2s;
}

.header-right .menu-icon:hover {
    color: #4fd1c5;
    transform: scale(1.1);
}

.tabs-nav {
    display: flex;
    justify-content: center;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.tabs-nav-item {
    padding: 15px 30px;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s, color 0.3s, border-bottom 0.3s;
    border-bottom: 3px solid transparent;
}

.tabs-nav-item:hover {
    background-color: #f7fafc;
    color: #2d3748;
}

.tabs-nav-item.active {
    color: #4fd1c5; /* Warna primer untuk tab aktif */
    border-bottom-color: #4fd1c5;
}

.tabs-nav-item.tabhide {
    display: none;
}

/* ================== Product List ================== */
#produk-list {
    display: grid;
    /* PERUBAHAN: Memaksa 6 kolom untuk tampilan laptop/desktop */
    grid-template-columns: repeat(6, 1fr); 
    gap: 30px;
}

.produk {
    background-color: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Gaya Warna Selang-Seling (memenuhi permintaan sebelumnya) */
.produk:nth-child(odd) {
    background-color: #ffffff; /* Putih */
}

.produk:nth-child(even) {
    background-color: #f7fafc; /* Abu-abu sangat muda */
}
/* Akhir Tambahan Warna Selang-Seling */

.produk:hover {
    transform: translateY(-8px); /* Efek melayang lebih dramatis */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.produk img {
    width: 100%;
    /* PENYESUAIAN GAMBAR */
    height: auto; 
    max-height: 250px; 
    object-fit: contain; /* Agar gambar tidak terpotong */
    display: block; 
    /* AKHIR PENYESUAIAN GAMBAR */
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px 12px 0 0; 
    transition: opacity 0.3s;
}

.produk:hover img {
    opacity: 0.95;
}

.produk h3 {
    padding: 0 15px;
    margin: 10px 0 5px; /* Margin atas dikurangi */
    font-size: 1.25em; /* Judul Produk dikecilkan */
    color: #2d3748;
    font-weight: 700;
    text-align: center !important; /* PENGATURAN UMUM: Judul rata tengah */
}

.produk p {
    padding: 0 15px;
    margin: 3px 0; /* Margin dikurangi agar lebih rapat */
    color: #718096;
    font-size: 0.8em; /* Detail produk (Penulis, Penerbit, Tahun) dikecilkan */
    text-align: center !important; /* PENGATURAN UMUM: Detail rata tengah */
}

/* START PERUBAHAN WARNA PENULIS DAN PENERBIT */

/* Warna spesifik untuk Penulis (mengasumsikan ini adalah <p> pertama) */
.produk p:nth-of-type(1) {
    color: #3182ce; /* Biru Solid */
    font-weight: 600;
}

/* Warna spesifik untuk Penerbit (mengasumsikan ini adalah <p> kedua) */
.produk p:nth-of-type(2) {
    color: #38b2ac; /* Hijau Teal/Dark Mint */
    font-weight: 600;
}

/* END PERUBAHAN WARNA PENULIS DAN PENERBIT */


/* PERUBAHAN: Menargetkan harga, yang kini berada di elemen <p> terakhir. */
/* Style ini menimpa p:nth-of-type(x) di atas untuk elemen terakhir */
.produk p:last-of-type { 
    font-size: 0.7em;
    font-weight: 700;
    color: #e53e3e; /* Warna merah untuk harga */
    margin-top: 10px; /* Tambah margin atas dari detail */
    margin-bottom: 15px; /* Jaga jarak dengan tombol Add to Cart */
    padding: 0 15px;
    text-align: center;
}

/* Styling tombol Add to Cart (Rata Kanan, Kecil, Ikon Merah) - DIJAGA */
.btn-tambah {
    background: none; 
    border: none;
    cursor: pointer;
    padding: 0; 
    margin: 10px 15px 15px 15px; 
    
    font-size: 0.85em;
    font-weight: 600;
    color: #4a5568; 
    
    display: inline-flex; 
    align-items: center;
    gap: 4px; 
    transition: color 0.3s ease;
}

/* Penempatan tombol RATA KANAN pada kartu produk */
.produk .btn-tambah {
    align-self: flex-end; 
    margin-right: 20px; 
}

.btn-tambah:hover {
    color: #e53e3e; 
}

/* Styling ikon keranjang menjadi MERAH */
.cart-icon {
    font-size: 1.2em; 
    color: #e53e3e; 
    transition: color 0.3s ease;
}

/* ================== Shopping Cart & Forms ================== */
.keranjang-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.keranjang-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 15px;
}

.keranjang-item:hover {
    background-color: #f7fafc;
}

.item-info {
    flex-grow: 1;
}

.item-info h4 {
    margin: 0 0 5px;
    font-size: 1.2em;
    color: #2d3748;
}

.item-info p {
    margin: 0;
    font-size: 0.95em;
    color: #718096;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.jumlah-item {
    width: 60px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    text-align: center;
    font-size: 1em;
}

.hapus-item {
    background-color: #e53e3e;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}

.hapus-item:hover {
    background-color: #c53030;
}

.keranjang-form {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid #e2e8e0;
}

.kode-diskon-input {
    padding: 12px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1em;
    width: 180px;
}

.apply-diskon-btn {
    background-color: #4299e1;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: 600;
}

.apply-diskon-btn:hover {
    background-color: #3182ce;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 1.1em;
    color: #4a5568;
}

.total-bayar {
    font-weight: 800;
    font-size: 1.5em;
    color: #2d3748;
    border-top: 2px solid #a0aec0;
    padding-top: 15px;
    margin-top: 15px;
}

.bayar-btn {
    background-color: #38a169;
    color: #fff;
    padding: 15px 30px;
    border: none;
    cursor: pointer;
    margin-top: 25px;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 700;
    transition: background-color 0.3s;
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
}

.bayar-btn:hover:not(:disabled) {
    background-color: #2f855a;
}

.bayar-btn:disabled {
    background-color: #a0aec0;
    cursor: not-allowed;
}

#btn-batal-bayar {
    /* Mirip dengan btn-primary */
    background-color: #dc3545; /* Merah */
    color: white; 
	 padding: 15px 30px;
    border: none;
    cursor: pointer;
    border-radius: 10px;
    font-size: 1.2em;
    font-weight: 700;
    /* Aturan Khusus yang Anda minta */
    margin-left: 20px; 
}

#btn-batal-bayar:hover {
    background-color: #c82333; /* Merah lebih gelap saat hover */
}

/* ================== Login & Register Form ================== */
.tab-content h2 {
    text-align: center;
    color: #2d3748;
    margin-bottom: 35px;
    font-size: 2em;
}

#form-login, #form-register {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 450px;
    margin: 0 auto;
    padding: 30px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

#form-login label, #form-register label {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.95em;
}

#form-login input, #form-register input {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    border: 1px solid #cbd5e0;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#form-login input:focus, #form-register input:focus {
    outline: none;
    border-color: #4fd1c5;
    box-shadow: 0 0 0 4px rgba(79, 209, 197, 0.2);
}

#form-login button, #form-register button {
    background-color: #4299e1;
    color: #fff;
    padding: 16px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: 700;
    margin-top: 15px;
    transition: background-color 0.3s;
}

#form-login button:hover, #form-register button:hover {
    background-color: #3182ce;
}

.register-link-container {
    text-align: center;
    margin-top: 25px;
    font-size: 1em;
    color: #718096;
}

.register-link-container a {
    color: #4299e1;
    text-decoration: none;
    font-weight: 700;
}

.register-link-container a:hover {
    text-decoration: underline;
}

/* ================== Biodata Styles ================== */
.biodata-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 40px;
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 500px;
    margin: 0 auto;
}

.profile-pic {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #4fd1c5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.biodata-details {
    width: 100%;
    text-align: left;
}

.biodata-details p {
    margin: 12px 0;
    font-size: 1.1em;
    color: #4a5568;
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 1px dotted #e2e8f0;
}

.biodata-details p strong {
    color: #2d3748;
    min-width: 120px;
    font-weight: 700;
}

#logout-link {
    color: #e53e3e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s;
}

#logout-link:hover {
    color: #c53030;
    text-decoration: underline;
}
/* ================== PATCH: GAYA TOTAL BAYAR ================== */
#total-bayar-text {
    /* Menebalkan teks */
    font-weight: bold;
    /* Mengubah warna menjadi hijau tua (misalnya: forest green) */
    color: #1a5e1a; 
    /* Mengatur ukuran font */
    font-size: 1.2em;
}
/* ============================================================= */
/* ================== Payment & Checkout Styles ================== */
.payment-instructions {
    background-color: #ecfdf5; /* Warna hijau muda yang lebih soft */
    border: 1px solid #a7f3d0;
    padding: 30px;
    border-radius: 16px;
    margin-top: 30px;
    text-align: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.payment-instructions h4 {
    color: #065f46;
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 20px;
}

.bank-details {
    font-size: 1.2em;
    margin: 15px 0;
    line-height: 1.8;
}

.bank-details strong {
    font-size: 1.1em;
    color: #104e3b;
}

.payment-proof-note, .contact-note {
    font-size: 1em;
    color: #4b5563;
    margin-top: 25px;
    border-top: 1px dashed #a7f3d0;
    padding-top: 15px;
}

.payment-proof-note strong {
    color: #ef4444; /* Merah cerah untuk penekanan kontak */
}

/* ================== Modal Styles & Riwayat (Non-Buku) ================== */

/* Modal sudah terdefinisi di HTML, menyesuaikan dengan modal-content */
.modal-content {
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 550px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    animation: fadeIn 0.4s;
    max-height: 85vh;
}

.close-button {
    font-size: 32px;
    color: #6c757d;
}

.close-button:hover,
.close-button:focus {
    color: #343a40;
}

.item-preview-image {
    max-width: 100%;
    max-height: 50vh;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.item-preview-content p {
    text-align: left;
    margin: 10px 0;
    font-size: 1em;
    color: #34495e;
}

.item-preview-content .item-description { /* Style SPESIFIK untuk deskripsi */
    padding: 15px;
    background-color: #f0f0f0;
    border-radius: 8px;
    margin: 15px 0;
    line-height: 1.8;
    text-align: justify; /* Membuat teks deskripsi lebih rapi */
    color: #212529;
}

.riwayat-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.riwayat-item {
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    background-color: #f7fafc;
}

.riwayat-item h4 {
    color: #4fd1c5;
    margin-top: 0;
    margin-bottom: 10px;
    border-bottom: 2px solid #a7f3d0;
    padding-bottom: 8px;
    font-size: 1.3em;
}

/* ================== Media Queries untuk Responsif ================== */
@media (max-width: 900px) {
    
	 
	
	
	
	
	
	
	
	
	#produk-list {
        /* PERUBAHAN: Mengatur 3 kolom untuk tablet */
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
    .header {
        padding: 15px 20px;
    }
    .tabs-nav-item {
        padding: 12px 18px;
        font-size: 0.9em;
    }
}

@media (max-width: 600px) {
	.modal {
        /* Matikan sentring otomatis: Dorong konten ke Kiri (start) dan Atas (start) */
        justify-content: flex-start !important; 
        align-items: flex-start !important; padding: 20 !important; 
    }
	
	.modal-content-buku.modal-buku-viewer {
        /* PENGATURAN TINGGI KHUSUS HP */
        /* Ganti nilai default (misalnya 80vh) menjadi 95vh di HP */
       /* height: 99vh;*/ padding: 0; 
        
        /* Opsional: Sesuaikan lebar menjadi 95% agar ada sedikit margin */
        width: 99vw;
        max-width: 99vw;
        
         /* === PERUBAHAN KRITIS: GESER KHUSUS HP === */
        /* Geser 30px ke KIRI (-30px) dan 40px ke ATAS (-40px) */
        transform: translate(10px, 10px);   
    }
	
	.modal-content-buku.modal-buku-viewer #book-content-iframe {
        /* Geser 30px ke KIRI (-30px) dan 40px ke ATAS (-40px) */
		 height: 99vh; padding: 0; 
        
        /* Opsional: Sesuaikan lebar menjadi 95% agar ada sedikit margin */
        width: 98vw;
        max-width: 99vw;
		
        transform: translate(10px, 10px); padding:0;
    }
	
	
	
	 
}
	
	
	
    /* PERBAIKAN RESPONSIVITAS DIV GAMBAR */
    #produk-list {
        /* MENGUBAH: Memaksa grid menjadi 2 kolom di layar kecil (HP) */
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; /* Kurangi gap agar lebih rapat */
    }

    .produk img {
        /* Set max-height lebih rendah di mobile */
        max-height: 180px; 
    }
    /* AKHIR PERBAIKAN RESPONSIVITAS */

    .tab-content {
        padding: 20px;
        margin: 20px auto;
        width: 95%;
    }
    .page-title {
        /* PENYESUAIAN PADDING UNTUK MOBILE */
        padding: 20px;
        font-size: 1.2em;
    }
    .header-left .logo-text {
        font-size: 1.2em;
    }
    .header-right .menu-icon {
        font-size: 0.9em;
        margin-left: 15px;
    }
    
    /* === PATCH UNTUK MEMASTIKAN JUDUL/DETAIL BUKU RATA TENGAH PADA HP === */
    .produk h4,
    .produk p {
        text-align: center !important; 
    }
    /* ================================================================= */

    .keranjang-item {
        flex-direction: column;
        align-items: flex-start;
    }
    .item-controls {
        margin-top: 10px;
        width: 100%;
        justify-content: space-between;
    }
    .keranjang-form {
        flex-direction: column;
        align-items: stretch;
    }
    .kode-diskon-input, .apply-diskon-btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* === PENGATURAN SPESIFIK MODAL BUKU DI HP === */
    .modal-content-buku.modal-buku-viewer {
        /* Hapus pergeseran di HP agar modal berada tepat di tengah */
        transform: translate(0, 0); 
    }
    /* =========================================== */
	
	
}