
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    scroll-behavior: smooth;
}

body {
    background: #101010;
    color: white;
}

:root {
    --red: #ff2020;
    --black: #101010;
    --card: #1c1c1c;
}

/* HEADER */

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 6%;
    background: #080808;
    border-bottom: 2px solid var(--red);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo, footer h1 {
    color: white;
    font-size: 28px;
    font-weight: 900;
}

.logo span, footer span {
    color: var(--red);
}

nav {
    display: flex;
    gap: 25px;
}

nav a {
    text-decoration: none;
    color: white;
    transition: .3s;
}

nav a:hover {
    color: var(--red);
}

.cart {
    background: var(--red);
    color: white;
    border: none;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: bold;
}

/* HERO */

.hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    padding: 50px 8%;
    background:
    linear-gradient(90deg, #080808 25%, #080808aa),
    url("https://images.unsplash.com/photo-1498049794561-7780e7231661?w=1600")
    center/cover;
}

.hero h3 {
    color: var(--red);
    letter-spacing: 4px;
    margin-bottom: 15px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 65px);
    line-height: 1.2;
}

.hero h1 span {
    color: var(--red);
}

.hero p {
    margin: 20px 0 30px;
    color: #ccc;
}

.shop-btn {
    background: var(--red);
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    display: inline-block;
    font-weight: bold;
    transition: .3s;
}

.shop-btn:hover {
    background: white;
    color: var(--red);
}

/* CATEGORIES */

.categories, .products-section {
    padding: 55px 6%;
}

h2 {
    margin-bottom: 25px;
}

h2 span {
    color: var(--red);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.category-list button {
    padding: 13px 25px;
    background: #222;
    border: 1px solid var(--red);
    color: white;
    cursor: pointer;
}

.category-list button:hover {
    background: var(--red);
}

/* SEARCH */

#searchInput {
    width: 100%;
    padding: 16px;
    background: #222;
    border: 1px solid #444;
    color: white;
    margin-bottom: 25px;
    outline: none;
}

#searchInput:focus {
    border-color: var(--red);
}

/* PRODUCTS */

.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product {
    background: var(--card);
    overflow: hidden;
    border: 1px solid #292929;
    transition: .3s;
}

.product:hover {
    transform: translateY(-7px);
    border-color: var(--red);
    box-shadow: 0 5px 20px #ff202033;
}

.product img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.product h3 {
    padding: 15px;
}

.price {
    color: var(--red);
    font-size: 20px;
    font-weight: bold;
    padding: 0 15px;
}

.product button {
    width: calc(100% - 30px);
    margin: 15px;
    padding: 13px;
    background: var(--red);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

.product button:hover {
    background: white;
    color: var(--red);
}

/* CART */

.cart-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #000c;
    justify-content: center;
    align-items: center;
    z-index: 200;
}

.cart-content {
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    background: #1c1c1c;
    padding: 25px;
    border: 1px solid var(--red);
}

.close {
    float: right;
    background: none;
    color: white;
    border: none;
    cursor: pointer;
}

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #444;
}

.cart-item button {
    background: var(--red);
    color: white;
    border: none;
    padding: 6px 12px;
    margin-top: 8px;
    cursor: pointer;
}

.checkout {
    width: 100%;
    padding: 14px;
    margin-top: 20px;
    background: var(--red);
    color: white;
    border: none;
    cursor: pointer;
}

/* FOOTER */

footer {
    text-align: center;
    background: #050505;
    padding: 45px 15px;
    border-top: 2px solid var(--red);
}

footer p {
    color: #999;
    margin-top: 12px;
}

/* MOBILE */

@media(max-width: 850px) {
    header {
        flex-wrap: wrap;
        gap: 15px;
    }

    nav {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 450px) {
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .product img {
        height: 130px;
    }

    .product h3 {
        font-size: 14px;
    }

    .hero {
        min-height: 380px;
    }
}
