/* Catalog Page Styles */

/* Main Catalog Container */
.catalog-section {
    padding: 2rem 0 3rem;
}

/* Magazine Container */
.magazine-container {
    position: relative;
    margin: 0 auto;
    max-width: 595px; /* A4 genişliği (210mm = ~595px) */
    width: 100%;
}

/* Swiper Container */
.swiper.catalog-swiper {
    width: 100%;
    height: 0;
    padding-bottom: 141.4%; /* A4 aspect ratio (297mm/210mm = 1.414) */
    max-width: 595px; /* A4 genişliği */
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

/* Swiper slide container styling */
.swiper-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    /* A4 kağıt efekti */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.15);
    border-radius: 2px;
    padding: 2px; /* Beyaz kenarlık için */
    box-sizing: border-box;
}

/* Catalog Pages Styling */
.catalog-page {
    height: 100%;
    width: 100%;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    /* A4 kağıt görünümü */
    padding: 15px;
    box-sizing: border-box;
    /* A4 boyutlarında */
    aspect-ratio: 1 / 1.414; /* A4 aspect ratio */
}

/* Cover Pages */
.cover-page, .back-cover {
    background-color: var(--primary-color);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    /* A4 kağıt kenar boşlukları */
    border: 10px solid white;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.cover-content {
    max-width: 80%;
    margin: 0 auto;
    /* A4 kapak içeriğini düzenle */
    padding: 2rem 1rem;
}

/* Swipe Hint */
.swipe-hint {
    margin-top: 2rem;
    animation: pulse 2s infinite;
    color: rgba(0, 0, 0, 0.8);
}

.swipe-hint i {
    font-size: 1.5rem;
    margin-right: 0.5rem;
    animation: swipe 3s infinite;
}

@keyframes swipe {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(10px);
    }
}

/* Page Numbers */
.page-number {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1rem;
    font-weight: bold;
    color: #888;
    z-index: 10;
    background: rgba(255, 255, 255, 0.7);
    padding: 2px 8px;
    border-radius: 3px;
}

/* Catalog Images */
.catalog-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* cover yerine contain kullanarak resmin A4 sayfasına tam sığmasını sağlıyoruz */
    object-position: center;
    background-color: white; /* Sayfanın arka planı beyaz olsun */
}

/* Navigation Controls */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background-color: rgba(255, 255, 255, 0.8);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 18px;
}

.swiper-pagination {
    color: var(--primary-color);
    bottom: -30px !important;
}

/* Control Buttons */
.catalog-controls {
    margin-top: 3rem !important;
}

.catalog-controls .btn {
    min-width: 140px;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .swiper.catalog-swiper {
        max-width: 550px; /* Biraz küçültülmüş A4 genişliği */
        padding-bottom: 141.4%; /* A4 aspect ratio sabit kalır */
    }
    
    .magazine-container {
        max-width: 550px;
    }
}

@media (max-width: 991px) {
    .swiper.catalog-swiper {
        max-width: 450px; /* Daha küçük A4 genişliği */
        padding-bottom: 141.4%; /* A4 aspect ratio sabit kalır */
    }
    
    .magazine-container {
        max-width: 450px;
    }
}

@media (max-width: 767px) {
    .swiper.catalog-swiper {
        max-width: 95%; /* Ekrana sığdır */
        padding-bottom: 141.4%; /* A4 aspect ratio sabit kalır */
    }
    
    .magazine-container {
        max-width: 95%;
    }
    
    .catalog-controls .btn {
        min-width: 120px;
        font-size: 14px;
    }

    .swiper-button-next,
    .swiper-button-prev {
        width: 30px;
        height: 30px;
    }

    .catalog-section {
        padding: 1rem 0 2rem;
    }
}

@media (max-width: 576px) {
    .swiper.catalog-swiper {
        padding-bottom: 141.4%; /* A4 aspect ratio korunur */
        max-width: 100%; /* Tam genişlik */
    }
    
    .catalog-controls {
        margin-top: 2.5rem !important;
    }

    .catalog-controls .btn {
        min-width: 100px;
        padding: 0.5rem;
    }
}

/* Dark Mode Adjustments */
@media (prefers-color-scheme: dark) {
    .catalog-page {
        background-color: #efefef;
    }

    .page-number {
        color: #ddd;
        background: rgba(0, 0, 0, 0.7);
    }

    .swiper-button-next,
    .swiper-button-prev {
        background-color: rgba(0, 0, 0, 0.5);
        color: #fff;
    }
}
