:root { --bg-color: #0f0f0f; --sidebar-color: #1a1a1a; --accent-color: #27ae60; --text-color: #ffffff; }
body { margin: 0; font-family: 'Segoe UI', sans-serif; display: flex; background: var(--bg-color); color: var(--text-color); height: 100vh; overflow: hidden; }

/* Sidebar & Tree */
.sidebar { width: 280px; height: 100vh; background: var(--sidebar-color); display: flex; flex-direction: column; border-right: 1px solid #333; z-index: 1000; transition: 0.3s; }
.logo-area { padding: 20px; text-align: center; }
.web-logo { max-width: 100%; height: auto; }
.sidebar-nav { padding: 10px 20px; }
.home-btn { width: 100%; padding: 12px; background: #333; color: white; border: none; border-radius: 6px; cursor: pointer; font-weight: bold; }
.search-box { padding: 10px 20px; }
.search-box input { width: 100%; padding: 10px; background: #222; border: 1px solid #444; color: white; border-radius: 6px; box-sizing: border-box; }

#tree-container { flex-grow: 1; overflow-y: auto; }
.tree-node { cursor: pointer; padding: 10px 20px; font-size: 14px; position: relative; }
.tree-node:hover { background: #252525; }
.tree-node.active-folder { color: var(--accent-color); font-weight: bold; }
.tree-children { display: none; padding-left: 15px; border-left: 1px solid #333; margin-left: 20px; }
.tree-children.active { display: block; }

/* Grid */
.content { flex-grow: 1; height: 100vh; overflow-y: auto; padding: 40px; box-sizing: border-box; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.photo-card { background: #1a1a1a; padding: 10px; border-radius: 8px; text-align: center; border: 1px solid #333; transition: 0.2s; position: relative; }
.photo-card:hover { border-color: var(--accent-color); }
.folder-card { background: #222; cursor: pointer; padding: 30px 10px; }
.back-card { background: #333; border-color: #555; }
.folder-icon-large { font-size: 40px; display: block; margin-bottom: 10px; }
.photo-card img { width: 100%; border-radius: 4px; }
.photo-shield { position: absolute; top:0; left:0; width:100%; height:75%; z-index: 5; cursor: pointer; }
.add-to-cart { background: var(--accent-color); color: white; border: none; padding: 10px; width: 100%; border-radius: 4px; cursor: pointer; margin-top: 10px; position: relative; z-index: 10; font-weight: bold; }

/* Modals */
.modal, .lightbox { display: none; position: fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.9); z-index:9000; align-items:center; justify-content:center; }
.modal.active, .lightbox.active { display: flex; }
.modal-content { background: #1a1a1a; padding: 30px; border-radius: 12px; max-width: 450px; width: 90%; position: relative; }
.stacked-fields { display: flex; flex-direction: column; gap: 10px; margin-top: 15px; }
.stacked-fields input, .stacked-fields select { padding: 12px; background: #222; border: 1px solid #444; color: white; border-radius: 6px; }

/* Forward Button Highlight */
#main-forward-btn {
    background: #27ae60;
    font-size: 18px;
    padding: 18px;
    margin-top: 25px;
    border: none;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
    transition: 0.3s;
    font-weight: bold;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}
#main-forward-btn:hover {
    background: #2ecc71;
    transform: scale(1.02);
}

/* Satispay Large */
.satispay-content { max-width: 600px !important; width: 80% !important; text-align: center; }
.qr-wrapper img { width: 100%; max-width: 400px; height: auto; padding: 20px; background: white; border-radius: 10px; }

/* Lightbox Controls */
.lightbox-content-wrapper { position: relative; text-align: center; width: 80%; }
.lightbox-img { max-height: 80vh; max-width: 100%; object-fit: contain; }
.lightbox-controls { position: absolute; top: 20px; right: 20px; display: flex; gap: 20px; align-items: center; z-index: 9999; }
.close-lightbox { font-size: 40px; color: white; cursor: pointer; }
.nav-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.1); color: white; border: none; padding: 20px; cursor: pointer; font-size: 30px; border-radius: 50%; }
.prev-btn { left: -60px; } .next-btn { right: -60px; }

/* Cart Preview */
.cart-item-row { display: flex; justify-content: space-between; align-items: center; background: #252525; padding: 10px; margin-bottom: 5px; border-radius: 4px; cursor: pointer; }
.cart-preview-popup { position: fixed; pointer-events: none; z-index: 10000; border: 2px solid var(--accent-color); border-radius: 8px; width: 160px; height: 160px; object-fit: cover; display: none; background: #000; }

/* Mobile */
#menu-toggle, #cart-toggle { position: fixed; z-index: 5000; border: none; font-weight: bold; border-radius: 8px; cursor: pointer; }
#menu-toggle { display: none; top: 15px; left: 15px; background: #333; color: white; padding: 10px; }
#cart-toggle { top: 15px; right: 15px; background: var(--accent-color); color: white; padding: 10px 20px; border-radius: 30px; }

@media (max-width: 768px) {
    #menu-toggle { display: block; }
    .sidebar { position: fixed; left: -280px; }
    .sidebar.mobile-active { left: 0; }
    .content { padding-top: 80px; }
    .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
    .nav-btn { padding: 10px; font-size: 20px; }
    .prev-btn { left: 5px; } .next-btn { right: 5px; }
}