/* ==========================================
   ZXUS STORE
   BOOKS PAGE
   DESIGN BASED ON REFERENCE IMAGE
========================================== */


/* ==========================================
   RESET
========================================== */

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;

    background: #050505;

    color: #f4f1ea;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    padding-bottom: 82px;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}


/* ==========================================
   HEADER
========================================== */

.books-header {

    width: 100%;

    height: 122px;

    padding:
        20px 30px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    background: #070707;

    border-bottom:
        1px solid
        rgba(255,255,255,.08);


    box-sizing: border-box;}


/* ==========================================
   BRAND
========================================== */

.books-brand a {

    color: #d7bd79;

    text-decoration: none;

    display: flex;

    align-items: baseline;

    gap: 8px;


    flex-shrink: 1;}


.books-brand span {

    font-size: 31px;

    font-weight: 600;

    letter-spacing: 3px;

}


.books-brand small {

    color: #aaa294;

    font-size: 9px;

    letter-spacing: 4px;

}


/* ==========================================
   HEADER ACTIONS
========================================== */

.books-header-actions {

    display: flex;

    align-items: center;

    gap: 12px;


    flex-shrink: 0;
    min-width: 0;}


/* ==========================================
   PROFILE
========================================== */

.profile-photo-btn {

    width: 68px;

    height: 68px;

    padding: 0;

    border: none;

    outline: none;

    border-radius: 50%;

    background: #ffffff;

    overflow: hidden;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-shrink: 0;

}


.profile-photo-btn:focus {

    outline: none;

    border: none;

    box-shadow: none;

}


#profileImage {

    width: 100%;

    height: 100%;

    object-fit: cover;

    border-radius: 50%;

    display: none;

}


.profile-photo-btn.has-image #profileImage {

    display: block;

}


/* ==========================================
   SEARCH BUTTON
========================================== */

.books-search-btn {

    width: 68px;

    height: 68px;

    padding: 0;

    border-radius: 50%;

    border:
        1px solid
        rgba(255,255,255,.12);

    background: #090909;

    color: #f2f2f2;

    font-family: Arial, sans-serif;

    font-size: 31px;

    display: flex;

    align-items: center;

    justify-content: center;

}


.books-search-btn:active {

    transform: scale(.96);

}


/* ==========================================
   POINTS
========================================== */

.points-mini {

    min-width: 200px;

    height: 68px;

    padding:
        0 15px;

    border:
        1px solid
        rgba(193,164,99,.45);

    background:
        linear-gradient(
            135deg,
            #17140f,
            #080808
        );

    color: #ffffff;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

}


.points-data {

    display: flex;

    flex-direction: column;

    align-items: flex-end;

}


.points-data small {

    color: #817866;

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 3px;

}


.points-data strong {

    color: #dfca91;

    font-family: Arial, sans-serif;

    font-size: 17px;

    font-weight: 400;

    margin-top: 5px;

}


.points-symbol {

    width: 38px;

    height: 38px;

    border:
        1px solid
        rgba(211,188,126,.45);

    border-radius: 50%;

    color: #d8c18a;

    font-family: Arial, sans-serif;

    font-size: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

}


/* ==========================================
   SEARCH AREA
========================================== */

.books-search-area {

    display: none;

    margin:
        15px 30px;

    height: 52px;

    padding:
        0 15px;

    gap: 10px;

    align-items: center;

    background: #0d0d0d;

    border:
        1px solid
        rgba(255,255,255,.12);

}


.books-search-area.show {

    display: flex;

}


.books-search-area span {

    font-family: Arial, sans-serif;

    font-size: 23px;

    color: #ffffff;

}


.books-search-area input {

    width: 100%;

    height: 100%;

    border: none;

    outline: none;

    background: transparent;

    color: #ffffff;

    font-family: Arial, sans-serif;

    font-size: 14px;

}


.books-search-area input::placeholder {

    color: #666;

}


/* ==========================================
   MAIN
========================================== */

.books-main {

    width: 100%;

    padding:
        30px;

}


/* ==========================================
   TITLE
========================================== */

.books-title {

    margin-bottom: 30px;

}


.books-title span {

    color: #bca46d;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 5px;

}


