* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background: #0a0a0a;
    color: #fff;
    line-height: 1.6;
    padding-bottom: 100px;
}

/* Nav */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    background: #0a0a0a;
    z-index: 100;
}

.logo {
    color: #f97316;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.nav-links a {
    color: #aaa;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: #fff;
}

/* Hero */
.hero {
    text-align: center;
    padding: 3rem 1rem;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

#searchInput {
    width: 100%;
    max-width: 400px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    background: #161616;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
}

#searchInput:focus {
    outline: none;
    border-color: #f97316;
}

/* Items */
.items {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.items h2 {
    margin-bottom: 1rem;
    color: #888;
    font-size: 1rem;
    font-weight: 500;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.card {
    background: #161616;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #222;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: #f97316;
}

.img-box {
    width: 100%;
    height: 180px;
    background: #1f1f1f;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    font-size: 0.8rem;
    position: relative;
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.img-box .no-img {
    position: absolute;
    color: #444;
}

.card-body {
    padding: 0.875rem;
}

.card h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.card .meta {
    color: #666;
    font-size: 0.8rem;
    margin-bottom: 0.75rem;
}

.card .price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card .price {
    color: #f97316;
    font-size: 1.1rem;
    font-weight: 600;
}

.card button {
    padding: 0.5rem 1rem;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
}

.card button:hover {
    background: #ea580c;
}

/* Haul Panel */
.haul-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 380px;
    height: 100vh;
    background: #161616;
    border-left: 1px solid #333;
    display: flex;
    flex-direction: column;
    z-index: 200;
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.haul-panel.hidden {
    transform: translateX(100%);
}

.haul-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem;
    border-bottom: 1px solid #333;
}

.haul-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.haul-header button {
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.haul-header button:hover {
    color: #fff;
}

#haulItems {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
}

.haul-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #1f1f1f;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.haul-img {
    width: 50px;
    height: 50px;
    background: #2a2a2a;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 0.7rem;
}

.haul-info {
    flex: 1;
    min-width: 0;
}

.haul-info h4 {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.haul-info .price {
    color: #f97316;
    font-size: 0.9rem;
    font-weight: 500;
}

.haul-info .qty {
    color: #666;
    font-size: 0.8rem;
}

.haul-remove {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.25rem;
}

.haul-remove:hover {
    color: #ff4444;
}

.haul-footer {
    padding: 1rem;
    border-top: 1px solid #333;
    background: #161616;
}

.haul-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.checkout-btn {
    width: 100%;
    padding: 0.875rem;
    background: #22c55e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

.checkout-btn:hover {
    background: #16a34a;
}

/* Haul Toggle Button */
.haul-toggle {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 0.875rem 1.5rem;
    background: #f97316;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 20px rgba(249, 115, 22, 0.4);
    z-index: 150;
}

.haul-toggle:hover {
    background: #ea580c;
}

/* Empty state */
.empty {
    color: #555;
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Mobile */
@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .card h3 {
        font-size: 0.85rem;
    }
    
    .haul-panel {
        max-width: 100%;
    }
}
