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

@font-face {
    font-family: Aldhabi;
    src: url("fonts/alfont_com_AlFont_com_4_30.ttf");
}

body {
    font-family: Jomhuria;
    background-color: rgb(248, 246, 242);
    overflow-x: hidden;
}

header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;

}

nav {
    display: flex;

    align-items: center;
    height: 120px;
    background-color: white;
    width: 100%;




}

.logo {
    margin-right: 5px;
}

.logo img {
    width: 280px;
    height: auto;
    display: block;
    height: 120px;


}

.navlinks {

    size: 30px;
    display: flex;
    flex: 1;
    justify-content: center;
    margin-left: 90px;
}

.navlinks ul {
    display: flex;
    gap: 30px;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    font-size: 25px;


}


.navlinks a {
    text-decoration: none;
    color: rgb(18, 45, 82);
    white-space: nowrap;


}

.navlinks a:hover {
    color: rgb(45, 90, 140);
}

.icons {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    font-size: 30px;
    margin-left: 20px;

}

.icons a {
    color: rgb(18, 45, 82);
}



.imgb {
    width: 90%;
    height: auto;
    object-fit: cover;
    overflow: hidden;
    margin: 100px auto 30px;
    border: 3px solid rgb(18, 45, 82);
    border-radius: 50px;

}

.imgb img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;


}

.imgb-text {
    position: absolute;
    top: 50%;
    right: 10%;
    z-index: 10;
    transform: translateY(-50%);
    color: rgb(18, 45, 82);
}

.imgb-text h1 {
    font-size: 40px;
    margin-bottom: 20px;
    line-height: 1.5;
    font-family: Jomhuria;
}

.shop-btn {
    padding: 15px 50px;
    font-size: 25px;
    border: none;
    border-radius: 30px;
    background-color: rgb(18, 45, 82);
    color: white;
    cursor: pointer;
    text-decoration: none;
    font-family: Jomhuria;

}

.title {
    color: rgb(18, 45, 82);
    padding: 10px 30px;
    text-align: center;
    font-size: 32px;
    border: 2px solid rgb(18, 45, 82);
    font-weight: bold;
    background: whitesmoke;
    border-radius: 50px;
    width: fit-content;
    margin: 170px auto 0;
}

#books img {
    border-radius: 20px;
    width: 250px;
    height: 350px;
    margin-bottom: 15px;
    margin-top: 15px;
}

.cards {
    position: relative;
    background-color: rgb(30, 50, 78);
    border-radius: 20px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;

}

.discount {
    position: absolute;
    top: -12px;
    left: -12px;

    width: 65px;
    height: 65px;

    background: #ff4d4d;
    color: white;

    display: flex;
    justify-content: center;
    align-items: center;

    font-weight: bold;
    font-size: 18px;

    clip-path: polygon(50% 0%,
            61% 17%,
            80% 5%,
            76% 27%,
            100% 30%,
            82% 50%,
            100% 70%,
            76% 73%,
            80% 95%,
            61% 83%,
            50% 100%,
            39% 83%,
            20% 95%,
            24% 73%,
            0% 70%,
            18% 50%,
            0% 30%,
            24% 27%,
            20% 5%,
            39% 17%);

    box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.section1,
.section2,
.section3,
.section4 {
    padding: 15px;
    display: flex;
    gap: 20px;
    justify-content: center;
}

.section1 div,
.section2 div,
.section3 div,
.section4 div {
    width: 20%;
    margin-right: 11px;

}

.section1 p,
.section2 p,
.section3 p,
.section4 p {
    text-align: center;
    color: rgb(241, 240, 231);
    font-size: 25px;

}

.section1 h5,
.section2 h5 {
    color: aliceblue;
    font-size: 25px;
}

del {
    color: red;
}

.cart-btn {
    border: none;
    border-radius: 8px;
    color: rgb(18, 45, 82);
    padding: 10px 15px;
}

.cart-text {
    display: none;
    font-size: 14px;
    font-weight: bold;
    color: whitesmoke;
}

.cards:hover {
    box-shadow: 0 10px 20px rgba(49, 63, 32, 0.792);
    border-color: rgba(49, 63, 32, 0.815);

}

.categories {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    background-color: rgb(252, 251, 250);
    width: 90%;
    margin: 40px auto;
    padding: 25px 20px;
    border-radius: 20px;
    gap: 40px;
    box-sizing: border-box;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    direction: rtl;

}

.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    text-decoration: none;
    flex: 1;
    transition: transform 0.2s ease;
    flex-direction: column;

}

.category-item:hover {
    transform: translateY(-5px);
}

.icon-wrapper {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background-color: rgb(245, 237, 230);
    display: flex;
    justify-content: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.category-item:hover .icon-wrapper {
    background-color: rgb(235, 220, 208);

}

.icon-wrapper a {
    color: rgb(61, 52, 46);
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    width: 100%;
    height: 100%;
}

.category-text {
    color: rgb(18, 45, 82);
    font-size: 16px;
    font-weight: 600;
    flex-direction: column;
    font-family: 'Cairo', sans-serif;
}

footer {
    background-color: white;
    color: rgb(18, 45, 82);
    padding: 40px 60px;
}

.footer-contanier {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-section {
    width: 40%;
}

.footer-section h2,
.footer-section h3 {
    margin-bottom: 15px;
    color: rgb(18, 45, 82);
}

.footer-section p {
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 10px;
}

.footer-section a {
    color: rgb(18, 45, 82);
    text-decoration: none;
}

.footer-section a:hover {
    color: rgb(45, 90, 140);
}

.social-icons {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.social-icons a {
    color: rgb(18, 45, 82);
    font-size: 24px;
    transition: 0.3s;
}

.social-icons a:hover {
    color: rgb(45, 90, 140);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    margin-top: 35px;
    padding-top: 20px;
    border-top: 1px solid rgb(220, 220, 220);
    font-size: 14px;
    color: rgb(18, 45, 82);
}

@media(max-width:780px) {
    nav {
        flex-direction: column;
        height: auto;

    }

    .logo {
        flex: 1;
        display: flex;
        justify-content: center;
    }

    .logo img {
        width: 150px;
        height: auto;

    }

    .navlinks {
        margin: 20px 0;
    }

    .navlinks ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 18px;
    }

    .icons {
        margin: 15px 0;
        gap: 20px;
        font-size: 22px;
    }

    .title {
        text-align: center;
        font-size: 30px;
        margin-right: auto;
    }

    #books img {
        width: 100%;
        height: 250px;
    }

    .cards {
        padding: 10px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 50px;
    }

    .section1,
    .section2,
    .section3,
    .section4 {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin: 20px 0;
        padding: 0;


    }

    .section1 .cards,
    .section2 .cards,
    .section3 .cards,
    .section4 .cards {
        width: calc(50% - 20px);
        max-width: 180px;
        margin: 0;
    }

    .section1 div,
    .section2 div,
    .section3 div,
    .section4 div {
        width: 50%;
        margin-right: 150px;
        gap: 20;


    }

    .categories {
        display: grid;
        gap: 15px;
        grid-template-columns: repeat(4, 1fr);
        padding: 20px 10px;
    }

    .icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .category-text {
        font-size: 13px;
    }

    .footer-contanier {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }

    .footer-section {
        width: 100%;
    }

    .social-icons {
        justify-content: center;
    }

    .copyright {
        margin-top: 20px;
        font-size: 13px;
    }

    footer {
        padding: 30px 20px;
    }




}