/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: #f5f0e8;
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Menu Container - Single Page Container */
.menu-container {
    position: relative;
    width: 90vw;
    max-width: 1000px;
    height: 80vh;
    max-height: 800px;
    overflow: hidden;
}

/* Page Container - Holds the single visible page */
#pageContainer {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Page Styles - Single Full-Width Page */
.page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: #faf8f3;
    border: 1px solid #e8e0d4;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    will-change: transform, opacity;
    /* Smooth rendering optimizations */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Page Content */
.page-content {
    width: 100%;
    height: 100%;
    padding: 50px 50px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Cover Page Styles */
.cover-page {
    background: linear-gradient(135deg, #faf8f3 0%, #f5f0e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cover-page .page-content {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 50px;
    scrollbar-width: thin;
    scrollbar-color: #d4c5b0 transparent;
}

.cover-page .page-content::-webkit-scrollbar {
    width: 6px;
}

.cover-page .page-content::-webkit-scrollbar-track {
    background: transparent;
}

.cover-page .page-content::-webkit-scrollbar-thumb {
    background-color: #d4c5b0;
    border-radius: 3px;
}

.back-cover .page-content {
    overflow-y: auto;
    overflow-x: hidden;
    padding: 40px 50px;
    scrollbar-width: thin;
    scrollbar-color: #d4c5b0 transparent;
}

.back-cover .page-content::-webkit-scrollbar {
    width: 6px;
}

.back-cover .page-content::-webkit-scrollbar-track {
    background: transparent;
}

.back-cover .page-content::-webkit-scrollbar-thumb {
    background-color: #d4c5b0;
    border-radius: 3px;
}

.restaurant-name {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #2c2416;
    text-align: center;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.restaurant-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #6b5d4a;
    text-align: center;
    font-style: italic;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.restaurant-info {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    color: #6b5d4a;
    text-align: center;
    font-style: italic;
}

/* Restaurant About Section */
.restaurant-about {
    margin: 20px 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.about-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #5a4f3f;
    text-align: center;
    line-height: 1.7;
    font-style: italic;
}

/* Contact Information */
.restaurant-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 25px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #6b5d4a;
}

.contact-item svg {
    flex-shrink: 0;
    color: #8b7a65;
}

/* Social Media Links */
.social-media {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #6b5d4a;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #2c2416;
}

.social-link svg {
    transition: transform 0.3s ease;
}

.social-link:hover svg {
    transform: scale(1.1);
}

/* Back Cover Styles */
.thank-you-message {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: #2c2416;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.payment-section {
    margin: 30px 0;
    text-align: center;
}

.qr-code-container {
    margin: 25px auto;
    padding: 15px;
    background: #fff;
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.qr-code {
    width: 200px;
    height: 200px;
    display: block;
}

.payment-info {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    color: #5a4f3f;
    margin-top: 20px;
    font-style: italic;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.footer-info {
    margin-top: 30px;
    text-align: center;
}

.footer-info p {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: #6b5d4a;
    margin: 10px 0;
}

.footer-info .website {
    font-weight: 600;
    color: #2c2416;
}

.footer-info .hours {
    font-style: italic;
    margin-top: 15px;
}

.cover-decoration {
    width: 200px;
    min-width: 200px;
    height: 3px;
    min-height: 3px;
    background: #d4c5b0;
    margin: 25px auto;
    position: relative;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10;
    box-sizing: border-box;
}

.cover-decoration::before,
.cover-decoration::after {
    content: '' !important;
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    min-width: 10px;
    min-height: 10px;
    background: #d4c5b0;
    border-radius: 50%;
    transform: translateY(-50%);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    box-sizing: border-box;
}

.cover-decoration::before {
    left: -25px;
}

.cover-decoration::after {
    right: -25px;
}

/* Ensure decoration is visible on back cover */
.back-cover .cover-decoration {
    width: 200px !important;
    min-width: 200px !important;
    height: 3px !important;
    min-height: 3px !important;
    background: #d4c5b0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    margin: 25px auto !important;
    position: relative !important;
}

.back-cover .cover-decoration::before {
    content: '' !important;
    position: absolute !important;
    left: -25px !important;
    top: 50% !important;
    width: 10px !important;
    height: 10px !important;
    background: #d4c5b0 !important;
    border-radius: 50% !important;
    transform: translateY(-50%) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.back-cover .cover-decoration::after {
    content: '' !important;
    position: absolute !important;
    right: -25px !important;
    top: 50% !important;
    width: 10px !important;
    height: 10px !important;
    background: #d4c5b0 !important;
    border-radius: 50% !important;
    transform: translateY(-50%) !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Menu Page Styles */
.category-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.2rem;
    font-weight: 600;
    color: #2c2416;
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 15px;
    border-bottom: 2px solid #d4c5b0;
    letter-spacing: 1px;
    flex-shrink: 0;
}

.menu-items {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
    /* Custom scrollbar styling */
    scrollbar-width: thin;
    scrollbar-color: #d4c5b0 transparent;
}

.menu-items::-webkit-scrollbar {
    width: 6px;
}

.menu-items::-webkit-scrollbar-track {
    background: transparent;
}

.menu-items::-webkit-scrollbar-thumb {
    background-color: #d4c5b0;
    border-radius: 3px;
}

.menu-items::-webkit-scrollbar-thumb:hover {
    background-color: #c4b5a0;
}

.menu-item {
    padding-bottom: 18px;
    border-bottom: 1px solid #e8e0d4;
    flex-shrink: 0;
}

.menu-item:last-child {
    border-bottom: none;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.item-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c2416;
    letter-spacing: 0.5px;
}

.item-price {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #6b5d4a;
    white-space: nowrap;
    margin-left: 20px;
}

.item-description {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 400;
    color: #5a4f3f;
    line-height: 1.5;
    font-style: italic;
}

/* Navigation Controls */
.navigation {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 30px;
    z-index: 1000;
}

.nav-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(44, 36, 22, 0.8);
    border: 2px solid #d4c5b0;
    color: #faf8f3;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-btn:hover:not(:disabled) {
    background: rgba(44, 36, 22, 0.95);
    transform: scale(1.1);
}

.nav-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-btn svg {
    width: 24px;
    height: 24px;
    stroke: #faf8f3;
}

/* Page Indicator */
.page-indicator {
    position: fixed;
    top: 30px;
    right: 40px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: #6b5d4a;
    z-index: 1000;
    background: rgba(250, 248, 243, 0.9);
    padding: 10px 20px;
    border-radius: 20px;
    border: 1px solid #d4c5b0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Page Flip States */
.page.flipping {
    pointer-events: none;
}

.page.hidden {
    display: none;
}

/* Tablet Landscape Optimization */
@media (orientation: landscape) and (max-height: 900px) {
    .menu-container {
        height: 85vh;
    }
    
    .page-content {
        padding: 40px 40px;
    }
    
    .category-title {
        font-size: 2.8rem;
        margin-bottom: 25px;
    }
    
    .item-name {
        font-size: 1.5rem;
    }
    
    .item-description {
        font-size: 1rem;
    }
    
    .menu-items {
        gap: 18px;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .nav-btn {
        width: 70px;
        height: 70px;
    }
    
    .nav-btn:active:not(:disabled) {
        background: rgba(44, 36, 22, 0.95);
    }
}

/* Prevent text selection during animations */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}
