@charset "UTF-8";
/* snowboard-flipbook.css */

/* ===== Layout wrapper ===== */
.flipbook-section {
    max-width: 1400px;
    margin: 60px auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.flipbook-section h2 {
    color: #6B7A99;
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

/* ===== Scaling wrapper ===== */
.flipbook-scale-wrap {
    width: 1000px;
    height: 350px;
    transform-origin: top center;
    position: relative;
    z-index: 200;
}

.flipbook-outer {
    width: 1000px;
    overflow: visible;
    position: relative;
    z-index: 200;
}

/* ===== Flipbook container positioning ===== */
#flipbook-container {
    width: 1000px;
    height: 350px;
    transform: translateX(-250px);
    transition: transform 0.15s ease-out;
    position: relative;
    z-index: 200;
}

#flipbook-container.pos-open { transform: translateX(0); }
#flipbook-container.pos-back { transform: translateX(250px); }

#flipbook-container,
#flipbook-container canvas,
.page,
.page img {
    outline: none;
    border: none;
}

/* ===== Page styling ===== */
.page {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fff;
}

.page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.page.cover { background: #1a1c1f; }

/* ===== Navigation ===== */
.flipbook-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding: 0 20px;
    gap: 20px;
    width: 1000px;
    position: relative;
    z-index: 100;
}

.flipbook-scrubber {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #454758;
    outline: none;
    cursor: pointer;
}

.flipbook-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6B7A99;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: background 0.2s, transform 0.2s;
}

.flipbook-scrubber::-webkit-slider-thumb:hover {
    background: #2F3858;
    transform: scale(1.2);
}

.flipbook-scrubber::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6B7A99;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.nav-btn {
    background-color: #2F3858;
    color: #8D99BB;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) { background-color: #6B7A99; color: #1a1c1f; transform: scale(1.1); }
.nav-btn:disabled { background-color: #454758; cursor: not-allowed; opacity: 0.5; }

.page-counter {
    color: #6B7A99;
    font-size: 18px;
    margin-top: 12px;
    position: relative;
    z-index: 100;
}

/* ===== Zoom button ===== */
.zoom-btn {
    background: none;
    border: none;
    color: #6B7A99;
    font-size: 22px;
    cursor: pointer;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.85;
    transition: opacity 0.2s;
    position: relative;
    z-index: 100;
}

.zoom-btn:hover { opacity: 1; }
.zoom-btn span { font-size: 14px; font-family: inherit; }

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26,28,31,0.98);
    z-index: 9999;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
    overflow-y: auto;
}

.lightbox.open { display: flex; }

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: #6B7A99;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
}

@media (max-width: 767px) {
    .lightbox {
        overflow-x: hidden;
    }
    .lightbox-close {
        top: 18px;
        right: 25px;
        font-size: 36px;
    }
}

/* ===== Lightbox flipbook ===== */
.lb-scale-wrap { transform-origin: top center; }

.lb-flipbook-outer {
    width: 800px;
    overflow: visible;
}

#lb-flipbook-container {
    width: 800px;
    height: 560px;
    transform: none !important;
    background: transparent;
}

.lb-page {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: transparent;
}

.lb-page img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.lb-page.cover { background: #1a1c1f; }

.lb-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding: 0 20px;
    gap: 20px;
    width: 800px;
}

.lb-scrubber {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #454758;
    outline: none;
    cursor: pointer;
}

.lb-scrubber::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6B7A99;
    cursor: pointer;
}

.lb-scrubber::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6B7A99;
    cursor: pointer;
    border: none;
}

.lb-counter {
    color: #6B7A99;
    font-size: 15px;
    margin-top: 10px;
}

/* ===== Tablet (matches style.css 1199px) ===== */
@media (max-width: 1199px) {
    .flipbook-section {
        padding: 0 20px;
    }
}

/* ===== Mobile (matches style.css 767px) ===== */
@media (max-width: 767px) {
    .flipbook-section {
        padding: 0 20px;
        margin: 40px auto;
    }

    .flipbook-scale-wrap {
        width: 1000px;
        height: 350px;
        transform-origin: top center;
    }

    .flipbook-outer {
        width: 1000px;
    }

    .flipbook-nav {
        max-width: calc(100vw - 40px);
        width: 100%;
        padding: 0 8px;
        margin-top: 20px;
    }

    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .page-counter {
        font-size: 15px;
    }

    .zoom-btn {
        font-size: 18px;
    }
}

/* ===== Small mobile (matches style.css 540px) ===== */
@media (max-width: 540px) {
    .flipbook-section {
        padding: 0 16px;
        margin: 30px auto;
    }

    .flipbook-nav {
        max-width: calc(100vw - 32px);
        gap: 10px;
        padding: 0 4px;
    }

    .nav-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}

@media (max-width: 400px) {
    .nav-btn { width: 34px; height: 34px; font-size: 15px; }
}