/* Base Styles & CSS Variables */
:root {
    --bg-main: #0c0d10;
    --bg-card: #15171e;
    --bg-hover: #1f222c;
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --border-color: #272a34;
    --cart-bg: #111318;
    --radius: 12px;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

.light-theme {
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-hover: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --border-color: #e2e8f0;
    --cart-bg: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-body);
    transition: background-color 0.3s, color 0.3s;
    line-height: 1.6;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 5%;
    background-color: rgba(12, 13, 16, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-main);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

#theme-toggle, .cart-icon-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
}

#theme-toggle:hover, .cart-icon-btn:hover {
    background: var(--bg-hover);
}

#cart-count {
    background: var(--accent);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 2px 7px;
    border-radius: 20px;
    margin-left: 5px;
}

/* Hero Section */
.hero {
    padding: 100px 5% 80px;
    text-align: center;
    background: radial-gradient(circle at center, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
}

.badge {
    background: rgba(99, 102, 241, 0.2);
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    margin: 20px 0 15px;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.btn {
    padding: 12px 26px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: transform 0.2s, background 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn:active {
    transform: scale(0.98);
}

.primary-btn {
    background-color: var(--accent);
    color: white;
}

.primary-btn:hover {
    background-color: var(--accent-hover);
}

.secondary-btn {
    background-color: var(--bg-card);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.secondary-btn:hover {
    background-color: var(--bg-hover);
}

/* Products Section */
.products-section {
    padding: 60px 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
    gap: 20px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 2rem;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 8px 18px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Product Grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 30px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent);
}

.product-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background-color: #1f222c;
}

.product-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-category {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 6px 0;
}

.product-price {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 15px;
}

.add-to-cart-btn {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s;
}

.add-to-cart-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* Cart Drawer */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: var(--cart-bg);
    box-shadow: -5px 0 25px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: right 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.cart-drawer.open {
    right: 0;
}

.cart-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-muted);
    cursor: pointer;
}

.cart-body {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

.cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.cart-item img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-size: 0.95rem;
    font-weight: 600;
}

.cart-item-price {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.85rem;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.full-width {
    width: 100%;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    z-index: 999;
    display: none;
}

.cart-overlay.active {
    display: block;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius);
    max-width: 500px;
    width: 90%;
    position: relative;
}

.size-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.size-table th, .size-table td {
    border: 1px solid var(--border-color);
    padding: 10px;
    text-align: center;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--accent);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: transform 0.3s ease;
    z-index: 2000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

/* Footer */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 60px 5% 20px;
    margin-top: 80px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 8px;
}

.footer-col ul a {
    color: var(--text-muted);
    text-decoration: none;
}

.newsletter-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.newsletter-form input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
    flex-grow: 1;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.85rem;
}
