/* css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,600;1,400&display=swap');

* { margin: 0; padding: 0; box-sizing: border-box; }

/* KUNCI UTAMA: Biar layar HP ga bisa digeser ke kiri/kanan */
html, body {
    overflow-x: hidden; 
    background-color: #f4f2ed; /* Warna beige sangat lembut ala aesthetic korean style */
    font-family: 'Montserrat', sans-serif;
    color: #1a1a1a;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Navigasi */
.navbar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 30px 50px; background: transparent;
}
.logo { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 600; letter-spacing: 4px; }
.lang-switch { display: flex; gap: 15px; align-items: center; }
.lang-btn { background: none; border: none; font-family: 'Montserrat', sans-serif; font-weight: 400; cursor: pointer; color: #999; transition: 0.3s ease; font-size: 13px; letter-spacing: 1px;}
.lang-btn:hover { color: #1a1a1a; }
.lang-btn.active { color: #1a1a1a; font-weight: 600; }

/* Container Buku */
.container { flex: 1; display: flex; justify-content: center; align-items: center; padding: 20px; perspective: 2000px; }

/* --- PERBAIKAN COVER SINI --- */
.page.cover-page { 
    background-color: #4A3B32 !important; /* Warna cokelat tua elegan */
    color: #F4F2ED; 
    padding: 15px; 
}
.cover-border { 
    border: 1px solid rgba(244, 242, 237, 0.2); 
    height: 100%; width: 100%; display: flex; flex-direction: column; 
    justify-content: center; align-items: center; text-align: center; 
    padding: 30px; position: relative; 
}
.cover-issue { position: absolute; top: 30px; font-size: 10px; letter-spacing: 3px; color: #D1C7BD; }
.cover-title { 
    font-family: 'Playfair Display', serif; 
    font-size: 54px; letter-spacing: 8px; margin-bottom: 10px; 
    font-weight: 400; color: #F4F2ED !important; 
}
.cover-subtitle { font-family: 'Montserrat', sans-serif; font-weight: 300; color: #D1C7BD !important; font-size: 12px; letter-spacing: 4px; text-transform: uppercase; }
.cover-line { width: 40px; height: 1px; background-color: #D4AF37 !important; margin: 30px 0; }
.cover-location { font-size: 10px; letter-spacing: 5px; color: #B5A89A !important; }
.swipe-hint { position: absolute; bottom: 30px; font-size: 11px; color: #D1C7BD !important; letter-spacing: 2px; text-transform: uppercase; animation: fadeBounce 2s infinite; }

@keyframes fadeBounce { 0%, 100% { opacity: 0.5; transform: translateX(0); } 50% { opacity: 1; transform: translateX(8px); } }

/* Halaman Gambar */
.image-page { padding: 0; background-color: #fff; }
.product-img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.05) brightness(0.98); }

/* Halaman Detail */
.detail-page { padding: 50px 40px; justify-content: center; align-items: flex-start; text-align: left; }
.detail-header { display: flex; justify-content: space-between; width: 100%; align-items: center; margin-bottom: 30px; }
.collection-tag { font-size: 10px; letter-spacing: 2px; color: #999; text-transform: uppercase; }

.badge { padding: 4px 0; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 2px; }
.badge.ready { color: #4a6a4a; }
.badge.sold { color: #a64d4d; }

.product-name { font-family: 'Playfair Display', serif; font-size: 38px; line-height: 1.1; margin-bottom: 10px; color: #1a1a1a; font-weight: 400; }
.product-price { font-size: 18px; color: #1a1a1a; margin-bottom: 30px; font-family: 'Playfair Display', serif; font-style: italic; }
.divider { width: 30px; height: 1px; background-color: #1a1a1a; margin-bottom: 30px; }
.product-desc { line-height: 1.8; color: #555; font-size: 13px; font-weight: 300; margin-bottom: 50px; text-align: left; }

/* Tombol Premium */
.order-btn { width: 100%; background-color: transparent; color: #1a1a1a; border: 1px solid #1a1a1a; padding: 18px; font-size: 11px; font-family: 'Montserrat', sans-serif; font-weight: 600; letter-spacing: 2px; cursor: pointer; transition: all 0.4s ease; text-transform: uppercase; position: relative; overflow: hidden; }
.order-btn::before { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: #1a1a1a; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease; }
.order-btn:hover { color: #fff; }
.order-btn:hover::before { transform: scaleX(1); }

.sold-out-btn { border-color: #ddd; color: #aaa; cursor: not-allowed; }
.sold-out-btn::before { display: none; }
.sold-out-btn:hover { color: #aaa; background: transparent; }

/* Cover Belakang */
.page.back-cover { background-color: #f4f2ed !important; color: #1a1a1a; }
.back-logo { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; margin-bottom: 30px; filter: grayscale(100%); }

/* ========================================= */
/* LUXURY UPGRADE: NOISE, CURSOR, TYPOGRAPHY */
/* ========================================= */

/* Update Desain Harga Jadi Sangat Menonjol */
.product-price { 
    font-size: 20px; 
    color: #1a1a1a; 
    margin-bottom: 30px; 
    font-family: 'Playfair Display', serif; 
    font-style: italic;
    font-weight: 600; 
    background-color: #f4f2ed; 
    padding: 10px 25px;
    display: inline-block; 
    border: 1px solid #1a1a1a; 
    letter-spacing: 2px;
}

/* Background Film Grain/Noise */
.noise-bg {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    pointer-events: none; z-index: -1; opacity: 0.05;
    background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)"/%3E%3C/svg%3E');
}

/* Custom Cursor (Titik Estetik) - Dioptimalkan untuk GPU */
:root {
    --mouse-x: -100px;
    --mouse-y: -100px;
}
@media (pointer: fine) { 
    .cursor-dot, .cursor-outline {
        position: fixed; top: 0; left: 0; 
        z-index: 9999; pointer-events: none;
        will-change: transform;
    }
    .cursor-dot { 
        width: 6px; height: 6px; background: #1a1a1a; border-radius: 50%;
        transform: translate(calc(var(--mouse-x) - 50%), calc(var(--mouse-y) - 50%));
    }
    .cursor-outline { 
        width: 40px; height: 40px; border: 1px solid rgba(26,26,26,0.3); border-radius: 50%;
        transform: translate(calc(var(--mouse-x) - 50%), calc(var(--mouse-y) - 50%));
        transition: transform 0.15s ease-out, width 0.2s, height 0.2s, background-color 0.2s; 
    }
    
    a:hover ~ .cursor-outline, button:hover ~ .cursor-outline, .st-page-flip:hover ~ .cursor-outline, .cart-icon:hover ~ .cursor-outline {
        width: 60px; height: 60px; background: rgba(26,26,26,0.05);
    }
}

/* Teks Vertikal Kiri Kanan */
.vertical-text {
    position: fixed; top: 50%; transform: translateY(-50%);
    writing-mode: vertical-rl; font-size: 10px; letter-spacing: 5px;
    color: #999; text-transform: uppercase; z-index: 10; font-weight: 600;
}
.vertical-text.left { left: 40px; transform: translateY(-50%) rotate(180deg); }
.vertical-text.right { right: 40px; }

/* Footer & Indikator Halaman */
.footer-bar {
    position: fixed; bottom: 30px; left: 50px; right: 50px;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 10;
}
.socials a { color: #1a1a1a; font-size: 22px; margin-right: 15px; text-decoration: none; transition: 0.3s; }
.socials a:hover { color: #888; }
.page-indicator { font-size: 11px; letter-spacing: 3px; color: #1a1a1a; font-weight: 600; }

/* Update Panah Navigasi jadi SVG */
.nav-btn svg { width: 35px; height: 35px; }
.nav-btn:hover { background: transparent; transform: translateY(-50%) scale(1.1); }

/* --- Preloader Layar Loading --- */
.preloader {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: #1a1a1a; z-index: 9999;
    display: flex; justify-content: center; align-items: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}
.preloader-text {
    color: #F4F2ED; font-family: 'Playfair Display', serif;
    font-size: 28px; letter-spacing: 12px; font-weight: 400;
    animation: pulseText 1.5s infinite alternate;
}
@keyframes pulseText { 0% { opacity: 0.3; } 100% { opacity: 1; } }
.preloader.hidden { opacity: 0; visibility: hidden; }

/* --- Tombol Navigasi Panah --- */
.nav-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: transparent; border: none;
    color: #1a1a1a; font-size: 32px; padding: 20px;
    cursor: pointer; z-index: 100; transition: all 0.3s ease;
    opacity: 0.4;
}
.nav-btn:hover { opacity: 1; transform: translateY(-50%) scale(1.1); }
.nav-prev { left: 5%; }
.nav-next { right: 5%; }

/* Copyright Footer Elegan */
.copyright-footer {
    position: fixed;
    bottom: 12px;
    width: 100%;
    text-align: center;
    font-size: 9px;
    letter-spacing: 4px;
    color: #999;
    text-transform: uppercase;
    z-index: 5;
    pointer-events: none; 
}

/* ========================================= */
/* E-COMMERCE UPGRADE: CART & CHECKOUT DRAWER*/
/* ========================================= */

.nav-actions { display: flex; align-items: center; gap: 20px; }
.cart-icon { position: relative; cursor: pointer; font-size: 24px; color: #1a1a1a; transition: 0.3s; z-index: 100;}
.cart-icon:hover { color: #888; }
#cart-count { position: absolute; top: -5px; right: -8px; background: #1a1a1a; color: #fff; font-size: 10px; font-weight: bold; width: 16px; height: 16px; display: flex; justify-content: center; align-items: center; border-radius: 50%; }

/* Drawer Layout - OPTIMASI ANTI LAG HP & FULL LAYAR */
.cart-overlay { 
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
    background: rgba(0,0,0,0.4); z-index: 1000; opacity: 0; 
    visibility: hidden; transition: 0.4s ease; backdrop-filter: blur(3px); 
}
.cart-drawer { 
    position: fixed; top: 0; right: 0; 
    width: 100vw; /* Paksa full layar pas di HP */
    max-width: 400px; 
    height: 100vh; 
    height: 100dvh; /* Support layar HP modern biar gak kepotong */
    background: #f4f2ed; 
    z-index: 1001; 
    transform: translateX(100%); 
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); 
    display: flex; flex-direction: column; box-shadow: -5px 0 20px rgba(0,0,0,0.1); 
    will-change: transform; 
}
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer.active { transform: translateX(0); }

.drawer-header { display: flex; justify-content: space-between; align-items: center; padding: 30px; border-bottom: 1px solid #ddd; }
.drawer-header h3 { font-family: 'Playfair Display', serif; font-size: 20px; letter-spacing: 2px; text-transform: uppercase; }
.drawer-header button { background: none; border: none; font-size: 24px; cursor: pointer; color: #1a1a1a; }
.drawer-body { padding: 30px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; }

/* Cart Items */
.cart-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; border-bottom: 1px solid #eaeaea; padding-bottom: 15px; }
.cart-item-info h4 { font-family: 'Playfair Display', serif; font-size: 14px; margin-bottom: 5px; }
.cart-item-info p { font-size: 12px; color: #666; font-style: italic; }
.cart-item-remove { color: #c62828; font-size: 10px; cursor: pointer; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; border: none; background: none; margin-top: 5px; }

/* Form & Checkout */
.checkout-form { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.checkout-input { width: 100%; padding: 12px; border: 1px solid #ccc; background: transparent; font-family: 'Montserrat', sans-serif; font-size: 12px; border-radius: 4px; }
.checkout-input:focus { border-color: #1a1a1a; outline: none; }
textarea.checkout-input { resize: vertical; height: 80px; }

.total-row { display: flex; justify-content: space-between; font-weight: 600; font-size: 16px; margin: 20px 0; border-top: 2px solid #1a1a1a; padding-top: 15px; }

/* QR Code & Upload */
.qr-container { text-align: center; margin: 20px 0; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #ddd; }
.qr-container img { width: 150px; height: 150px; margin-bottom: 10px; }
.qr-container p { font-size: 12px; color: #666; }
.file-upload-wrapper { position: relative; width: 100%; height: 50px; border: 1px dashed #1a1a1a; display: flex; justify-content: center; align-items: center; cursor: pointer; background: #fff; margin-bottom: 20px; }
.file-upload-wrapper input[type="file"] { position: absolute; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-upload-text { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; pointer-events: none; }

.btn-primary { background: #1a1a1a; color: #fff; border: none; padding: 15px; width: 100%; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; transition: 0.3s; margin-top: auto; }
.btn-primary:hover { background: #333; }
.btn-primary:disabled { background: #888; cursor: not-allowed; }
.btn-secondary { background: transparent; color: #1a1a1a; border: 1px solid #1a1a1a; padding: 12px; width: 100%; font-size: 11px; font-weight: 600; text-transform: uppercase; cursor: pointer; margin-top: 10px; transition: 0.3s; }
.btn-secondary:hover { background: #f4f4f4; }

/* ========================================= */
/* RESPONSIVE MOBILE VIEW                    */
/* (POSISI HARUS SELALU DI PALING BAWAH FILE)*/
/* ========================================= */
@media screen and (max-width: 768px) {
    /* Perkecil Navigasi */
    .navbar { padding: 15px 20px; }
    .nav-btn { font-size: 24px; padding: 10px; opacity: 0.6; }
    .nav-prev { left: 0; }
    .nav-next { right: 0; }
    .logo { font-size: 16px; letter-spacing: 2px; }
    
    /* Kurangi padding container buku */
    .container { padding: 10px; perspective: 1000px; }

    /* Sesuaikan ukuran font cover untuk HP */
    .cover-title { font-size: 36px; letter-spacing: 5px; }
    .cover-subtitle { font-size: 10px; letter-spacing: 2px; }
    .cover-border { padding: 15px; }
    
    /* Sesuaikan halaman detail untuk HP */
    .detail-page { padding: 30px 20px; }
    .product-name { font-size: 28px; }
    .product-price { font-size: 16px; margin-bottom: 20px; }
    .product-desc { font-size: 12px; margin-bottom: 30px; }
    
    /* Tombol lebih compact di HP */
    .order-btn { padding: 15px; font-size: 10px; }

    /* Tambahan Mobile Luxury */
    .vertical-text { display: none; } 
    .footer-bar { left: 20px; right: 20px; bottom: 35px; } 
    .nav-btn svg { width: 25px; height: 25px; }

    .copyright-footer { 
        font-size: 7px; 
        bottom: 8px; 
        letter-spacing: 2px; 
    }
}