/* ===== FOOD GRID & CARD STYLES ===== */
.menu-grid,
.food-grid {
    display: grid;
    gap: 40px;
    max-width: 1400px;
    margin: 40px auto;
    padding: 20px 10px;
    justify-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .food-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

@media (min-width: 1200px) {
    .food-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
}

.food-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    max-width: 300px;
    cursor: pointer;
}

.food-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.food-card:active {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.food-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: none;
}

.food-card:hover img {
    transform: none;
}

.food-card-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

.food-card h3 {
    margin: 0 0 5px;
    color: #333;
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.food-card p {
    margin-bottom: 10px;
    color: #666;
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    flex-grow: 1;
}

.food-card .price {
    font-size: 22px;
    font-weight: 700;
    color: #f7941d;
    margin-bottom: 15px;
}

.food-card .order-button {
    background-color: #f7941d;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    border: none;
    cursor: pointer;
}

.food-card .order-button:hover {
    background-color: #e0871a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* ===== E-BOOK READER STYLES ===== */
.ebook-reader-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 800px;
}

/* Header */
.ebook-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background: linear-gradient(135deg, #f7941d 0%, #e0871a 100%);
    color: white;
    gap: 20px;
    flex-wrap: wrap;
}

.ebook-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0;
    flex: 1;
    min-width: 200px;
    font-family: 'Montserrat', sans-serif;
}

.ebook-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
}

.ebook-download-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.ebook-download-btn i {
    font-size: 16px;
}

/* Controls Bar */
.ebook-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 20px;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ebook-btn {
    background-color: #f7941d;
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    user-select: none;
}

.ebook-btn:hover:not(:disabled) {
    background-color: #e0871a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(247, 148, 29, 0.3);
}

.ebook-btn:active:not(:disabled) {
    transform: translateY(0);
}

.ebook-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #333;
    font-family: 'Lato', sans-serif;
}

.page-indicator input {
    width: 50px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: 'Lato', sans-serif;
}

.page-indicator input:focus {
    outline: none;
    border-color: #f7941d;
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.1);
}

.zoom-indicator {
    font-weight: 600;
    color: #333;
    min-width: 50px;
    text-align: center;
    font-family: 'Lato', sans-serif;
}

/* Canvas Container */
.ebook-canvas-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background-color: #e8e8e8;
    position: relative;
    overflow: auto;
}

.ebook-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    background: white;
    border-radius: 4px;
}

/* Loading Indicator */
.loading-indicator {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #666;
    font-family: 'Lato', sans-serif;
}

.loading-indicator p {
    font-size: 16px;
    margin: 0;
}

.loading-indicator a {
    color: #f7941d;
    font-weight: 600;
    text-decoration: none;
}

.loading-indicator a:hover {
    text-decoration: underline;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #f7941d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Footer */
.ebook-footer {
    padding: 15px 30px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    color: #666;
    font-size: 14px;
    font-family: 'Lato', sans-serif;
}

.ebook-footer p {
    margin: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .ebook-reader-container {
        max-width: 100%;
        margin: 20px auto;
        border-radius: 0;
    }
}

@media (max-width: 768px) {
    .ebook-reader-container {
        min-height: auto;
        margin: 20px 10px;
        border-radius: 8px;
    }

    .ebook-header {
        padding: 20px;
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }

    .ebook-header h1 {
        font-size: 24px;
        flex: none;
        min-width: auto;
    }

    .ebook-download-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }

    .ebook-controls {
        padding: 12px 15px;
        gap: 10px;
        flex-direction: column;
    }

    .controls-left,
    .controls-right {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .page-indicator {
        gap: 5px;
        font-size: 13px;
    }

    .page-indicator input {
        width: 45px;
        padding: 6px 8px;
        font-size: 12px;
    }

    .zoom-indicator {
        font-size: 12px;
        min-width: 45px;
    }

    .ebook-btn {
        padding: 8px 10px;
        font-size: 14px;
        min-width: 38px;
        min-height: 38px;
    }

    .ebook-canvas-wrapper {
        padding: 15px;
        min-height: 400px;
    }

    .ebook-footer {
        padding: 12px 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .ebook-header {
        padding: 15px;
        gap: 10px;
    }

    .ebook-header h1 {
        font-size: 20px;
    }

    .ebook-download-btn {
        padding: 10px 16px;
        font-size: 12px;
        gap: 6px;
    }

    .ebook-download-btn i {
        font-size: 14px;
    }

    .ebook-controls {
        padding: 10px 12px;
        gap: 8px;
    }

    .controls-left,
    .controls-right {
        gap: 6px;
    }

    .ebook-btn {
        padding: 7px 8px;
        font-size: 12px;
        min-width: 36px;
        min-height: 36px;
    }

    .page-indicator {
        gap: 4px;
        font-size: 12px;
    }

    .page-indicator input {
        width: 40px;
        padding: 5px 6px;
        font-size: 11px;
    }

    .zoom-indicator {
        font-size: 11px;
        min-width: 40px;
    }

    .ebook-canvas-wrapper {
        padding: 10px;
        min-height: 300px;
    }

    .ebook-footer {
        padding: 10px 12px;
        font-size: 11px;
    }
}