@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg: #050507;
    --surface: #0e0e12;
    --surface-hover: #16161e;
    --border: #22222f;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.3);
    --accent: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.3);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --green-badge: #10b981;
    --green-badge-bg: rgba(16, 185, 129, 0.1);
    --amber-badge: #f59e0b;
    --amber-badge-bg: rgba(245, 158, 11, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg); color: var(--text-main); font-family: 'Inter', sans-serif; overflow-x: hidden; line-height: 1.6; }

/* Grid Background */
.bg-grid {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1;
    background: radial-gradient(circle at 15% 25%, rgba(99, 102, 241, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 85% 75%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                linear-gradient(to right, rgba(255,255,255,0.02) 1px, transparent 1px),
                linear-gradient(to bottom, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
}

.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* Header & Nav */
header { padding: 1.5rem 0; border-bottom: 1px solid var(--border); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 50; }
.nav-bar { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 800; letter-spacing: 0.1em; background: linear-gradient(90deg, #fff, #8b5cf6); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-decoration: none; display: flex; align-items: center; gap: 0.5rem; }
.logo-tag { font-size: 0.7rem; font-weight: 600; padding: 0.2rem 0.5rem; border-radius: 4px; background: rgba(99, 102, 241, 0.2); color: var(--primary); border: 1px solid rgba(99, 102, 241, 0.3); }

.nav-links { display: flex; gap: 2rem; align-items: center; }
.nav-link { color: var(--text-muted); font-size: 0.9rem; font-weight: 500; text-decoration: none; transition: color 0.2s; }
.nav-link:hover { color: var(--text-main); }
.nav-link.active { color: var(--primary); font-weight: 600; }

.cart-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border); padding: 0.6rem 1.25rem; border-radius: 8px; color: var(--text-main); font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 0.5rem; }
.cart-btn:hover { background: rgba(255,255,255,0.1); border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
.cart-badge { background: var(--primary); color: #fff; padding: 0.1rem 0.5rem; border-radius: 99px; font-size: 0.75rem; }

/* Storefront Hero */
.store-hero { padding: 5rem 0 4rem; text-align: center; }
.store-hero h1 { font-family: 'Outfit', sans-serif; font-size: 4rem; font-weight: 800; line-height: 1.1; margin-bottom: 1rem; }
.store-hero p { color: var(--text-muted); font-size: 1.25rem; max-width: 650px; margin: 0 auto; }

/* Filter & Search Bar */
.catalog-controls { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; gap: 1.5rem; flex-wrap: wrap; }
.filter-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.5rem; }
.filter-tab { background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); padding: 0.6rem 1.25rem; border-radius: 99px; font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap; }
.filter-tab:hover { background: var(--surface-hover); color: var(--text-main); }
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }

.search-box { position: relative; flex: 1; max-width: 350px; }
.search-box input { width: 100%; background: var(--surface); border: 1px solid var(--border); padding: 0.75rem 1rem 0.75rem 2.5rem; border-radius: 99px; color: var(--text-main); font-size: 0.9rem; outline: none; transition: border-color 0.2s; }
.search-box input:focus { border-color: var(--primary); box-shadow: 0 0 15px var(--primary-glow); }
.search-icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 1rem; }

/* Product Grid */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 2.5rem; padding-bottom: 6rem; }
.product-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; transition: all 0.3s ease; display: flex; flex-direction: column; position: relative; }
.product-card:hover { transform: translateY(-6px); border-color: rgba(99, 102, 241, 0.4); box-shadow: 0 20px 40px rgba(0,0,0,0.6), 0 0 20px var(--primary-glow); }

