/* Simple Book Menu - Clean Implementation */

.menu-book-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px 0;
    perspective: 1500px;
}

.book {
    position: relative;
    width: 600px;
    height: 400px;
    margin: 0 auto;
    transform-style: preserve-3d;
}

/* Book Cover - Always visible initially */
.book-cover {
    position: absolute;
    width: 300px;
    height: 400px;
    right: 0;
    top: 0;
    background: linear-gradient(145deg, #001AB1, #2563eb);
    border-radius: 12px;
    transform-origin: left center;
    transform-style: preserve-3d;
    transition: transform 1.5s ease-in-out;
    z-index: 10;
    box-shadow: 
        0 10px 30px rgba(0, 26, 177, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    cursor: pointer;
}

/* Cover content */
.cover-front {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 40px 20px;
    backface-visibility: hidden;
}

.cover-back {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    transform: rotateY(180deg);
    backface-visibility: hidden;
    padding: 30px 25px;
    overflow-y: auto;
}

.cover-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cover-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 20px;
}

.cover-ornament {
    font-size: 2rem;
    opacity: 0.8;
    animation: pulse 2s infinite;
}

/* Menu Pages Container */
.pages-container {
    position: absolute;
    width: 300px;
    height: 400px;
    right: 0;
    top: 0;
    z-index: 5;
}

/* Left Page Container (turned cover back) */
.left-page-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pain-context {
    margin-bottom: 20px;
}

.pain-text {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 15px;
}

.product-image-container {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-image-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

/* Fallback for old image placeholder (in case we need it) */
.image-placeholder {
    width: 100%;
    height: 120px;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 15px;
}

.context-note {
    font-size: 0.8rem;
    color: #64748b;
    font-style: italic;
    text-align: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

/* Individual Pages */
.menu-page {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    border: 1px solid rgba(226, 232, 240, 0.5);
    border-radius: 12px;
    padding: 30px 25px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
}

.menu-page.active {
    opacity: 1;
    visibility: visible;
    z-index: 8;
}

/* Page Content */
.page-header {
    text-align: center;
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: #001AB1;
    margin-bottom: 5px;
}

.page-subtitle {
    font-size: 1rem;
    color: #64748b;
    font-style: italic;
}

.page-description {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.5;
    margin-bottom: 15px;
}

.page-features {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.page-features li {
    font-size: 0.8rem;
    color: #475569;
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.page-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.page-cta {
    background: linear-gradient(135deg, #001AB1, #2563eb);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: auto;
}

.page-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 26, 177, 0.3);
}

/* Side Navigation - Centered on Menu */
.book-nav {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.book-nav.visible {
    opacity: 1;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    height: 100px;
    border: 3px solid #001AB1;
    background: linear-gradient(135deg, #001AB1, #2563eb);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: all;
    box-shadow: 0 6px 25px rgba(0, 26, 177, 0.4);
    z-index: 25;
}

.nav-btn.prev {
    left: -70px;
}

.nav-btn.next {
    right: -70px;
}

.nav-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border-color: #0ea5e9;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 30px rgba(14, 165, 233, 0.5);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background: #cbd5e1;
    border-color: #94a3b8;
    color: #64748b;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn svg {
    margin-bottom: 2px;
    width: 22px;
    height: 22px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-align: center;
    line-height: 1.1;
    margin-top: 1px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.nav-menu-text {
    font-size: 0.6rem;
    font-weight: 600;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Page Counter - Bottom Center */
.page-counter {
    position: absolute;
    bottom: -50px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 600;
    background: white;
    padding: 8px 16px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: all;
    opacity: 0;
    transition: opacity 0.5s ease 0.3s;
}

.book-nav.visible .page-counter {
    opacity: 1;
}

/* Animations */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Book States */
.book.opened .book-cover {
    transform: rotateY(-180deg);
    z-index: 1;
}

.book.opened .pages-container {
    z-index: 10;
}

/* Responsive */
@media (max-width: 768px) {
    .book {
        width: 90%;
        max-width: 500px;
        height: 350px;
    }
    
    .book-cover,
    .pages-container,
    .menu-page {
        width: 250px;
        height: 350px;
    }
    
    .cover-title {
        font-size: 2rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}
