@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", sans-serif;
    background: #fff;
    color: #222;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    cursor: pointer;
}

img {
    width: 100%;
    display: block;
}


/* ================= HEADER ================= */

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,.08);
}

.navbar {
    width: 90%;
    max-width: 1250px;
    height: 75px;
    margin: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-size: 15px;
    transition: .3s;
}

.nav-links a:hover {
    color: #9b6b43;
}

.nav-icons {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-icons button {
    border: none;
    background: transparent;
    font-size: 19px;
}

.cart-button {
    position: relative;
}

#cartCount {
    position: absolute;
    top: -10px;
    right: -12px;

    width: 20px;
    height: 20px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #9b6b43;
    color: white;

    border-radius: 50%;
    font-size: 11px;
}

.menu-btn {
    display: none;
}


/* Search */

.search-box {
    display: none;
    width: 90%;
    max-width: 600px;
    margin: 0 auto 15px;
    position: relative;
}

.search-box.active {
    display: block;
}

.search-box input {
    width: 100%;
    padding: 13px 45px 13px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.search-box i {
    position: absolute;
    right: 15px;
    top: 14px;
}


/* ================= HERO ================= */

.hero {
    min-height: 600px;

    display: flex;
    align-items: center;

    background:
        linear-gradient(
            90deg,
            rgba(0,0,0,.65),
            rgba(0,0,0,.1)
        ),
        url("https://images.unsplash.com/photo-1445205170230-053b83016050?auto=format&fit=crop&w=1600&q=85");

    background-size: cover;
    background-position: center;
}

.hero-content {
    width: 90%;
    max-width: 1250px;
    margin: auto;

    color: white;
}

.hero-content span {
    font-size: 14px;
    letter-spacing: 4px;
}

.hero-content h1 {
    font-size: clamp(40px, 6vw, 75px);
    line-height: 1.2;
    margin: 15px 0;
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.main-btn,
.offer-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;

    padding: 14px 28px;

    background: #fff;
    color: #222;

    border-radius: 5px;

    font-weight: 700;

    transition: .3s;
}

.main-btn:hover {
    background: #9b6b43;
    color: #fff;
}


/* ================= SECTION ================= */

.section {
    width: 90%;
    max-width: 1250px;
    margin: auto;
    padding: 90px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 45px;
}

.section-title span {
    color: #9b6b43;
    font-size: 14px;
}

.section-title h2 {
    font-size: 38px;
    margin-top: 5px;
}


/* ================= CATEGORIES ================= */

.category-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.category-card {
    min-height: 200px;

    background: #f5f3f1;

    padding: 35px;

    text-align: center;

    border-radius: 12px;

    transition: .3s;
}

.category-card:hover {
    transform: translateY(-8px);
    background: #ece6e0;
}

.category-icon {
    width: 70px;
    height: 70px;

    margin: auto auto 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;

    border-radius: 50%;

    font-size: 28px;
    color: #9b6b43;
}

.category-card h3 {
    margin-bottom: 8px;
}

.category-card p {
    color: #777;
    font-size: 14px;
}


/* ================= FILTER ================= */

.filter-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.filter {
    border: 1px solid #ddd;
    background: white;

    padding: 10px 25px;

    border-radius: 5px;

    transition: .3s;
}

.filter:hover,
.filter.active {
    background: #222;
    color: white;
}


/* ================= PRODUCTS ================= */

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;

    transition: .3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
}

.product-image {
    height: 350px;
    position: relative;
    overflow: hidden;
    background: #f5f5f5;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;

    transition: .5s;
}

.product-card:hover img {
    transform: scale(1.05);
}

.sale,
.new {
    position: absolute;
    top: 15px;
    right: 15px;

    padding: 5px 12px;

    border-radius: 4px;

    color: white;
    font-size: 12px;
}

.sale {
    background: #d9534f;
}

.new {
    background: #222;
}

.favorite {
    position: absolute;
    top: 15px;
    left: 15px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: white;

    font-size: 18px;
}

.favorite.liked {
    color: #e74c3c;
}

.product-info {
    padding: 20px;
}

.product-category {
    color: #999;
    font-size: 13px;
}

.product-info h3 {
    margin: 7px 0;
    font-size: 18px;
}

.rating {
    color: #e5a100;
    font-size: 14px;
}

.price {
    display: flex;
    align-items: center;
    gap: 10px;

    margin: 12px 0;

    font-size: 18px;
    font-weight: 700;
}

.price del {
    color: #999;
    font-size: 14px;
}

.add-cart {
    width: 100%;

    border: none;

    background: #222;
    color: white;

    padding: 12px;

    border-radius: 5px;

    transition: .3s;
}

.add-cart:hover {
    background: #9b6b43;
}


/* ================= OFFER ================= */

