:root{--bg:#0a0a0a;--bg2:#111;--card:#1a1a1a;--red:#dc2626;--red2:#ef4444;--white:#fff;--gray:#a0a0a0;--gray2:#666;--border:#2a2a2a;--green:#22c55e}
*{margin:0;padding:0;box-sizing:border-box}
html,body{height:100%}
body{font-family:Arial,sans-serif;background:var(--bg);color:var(--white);font-size:15px;display:flex;flex-direction:column;min-height:100vh}
a{color:var(--red2);text-decoration:none}
.container{max-width:1200px;margin:0 auto;padding:0 12px}

/* NAVBAR */
.navbar{background:var(--bg2);padding:12px 0;border-bottom:1px solid var(--border);position:sticky;top:0;z-index:100}
.navbar .container{display:flex;justify-content:space-between;align-items:center}
.navbar-brand{display:flex;align-items:center;gap:10px;color:#fff}
.navbar-brand img{width:40px;height:40px;border-radius:8px}
.brand-text{display:flex;flex-direction:column}
.brand-name{font-weight:700;font-size:1rem}
.brand-tagline{font-size:.7rem;color:var(--gray)}
.cart-btn{background:var(--card);padding:10px 15px;border-radius:8px;color:#fff;position:relative;border:1px solid var(--border);font-size:.9rem}
.cart-btn:hover{background:var(--red);color:#fff}
.cart-badge{position:absolute;top:-6px;right:-6px;background:var(--red);color:#fff;font-size:.65rem;padding:2px 6px;border-radius:8px}

/* MAIN */
.main-content{padding:15px 0;flex:1}
.page-header{text-align:center;margin-bottom:20px}
.page-title{font-size:1.3rem;margin-bottom:5px}
.page-subtitle{color:var(--gray);font-size:.85rem}

/* SEARCH */
.search-box{margin-bottom:20px}
.search-form{display:flex;gap:10px}
.search-input{flex:1;padding:12px 15px;background:var(--card);border:1px solid var(--border);border-radius:8px;color:#fff;font-size:.95rem}
.search-input:focus{outline:none;border-color:var(--red)}
.search-input::placeholder{color:var(--gray2)}

/* BUTTONS */
.btn{padding:10px 18px;border:none;border-radius:8px;cursor:pointer;font-size:.9rem;font-weight:500;transition:.3s}
.btn-primary{background:var(--red);color:#fff}
.btn-primary:hover{background:var(--red2)}
.btn-secondary{background:var(--card);color:#fff;border:1px solid var(--border)}
.btn-danger{background:#ef4444;color:#fff}
.btn-sm{padding:6px 12px;font-size:.8rem}
.btn-block{width:100%}
.btn:disabled{opacity:.5;cursor:not-allowed}

/* PRODUCT - MOBILE */
.product-grid{display:flex;flex-direction:column;gap:8px}
.product-card{background:var(--card);border:1px solid var(--border);border-radius:10px;overflow:hidden;display:flex;flex-direction:row;align-items:center;transition:.2s;padding:8px}
.product-card:hover{border-color:var(--red)}
.product-image{width:60px;height:60px;min-width:60px;background:var(--bg2);display:flex;align-items:center;justify-content:center;overflow:hidden;border-radius:8px}
.product-image img{width:100%;height:100%;object-fit:cover}
.product-image-placeholder{font-size:1.3rem;color:var(--gray2)}
.product-body{flex:1;padding:0 10px;min-width:0}
.product-name{font-size:.8rem;font-weight:600;margin-bottom:3px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.product-name a{color:#fff}
.product-price{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-bottom:2px}
.price-original{color:var(--gray2);text-decoration:line-through;font-size:.7rem}
.price-final{font-size:.85rem;font-weight:700;color:var(--red2)}
.discount-badge{background:var(--red);color:#fff;font-size:.55rem;padding:2px 4px;border-radius:3px}
.product-status{font-size:.65rem;margin:0}
.status-available{color:var(--green)}
.status-unavailable{color:#ef4444}
.product-footer{padding:0;display:flex;align-items:center}
.product-footer .btn{padding:8px 10px;font-size:.7rem;white-space:nowrap;border-radius:6px}

/* PRODUCT DETAIL */
.product-detail{background:var(--card);border-radius:10px;overflow:hidden}
.product-detail-grid{display:grid}
.product-detail-image{aspect-ratio:1;background:var(--bg2);display:flex;align-items:center;justify-content:center}
.product-detail-image img{width:100%;height:100%;object-fit:cover}
.product-detail-placeholder{font-size:4rem;color:var(--gray2)}
.product-detail-content{padding:20px}
.product-detail-name{font-size:1.2rem;margin-bottom:12px}
.product-detail-price{display:flex;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.product-detail-price .price-final{font-size:1.3rem}
.product-detail-price .price-original{font-size:.9rem}
.product-detail-price .discount-badge{font-size:.7rem;padding:3px 8px}
.product-detail-status{margin-bottom:12px;font-size:.9rem}
.product-detail-desc{color:var(--gray);margin-bottom:15px;font-size:.9rem;line-height:1.6}
.product-detail-stock{color:var(--gray);margin-bottom:20px;font-size:.9rem}

/* CART */
.cart-empty{text-align:center;padding:50px 20px;background:var(--card);border-radius:10px}
.cart-empty-icon{font-size:3.5rem;margin-bottom:15px}
.cart-empty h2{font-size:1.1rem;margin-bottom:8px}
.cart-empty p{font-size:.9rem;color:var(--gray);margin-bottom:15px}
.cart-container{display:grid;gap:20px}
.cart-items{background:var(--card);border-radius:10px;padding:18px}
.cart-items h3{font-size:1rem;margin-bottom:15px}
.cart-item{display:flex;gap:15px;padding:15px 0;border-bottom:1px solid var(--border);align-items:center}
.cart-item:last-child{border-bottom:none}
.cart-item-image{width:70px;height:70px;background:var(--bg2);border-radius:8px;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0}
.cart-item-image img{width:100%;height:100%;object-fit:cover}
.cart-item-placeholder{font-size:1.8rem;color:var(--gray2)}
.cart-item-info{flex:1;min-width:0}
.cart-item-name{font-weight:600;margin-bottom:5px;font-size:.95rem}
.cart-item-price{color:var(--gray);font-size:.85rem;margin-bottom:3px}
.cart-item-subtotal{color:var(--red2);font-weight:600;font-size:.95rem}
.cart-item-actions{display:flex;flex-direction:column;gap:10px;align-items:flex-end}
.qty-control{display:flex;background:var(--bg2);border-radius:6px;overflow:hidden}
.qty-btn{width:35px;height:35px;border:none;background:0 0;color:#fff;cursor:pointer;font-size:1.1rem}
.qty-btn:hover{background:var(--red)}
.qty-btn:disabled{opacity:.3}
.qty-value{width:40px;text-align:center;line-height:35px;font-weight:600;font-size:.9rem}
.cart-item-remove{background:0 0;border:none;color:var(--gray2);cursor:pointer;font-size:.8rem}
.cart-item-remove:hover{color:#ef4444}
.cart-summary{background:var(--card);border-radius:10px;padding:20px}
.cart-summary h3{margin-bottom:18px;padding-bottom:15px;border-bottom:1px solid var(--border);font-size:1rem}
.summary-row{display:flex;justify-content:space-between;margin-bottom:10px;font-size:.95rem}
.summary-row.discount{color:var(--green)}
.summary-row.total{font-size:1.1rem;font-weight:700;padding-top:12px;border-top:1px solid var(--border);margin-top:12px;color:var(--red2)}
.cart-form{margin-top:20px;padding-top:18px;border-top:1px solid var(--border)}

/* FORMS */
.form-group{margin-bottom:15px}
.form-label{display:block;margin-bottom:6px;font-size:.85rem;color:var(--gray)}
.form-control{width:100%;padding:12px;background:var(--bg2);border:1px solid var(--border);border-radius:8px;color:#fff;font-size:.95rem}
.form-control:focus{outline:none;border-color:var(--red)}
.form-control::placeholder{color:var(--gray2)}
select.form-control{cursor:pointer}
textarea.form-control{resize:vertical;min-height:70px}
.btn-checkout{margin-top:15px;padding:14px;font-size:1rem;background:linear-gradient(135deg,var(--red),#b91c1c)}
.btn-checkout:hover{opacity:.9}

/* ALERTS */
.alert{padding:12px 15px;border-radius:8px;margin-bottom:15px;font-size:.9rem}
.alert-success{background:rgba(34,197,94,.15);border:1px solid var(--green);color:var(--green)}
.alert-danger{background:rgba(239,68,68,.15);border:1px solid #ef4444;color:#ef4444}

/* FOOTER - SELALU DI BAWAH */
.footer{background:var(--bg2);padding:20px 0;text-align:center;border-top:1px solid var(--border);margin-top:auto}
.footer p{color:var(--gray);font-size:.85rem}

/* NO PRODUCTS */
.no-products{text-align:center;padding:50px 20px;background:var(--card);border-radius:10px}
.no-products-icon{font-size:3rem;margin-bottom:12px}
.no-products h3{font-size:1rem}

/* ADMIN */
.admin-layout{display:flex;flex-direction:column;min-height:100vh}
.admin-sidebar{background:var(--bg2);padding:15px}
.admin-logo{display:flex;align-items:center;margin-bottom:15px}
.admin-logo img{width:35px;height:35px;border-radius:6px;margin-right:10px}
.admin-logo h2{font-size:.9rem;margin:0}
.admin-logo span{font-size:.65rem;color:var(--gray)}
.admin-nav{list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.admin-nav a{display:block;padding:8px 14px;color:var(--gray);border-radius:6px;background:var(--card);font-size:.85rem}
.admin-nav a:hover,.admin-nav a.active{background:var(--red);color:#fff}
.admin-main{flex:1;padding:15px}
.admin-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid var(--border)}
.admin-header h1{font-size:1.1rem}
.admin-user{color:var(--gray);font-size:.9rem}
.stats-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px;margin-bottom:20px}
.stat-card{background:var(--card);padding:15px;border-radius:10px;border:1px solid var(--border)}
.stat-card:hover{border-color:var(--red)}
.stat-icon{font-size:1.5rem;margin-bottom:8px}
.stat-value{font-size:1.4rem;font-weight:700;color:var(--red2)}
.stat-label{color:var(--gray);font-size:.8rem}
.admin-table-wrapper{background:var(--card);border-radius:10px;overflow-x:auto}
.admin-table{width:100%;border-collapse:collapse;min-width:500px}
.admin-table th,.admin-table td{padding:12px;text-align:left;border-bottom:1px solid var(--border);font-size:.85rem}
.admin-table th{background:var(--bg2);color:var(--gray)}
.admin-table tr:hover{background:rgba(255,255,255,.02)}
.table-image{width:45px;height:45px;border-radius:6px;object-fit:cover}
.table-actions{display:flex;gap:6px}
.badge{padding:3px 8px;border-radius:4px;font-size:.7rem;font-weight:600}
.badge-success{background:rgba(34,197,94,.2);color:var(--green)}
.badge-danger{background:rgba(239,68,68,.2);color:#ef4444}
.badge-warning{background:rgba(234,179,8,.2);color:#eab308}
.admin-form{background:var(--card);padding:20px;border-radius:10px;max-width:550px}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-hint{font-size:.75rem;color:var(--gray2);margin-top:4px}
.form-actions{display:flex;gap:10px;margin-top:20px;padding-top:15px;border-top:1px solid var(--border)}
.price-preview{background:var(--bg2);padding:12px;border-radius:8px;margin-top:12px}
.price-preview-row{display:flex;justify-content:space-between;margin-bottom:6px;font-size:.85rem}
.price-preview-row:last-child{margin-bottom:0;padding-top:8px;border-top:1px solid var(--border)}
.form-switch{display:flex;align-items:center;gap:10px}
.switch{position:relative;width:44px;height:24px}
.switch input{opacity:0;width:0;height:0}
.switch-slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:var(--bg2);border-radius:24px;transition:.3s}
.switch-slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.3s}
.switch input:checked+.switch-slider{background:var(--red)}
.switch input:checked+.switch-slider:before{transform:translateX(20px)}
.switch-label{color:var(--gray);font-size:.85rem}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:15px}
.login-container{width:100%;max-width:380px}
.login-card{background:var(--card);padding:30px;border-radius:12px;border:1px solid var(--border)}
.login-header{text-align:center;margin-bottom:25px}
.login-header img{width:70px;height:70px;border-radius:10px;margin-bottom:12px}
.login-header h1{font-size:1.15rem;margin-bottom:5px}
.login-header p{color:var(--gray);font-size:.85rem}

/* RESPONSIVE */
@media(min-width:600px){
    .product-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}
    .product-card{flex-direction:column;align-items:stretch;padding:0}
    .product-image{width:100%;height:auto;aspect-ratio:1;border-radius:0}
    .product-body{padding:12px}
    .product-name{-webkit-line-clamp:2;font-size:.85rem}
    .product-footer{padding:0 12px 12px}
    .product-footer .btn{width:100%;padding:10px;font-size:.85rem}
}
@media(min-width:768px){
    .product-grid{grid-template-columns:repeat(4,1fr)}
    .cart-container{grid-template-columns:1fr 350px}
    .product-detail-grid{grid-template-columns:1fr 1fr}
}
@media(min-width:992px){
    .product-grid{grid-template-columns:repeat(5,1fr)}
    .admin-layout{flex-direction:row}
    .admin-sidebar{width:200px;position:fixed;height:100vh;padding:20px 0}
    .admin-logo{padding:0 15px 15px;border-bottom:1px solid var(--border);margin-bottom:15px}
    .admin-nav{flex-direction:column;gap:0}
    .admin-nav a{border-radius:0;padding:10px 15px}
    .admin-main{margin-left:200px;padding:20px}
    .stats-grid{grid-template-columns:repeat(4,1fr)}
}