/* ====================================
   FLIPBOOK CATALOG PREMIUM STYLES
   Theme: Gold, Emerald, & Cream Paper
   ==================================== */

:root {
    --paper-bg: #fdfbf7;
    --paper-texture: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.03'/%3E%3C/svg%3E");

    --gold-primary: #d4af37;
    --gold-light: #f3e5ab;
    --gold-dark: #aa8c2c;
    --gold-gradient: linear-gradient(135deg, #cfae44 0%, #e6cf79 45%, #b59328 100%);

    --emerald-deep: #1a472a;
    --emerald-light: #2d5e3e;

    --text-primary: #2c241b;
    --text-secondary: rgba(44, 36, 27, 0.7);

    --font-heading: "Playfair Display", serif;
    --font-body: "Work Sans", sans-serif;
}

/* === WRAPPER === */
.flipbook-catalog {
    padding: 6rem 0;
    background: radial-gradient(circle at center, #f5f0e6 0%, #e6ded3 100%);
    position: relative;
    overflow: hidden;
}

.flipbook-wrapper {
    max-width: min(1400px, 95vw);
    margin: 0 auto;
    padding: 0 clamp(1rem, 3vw, 2rem);
    position: relative;
    z-index: 2;
}

/* === FLIPBOOK HEADER === */
.flipbook-header {
    text-align: center;
    margin-bottom: 4rem;
}

.flipbook-header .section-kicker {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 1rem;
    color: var(--gold-dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.flipbook-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: #000;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.flipbook-header p {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === FLIPBOOK CONTAINER === */
#flipbook-container {
    margin: 0 auto;
    position: relative;
    width: min(92vw, 1200px);
    height: min(75vh, 650px);
    max-height: 750px;
    filter: drop-shadow(0 20px 40px rgba(26, 71, 42, 0.15));
    transition: filter 0.3s ease;
}

/* === PAGE BASE === */
.page {
    background: var(--paper-bg);
    background-image: var(--paper-texture);
    border-radius: 4px;
    /* Sharper edges for paper feel */
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.02);
}

/* Spine Shadow */
.page::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.12), transparent);
    z-index: 10;
    pointer-events: none;
    left: 0;
}

.page:nth-child(even)::before {
    left: auto;
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, 0.12), transparent);
}

/* === CONTENT LAYOUTS === */
.page-content {
    height: 100%;
    padding: 1.2rem;
    /* Reduced for better content fit */
    position: relative;
    display: flex;
    flex-direction: column;
}

.page-inner-border {
    border: 1px solid rgba(212, 175, 55, 0.3);
    height: 100%;
    width: 100%;
    position: relative;
    padding: 0.8rem;
    /* Reduced for better content fit */
    display: flex;
    flex-direction: column;
}

/* === COVER PAGE (PREMIUM) === */
.cover-page {
    background: #1a1a1a;
    /* Fallback */
    background: radial-gradient(circle at center, #2e2e2e 0%, #1a1a1a 100%);
    color: var(--gold-light);
    padding: 1.5rem;
}

.cover-frame {
    border: 2px solid var(--gold-dark);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3rem 1rem;
    position: relative;
    z-index: 2;
}

.cover-header,
.cover-footer {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
    opacity: 0.8;
}

.cover-center {
    text-align: center;
}

.logo-mark-large {
    margin-bottom: 2rem;
    opacity: 0.9;
    display: flex;
    justify-content: center;
}

.logo-mark-large img {
    height: 120px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.cover-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    /* Scaled down for better fit */
    color: #fff;
    margin: 0;
    line-height: 1;
    letter-spacing: -0.02em;
}

.cover-subtitle {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1.3rem;
    color: var(--gold-primary);
    margin-top: 0.5rem;
    font-weight: 400;
}

.cover-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23d4af37' fill-opacity='0.05' fill-rule='evenodd'%3E%3Cpath d='M0 40L40 0H20L0 20M40 40V20L20 40'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: 1;
}

/* === BACK COVER === */
.back-cover {
    background: #1a472a;
    color: #ecf0f1;
}

.back-cover .cover-frame {
    border-color: rgba(255, 255, 255, 0.2);
    justify-content: center;
    gap: 4rem;
}

.b-contact-section h3 {
    font-family: var(--font-heading);
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--gold-light);
}

.b-contact-section p {
    font-size: 1rem;
    opacity: 0.9;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
    color: #fff;
}

.b-location-section p {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #fff;
}

.b-location-section .b-small {
    font-family: var(--font-body);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
    margin-top: 0.5rem;
}

.b-logo-small {
    opacity: 0.4;
    display: flex;
    justify-content: center;
}

.b-logo-small img {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) opacity(0.8);
    /* Make it white/light for the dark green background */
}


