/* ================= GENERAL RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ================= PRODUCT PAGE STYLING ================= */
.ebooks-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 50px auto;
    max-width: 1100px;
    padding: 20px;
}

/* Individual Product Card */
.product-page {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    background-color: var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 30px;
    margin-bottom: 50px;
    transition: transform 0.3s ease-in-out;
}

/* Hover Effect */


/* ================= LEFT COLUMN: IMAGE GALLERY ================= */
.left-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
}

.image-gallery {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.main-image {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

/* Hover Effect on Main Image */
.main-image:hover {
    transform: scale(1.05);
}

.thumbnail-images {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.thumbnail-images img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border: 2px solid transparent;
    cursor: pointer;
    transition: border 0.3s ease, transform 0.2s ease-in-out;
}

/* Thumbnail Hover Effect */
.thumbnail-images img:hover,
.thumbnail-images img.active {
    border: 2px solid var(--accent-color);
    transform: scale(1.1);
}

/* ================= RIGHT COLUMN: DETAILS ================= */
.right-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 50%;
    padding: 20px;
}

.right-column h2 {
    font-size: 2rem;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: bold;
    text-transform: capitalize;
}

.right-column p {
    font-size: 1rem;
    color: var(--secondary-color);
    line-height: 1.6;
    margin-bottom: 20px;
}

/* ================= BUTTONS ================= */
.btn-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btndownload,
.rodownload {
    display: inline-block;
    padding: 14px;
    font-size: 1rem;
    font-weight: bold;
    text-align: center;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease-in-out;
}

.btndownload {
    background-color: var(--accent-color);
    color: white;
}

.rodownload {
    background-color: var(--secondary-color);
    color: white;
}

/* Hover Effects for Buttons */
.btndownload:hover,
.rodownload:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* ================= LIGHTBOX (IMAGE PREVIEW) ================= */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    padding-top: 50px;
}

.lightbox img {
    max-width: 80%;
    max-height: 80%;
    border-radius: 8px;
}

.lightbox.active {
    visibility: visible;
    opacity: 1;
}

/* Close Button */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

/* Navigation Arrows */
.lightbox .arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: white;
    cursor: pointer;
}

.arrow-left {
    left: 20px;
}

.arrow-right {
    right: 20px;
}

main {
    margin-top: 200px;
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 1024px) {
    .product-page {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }

    .left-column,
    .right-column {
        width: 100%;
    }

    .main-image {
        max-width: 250px;
    }

    .right-column h2 {
        font-size: 1.8rem;
    }

    .right-column p {
        font-size: 1rem;
    }

    .thumbnail-images img {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 768px) {
    .product-page {
        padding: 20px;
    }

    .right-column h2 {
        font-size: 1.5rem;
    }

    .thumbnail-images img {
        width: 50px;
        height: 50px;
    }

    .btndownload,
    .rodownload {
        font-size: 0.9rem;
        padding: 12px;
    }
}
