/* Import Font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* Variabel Warna & Desain */
:root {
    --primary-color: #3B82F6;
    --danger-color: #ff3e1d;
    --success-color: #28a745;
    --sidebar-bg: #1E293B;
    --sidebar-hover-bg: #334155;
    --body-bg: #F8FAFC;
    --card-bg: #FFFFFF;
    --text-light: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    --border-radius: 10px;
}

/* Reset & Global */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* Layout Utama Dashboard */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #ff3e1d;
    color: var(--text-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100%;
    overflow-y: auto;
    font-size: 15px;
}

.sidebar .logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 30px;
    text-align: center;
}

.sidebar .menu a {
    display: block;
    color: var(--text-light);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 5px;
}

.sidebar .menu a:hover,
.sidebar .menu a.active {
    background-color: #bb1f04;
}

.main-wrapper {
    margin-left: 250px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.header {
    height: 60px;
    padding: 0 40px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
}

.main-content {
    flex: 1;
    padding: 40px;
}

.footer {
    padding: 20px 40px;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.footer .footer-links a {
    margin-left: 15px;
    color: var(--text-muted);
}

/* Komponen Card */
.card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

/* Komponen Form & Tombol */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-danger {
    background-color: var(--danger-color);
    color: var(--text-light);
    box-shadow: 0 4px 14px 0 rgba(255, 62, 29, 0.39);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--text-light);
}

/* Halaman Login & Register */
.auth-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-card .logo {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--danger-color);
}

.auth-card h3 {
    text-align: center;
    margin-bottom: 20px;
    font-weight: 500;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

/* Grid Katalog Produk */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px;
    margin-left: 30px;
    margin-right: 30px;
}

.product-card {
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.product-card img {
    width: 100%;
    height: 200px;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    object-fit: contain;
}

.product-card-body {
    padding: 15px;
}

.product-card h5 {
    font-size: 1rem;
    margin-bottom: 5px;
    /* align-content: center; */
    text-align: center !important;
    padding-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.product-card .price {
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
    Font-size: 20px;
}

.product-card .description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.payment-options-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.payment-option-item {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
}

.payment-option-item:hover {
    border-color: #007bff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.payment-option-item input[type="radio"] {
    margin-right: 8px;
    accent-color: #007bff; /* Warna radio button modern */
}

.payment-option-item .payment-option-item img {
    width: 40px;
    height: auto;
    margin-right: 10px;
    object-fit: contain;
}

.payment-option-item span {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

/* Tabel */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background-color: #F9FAFB;
    font-weight: 600;
}

.table .status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}
.status.paid {
    background-color: #ECFDF5;
    color: #16A34A;
}
.status.pending {
    background-color: #FFFBEB;
    color: #F59E0B;
}

/* Popup / Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 600px;
    transform: scale(0.9);
    transition: all 0.3s ease;
    height: 70%;
    overflow-y: scroll;
}

.modal-overlay.show .modal-content {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.modal-header h4 {
    font-size: 1.3rem;
}

.close-modal {
    cursor: pointer;
    font-size: 1.5rem;
    border: none;
    background: transparent;
}

.modal-body .detail-item {
    margin-bottom: 15px;
}
.modal-body .detail-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-muted);
}
.modal-body .detail-item p,
.modal-body .detail-item a {
    background-color: var(--body-bg);
    padding: 10px;
    border-radius: 5px;
    word-break: break-all;
}

/* Halaman Produk Detail */
.product-page-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 20px;
    background-color: #f4f4f4;
}

.product-detail-card {
    max-width: 500px;
    width: 100%;
    background: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.product-detail-header {
    background-color: #ff3e1d;
    color: white;
    padding: 15px 20px;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

.product-detail-body {
    padding: 20px;
}

.product-detail-body img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
    background-color: #eee;
    height: 210px;
    object-fit: contain;
}

h1{

    text-align: center !important;
    display: block;
    font-size: 2em;
    margin-block-start: 0.67em;
    margin-block-end: 0.67em;
    margin-inline-start: 0px;
    margin-inline-end: 0px;
    font-weight: bold;
    unicode-bidi: isolate;

}

.product-detail-body h1 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    text-align: center !important;
    padding-bottom: 10px;
    font-family: 'Poppins', sans-serif;
}

