/**
 * ============================================================
 * STYLE.CSS - CSS Utama Website Customer NES
 * ============================================================
 * Berisi semua styling untuk halaman customer termasuk:
 * - Navbar responsive + hamburger menu
 * - Banner carousel
 * - Product cards dengan animasi hover/click
 * - Footer
 * - Scroll reveal animation
 * - Responsive design (mobile, tablet, desktop)
 * - Tipografi modern & warna premium
 * ============================================================
 */

/* =============================================
   IMPORT FONT - Google Fonts (Inter)
   Tipografi modern untuk kesan premium
   ============================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* =============================================
   CSS VARIABLES - Sistem Warna & Design Tokens
   Warna utama hijau #1a6d4b dan gold #ffd700
   ============================================= */
:root {
    --primary: #1a6d4b;
    --primary-dark: #14553a;
    --primary-light: #dcf2e6;
    --gold: #ffd700;
    --gold-dark: #e6c200;
    --danger: #dc3545;
    --bg-light: #f8f9fa;
    --bg-card: #ffffff;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.18);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* =============================================
   RESET & BASE STYLES
   Dasar layout dan tipografi
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.6;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 50px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* =============================================
   CONTAINER - Wrapper Konten
   ============================================= */
.content-container {
    width: 95%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =============================================
   NAVBAR - Navigasi Utama
   Background hijau, teks putih, hover gold
   ============================================= */
.navbar {
    background-color: var(--primary);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.navbar .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo & Brand */
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}

.navbar-brand .logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-brand .logo-circle img {
    width: 100%;
    padding: 5px;
}

/* =============================================
   HAMBURGER MENU - Tombol Menu Mobile
   Tiga garis yang beranimasi menjadi X
   ============================================= */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
    z-index: 1100;
    background: none;
    border: none;
}

.hamburger span {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: var(--transition);
}

/* Animasi hamburger menjadi X saat aktif */
.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* =============================================
   NAV LINKS - Menu Navigasi
   ============================================= */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 5px;
    list-style: none;
}

.nav-menu a {
    color: rgba(255, 255, 255, 0.85);
    padding: 8px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-menu a:hover {
    color: var(--gold) !important;
    background: rgba(255, 255, 255, 0.08);
}

.nav-menu a.active {
    color: var(--gold) !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* =============================================
   DROPDOWN MENU - Submenu Kategori
   ============================================= */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 200px;
    z-index: 2000;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.dropdown-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--text-dark) !important;
    font-size: 0.85rem;
    text-transform: none;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: var(--primary) !important;
    color: white !important;
}

/* =============================================
   NAVBAR RIGHT - Cart, Search, Profile
   ============================================= */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right .cart-link {
    position: relative;
    color: white;
    font-size: 1.3rem;
    transition: var(--transition);
}

.nav-right .cart-link:hover {
    color: var(--gold);
    transform: scale(1.1);
}

/* Badge Count Keranjang */
.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search Bar */
.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    border: none;
    border-radius: 20px 0 0 20px;
    padding: 6px 14px;
    font-size: 0.8rem;
    outline: none;
    width: 160px;
    background: rgba(255,255,255,0.15);
    color: white;
    transition: var(--transition);
}

.search-form input::placeholder {
    color: rgba(255,255,255,0.6);
}

.search-form input:focus {
    background: rgba(255,255,255,0.25);
    width: 200px;
}

.search-form button {
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 6px 12px;
    border-radius: 0 20px 20px 0;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: var(--gold);
    color: var(--primary);
}

/* Profile Area */
.nav-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 15px;
    border-left: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    position: relative;
}

.nav-profile .user-name {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-profile .profile-icon {
    color: var(--gold);
    font-size: 1.8rem;
}

.nav-profile .profile-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold);
}

.nav-profile .auth-links {
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-profile .auth-links a {
    color: white;
}

.nav-profile .auth-links a:hover {
    color: var(--gold);
}

/* Profile Dropdown */
.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    min-width: 180px;
    z-index: 2000;
}

.profile-dropdown.show {
    display: block;
}

