@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: #2A2A2A;
    font-family: "waverly-cf", sans-serif;
    font-weight: 700;
    font-size: clamp(27px, 3.3vw, 41px);
    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: #D9D4CC;
    outline: none;
    cursor: pointer;
}

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

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

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

.nav-btn {
    background-color: #2A2A2A;
    color: #FFFFFF;
    border: 1.5px solid #2A2A2A;
    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.1);
    flex-shrink: 0;
}

.nav-btn:hover:not(:disabled) { background-color: #C0522A; border-color: #C0522A; color: #FFFFFF; transform: scale(1.1); }
.nav-btn:disabled { background-color: #D9D4CC; border-color: #D9D4CC; color: #4A4A4A; cursor: not-allowed; opacity: 0.5; }

.page-counter {
    color: #4A4A4A;
    font-size: clamp(13px, 1.1vw, 15px);
    font-family: "waverly-cf", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 12px;
    position: relative;
    z-index: 100;
}

/* ===== Zoom button ===== */
.zoom-btn {
    background: none;
    border: 1.5px solid #2A2A2A;
    color: #2A2A2A;
    font-size: 16px;
    font-family: "waverly-cf", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    margin-top: 16px;
    padding: 10px 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.2s;
    position: relative;
    z-index: 100;
}

.zoom-btn:hover { background-color: #2A2A2A; color: #FFFFFF; border-color: #2A2A2A; transform: translateY(-2px); }
.zoom-btn span { font-size: clamp(13px, 1.1vw, 15px); font-family: inherit; }

/* ===== Lightbox ===== */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 42, 42, 0.97);
    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: #FFFFFF;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
    transition: color 0.3s;
}

@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: rgba(255,255,255,0.25);
    outline: none;
    cursor: pointer;
}

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

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

.lb-counter {
    color: rgba(255, 255, 255, 0.75);
    font-size: clamp(13px, 1.1vw, 15px);
    font-family: "waverly-cf", sans-serif;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    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; }
}