/* --- CONFIG & VARIABLES --- */
:root {
    --bg-body: #050505;
    --bg-card: #121212;
    --bg-hover: #1e1e1e;
    --primary: #2563eb;
    --secondary: #3b82f6;
    --accent: #f59e0b;
    --text-main: #ffffff;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --radius: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    padding-bottom: 100px;
    overflow-x: hidden;
    line-height: 1.5;
}

/* --- NAVBAR --- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(5, 5, 5, 0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 15px 20px;
    display: flex; justify-content: space-between; align-items: center;
}
.brand { font-size: 1.3rem; font-weight: 800; letter-spacing: -0.5px; display: flex; align-items: center; gap: 8px; }
.brand span { color: var(--primary); }

.cart-wrap { position: relative; cursor: pointer; padding: 5px; }
.cart-count { 
    position: absolute; top: 0; right: 0; 
    background: var(--primary); color: white; font-size: 0.7rem; 
    padding: 2px 6px; border-radius: 50px; font-weight: 700;
}

/* --- HERO SECTION --- */
.hero {
    padding: 50px 20px; text-align: center;
    background: linear-gradient(to bottom, #111 0%, var(--bg-body) 100%);
    border-bottom: 1px solid var(--border);
}
.hero h1 { font-size: 2rem; font-weight: 800; margin-bottom: 10px; color: white; }
.hero p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 25px; }

.search-box { position: relative; max-width: 500px; margin: 0 auto; }
.search-box input {
    width: 100%; padding: 12px 20px 12px 45px;
    border-radius: 50px; border: 1px solid var(--border);
    background: var(--bg-card); color: white; outline: none; transition: 0.2s;
}
.search-box input:focus { border-color: var(--primary); }
.search-icon { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }

/* --- FILTER SCROLLER --- */
.filter-bar {
    display: flex; gap: 10px; overflow-x: auto; padding: 15px 20px;
    background: var(--bg-body); position: sticky; top: 70px; z-index: 90;
    border-bottom: 1px solid var(--border); scrollbar-width: none;
}
.filter-bar::-webkit-scrollbar { display: none; }

.filter-chip {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted);
    padding: 8px 16px; border-radius: 50px; font-size: 0.85rem; font-weight: 500;
    cursor: pointer; white-space: nowrap; transition: 0.2s;
}
.filter-chip:hover, .filter-chip.active { background: var(--primary); color: white; border-color: var(--primary); }

/* --- PRODUCT LAYOUT --- */
.section-box { padding: 30px 0 10px 0; }
.container { padding-left: 20px; }

.sec-header {
    display: flex; justify-content: space-between; align-items: center;
    padding-right: 20px; margin-bottom: 15px;
}
.sec-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.sec-title i { color: var(--primary); }
.swipe-hint { font-size: 0.8rem; color: var(--text-muted); }

.horizontal-scroll {
    display: flex; gap: 15px; overflow-x: auto;
    padding-bottom: 20px; padding-right: 20px;
    scroll-snap-type: x mandatory; scrollbar-width: none;
}
.horizontal-scroll::-webkit-scrollbar { display: none; }

/* CARD STYLE */
.card {
    min-width: 260px; max-width: 260px;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 16px;
    scroll-snap-align: start; display: flex; flex-direction: column;
    position: relative; transition: 0.2s;
}
.card:hover { border-color: var(--primary); transform: translateY(-3px); }

.badge-corner {
    position: absolute; top: 10px; right: 10px;
    font-size: 0.65rem; font-weight: 800; padding: 3px 8px; border-radius: 4px;
}
.badge-hot { background: rgba(245, 158, 11, 0.15); color: var(--accent); }
.badge-new { background: rgba(16, 185, 129, 0.15); color: #10b981; }

.card h3 { 
    font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; color: white; 
    line-height: 1.3; height: 40px; overflow: hidden; 
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; 
}
.card-cat { font-size: 0.75rem; color: var(--text-muted); margin-bottom: 10px; }

.price { font-size: 1.1rem; font-weight: 700; color: white; margin-bottom: 12px; }

.spec-box {
    background: rgba(255,255,255,0.03); border-radius: 6px; padding: 8px;
    margin-bottom: 15px; font-size: 0.8rem; color: var(--text-muted); flex-grow: 1;
}
.spec-row { display: flex; justify-content: space-between; margin-bottom: 4px; }

.btn-group { display: flex; gap: 8px; margin-top: auto; }
.btn-action {
    flex: 1; padding: 10px; background: var(--primary); color: white;
    border: none; border-radius: 6px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.btn-action:hover { background: #1d4ed8; }

.btn-detail {
    flex: 1; padding: 10px; background: transparent; color: var(--text-muted);
    border: 1px solid var(--border); border-radius: 6px; font-weight: 500; cursor: pointer;
}
.btn-detail:hover { border-color: #fff; color: #fff; }

/* --- MODALS --- */
.modal-wrap {
    position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 2000;
    display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.modal-content {
    background: #18181b; width: 95%; max-width: 500px;
    padding: 24px; border-radius: 12px; border: 1px solid var(--border);
    max-height: 85vh; overflow-y: auto; position: relative;
}
.close-modal { position: absolute; top: 20px; right: 20px; cursor: pointer; color: #666; font-size: 1.2rem; }

.btn-checkout {
    width: 100%; padding: 15px; background: var(--primary); color: white;
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
}
.btn-add-modal {
    width: 100%; padding: 15px; background: white; color: black;
    border: none; border-radius: 8px; font-weight: 600; cursor: pointer;
}

/* --- FLOATING CART --- */
.float-cart {
    position: fixed; bottom: 30px; right: 30px;
    background: var(--primary); color: white;
    padding: 16px 28px; border-radius: 50px; font-weight: 600;
    box-shadow: 0 10px 40px rgba(37, 99, 235, 0.3);
    cursor: pointer; z-index: 900; display: none;
}

/* Footer */
footer { border-top: 1px solid var(--border); padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 0.9rem; margin-top: 40px; }