.profile-dropdown a {
    display: block;
    padding: 10px 18px;
    color: var(--text-dark) !important;
    font-size: 0.85rem;
    text-transform: none;
}

.profile-dropdown a:hover {
    background: var(--bg-light);
}

.profile-dropdown .text-danger {
    color: var(--danger) !important;
}

.profile-dropdown .divider {
    height: 1px;
    background: #eee;
    margin: 4px 0;
}

/* =============================================
   BANNER CAROUSEL
   Auto-sliding banner promosi
   ============================================= */
.banner-wrapper {
    margin-top: 25px;
    margin-bottom: 60px;
}

.carousel {
    position: relative;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.carousel-inner {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.carousel-item {
    display: none;
    width: 100%;
    transition: opacity 0.8s ease;
    opacity: 0;
}

.carousel-item.active {
    display: block;
    opacity: 1;
}

.carousel-item img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

/* Carousel Indicators (dots) */
.carousel-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background-color: var(--primary);
    opacity: 0.3;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-indicators button.active {
    opacity: 1;
    background-color: var(--gold);
    transform: scale(1.3);
}

/* =============================================
   PRODUCT CARDS - Kartu Produk
   Animasi hover, click, & zoom gambar
   ============================================= */
.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition-bounce);
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

/* Animasi hover: card naik + shadow membesar */
.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-xl);
    z-index: 5;
}

/* Animasi click: card menyusut sesaat */
.product-card:active {
    transform: scale(0.95) translateY(0);
    box-shadow: var(--shadow-sm);
    transition: all 0.1s ease;
}

/* Wrapper gambar produk dengan efek zoom */
.product-img-wrapper {
    height: 220px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 15px;
}

.product-img-wrapper img {
    max-height: 100%;
    width: auto;
    object-fit: contain;
    transition: transform 0.6s ease;
}

/* Zoom gambar saat hover card */
.product-card:hover .product-img-wrapper img {
    transform: scale(1.15);
}

/* Info produk (nama & harga) */
.product-info {
    padding: 15px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info .product-name {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-dark);
    line-height: 1.3;
}

.product-info .product-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--danger);
}

/* Label stok habis */
.out-of-stock-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--danger);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.product-img-wrapper {
    position: relative;
}

/* =============================================
   SECTION TITLE - Judul Seksi
   ============================================= */
.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    padding-bottom: 10px;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--text-dark);
}

/* =============================================
   CARDS - Card Generik
   ============================================= */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: none;
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 20px;
}

/* =============================================
   BUTTONS - Tombol
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); color: white; }

.btn-success { background: #198754; color: white; }
.btn-success:hover { background: #157347; color: white; }

.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #a71d2a; color: white; }

.btn-warning { background: #ffc107; color: #000; }
.btn-warning:hover { background: #e0a800; }

.btn-secondary { background: #6c757d; color: white; }
.btn-secondary:hover { background: #5a6268; color: white; }

.btn-outline-primary { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: white; }

.btn-outline-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: white; }

.btn-outline-secondary { background: transparent; color: #6c757d; border: 1px solid #6c757d; }
.btn-outline-secondary:hover { background: #6c757d; color: white; }

.btn-green {
    background-color: var(--primary);
    color: white;
    border: none;
    transition: var(--transition);
}

.btn-green:hover {
    background-color: var(--gold);
    color: var(--primary);
    font-weight: 700;
    transform: translateY(-2px);
}

.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* =============================================
   FORMS - Input & Select
   ============================================= */
.form-control, .form-select {
    font-family: 'Inter', sans-serif;
    padding: 10px 14px;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    width: 100%;
    outline: none;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 109, 75, 0.15);
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

textarea.form-control {
    resize: vertical;
}

