:root {
    --alert-yellow: #FFD000;
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--gray-bg);
}


section.recommendations {
    background: var(--white);
}

.catalog-top-info { padding: 30px 20px 15px 20px; text-align: center; }
.catalog-top-info h1 { font-size: 1.8rem; margin-bottom: 5px; }
.catalog-validity { color: var(--text-muted); font-size: 0.95rem; }

/* Responsive Viewer-container padding system mechanics */
.viewer-section {
    padding: 10px 0 40px 0;
}

.viewer-container {
    margin: 0 auto;
    width: 100%;
    transition: padding 0.2s ease;
}

/* Dynamic CSS responsive step-formula generator definitions */
@media (min-width: 1024px) {
    .viewer-container {
        max-width: 800px;
        padding: 0 1%;
    }

    #catalogViewerSection .viewer-container {
        max-width: 1280px;
    }
}
@media (min-width: 1152px)  { .viewer-container { max-width: 850px; padding: 0 2%; } }
@media (min-width: 1280px)  { .viewer-container { max-width: 900px; padding: 0 3%; } }
@media (min-width: 1380px)  { .viewer-container { max-width: 950px; padding: 0 4%; } }
@media (min-width: 1480px)  { .viewer-container { max-width: 1000px; padding: 0 5%; } }

/* Slider Window core structure */
.slider-window {
    background-color: #1A1829;
    border-top-left-radius: var(--radius);
    border-top-right-radius: var(--radius);
    position: relative;
    overflow: hidden;
    height: 70vh;
    min-height: 480px;
    max-height: 780px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Main viewport slide window */
.slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    overflow: hidden; /* Prevent native scrollbars from breaking structural logic */
    background-color: #1A1829; /* Deep black canvas behind the flyers */
}

/* FIXED: The inner scaling wrapper MUST match the parent boundaries perfectly */
.zoom-image-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center center;
    will-change: transform; /* Performance optimization for GPU acceleration */
}

/* FIXED: Standard configuration for the flyer image to fit without layout breaks */
.slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;  /* Absolute necessity to override full stretching distortion */
    height: auto; /* Keeps the native standard aspect ratio safe */
    object-fit: contain; /* Forces browser to scale down beautifully inside the box */
    pointer-events: none;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5); /* Nice depth drop-shadow for reality realism */
}

/* Dynamic modifiers when the slide changes tracking state to Zoomed */
.slide.zoomed {
    cursor: zoom-out;
}

/* When zoomed, the wrapper stays 100%, JavaScript transforms it via translation scales */
.slide.zoomed .zoom-image-wrapper {
    width: 100%;
    height: 100%;
}

/* FIXED: When zoomed, the image can now expand fully beyond constraints */
.slide.zoomed img {
    max-width: none;
    max-height: none;
    /* We handle scaling directly in JS via wrapper transform matrix to prevent blurry blurry results */
}

/* Advertisement frames template architecture layout rules */
.ad-slide-content {
    background: linear-gradient(135deg, #2D2A4A 0%, #151326 100%);
    width: 85%; height: 85%; border-radius: var(--radius);
    border: 2px dashed rgba(255,255,255,0.15);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: var(--white); padding: 40px; text-align: center;
}

.ad-label { background: rgba(255,255,255,0.15); padding: 4px 10px; border-radius: 4px; font-size: 0.75rem; margin-bottom: 20px; }
.ad-slide-content h2 { font-size: 1.8rem; margin-bottom: 15px; color: var(--alert-yellow); }
.ad-slide-content p { opacity: 0.8; max-width: 400px; font-size: 0.95rem; }

/* Visual Screen Edge Arrow Triggers */
.nav-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    background-color: rgba(45, 42, 74, 0.4); backdrop-filter: blur(4px);
    color: var(--white); border: none; width: 46px; height: 46px; border-radius: 50%;
    font-size: 1.1rem; cursor: pointer; z-index: 10;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s, opacity 0.2s;
}
.nav-arrow:hover { background-color: var(--brand); }
.prev-arrow { left: 15px; }
.next-arrow { right: 15px; }

