/* NYETAK CORE - FRONTEND STYLES V2.1
   Fokus: Form Calculator & Sticky Bar (Stacked above Theme Footer)
*/

/* --- 1. FORM CALCULATOR STYLING --- */
.nyetak-calculator-wrapper {
    background: #fff; 
    border: 1px solid #f0f0f0; 
    border-radius: 12px; 
    padding: 20px; 
    margin: 15px 0 30px; /* Jarak bawah agar tidak mepet */
    box-shadow: 0 5px 20px rgba(0,0,0,0.02);
}

.nyetak-form-group { margin-bottom: 18px; }
.nyetak-form-group label { 
    display: block; margin-bottom: 8px; 
    font-size: 13px; font-weight: 700; color: #333; 
}

/* Input Fields yang Enak ditekan di HP */
.nyetak-input, 
input[type="number"].nyetak-input, 
select.nyetak-input,
textarea.nyetak-input {
    width: 100%; 
    padding: 12px; 
    border: 1px solid #e0e0e0; 
    border-radius: 8px;
    font-size: 14px; 
    background: #f9f9f9; 
    outline: none; 
    box-sizing: border-box;
    transition: 0.2s;
    appearance: none; /* Hilangkan style bawaan browser */
}

.nyetak-input:focus {
    background: #fff;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

/* Tombol QTY (+ -) */
.nyetak-qty-box {
    display: flex; align-items: center; gap: 5px;
    background: #f0f2f5; border-radius: 8px; padding: 4px; width: fit-content;
}
.nyetak-qty-btn {
    width: 36px; height: 36px; 
    border: none; background: #fff; 
    border-radius: 6px; font-weight: bold; font-size: 16px; 
    cursor: pointer; color: #0073aa;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.nyetak-qty-input {
    width: 50px; text-align: center; border: none; background: transparent; 
    font-weight: bold; font-size: 14px;
}

/* --- 2. PILIHAN DESAIN (RADIO IMAGE) --- */
.nyetak-gallery-section {
    margin-bottom: 20px; 
}
.nyetak-gallery-scroll { 
    display: flex; gap: 12px; overflow-x: auto; 
    padding-bottom: 10px; scrollbar-width: none;
}
.nyetak-gallery-scroll::-webkit-scrollbar { display: none; }

.nyetak-design-option {
    cursor: pointer; min-width: 90px; position: relative;
}
.nyetak-design-option input { display: none; } /* Sembunyikan radio asli */

.nyetak-design-thumb {
    width: 90px; height: 90px; 
    border-radius: 10px; 
    overflow: hidden; 
    border: 2px solid #eee; 
    position: relative;
    transition: 0.2s;
}
.nyetak-design-thumb img { width: 100%; height: 100%; object-fit: cover; }
.nyetak-design-thumb .placeholder-text {
    width: 100%; height: 100%; 
    display: flex; align-items: center; justify-content: center; text-align: center;
    background: #f5f5f5; font-size: 10px; font-weight: 600; color: #666; padding: 5px;
}

/* State Checked */
.nyetak-design-option input:checked + .nyetak-design-thumb {
    border-color: #0073aa;
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.2);
}
.nyetak-design-option input:checked + .nyetak-design-thumb::after {
    content: '✓'; position: absolute; top: 0; right: 0;
    background: #0073aa; color: #fff; font-size: 10px; 
    padding: 2px 6px; border-bottom-left-radius: 8px;
}

/* --- 3. STICKY BAR HARGA (POSISI DI ATAS FOOTER TEMA) --- */
.nyetak-sticky-bar {
    position: fixed; 
    bottom: 66px; /* NAIK 66px SUPAYA TIDAK NUTUPIN MENU BAWAH */
    left: 50%; 
    transform: translateX(-50%);
    width: 100%; 
    max-width: 480px; 
    background: #fff; 
    padding: 12px 20px;
    border-top: 1px solid #eee; 
    z-index: 1900; /* Di bawah Drawer (3000) tapi di atas konten */
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    box-sizing: border-box;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.03);
}

.nyetak-price-box small { display: block; font-size: 10px; color: #999; text-transform: uppercase; font-weight: 600; }
.price-display { font-size: 18px; font-weight: 800; color: #e67e22; }

.nyetak-btn-buy {
    background: #0073aa; color: white; border: none; 
    padding: 12px 24px; border-radius: 50px; 
    font-weight: 600; font-size: 13px; cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 115, 170, 0.3);
    transition: 0.2s;
}
.nyetak-btn-buy:active { transform: scale(0.96); }
.nyetak-btn-buy:disabled { background: #ccc; box-shadow: none; cursor: not-allowed; }

/* --- 4. MODAL CHECKOUT & LOADER --- */
.nyetak-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 9999;
    align-items: flex-end; justify-content: center;
    backdrop-filter: blur(2px);
}
.nyetak-modal.show { display: flex; }

.nyetak-modal-content {
    background: #fff; width: 100%; max-width: 480px;
    border-radius: 25px 25px 0 0; padding: 25px;
    max-height: 85vh; overflow-y: auto;
    animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* Loader */
#nyetak-loading-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(255,255,255,0.9); z-index: 10000;
    flex-direction: column; align-items: center; justify-content: center;
}
.nyetak-spinner {
    width: 40px; height: 40px; border: 4px solid #f3f3f3; 
    border-top: 4px solid #0073aa; border-radius: 50%; 
    animation: spin 0.8s linear infinite; margin-bottom: 15px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }