:root {
    --bg-main: #0b0f19;
    --bg-card: #151b2c;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent-color: #3b82f6;
    --sale-color: #ef4444;
    --preorder-color: #10b981;
    --border-color: #242f47;
    --font-sans: 'Inter', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 20px 20px;
}

.header-center-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
    max-width: 500px;
}

header .logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    cursor: pointer;
    transition: transform 0.2s ease;
    white-space: nowrap;
}

header .logo:hover { transform: scale(1.02); }

.search-container { width: 100%; }

.search-container input {
    width: 100%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 8px;
    font-family: var(--font-sans);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.2s ease;
}

.search-container input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.cart-trigger {
    position: absolute;
    right: 20px;
    bottom: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.cart-trigger:hover { background: var(--border-color); }
.cart-count { background: var(--accent-color); color: #fff; font-size: 0.8rem; padding: 2px 6px; border-radius: 20px; }

nav {
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(12px);
    background-color: rgba(11, 15, 25, 0.9);
    border-bottom: 1px solid var(--border-color);
}

.menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.menu button {
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.menu button:hover, .menu button.active { color: var(--text-main); background-color: var(--border-color); }
.menu button.preorder { color: var(--preorder-color); }
.menu button.sale { color: var(--sale-color); font-weight: 600; }

main { max-width: 1200px; margin: 50px auto; padding: 0 20px; }

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: capitalize;
}

.section-title::after { content: ''; flex: 1; height: 1px; background-color: var(--border-color); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }

.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); border-color: #334155; }

.badge { position: absolute; top: 24px; left: 24px; color: white; font-size: 0.75rem; font-weight: 700; padding: 4px 8px; border-radius: 4px; text-transform: uppercase; z-index: 10; }
.badge.badge-sale { background-color: var(--sale-color); }
.badge.badge-preorder { background-color: var(--preorder-color); }

.product-image-wrapper { width: 100%; padding-top: 100%; position: relative; background-color: #1e293b; border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.product-image { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.product-image-placeholder { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: #475569; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; background-color: #1e293b; }

.product-category { font-size: 0.75rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: 0.05em; margin-bottom: 4px; }
.product-title { font-size: 1rem; font-weight: 600; color: var(--text-main); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.price-wrapper { margin-top: auto; display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.current-price { font-size: 1.15rem; font-weight: 700; color: #fff; }
.old-price { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; }

.buy-btn { background-color: #fff; color: #000; border: none; padding: 12px; border-radius: 8px; cursor: pointer; width: 100%; font-weight: 600; font-size: 0.9rem; transition: background-color 0.2s ease; }
.buy-btn:hover { background-color: #e2e8f0; }

.cart-panel { position: fixed; top: 0; right: -400px; width: 100%; max-width: 400px; height: 100%; background: var(--bg-card); border-left: 1px solid var(--border-color); box-shadow: -10px 0 30px rgba(0,0,0,0.5); z-index: 200; transition: right 0.3s ease; display: flex; flex-direction: column; padding: 30px 24px; }
.cart-panel.open { right: 0; }
.cart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
.close-cart { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; }
.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; background: rgba(255,255,255,0.02); padding: 12px; border-radius: 8px; border: 1px solid var(--border-color); }
.cart-item-title { font-weight: 500; font-size: 0.95rem; }
.cart-item-price { color: var(--text-muted); font-size: 0.85rem; }
.remove-item { background: none; border: none; color: var(--sale-color); cursor: pointer; font-size: 0.85rem; }
.cart-footer { margin-top: auto; border-top: 1px solid var(--border-color); padding-top: 20px; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.checkout-btn { background: var(--accent-color); color: white; border: none; width: 100%; padding: 14px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 1rem; }

@media (max-width: 600px) {
    header { flex-direction: column; gap: 20px; padding-bottom: 10px; }
    .cart-trigger { position: static; width: 100%; justify-content: center; }
}