.offer {
    min-height: 400px;

    display: flex;
    align-items: center;

    background:
        linear-gradient(
            rgba(0,0,0,.5),
            rgba(0,0,0,.5)
        ),
        url("https://images.unsplash.com/photo-1490481651871-ab68de25d43d?auto=format&fit=crop&w=1600&q=80");

    background-size: cover;
    background-position: center;

    text-align: center;
    color: white;
}

.offer-content {
    width: 90%;
    margin: auto;
}

.offer-content span {
    letter-spacing: 4px;
}

.offer-content h2 {
    font-size: 45px;
    margin: 15px 0;
}

.offer-content strong {
    color: #dca66e;
}

.offer-btn {
    margin-top: 20px;
}


/* ================= NEWSLETTER ================= */

.newsletter {
    width: 90%;
    max-width: 1100px;

    margin: 80px auto;

    padding: 45px;

    background: #f5f3f1;

    border-radius: 12px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.newsletter h2 {
    margin-bottom: 8px;
}

.newsletter p {
    color: #777;
}

.newsletter form {
    display: flex;
    min-width: 400px;
}

.newsletter input {
    flex: 1;

    border: 1px solid #ddd;

    padding: 14px;

    outline: none;
}

.newsletter button {
    border: none;

    background: #222;
    color: white;

    padding: 0 25px;
}


/* ================= FOOTER ================= */

footer {
    background: #191919;
    color: white;

    padding-top: 60px;
}

.footer-container {
    width: 90%;
    max-width: 1250px;

    margin: auto;

    display: grid;
    grid-template-columns: 2fr 1fr 1fr;

    gap: 60px;

    padding-bottom: 50px;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-column .logo {
    margin-bottom: 5px;
}

.footer-column p {
    color: #aaa;
    line-height: 1.8;
}

.footer-column h3 {
    margin-bottom: 10px;
}

.social {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.social a {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #555;

    border-radius: 50%;

    transition: .3s;
}

.social a:hover {
    background: #9b6b43;
    border-color: #9b6b43;
}

.copyright {
    border-top: 1px solid #333;

    padding: 20px;

    text-align: center;

    color: #888;

    font-size: 13px;
}


/* ================= CART ================= */

.cart-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,.5);

    z-index: 1999;

    display: none;
}

.cart-overlay.active {
    display: block;
}

.cart {
    position: fixed;

    top: 0;
    right: -450px;

    width: 420px;
    max-width: 90%;

    height: 100vh;

    background: white;

    z-index: 2000;

    display: flex;
    flex-direction: column;

    transition: .4s;
}

.cart.active {
    right: 0;
}

.cart-header {
    padding: 25px;

    display: flex;
    justify-content: space-between;
    align-items: center;

    border-bottom: 1px solid #eee;
}

.cart-header button {
    border: none;
    background: transparent;
    font-size: 22px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;

    padding: 20px;
}

.empty-cart {
    text-align: center;
    color: #888;
    margin-top: 50px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 15px 0;

    border-bottom: 1px solid #eee;
}

.cart-item-info h4 {
    font-size: 14px;
}

.cart-item-info p {
    color: #9b6b43;
    margin-top: 5px;
}

.remove-item {
    border: none;
    background: transparent;
    color: #e74c3c;
}

.cart-footer {
    padding: 20px;

    border-top: 1px solid #eee;
}

.total {
    display: flex;
    justify-content: space-between;

    margin-bottom: 15px;

    font-size: 18px;
}

.checkout {
    width: 100%;

    border: none;

    background: #222;
    color: white;

    padding: 14px;

    border-radius: 5px;
}


/* ================= RESPONSIVE ================= */

@media (max-width: 900px) {

    .nav-links {
        position: absolute;

        top: 75px;
        right: -100%;

        width: 280px;

        background: white;

        padding: 30px;

        flex-direction: column;

        box-shadow: 0 10px 20px rgba(0,0,0,.1);

        transition: .3s;
    }

    .nav-links.active {
        right: 0;
    }

    .menu-btn {
        display: block;
    }

    .category-container,
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .newsletter {
        flex-direction: column;
        align-items: stretch;
    }

    .newsletter form {
        min-width: 0;
    }

    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}


@media (max-width: 600px) {

    .navbar {
        height: 65px;
    }

    .logo {
        font-size: 24px;
    }

    .hero {
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 40px;
    }

    .hero-content p {
        font-size: 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title h2 {
        font-size: 30px;
    }

    .category-container,
    .products-grid {
        grid-template-columns: 1fr;
    }

    .product-image {
        height: 400px;
    }

    .filter-buttons {
        flex-wrap: wrap;
    }

    .newsletter {
        padding: 25px;
    }

    .newsletter form {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter input,
    .newsletter button {
        height: 50px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .offer-content h2 {
        font-size: 35px;
    }
}