/* === STORY / PHILOSOPHY PAGES === */
.page-header-small {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    padding-bottom: 0.4rem;
    margin-bottom: 1.2rem;
}

.page-chapter {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--gold-dark);
    font-size: 1.2rem;
}

.page-label {
    text-transform: uppercase;
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-secondary);
}

.story-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    /* Scaled down for better fit */
    line-height: 1.1;
    color: var(--emerald-deep);
    margin-bottom: 0.8rem;
    /* Reduced margin */
}

.story-text-lead {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    /* Scaled down for better fit */
    color: var(--gold-dark);
    margin-bottom: 0.6rem;
    font-style: italic;
}

.story-text {
    font-size: 0.72rem;
    /* Scaled down for better fit */
    line-height: 1.5;
    color: var(--text-primary);
    max-width: 95%;
    /* Increased width utilization */
}

/* === HEALTH STAMP === */
.health-stamp {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    width: 100px;
    height: 100px;
    color: var(--emerald-deep);
    opacity: 0.9;
}

.stamp-rotate {
    animation: rotateStamp 20s linear infinite;
    transform-origin: center;
}

@keyframes rotateStamp {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.stamp-text {
    font-size: 12px;
    font-family: var(--font-body);
    letter-spacing: 2px;
    fill: currentColor;
    font-weight: 600;
}

.stamp-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--gold-dark);
}

/* === PROMISE LIST === */
.promise-section {
    padding-top: 2rem;
}

.section-title-sm {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--emerald-deep);
    margin-bottom: 1.2rem;
    text-align: center;
}

.promise-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.promise-list li {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.promise-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promise-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.promise-text strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.promise-text p {
    font-size: 0.7rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.signature-block {
    margin-top: auto;
    text-align: right;
    font-family: "Allura", cursive, var(--font-heading);
    /* Fallback */
    font-size: 2rem;
    color: var(--gold-dark);
    padding-right: 2rem;
}

/* === CATALOG GRID === */
.catalog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.catalog-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.ci-image {
    width: 100%;
    height: 95px;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.ci-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.catalog-item:hover .ci-image img {
    transform: scale(1.05);
}

.ci-details {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
}

.ci-details h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--emerald-deep);
    margin: 0;
}

.ci-line {
    flex-grow: 1;
    border-bottom: 1px dotted #ccc;
    margin: 0 1rem;
}

.ci-price {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--gold-dark);
}

.ci-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
}

/* === FULL PAGE VISUAL === */
.full-page-feature {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    justify-content: center;
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--emerald-deep);
    margin-bottom: 0.75rem;
}

.feature-image-container {
    width: 100%;
    height: 150px;
    margin-bottom: 0.75rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: rotate(-2deg);
}

.feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.feature-text {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.6rem;
}

.feature-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gold-dark);
    display: inline-block;
    border-bottom: 2px solid var(--gold-light);
}

/* === CATALOG LIST === */
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 0.4rem;
}

.list-item {
    display: grid;
    grid-template-columns: 1fr 110px;
    /* Fixed width for the labels column to align them vertically */
    gap: 1.5rem;
    align-items: center;
    padding-bottom: 0.7rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Specific centering for full-page features like the Summer Preview */
.full-page-feature .list-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.25rem;
}

.li-info h4 {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--text-primary);
    margin: 0 0 0.15rem 0;
}

.li-info p {
    font-size: 0.68rem;
    color: var(--text-secondary);
    margin: 0;
}

.li-price {
    font-weight: 600;
    color: var(--emerald-deep);
    font-size: 0.7rem;
    text-align: left;
    /* Aligns the start of the 'with...' text */
    line-height: 1.2;
}

/* === SERVICES & FRANCHISE === */
.elegant-heading {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--emerald-deep);
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

.elegant-heading::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--gold-primary);
    margin: 10px auto 0;
}

.page-center-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
}

.service-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 8px;
}

.service-icon-lg {
    font-size: 1.5rem;
}

.service-data h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    margin: 0 0 0.2rem 0;
    color: var(--emerald-deep);
}

.service-data p {
    margin: 0;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.highlight-bg {
    background-color: var(--emerald-deep);
    color: #fff !important;
    position: relative;
}

.highlight-bg p {
    color: #fff !important;
}

.highlight-bg .page-inner-border {
    border-color: rgba(255, 255, 255, 0.2);
}

.highlight-bg .page-number {
    color: rgba(255, 255, 255, 0.4);
}

.franchise-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.eyebrow-accent {
    text-transform: uppercase;
    letter-spacing: 0.25em;
    font-size: 0.7rem;
    color: var(--gold-primary);
    margin-bottom: 1rem;
    display: block;
}

.franchise-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 1.5rem;
    background: var(--gold-gradient);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 3rem 0;
}

