body {
    margin: 0;
    background: #dfeeff;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* SHIRITI SIPËR */
.topbar {
    width: 100%;
    height: 50px;
    background: white;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;
    z-index: 1000;
}

.top-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

    width: 130px;
    height: auto;

    object-fit: contain;
    display: block;
}


/* ZONA E FLETUSHKËS */
.catalog-area {
    position: relative;

    width: 100vw;
    height: calc(100vh - 50px);

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: visible;
}

.page-counter {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);

    font-size: 16px;
    font-weight: 600;
    color: #333;

    z-index: 6000;
}
/* LIBRI */
#book {
    width: 1650px;
    height: 1165px;

    max-width: 92vw;
    max-height: calc(100vh - 100px);

    margin: 20px auto 0 auto;

    background: transparent !important;
}


/* FAQET */
.page {
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;

    overflow: hidden;
}

.page canvas {
    display: block;

    width: 100%;
    height: 100%;

    margin: 0 !important;
    padding: 0 !important;

    object-fit: fill;
}


/* HIQ HAPËSIRAT E BARDHA TË PAGEFLIP */
.stf__parent,
.stf__wrapper,
.stf__block,
.stf__item,
.stf__outerShadow,
.stf__innerShadow {
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
}


/* SHIGJETAT MAJTAS / DJATHTAS */
.nav-arrow {
    position: fixed;

    top: 52%;
    transform: translateY(-50%);

    border: none;
    background: transparent;

    font-size: 54px;
    line-height: 1;

    color: #222;

    cursor: pointer;

    z-index: 2000;
}

.nav-left {
    left: 1.5%;
}

.nav-right {
    right: 1.5%;
}


/* FILLIM / FUND */
.top-button {
    position: fixed;

    top: 58px;

    border: none;
    background: transparent;

    font-size: 26px;
    line-height: 1;

    color: #222;

    cursor: pointer;

    z-index: 2000;
}

#firstPage {
    left: 3%;
}

#lastPage {
    right: 3%;
}


/* HOVER */
.nav-arrow:hover,
.top-button:hover {
    opacity: 0.55;
}

.stf__parent,
.stf__wrapper,
.stf__block,
.stf__item {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* BUTONAT NË SHIRITIN E SIPËRM */
.top-tools {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    margin-right: 25px;
}

.top-tools button {
    background: transparent;
    border: none;
    padding: 5px;
    font-size: 27px;
    color: #202533;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.15s ease;
}

.top-tools button:hover {
    transform: scale(1.12);
}

/* DARK MODE */
body.dark-mode {
    background: #10101f;
}

body.dark-mode .catalog-area {
    background: #10101f;
}

body.dark-mode .topbar {
    background: #10101f;
}

body.dark-mode .top-tools button,
body.dark-mode .top-button {
    color: white;
}


/* SINGLE PAGE VIEW */
body.single-view #book {
    max-width: 50vw;
}
/* =====================================
   SHPORTA E PRODUKTIT
===================================== */

.product-cart {
    position: absolute;

    /* Qendra e shportës vendoset te pika ku klikon */
    transform: translate(-50%, -50%);

    width: 46px;
    height: 46px;

    background: #e30613;

    border: 2px solid #ffffff;
    border-radius: 50%;

    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.25);

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;
    font-size: 20px;

    text-decoration: none;

    cursor: pointer;

    z-index: 5000;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* IKONA E SHPORTËS */
.product-cart i {
    color: #ffffff;
    pointer-events: none;
}


/* HOVER */
.product-cart:hover {
    transform: translate(-50%, -50%) scale(1.12);

    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.32);
}


/* =====================================
   TOOLTIP
===================================== */

.cart-tooltip {
    position: absolute;

    bottom: 58px;
    left: 50%;

    transform: translateX(-50%);

    background: #111111;
    color: #ffffff;

    padding: 7px 11px;

    border-radius: 5px;

    font-size: 13px;
    font-weight: 500;

    white-space: nowrap;

    opacity: 0;
    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease;
}


/* SHIGJETA E VOGËL E TOOLTIP */
.cart-tooltip::after {
    content: "";

    position: absolute;

    top: 100%;
    left: 50%;

    transform: translateX(-50%);

    border-width: 5px;
    border-style: solid;

    border-color:
        #111111
        transparent
        transparent
        transparent;
}


/* SHFAQ TOOLTIP KUR AFROHET MAUSI */
.product-cart:hover .cart-tooltip {
    opacity: 1;
    visibility: visible;
}

/* EDIT BUTTON */
.edit-button {
    position: absolute;
    right: 120px;
    top: 50%;
    transform: translateY(-50%);

    background: #e30613;
    color: white;

    border: none;
    border-radius: 6px;

    padding: 8px 14px;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;

    z-index: 3000;
}

.edit-button:hover {
    opacity: 0.85;
}

/* EDIT është i fshehur për vizitorët */
.edit-button {
    display: none;
}

/* Shfaqet vetëm kur JavaScript e lejon */
.edit-button.admin-visible {
    display: block;
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 768px) {

    body {
        overflow-x: hidden;
    }

    .topbar {
        height: 48px;
    }

    .top-logo {
        width: 110px;
        max-height: 28px;
    }

 .catalog-area {
    width: 100vw;
    height: auto;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    overflow: hidden;
}

#book {
    width: 100vw !important;
    height: 141.4vw !important;

    max-width: none !important;
    max-height: none !important;

     margin: 40px auto 0 auto !important;
}

    .page {
        overflow: hidden;
    }

    .page canvas {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain;
    }

    .nav-arrow {
        font-size: 38px;
        top: 52%;
        padding: 6px;
    }

    .nav-left {
        left: 4px;
    }

    .nav-right {
        right: 4px;
    }

    .top-button {
        font-size: 20px;
        top: 54px;
    }

    #firstPage {
        left: 8px;
    }

    #lastPage {
        right: 8px;
    }

    .top-tools {
        gap: 8px;
        margin-right: 8px;
    }

    .top-tools button {
        font-size: 21px;
        padding: 3px;
    }

    .edit-button {
        right: 70px;
        padding: 6px 10px;
        font-size: 11px;
    }

    .product-cart {
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .cart-tooltip {
        display: none;
    }
}

/* =====================================
   GOGAJ LOADING SCREEN
===================================== */

#loading-screen {
    position: fixed;
    inset: 0;

    width: 100vw;
    height: 100vh;

    background: #e30613;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 999999;

    opacity: 1;
    visibility: visible;

    transition:
        opacity 0.6s ease,
        visibility 0.6s ease;
}

#loading-screen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#loading-screen img {
    width: 600px;
    max-width: 60vw;
    height: auto;

    animation: gogajLogo 1.2s ease-in-out infinite alternate;
}

@keyframes gogajLogo {
    from {
        transform: scale(0.92);
        opacity: 0.65;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}