.product-img-wrapper { position: relative; height: 240px; overflow: hidden; background: #000; }
.product-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.product-card:hover .product-img { transform: scale(1.05); }

.tier-badge { position: absolute; top: 1rem; left: 1rem; padding: 0.35rem 0.85rem; border-radius: 99px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; backdrop-filter: blur(8px); z-index: 10; }
.tier-open { background: var(--green-badge-bg); border: 1px solid var(--green-badge); color: var(--green-badge); }
.tier-pro { background: var(--amber-badge-bg); border: 1px solid var(--amber-badge); color: var(--amber-badge); }

.product-info { padding: 1.75rem; display: flex; flex-direction: column; flex: 1; }
.product-category { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; color: var(--primary); letter-spacing: 0.08em; margin-bottom: 0.5rem; }
.product-title { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 700; margin-bottom: 0.75rem; color: var(--text-main); }
.product-desc { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 1.5rem; flex: 1; }

.cli-snippet { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 8px; padding: 0.75rem 1rem; font-family: 'JetBrains Mono', monospace; font-size: 0.8rem; display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; color: #34d399; }
.cli-copy-btn { background: transparent; border: none; color: var(--text-muted); cursor: pointer; transition: color 0.2s; font-size: 1rem; }
.cli-copy-btn:hover { color: #fff; }

.product-actions { display: flex; gap: 1rem; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 1.5rem; }
.price-tag { font-family: 'Outfit', sans-serif; font-size: 1.25rem; font-weight: 700; color: var(--text-main); }
.action-buttons { display: flex; gap: 0.5rem; }
.btn-action { padding: 0.65rem 1.25rem; border-radius: 8px; font-weight: 600; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border: 1px solid var(--border); background: var(--surface-hover); color: var(--text-main); }
.btn-action:hover { background: #fff; color: #000; border-color: #fff; }
.btn-primary-action { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary-action:hover { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 15px var(--accent-glow); color: #fff; }

/* Modals */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(8px); z-index: 100; display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; padding: 1.5rem; }
.modal-overlay.active { opacity: 1; pointer-events: all; }
.modal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; width: 100%; max-width: 800px; max-height: 90vh; overflow-y: auto; padding: 2.5rem; position: relative; transform: scale(0.95); transition: transform 0.3s ease; box-shadow: 0 30px 60px rgba(0,0,0,0.8); }
.modal-overlay.active .modal-card { transform: scale(1); }
.close-modal { position: absolute; top: 1.5rem; right: 1.5rem; background: transparent; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; transition: color 0.2s; }
.close-modal:hover { color: #fff; }

.modal-header { display: flex; gap: 2rem; margin-bottom: 2rem; align-items: center; }
.modal-img { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; border: 1px solid var(--border); }
.modal-title-area h2 { font-family: 'Outfit', sans-serif; font-size: 2rem; margin-bottom: 0.5rem; }
.modal-meta { display: flex; gap: 1rem; align-items: center; color: var(--text-muted); font-size: 0.9rem; }

.modal-section { margin-bottom: 2rem; }
.modal-section h3 { font-family: 'Outfit', sans-serif; font-size: 1.25rem; margin-bottom: 1rem; color: var(--primary); }
.doc-box { background: rgba(0,0,0,0.4); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; line-height: 1.6; }
.checklist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: 1rem; }
.check-item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.95rem; }
.check-icon { color: var(--green-badge); font-weight: 700; }

/* Cart Drawer Modal */
.cart-drawer { width: 100%; max-width: 500px; margin-left: auto; height: 100%; border-radius: 0; border-left: 1px solid var(--border); display: flex; flex-direction: column; }
.cart-items { flex: 1; overflow-y: auto; margin: 1.5rem 0; display: flex; flex-direction: column; gap: 1rem; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 1rem; background: var(--surface-hover); border: 1px solid var(--border); border-radius: 12px; }
.cart-item-title { font-weight: 600; font-size: 1rem; }
.cart-item-price { color: var(--primary); font-weight: 700; }
.cart-item-del { color: var(--text-muted); cursor: pointer; background: transparent; border: none; font-size: 1.1rem; }
.cart-item-del:hover { color: var(--red-500); }
.cart-total { display: flex; justify-content: space-between; font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; border-top: 1px solid var(--border); padding-top: 1.5rem; }

/* Notifications Toast */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; z-index: 200; display: flex; flex-direction: column; gap: 1rem; }
.toast { background: var(--surface); border: 1px solid var(--primary); padding: 1rem 1.5rem; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px var(--primary-glow); display: flex; align-items: center; gap: 1rem; font-weight: 500; animation: slide-in 0.3s ease; }
@keyframes slide-in { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Footer */
footer { padding: 4rem 0; border-top: 1px solid var(--border); text-align: center; color: var(--text-muted); font-size: 0.85rem; }

@media (max-width: 768px) {
    .product-grid { grid-template-columns: 1fr; }
    .modal-header { flex-direction: column; text-align: center; }
    .checklist { grid-template-columns: 1fr; }
}