/* =============================================
   BADGES
   ============================================= */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success { background: #198754; color: white; }
.badge-danger { background: var(--danger); color: white; }
.badge-warning { background: #ffc107; color: #000; }
.badge-info { background: #0dcaf0; color: #000; }
.badge-primary { background: #0d6efd; color: white; }
.badge-secondary { background: #6c757d; color: white; }
.badge-light { background: #f8f9fa; color: var(--text-dark); border: 1px solid #dee2e6; }

/* =============================================
   ALERTS
   ============================================= */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success { background: #d1e7dd; color: #0f5132; }
.alert-danger { background: #f8d7da; color: #842029; }
.alert-warning { background: #fff3cd; color: #664d03; }

/* =============================================
   TABLES
   ============================================= */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 0.9rem;
}

table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: rgba(26, 109, 75, 0.03);
}

/* =============================================
   MODALS - Pop-up Dialog
   ============================================= */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-overlay.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

.modal-lg {
    max-width: 800px;
}

.modal-sm {
    max-width: 360px;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h5 {
    font-weight: 700;
    margin: 0;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* =============================================
   FOOTER - Redesign Premium 4 Kolom
   Logo bank, navigasi, kontak, social icons
   ============================================= */
.footer {
    background: linear-gradient(180deg, #f0faf5 0%, #e0f2ea 100%);
    padding: 50px 0 0;
    margin-top: auto;
    border-top: 3px solid var(--primary);
}

.footer h5 {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Footer Grid 4 kolom */
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
    gap: 30px;
    padding-bottom: 30px;
}

.footer-col {}

/* Footer Links */
.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li { margin-bottom: 8px; }

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Footer Contact */
.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact a {
    color: var(--text-muted);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.footer-contact a:hover {
    color: var(--primary);
}

.footer-contact a i {
    font-size: 1rem;
    color: var(--primary);
    width: 20px;
}

/* Bank Logo Grid Cards */
.bank-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.bank-card {
    background: white;
    border-radius: 8px;
    padding: 6px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.bank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(26, 109, 75, 0.12);
    border-color: rgba(26, 109, 75, 0.3);
}

.bank-card img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.bank-card:hover img {
    transform: scale(1.08);
}

/* Footer Bottom Bar */
.footer-bottom {
    border-top: 1px solid rgba(26, 109, 75, 0.15);
    padding: 18px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gold);
    color: var(--primary);
    transform: translateY(-3px);
}

/* =============================================
   SCROLL REVEAL ANIMATION
   Elemen muncul dari bawah saat scroll (1x saja)
   ============================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Variasi delay untuk efek staggered */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* =============================================
   PAGE FADE-IN - Animasi saat halaman dimuat
   ============================================= */
.page-fade-in {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =============================================
   DETAIL PRODUK
   ============================================= */
/* Revisi: gambar detail produk tanpa zoom hover */
.detail-img {
    max-width: 100%;
    width: auto;
    height: auto;
    max-height: 400px;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid #eee;
    background: #fff;
    padding: 10px;
    display: block;
    margin: 0 auto;
}

.detail-tabs {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.detail-tabs h5 {
    cursor: pointer;
    padding-bottom: 8px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.detail-tabs h5.active {
    color: var(--text-dark);
    border-bottom: 3px solid #0d6efd;
}

.detail-tabs h5:hover {
    color: var(--text-dark);
}

/* Quantity Input */
.qty-group {
    display: flex;
    align-items: center;
    border: 1px solid #dee2e6;
    border-radius: var(--radius-sm);
    overflow: hidden;
    width: fit-content;
}

.qty-group button {
    width: 38px;
    height: 38px;
    border: none;
    background: var(--bg-light);
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.qty-group button:hover {
    background: #dee2e6;
}

.qty-group input {
    width: 50px;
    height: 38px;
    text-align: center;
    border: none;
    border-left: 1px solid #dee2e6;
    border-right: 1px solid #dee2e6;
    font-weight: 700;
    font-size: 0.9rem;
    outline: none;
}

/* =============================================
   ORDER TABS - Filter Pesanan
   ============================================= */
.order-tabs {
    display: flex;
    background: var(--bg-light);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 8px;
    gap: 4px;
    overflow-x: auto;
}

.order-tabs a {
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    transition: var(--transition);
}

.order-tabs a.active {
    background: var(--danger);
    color: white;
}

.order-tabs a:hover:not(.active) {
    background: #dee2e6;
}

/* =============================================
   CHECKOUT - Halaman Konfirmasi Pembayaran
   ============================================= */
.checkout-header {
    background: var(--danger);
    color: white;
    padding: 16px 20px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

/* =============================================
   UTILITY CLASSES
   ============================================= */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-success { color: #198754; }
.text-danger { color: var(--danger); }
.text-primary { color: #0d6efd; }
.text-warning { color: #ffc107; }
.text-dark { color: var(--text-dark); }
.text-white { color: white; }

.fw-bold { font-weight: 700; }
.fw-semibold { font-weight: 600; }
.small { font-size: 0.85rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 40px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 40px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.ms-2 { margin-left: 8px; }
.p-3 { padding: 16px; }
.p-4 { padding: 24px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 40px; padding-bottom: 40px; }
.px-3 { padding-left: 16px; padding-right: 16px; }
.px-4 { padding-left: 24px; padding-right: 24px; }

.d-flex { display: flex; }
.d-none { display: none; }
.d-block { display: block; }
.d-grid { display: grid; }
.align-items-center { align-items: center; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.rounded { border-radius: var(--radius-sm); }
.rounded-4 { border-radius: var(--radius-xl); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.border-0 { border: none; }
.border-top { border-top: 1px solid #dee2e6; }
.border-bottom { border-bottom: 1px solid #dee2e6; }

.position-relative { position: relative; }
.position-sticky { position: sticky; top: 20px; }

/* Grid layout helpers */
.row {
    display: grid;
    gap: 24px;
}

.row-2 { grid-template-columns: repeat(2, 1fr); }
.row-3 { grid-template-columns: repeat(3, 1fr); }
.row-4 { grid-template-columns: repeat(4, 1fr); }
.row-2-1 { grid-template-columns: 2fr 1fr; }
.row-1-2 { grid-template-columns: 1fr 2fr; }
.row-8-4 { grid-template-columns: 2fr 1fr; }
.row-4-8 { grid-template-columns: 1fr 2fr; }
.row-5-5 { grid-template-columns: 1fr 1fr; }
.row-5-7 { grid-template-columns: 5fr 7fr; }

/* =============================================
   RESPONSIVE DESIGN - Media Queries
   ============================================= */

/* Tablet (768px - 992px) */
@media (max-width: 992px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .row-2, .row-3, .row-4, .row-2-1, .row-1-2, .row-8-4, .row-4-8, .row-5-5, .row-5-7 {
        grid-template-columns: 1fr;
    }

    .search-form { display: none; }
}

/* Mobile (max 768px) */
@media (max-width: 768px) {
    /* Cegah overflow horizontal di seluruh halaman */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    /* Hamburger tampil di mobile */
    .hamburger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.1);
        border: none;
        cursor: pointer;
        z-index: 1200;
        order: 3;
        transition: var(--transition);
        -webkit-tap-highlight-color: transparent;
    }

    .hamburger:hover {
        background: rgba(255, 255, 255, 0.2);
    }

    .navbar-brand {
        order: 1;
    }

    .nav-right {
        order: 2;
    }

    /* Nav menu menjadi sidebar overlay */
    .nav-menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: var(--primary);
        flex-direction: column;
        padding: 80px 30px 30px;
        gap: 5px;
        align-items: stretch;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1050;
        box-shadow: 5px 0 30px rgba(0,0,0,0.3);
        overflow-y: auto;
    }

    .nav-menu.open {
        left: 0;
    }

    /* Pastikan semua link di nav-menu bisa diklik */
    .nav-menu li {
        display: block;
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 16px;
        font-size: 0.9rem;
        border-radius: var(--radius-sm);
        -webkit-tap-highlight-color: transparent;
        cursor: pointer;
        pointer-events: auto;
    }

    .nav-menu a:hover, .nav-menu a.active {
        background: rgba(255,255,255,0.1);
    }

    /* Dropdown di mobile - pastikan bisa diklik */
    .dropdown {
        position: static;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(255,255,255,0.05);
        border-radius: var(--radius-sm);
        padding: 0;
        margin-top: 4px;
        transform: none;
        opacity: 1;
    }

    .dropdown-menu a {
        color: rgba(255,255,255,0.8) !important;
        padding: 10px 30px;
        font-size: 0.8rem;
    }

    .dropdown-menu a:hover {
        background: rgba(255,255,255,0.1) !important;
        color: var(--gold) !important;
    }

    /* Product grid 2 kolom di mobile */
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .product-img-wrapper {
        height: 160px;
        padding: 10px;
    }

    .product-info {
        padding: 10px;
    }

    .product-info .product-name {
        font-size: 0.75rem;
    }

    .product-info .product-price {
        font-size: 0.75rem;
    }

    /* Banner tinggi dikurangi */
    .carousel-item img {
        height: 200px;
    }

    .section-title {
        font-size: 1.1rem;
    }

    .content-container {
        padding: 0 10px;
        max-width: 100%;
        overflow-x: hidden;
    }

    /* ===== FOOTER RESPONSIVE MOBILE ===== */
    .footer {
        padding: 30px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        padding-bottom: 24px;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col > div[style*="display:flex"] {
        justify-content: center;
    }

    .footer-contact {
        align-items: center;
    }

    .footer-links {
        text-align: center;
    }

    .bank-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 280px;
        margin: 0 auto;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 0;
    }

    .footer-social {
        justify-content: center;
    }

    /* Table scroll */
    .table-responsive {
        font-size: 0.8rem;
    }

    /* Overlay untuk menutup menu */
    .nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.4);
        z-index: 1040;
    }

    .nav-overlay.show {
        display: block;
    }

    /* Order tabs scroll horizontal */
    .order-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .order-tabs a {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    /* Row responsive untuk checkout dan cart */
    .row-8-4, .row-2-1, .row-1-2, .row-4-8, .row-5-5, .row-5-7 {
        grid-template-columns: 1fr !important;
    }

    /* Card body padding mobile */
    .card-body {
        padding: 14px;
    }

    /* Detail produk mobile */
    .detail-img {
        max-height: 280px;
    }

    /* Form controls mobile */
    .form-select, .form-control {
        font-size: 0.85rem;
    }

    /* Checkout item layout mobile */
    .checkout-item-row {
        flex-direction: column;
        text-align: center;
    }
}

/* Small Mobile (max 480px) */
@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .product-img-wrapper {
        height: 130px;
    }

    .carousel-item img {
        height: 160px;
    }

    .navbar .container-fluid {
        padding: 0 12px;
    }
}

/* =============================================
   SMOOTH IMAGE LOADING
   Gambar muncul smooth saat dimuat
   ============================================= */
img {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img.loaded, img[src] {
    opacity: 1;
}

/* Pastikan gambar yang sudah loaded tetap terlihat */
img:not([data-lazy]) {
    opacity: 1;
}

/* =============================================
   LOADING SPINNER
   ============================================= */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #eee;
    border-top-color: var(--danger);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================
   SELECTION STYLE
   ============================================= */
::selection {
    background: var(--primary);
    color: white;
}

/* =============================================
   SCROLLBAR CUSTOM
   ============================================= */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* =============================================
   PAYMENT FLOW - QR Code, PIN Modal, Success
   ============================================= */

/* Payment Method Selection Cards */
.payment-method-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.payment-method-card {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: white;
}

.payment-method-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.payment-method-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(26, 109, 75, 0.15);
}

.payment-method-card i {
    font-size: 1.6rem;
    color: var(--primary);
    display: block;
    margin-bottom: 6px;
}

.payment-method-card .method-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--text-dark);
}

.payment-method-card .method-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Payment Modal (QR Code / PIN) */
.payment-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(6px);
}

.payment-modal-overlay.show {
    display: flex;
}

.payment-modal {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.25);
    max-width: 420px;
    width: 92%;
    animation: paymentModalIn 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
}

@keyframes paymentModalIn {
    from { opacity: 0; transform: scale(0.85) translateY(30px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.payment-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0d7a52 100%);
    color: white;
    padding: 24px;
    text-align: center;
}

.payment-modal-header h4 {
    margin: 0;
    font-weight: 800;
    font-size: 1.1rem;
}

.payment-modal-header p {
    margin: 6px 0 0;
    font-size: 0.82rem;
    opacity: 0.85;
}

.payment-modal-body {
    padding: 28px 24px;
    text-align: center;
}

/* QR Code Display */
.qr-code-container {
    display: inline-block;
    padding: 16px;
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: var(--radius-lg);
    margin-bottom: 18px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.qr-code-svg {
    width: 200px;
    height: 200px;
}

.qr-code-container .qr-label {
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Payment amount in modal */
.payment-amount-display {
    background: linear-gradient(135deg, #f0faf5, #e8f5ed);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid rgba(26, 109, 75, 0.15);
}

.payment-amount-display .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.payment-amount-display .amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
}

/* Countdown Timer */
.countdown-timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff3cd;
    color: #664d03;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.countdown-timer i {
    font-size: 1rem;
}

.countdown-timer.expired {
    background: #f8d7da;
    color: #842029;
}

/* PIN Input */
.pin-input-group {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.pin-input-group input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--transition);
    font-family: 'Inter', sans-serif;
    -webkit-text-security: disc;
}

.pin-input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 109, 75, 0.15);
    transform: scale(1.05);
}

.pin-input-group input.error {
    border-color: var(--danger);
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.pin-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 18px;
}

.pin-error-msg {
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: none;
}

.pin-error-msg.show {
    display: block;
}

.payment-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 10px;
}

.payment-modal-footer .btn {
    flex: 1;
}

/* =============================================
   PAYMENT SUCCESS PAGE
   ============================================= */
.payment-success-container {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.payment-success-card {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    animation: successCardIn 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes successCardIn {
    from { opacity: 0; transform: translateY(40px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.success-icon-area {
    background: linear-gradient(135deg, #198754 0%, #20c997 100%);
    padding: 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.success-icon-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 1; }
}

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    position: relative;
    z-index: 1;
    animation: checkBounce 0.6s 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

@keyframes checkBounce {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.success-checkmark i {
    font-size: 2.5rem;
    color: #198754;
}

.success-icon-area h3 {
    color: white;
    font-weight: 800;
    margin: 0;
    position: relative;
    z-index: 1;
    font-size: 1.3rem;
}

.success-icon-area p {
    color: rgba(255, 255, 255, 0.85);
    margin: 6px 0 0;
    font-size: 0.88rem;
    position: relative;
    z-index: 1;
}

.success-details {
    padding: 28px;
}

.success-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
}

.success-detail-row:last-child {
    border-bottom: none;
}

.success-detail-row .label {
    color: var(--text-muted);
    font-weight: 500;
}

.success-detail-row .value {
    font-weight: 700;
    color: var(--text-dark);
    text-align: right;
}

.success-detail-row .value.total-amount {
    color: var(--primary);
    font-size: 1.1rem;
}

.success-actions {
    padding: 0 28px 28px;
    display: flex;
    gap: 12px;
    flex-direction: column;
}

.success-actions .btn {
    width: 100%;
    padding: 13px;
    font-size: 0.92rem;
}

/* Confetti animation for success page */
.confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99998;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    animation: confettiFall 3s ease-in forwards;
}

@keyframes confettiFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* Mobile Payment Modal */
@media (max-width: 768px) {
    .payment-modal {
        max-width: 340px;
        width: 94%;
    }

    .qr-code-svg {
        width: 160px;
        height: 160px;
    }

    .pin-input-group input {
        width: 42px;
        height: 50px;
        font-size: 1.2rem;
    }

    .success-icon-area {
        padding: 30px 20px;
    }

    .success-checkmark {
        width: 65px;
        height: 65px;
    }

    .success-checkmark i {
        font-size: 2rem;
    }

    .success-details {
        padding: 20px;
    }

    .success-actions {
        padding: 0 20px 20px;
    }

    .payment-method-cards {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .payment-method-card {
        padding: 10px;
    }

    .payment-method-card i {
        font-size: 1.3rem;
    }

    .payment-method-card .method-name {
        font-size: 0.75rem;
    }

    .payment-method-card .method-desc {
        font-size: 0.65rem;
    }
}