/* Floating Smart Tip Bubble block system layout */
.floating-tip-bubble {
    visibility: hidden;
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    border-radius: var(--radius);
    padding: 12px 16px;
    max-width: 320px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    z-index: 50;
    animation: bubbleSlideIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bubbleSlideIn {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.tip-icon { font-size: 1.3rem; margin-top: 2px; }
.tip-text { font-size: 0.85rem; color: var(--text-dark); line-height: 1.4; }
.close-tip-btn {
    background: transparent; border: none; font-size: 1.3rem;
    color: var(--text-muted); cursor: pointer; line-height: 1;
}
.close-tip-btn:hover { color: #E74C3C; }

/* Redesigned Centered Toolbar Layout */
.viewer-toolbar {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 10px 20px;
    border-bottom-left-radius: var(--radius);
    border-bottom-right-radius: var(--radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 54px;
}

.toolbar-left-spacer { width: 40px; } /* Balancing element offset for absolute centering execution */

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pag-btn {
    background-color: rgba(255,255,255,0.08);
    border: none;
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.pag-btn:hover { background-color: var(--brand); }

.page-counter {
    font-weight: 700;
    font-size: 0.95rem;
    background-color: rgba(255,255,255,0.15);
    padding: 5px 16px;
    border-radius: 20px;
    min-width: 70px;
    text-align: center;
}

.fullscreen-toggle-icon {
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    transition: background 0.2s;
}
.fullscreen-toggle-icon:hover { background-color: rgba(255,255,255,0.1); }

/* Interactive Native App Promotion Alert Banner underneath */
.app-feature-alert {
    background-color: var(--white);
    border: 1px solid var(--brand-pale);
    border-left: 5px solid var(--brand);
    border-radius: var(--radius);
    padding: 15px 20px;
    margin-top: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    visibility: hidden;
    height: 0;
    padding: 0;
    margin: 0;
    border: none;
}

.alert-content {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    padding-right: 30px;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content p {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.close-alert-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* Fullscreen Execution Overrides rules logic configuration */
#catalogViewerSection:fullscreen {
    padding: 0; background-color: #1A1829;
    display: flex; flex-direction: column;
}
#catalogViewerSection:fullscreen .viewer-container {
    max-width: 100% !important; padding: 0 !important;
    height: 100vh; display: flex; flex-direction: column;
}
#catalogViewerSection:fullscreen .slider-window {
    flex: 1; height: auto; max-height: none; border-radius: 0;
}
#catalogViewerSection:fullscreen .viewer-toolbar {
    border-radius: 0; width: 100%;
}

/* Secondary Lower Block */
.catalog-details-content { padding: 40px 20px; }
.details-block { background-color: var(--white); padding: 25px; border-radius: var(--radius); border: 1px solid var(--brand-pale); }
.details-block h3 { margin-bottom: 12px; }
.details-block ul { padding-left: 20px; }
.details-block li { margin-bottom: 8px; font-size: 1rem; color: var(--text-muted); }

/* Custom PocSto strict cursor forcing system */
.slide.zoomed { cursor: zoom-out !important; }
.slide.zoomed[style*="grabbing"] { cursor: grabbing !important; }
.slide img.cursor-zoom-in { cursor: zoom-in !important; pointer-events: auto !important; }
.slide img.cursor-zoom-out { cursor: zoom-out !important; pointer-events: auto !important; }
.slide img.cursor-grabbing { cursor: grabbing !important; pointer-events: auto !important; }

.sub-section-title {
    font-size: 1.4rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--brand-pale);
}

section.recommendations .store-card {
    border: 1px solid rgba(0, 0, 0, 0.04);
}


.catalog-details-content .section-subtitle {
    margin-top: 15px;
    font-size: 1.2rem;
}

.catalog-details-content .search-tips {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 5px;
}

.fact-sheet {
    background-color: #f0effc;
    border: 1px solid #a8a6e8;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.fact-sheet .fact-sheet-title {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.fact-sheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.fact-sheet-table tr {
    border-bottom: 1px solid rgba(128, 125, 219, 0.2);
}

.fact-sheet-table td {
    padding: 8px 0;
}

.fact-sheet-table .label {
    font-weight: bold;
}

.fact-sheet-table .value {
    text-align: right;
}

/* --- Újság vége dia (Template) --- */
.end-slide-content {
    border: 2px solid var(--brand-light);
    background: linear-gradient(135deg, #151326 0%, #2D2A4A 100%);
    width: 90%;
    height: 90%;
}

.end-slide-content .success-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.end-slide-content .end-title {
    color: var(--white);
    font-size: 1.6rem;
    margin-bottom: 5px;
}

.end-slide-content .end-description {
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: var(--brand-pale);
}

/* --- Promo Box --- */
.promo-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    width: 100%;
    max-width: 450px;
}

.promo-box .promo-title {
    color: #FFD000;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.promo-box .promo-text {
    font-size: 0.82rem;
    color: #dfdefa;
    line-height: 1.4;
}

/* --- Ajánlások és Gombok --- */
.recommendation-title {
    color: var(--brand-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.store-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    width: 100%;
}

.sbtn {
    display: inline-block;
    text-decoration: none;
    font-weight: bold;
    border-radius: 6px;
    transition: background 0.2s ease-in-out;
}

.sbtn-primary {
    background: var(--brand);
    color: white;
    padding: 6px 14px;
    font-size: 0.8rem;
    margin-top: 10px;
}

.sbtn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
}

.sbtn:hover {
    opacity: 0.9;
}

.archive-section {
    margin: 80px auto;
}
.archive-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    background: var(--white);
    padding: 40px 20px;
    border-left: 5px solid #ff4d4d;
}
.archive-section .thumbnail-wrapper {
    opacity: 0.6;
    filter: grayscale(100%);
    width: 260px;
}

.archive-section .archive-text {
    align-content: center;
}
.archive-section .archive-text p {
    margin: 20px 0 30px;
}

/* START - adsense fix - Important */
.ad-slide-content {
    position: relative;
}
.adsense-slot-container {
    width: 100%;
    max-height: 90%;
    margin-bottom: 10px;
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.ad-label {
    position: absolute;
    bottom: 0;
}
.adsense-slot-container ins {
    width: 100%;
    height: 100%;
}
/* END - adsense fix - Important */


/* Rigid Mobile View Layout Transformations Rules overrides */
@media (max-width: 1023px) {
    .viewer-container {
        padding: 0 !important; /* Full width edge to edge enforcement strategy */
    }
    .slider-window {
        border-radius: 0;
        height: 65vh;
    }

    /* Move Toolbar to screen bottom structure layout */
    .viewer-container {
        display: flex;
        flex-direction: column;
    }
    .slider-window {
        order: 1;
    }
    .viewer-toolbar {
        order: 2;
        border-radius: 0;
        width: 100%;
        background-color: #151326; /* Darkened base context background layer */
        box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    }

    /* Disable elements overlapping clear touch targets */
    .nav-arrow { display: none !important; }
    .floating-tip-bubble { display: none !important; } /* Hide floating text frames inside strict compact mobile boundaries */
}