.product-detail-body .price {
    font-weight: 700;
    color: var(--danger-color);
    margin-bottom: 25px;
    font-family: 'Playfair Display', serif;
    Font-size: 1.4rem
}

.product-detail-body .description {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin-bottom: 20px;
}

.btn-share {
    background-color: #007bff;
    color: white;
    width: 100%;
    margin-bottom: 20px;
    text-align: center;
}

.divider {
    border-top: 1px solid #eee;
    margin: 20px 0;
}

.subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: bold;
    margin: 15px 0;
}

.product-detail-footer {
    background-color: #222;
    color: white;
    text-align: center;
    padding: 15px;
    font-size: 14px;
}

.paid-stamp {
    position: absolute;
    top: 25px;
    right: 25px;
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--success-color);
    border: 2px solid var(--success-color);
    border-radius: 8px;
    transform: rotate(15deg);
    opacity: 0.8;
}

.confirmation-box {
    margin-top: 20px;
    padding: 20px;
    background-color: #f0f8ff;
    border: 1px solid #b0d8ff;
    border-radius: 8px;
    text-align: center;
}

.confirmation-box h4 {
    margin-top: 0;
}

.confirmation-box .support-link {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
}
.small-text {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.chat-timestamp {
    display: block;
    font-size: 0.75rem;
    color: #888;
    margin-top: 5px;
    text-align: right;
}
.chat-bubble.admin .chat-timestamp {
    text-align: left;
}

/* --- CSS untuk Bottom Navigation Bar --- */
.bottom-nav {
    display: none; /* Sembunyikan di desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background-color: #ffffff;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    align-items: center;
    padding: 0 5px;
}

.bottom-nav-scroll {
    display: flex;
    flex-grow: 1;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
    scroll-behavior: smooth;
}

.bottom-nav-scroll::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px; /* Lebar minimum setiap item menu */
    height: 100%;
    padding: 8px 4px;
    color: #757575;
    text-decoration: none;
    flex-shrink: 0; /* Mencegah item menyusut */
    transition: color 0.3s;
}

.bottom-nav-link svg {
    margin-bottom: 4px;
}

.bottom-nav-link span {
    font-size: 12px;
    font-weight: 500;
}

.bottom-nav-link.active {
    color: #c0392b; /* Warna merah untuk item aktif */
}

.scroll-btn {
    display: none; /* Akan diatur oleh JS */
    background: #f0f0f0;
    border: none;
    padding: 10px 5px;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
    font-weight: bold;
}

/* --- CSS untuk Responsivitas Konten Utama --- */

/* Wrapper untuk tabel agar bisa di-scroll horizontal */
.table-responsive-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch; /* Scrolling halus di iOS */
}

/* Sedikit padding untuk tabel di dalam wrapper */
.table-responsive-wrapper .table {
    margin-bottom: 0;
}

/* Aturan Media Query untuk Mobile */
@media (max-width: 768px) {
    .sidebar {
        display: none; /* Sembunyikan sidebar di mobile */
    }

    .main-wrapper {
        margin-left: 0; /* Konten utama memakai lebar penuh */
        width: 100%;
    }

    .main-content {
        padding: 15px;
         padding-bottom: 80px; /* Beri ruang agar tidak tertutup bottom-nav */
    }

    .bottom-nav {
        display: flex; /* Tampilkan bottom-nav di mobile */
    }

    /* Penyesuaian untuk Grid Produk */
    .product-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolom di mobile */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    /* Penyesuaian untuk layar yang lebih kecil */
    .product-grid {
        grid-template-columns: 1fr; /* 1 kolom di layar sangat kecil */
    }
}