.books-title h1 {

    margin-top: 12px;

    color: #ffffff;

    font-size: 39px;

    font-weight: 400;

}


/* ==========================================
   CATEGORIES
========================================== */

.books-categories {

    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 1px;

    background:
        rgba(255,255,255,.08);

    margin-bottom: 50px;

}


.book-category {

    min-height: 105px;

    padding: 18px;

    border: none;

    background: #0b0b0b;

    color: #ffffff;

    text-align: right;

    transition:
        .2s ease;

}


.book-category strong {

    display: block;

    font-size: 20px;

    font-weight: 400;

}


.book-category small {

    display: block;

    margin-top: 10px;

    color: #666666;

    font-family: Arial, sans-serif;

    font-size: 10px;

}


.book-category.active {

    border:
        1px solid
        rgba(194,164,102,.4);

}


.book-category.active strong {

    color: #d6bc7e;

}


/* ==========================================
   SECTION HEADER
========================================== */

.books-section-head {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    margin-bottom: 30px;

}


.books-section-head span {

    color: #bca46d;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 5px;

}


.books-section-head h2 {

    margin-top: 10px;

    color: #ffffff;

    font-size: 34px;

    font-weight: 400;

}


.books-section-head button {

    border: none;

    background: transparent;

    color: #c4aa70;

    font-family: Arial, sans-serif;

    font-size: 12px;

}


/* ==========================================
   BOOKS HORIZONTAL CAROUSEL
========================================== */

.books-row {

    width: 100%;

    display: flex !important;

    flex-direction: row;

    direction: rtl;

    gap: 22px;

    overflow-x: auto;

    overflow-y: hidden;

    padding:
        0
        0
        12px;

    scrollbar-width: none;

    -ms-overflow-style: none;

    -webkit-overflow-scrolling: touch;

    scroll-snap-type: x mandatory;

}


.books-row::-webkit-scrollbar {

    display: none;

}


/* ==========================================
   BOOK CARD
========================================== */

.zx-book-card {

    width: 256px !important;

    min-width: 256px !important;

    max-width: 256px !important;

    flex:
        0 0 256px !important;

    scroll-snap-align: start;

    background: #0d0d0d;

    border:
        1px solid
        rgba(255,255,255,.08);

    overflow: hidden;

}


/* ==========================================
   BOOK COVER
========================================== */

.zx-book-cover {

    width: 100%;

    aspect-ratio: .72;

    position: relative;

    overflow: hidden;

    display: flex;

    align-items: center;

    justify-content: center;

    text-align: center;

}


/* ==========================================
   AFTER DARK
========================================== */

.cover-after {

    background:
        linear-gradient(
            145deg,
            #344650 0%,
            #182126 48%,
            #0d1113 100%
        );

    color: #ffffff;

}


.cover-after::after {

    content: "";

    position: absolute;

    width: 180%;

    height: 100%;

    background:
        linear-gradient(
            120deg,
            transparent 30%,
            rgba(255,255,255,.15) 48%,
            transparent 67%
        );

    transform:
        rotate(-10deg);

}


.cover-after span {

    position: absolute;

    top: 20px;

    right: 20px;

    z-index: 2;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 3px;

}


.cover-after strong {

    position: relative;

    z-index: 2;

    font-size: 30px;

    line-height: .95;

}


/* ==========================================
   READING
========================================== */

.cover-reading {

    background:
        linear-gradient(
            145deg,
            #a89875,
            #514a39
        );

    color: #ffffff;

}


.cover-reading::after {

    content: "";

    position: absolute;

    width: 170%;

    height: 100%;

    background:
        linear-gradient(
            120deg,
            transparent 35%,
            rgba(255,255,255,.12),
            transparent 65%
        );

    transform:
        rotate(-12deg);

}


.cover-reading span {

    position: absolute;

    top: 20px;

    right: 20px;

    z-index: 2;

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 4px;

}


.cover-reading strong {

    position: relative;

    z-index: 2;

    font-size: 22px;

    line-height: .95;

}


/* ==========================================
   HUMAN
========================================== */

.cover-human {

    background:
        linear-gradient(
            145deg,
            #777a78,
            #252827
        );

    color: #ffffff;

}