.stat-box {
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 1rem;
}

.stat-val {
    display: block;
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--gold-light);
}

.stat-lbl {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    opacity: 0.7;
}

/* === PAGE NUMBER === */
.page-number {
    position: absolute;
    bottom: 1.5rem;
    font-size: 0.7rem;
    font-family: var(--font-body);
    color: var(--text-secondary);
}

.left .page-number {
    left: 2rem;
}

.right .page-number {
    right: 2rem;
}

.note-box {
    background: rgba(212, 175, 55, 0.1);
    padding: 0.8rem;
    border-radius: 4px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-top: auto;
    margin-bottom: 5.5rem;
    /* Lifted up to avoid page number */
    font-size: 0.75rem;
    color: var(--emerald-deep);
}

/* === FLIPBOOK NAVIGATION CONTROLS === */
.flipbook-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding: 1rem 0;
    position: relative;
    z-index: 100;
}

.flip-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gold-gradient);
    color: #fff;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    z-index: 101;
    pointer-events: auto;
}

.flip-btn:hover:not(:disabled) {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
    background: linear-gradient(135deg, #e6cf79 0%, #cfae44 45%, #aa8c2c 100%);
}

.flip-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.flip-btn:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    opacity: 0.5;
    box-shadow: none;
}

.page-indicator {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--emerald-deep);
    font-weight: 500;
    min-width: 140px;
    text-align: center;
    letter-spacing: 0.05em;
    user-select: none;
    position: relative;
    z-index: 101;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .page-content {
        padding: 0.5rem;
    }

    .page-inner-border {
        padding: 0.35rem;
    }

    .cover-title {
        font-size: 1.8rem;
    }

    .cover-subtitle {
        font-size: 1.1rem;
    }

    .logo-mark-large img {
        height: 70px;
    }

    .story-title {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
        line-height: 1.1;
    }

    .story-text-lead {
        font-size: 0.65rem;
        margin-bottom: 0.3rem;
    }

    .story-text {
        font-size: 0.52rem;
        line-height: 1.35;
    }

    .health-stamp {
        width: 45px;
        height: 45px;
        bottom: 0.5rem;
        right: 0.5rem;
    }

    .stamp-center {
        font-size: 0.75rem;
    }

    .section-title-sm {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }

    .promise-list {
        gap: 0.6rem;
    }

    .promise-icon {
        width: 25px;
        height: 25px;
    }

    .promise-text strong {
        font-size: 0.75rem;
    }

    .promise-text p {
        font-size: 0.6rem;
    }

    .catalog-grid {
        gap: 0.3rem;
    }

    .ci-image {
        height: 55px;
    }

    .ci-details h4 {
        font-size: 0.65rem;
    }

    .ci-price {
        font-size: 0.6rem;
    }

    .ci-desc {
        font-size: 0.5rem;
    }

    .feature-title {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .feature-text {
        font-size: 0.6rem;
        margin-bottom: 0.5rem;
        padding: 0 0.5rem;
    }

    .feature-image-container {
        height: 100px !important;
        /* Override inline style */
        margin-bottom: 0.5rem;
    }

    .feature-price {
        font-size: 1.1rem;
    }

    .catalog-list {
        gap: 0.2rem;
    }

    .list-item {
        grid-template-columns: 1fr 80px;
        gap: 0.4rem;
        padding-bottom: 0.4rem;
        margin-bottom: 0;
        border-bottom-width: 0.5px;
    }

    .li-info h4 {
        font-size: 0.7rem;
    }

    .li-info p {
        font-size: 0.5rem;
    }

    /* Specific fix for centering list items on full page features */
    .full-page-feature .list-item {
        gap: 0.1rem;
        padding-bottom: 0.4rem;
    }

    .elegant-heading {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .service-row {
        padding: 0.4rem;
        margin-bottom: 0.6rem;
    }

    .service-icon-lg {
        font-size: 1.1rem;
    }

    .service-data h4 {
        font-size: 0.85rem;
    }

    .franchise-title {
        font-size: 1.8rem;
    }

    .stat-grid {
        margin: 1.2rem 0;
        gap: 0.6rem;
    }

    .stat-val {
        font-size: 1.4rem;
    }

    .signature-block {
        font-size: 1.4rem;
        padding-right: 0.8rem;
    }

    .page-chapter {
        font-size: 0.85rem;
    }

    .page-number {
        bottom: 0.75rem;
        font-size: 0.65rem;
    }

    .note-box {
        font-size: 0.5rem;
        padding: 0.3rem;
        margin-bottom: 2rem;
        margin-top: 0.5rem !important;
    }
}