.cover-human span {

    position: absolute;

    top: 20px;

    right: 20px;

    font-family: Arial, sans-serif;

    font-size: 9px;

    letter-spacing: 4px;

}


.cover-human strong {

    font-size: 25px;

    line-height: .95;

}


/* ==========================================
   JOURNEY
========================================== */

.cover-journey {

    background:
        linear-gradient(
            145deg,
            #e0dcd1,
            #89867d
        );

    color: #171717;

}


.cover-journey span {

    position: absolute;

    top: 18px;

    right: 18px;

    font-family: Arial, sans-serif;

    font-size: 9px;

}


.cover-journey strong {

    font-size: 28px;

    line-height: .9;

}


/* ==========================================
   BOOK INFO
========================================== */

.zx-book-info {

    padding:
        15px;

}


.zx-book-info h3 {

    color: #ffffff;

    font-size: 18px;

    font-weight: 400;

}


.zx-book-info p {

    margin-top: 6px;

    color: #777777;

    font-family: Arial, sans-serif;

    font-size: 10px;

}


/* ==========================================
   BOOK BOTTOM
========================================== */

.zx-book-bottom {

    margin-top: 18px;

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.zx-book-bottom > span {

    color: #d1bd8b;

    font-family: Arial, sans-serif;

    font-size: 16px;

}


.book-add-btn {

    width: 42px;

    height: 42px;

    border:
        1px solid
        #a88d50;

    background: transparent;

    color: #d6bd7d;

    font-family: Arial, sans-serif;

    font-size: 25px;

    display: flex;

    align-items: center;

    justify-content: center;

}


.book-add-btn:active {

    transform: scale(.92);

}


/* ==========================================
   BOOK OF THE WEEK
========================================== */

.zx-book-week {

    width: 100%;

    min-height: 280px;

    margin-top: 70px;

    padding: 35px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 30px;

    background:
        linear-gradient(
            110deg,
            #0d0d0d,
            #11100d
        );

    border:
        1px solid
        rgba(255,255,255,.08);

}


.zx-book-week > div:first-child {

    flex: 1;

}


.zx-book-week > div:first-child > span {

    color: #c0a66b;

    font-family: Arial, sans-serif;

    font-size: 10px;

    letter-spacing: 4px;

}


.zx-book-week h2 {

    margin-top: 15px;

    color: #ffffff;

    font-size: 35px;

    font-weight: 400;

}


.zx-book-week p {

    margin-top: 12px;

    color: #777777;

    font-family: Arial, sans-serif;

    font-size: 11px;

}


/* ==========================================
   WEEK BOOK
========================================== */

.week-book-cover {

    width: 130px;

    aspect-ratio: .68;

    flex-shrink: 0;

    padding: 14px;

    background:
        linear-gradient(
            145deg,
            #292925,
            #080808
        );

    border:
        1px solid
        rgba(194,164,102,.25);

    display: flex;

    flex-direction: column;

    justify-content: space-between;

}


.week-book-cover small {

    color: #a99465;

    font-family: Arial, sans-serif;

    font-size: 7px;

}


.week-book-cover strong {

    color: #ffffff;

    font-size: 22px;

    line-height: .9;

}


.week-book-cover span {

    color: #a99465;

    font-family: Arial, sans-serif;

    font-size: 6px;

    letter-spacing: 2px;

}


/* ==========================================
   NO RESULTS
========================================== */

.books-no-results {

    display: none;

    padding:
        70px 20px;

    text-align: center;

}


.books-no-results.show {

    display: block;

}


.books-no-results strong {

    color: #ffffff;

    font-size: 20px;

    font-weight: 400;

}


.books-no-results p {

    margin-top: 10px;

    color: #666666;

    font-family: Arial, sans-serif;

    font-size: 11px;

}


/* ==========================================
   BOTTOM NAV
========================================== */

.bottom-nav {

    position: fixed;

    left: 0;

    right: 0;

    bottom: 0;

    z-index: 500;

    min-height: 67px;

    padding:
        8px 8px
        calc(8px + env(safe-area-inset-bottom));

    display: flex;

    align-items: center;

    justify-content: space-around;

    background:
        rgba(7,7,7,.97);

    border-top:
        1px solid
        rgba(255,255,255,.08);

    backdrop-filter: blur(18px);

    -webkit-backdrop-filter: blur(18px);

}


.nav-item {

    min-width: 55px;

    border: none;

    background: transparent;

    color:
        rgba(255,255,255,.35);

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 5px;

}


.nav-item span {

    font-family: Arial, sans-serif;

    font-size: 19px;

    line-height: 1;

}


.nav-item small {

    font-family: Arial, sans-serif;

    font-size: 8px;

}


.nav-item.active {

    color: #d5bd82;

}


.nav-item:active {

    transform: scale(.92);

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 600px) {


    /* HEADER */

    .books-header {

        height: 122px;

        padding:
            18px 12px;
        box-sizing: border-box;

    }


    .books-brand span {

        font-size: 25px;

    }


    .books-brand small {

        font-size: 7px;

    }


    .books-header-actions {

        gap: 7px;

    }


    .profile-photo-btn {

        width: 46px;

        height: 46px;

    }


    .books-search-btn {

        width: 46px;

        height: 46px;

        font-size: 21px;

    }


    .points-mini {

        min-width: 120px;

        width: 120px;

        height: 46px;

        padding:
            0 10px;

    }


    .points-data small {

        font-size: 7px;

    }


    .points-data strong {

        font-size: 14px;

    }


    .points-symbol {

        width: 30px;

        height: 30px;

        font-size: 15px;

    }


    /* SEARCH */

    .books-search-area {

        margin:
            12px 18px;

    }


    /* MAIN */

    .books-main {

        padding:
            25px 29px;

    }


    /* TITLE */

    .books-title {

        margin-bottom: 28px;

    }


    .books-title h1 {

        font-size: 34px;

    }


    /* CATEGORIES */

    .books-categories {

        margin-left: 0;

        margin-right: 0;

        margin-bottom: 45px;

    }


    .book-category {

        min-height: 100px;

        padding: 16px;

    }


    .book-category strong {

        font-size: 19px;

    }


    /* SECTION */

    .books-section-head {

        margin-bottom: 28px;

    }


    .books-section-head h2 {

        font-size: 29px;

    }


    .books-section-head span {

        font-size: 9px;

        letter-spacing: 4px;

    }


    /* CAROUSEL */

    .books-row {

        display: flex !important;

        flex-direction: row;

        direction: rtl;

        gap: 22px;

        overflow-x: auto;

        overflow-y: hidden;

        scrollbar-width: none;

        padding-bottom: 12px;

    }


    .books-row::-webkit-scrollbar {

        display: none;

    }


    /* CARD */

    .zx-book-card {

        width: 256px !important;

        min-width: 256px !important;

        max-width: 256px !important;

        flex:
            0 0 256px !important;

    }


    /* COVER */

    .zx-book-cover {

        aspect-ratio: .72;

    }


    .cover-after strong {

        font-size: 30px;

    }


    /* INFO */

    .zx-book-info {

        padding: 12px;

    }


    .zx-book-info h3 {

        font-size: 16px;

    }


    .zx-book-info p {

        font-size: 10px;

    }


    /* ADD */

    .book-add-btn {

        width: 38px;

        height: 38px;

        font-size: 22px;

    }


    .zx-book-bottom > span {

        font-size: 15px;

    }


    /* BOOK WEEK */

    .zx-book-week {

        min-height: 250px;

        margin-top: 65px;

        padding: 25px;

    }


    .zx-book-week h2 {

        font-size: 29px;

    }


    .week-book-cover {

        width: 105px;

    }

}


/* ==========================================
   SMALL PHONES
========================================== */

@media (max-width: 390px) {
    .books-brand span {
        font-size: 22px;
    }




    .books-header {

        padding-left: 18px;

        padding-right: 18px;

    }


    .books-main {

        padding-left: 18px;

        padding-right: 18px;

    }


    .points-mini {
        min-width: 100px;
        width: 100px;
    }


    .points-symbol {

        display: none;

    }


    .books-row {

        gap: 18px;

    }


    .zx-book-card {

        width: 245px !important;

        min-width: 245px !important;

        max-width: 245px !important;

        flex:
            0 0 245px !important;

    }

}
/* ZXUS CATEGORY CAROUSEL - SAFE ADDITION */
.books-categories {
    position: relative !important;
    display: block !important;
    width: 100%;
    height: 180px;
    min-height: 180px;
    overflow: hidden !important;
    padding: 0 !important;
    perspective: 900px;
    background: transparent;
}

.books-categories .zxus-category-track {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.books-categories .book-category {
    position: absolute !important;
    top: 50%;
    left: 50%;
    width: 165px;
    min-height: 82px;
    margin: 0 !important;
    padding: 14px 12px;
    transform:
        translate(-50%, -50%)
        translateX(calc(var(--zxus-offset) * 155px))
        translateZ(calc((4 - var(--zxus-distance)) * 35px))
        rotateY(calc(var(--zxus-offset) * -18deg))
        scale(calc(1 - (var(--zxus-distance) * .10)));
    opacity: calc(1 - (var(--zxus-distance) * .17));
    transition:
        transform .42s ease,
        opacity .42s ease,
        box-shadow .42s ease,
        border-color .42s ease;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 20px;
    background: #0b0b0b;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
}

.books-categories .book-category[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

.books-categories .book-category.active {
    transform:
        translate(-50%, -50%)
        translateZ(120px)
        scale(1.12) !important;
    opacity: 1 !important;
    border-color: rgba(194,164,102,.75);
    box-shadow: 0 0 30px rgba(194,164,102,.16);
}

.books-categories .zxus-category-arrow {
    position: absolute !important;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid rgba(194,164,102,.55);
    border-radius: 50%;
    background: #0b0b0b;
    color: #d6bc7e;
    font-size: 32px;
    line-height: 40px;
    cursor: pointer;
    z-index: 200;
}

.books-categories .zxus-category-prev {
    left: 8px;
}

.books-categories .zxus-category-next {
    right: 8px;
}

@media (max-width: 600px) {
    .books-categories {
        height: 155px;
        min-height: 155px;
    }

    .books-categories .book-category {
        width: 135px;
        min-height: 74px;
        transform:
            translate(-50%, -50%)
            translateX(calc(var(--zxus-offset) * 105px))
            translateZ(calc((4 - var(--zxus-distance)) * 25px))
            rotateY(calc(var(--zxus-offset) * -16deg))
            scale(calc(1 - (var(--zxus-distance) * .10)));
    }

    .books-categories .book-category.active {
        transform:
            translate(-50%, -50%)
            translateZ(90px)
            scale(1.08) !important;
    }

    .books-categories .zxus-category-prev {
        left: 4px;
    }

    .books-categories .zxus-category-next {
        right: 4px;
    }
}



/* ==========================================
   ZXUS BOOK CARD DESCRIPTION FLIP
   ========================================== */

.zx-book-card {
    position: relative;
}

.zx-book-cover {
    transform-style: preserve-3d;
    backface-visibility: hidden;
    transition: transform .55s ease;
}

.zx-book-card.zx-book-flipped .zx-book-cover {
    transform: perspective(900px) rotateY(180deg);
}

.zx-book-description {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    aspect-ratio: .72;
    box-sizing: border-box;
    padding: 22px 15px;
    overflow: hidden;
    background: #000000;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.08);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-family: "Noto Kufi Arabic", "Kufi", "Tahoma", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.9;
    text-align: center;
    direction: rtl;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    transform: perspective(900px) rotateY(180deg);
    transform-origin: center;
    backface-visibility: hidden;
    transition: transform .55s ease;
    z-index: 3;
}

.zx-book-card.zx-book-flipped .zx-book-description {
    transform: perspective(900px) rotateY(0deg);
}


/* ==========================================
   ZXUS SHOW ALL - BOOKS GRID
   Does not change the normal carousel
========================================== */

.books-row.zxus-show-all-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    direction: rtl;
    gap: 22px;
    overflow-x: visible;
    overflow-y: visible;
    padding: 0 0 12px;
    scroll-snap-type: none;
}

.books-row.zxus-show-all-grid .zx-book-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 256px !important;
    flex: none !important;
    justify-self: center;
    scroll-snap-align: none;
}

@media (max-width: 575px) {
    .books-row.zxus-show-all-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .books-row.zxus-show-all-grid .zx-book-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}
