/* ==========================================
   THEME 13 - VISUAL PORTFOLIO (SPA Layout)
   ========================================== */

:root {
    --bg-body: #FFFFFF;
    --text-dark: #2D3436;
    --text-muted: #636E72;
    --accent-color: #D4AF37;
    /* Goldish */
    --accent-bg: #F9F9F9;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-dark);
    font-family: var(--font-body);
    font-weight: 400;
    overflow-x: hidden;
}

/* --- Loader --- */
#app-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s;
}

.loader-circle {
    width: 40px;
    height: 40px;
    border: 3px solid #eee;
    border-top-color: var(--text-dark);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Header --- */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#logo-text {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 18px;
    text-transform: uppercase;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-dark);
    padding: 10px;
}

/* --- Pages & Transitions --- */
#app-container {
    padding-top: 60px;
    min-height: 100vh;
    position: relative;
}

.page {
    display: none;
    width: 100%;
    animation: fadeIn 0.6s var(--ease-out);
}

.page.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Home Page --- */
.home-intro {
    padding: 30px 20px;
    text-align: center;
}

.home-intro h1 {
    font-family: var(--font-heading);
    font-size: 32px;
    margin-bottom: 5px;
}

.home-intro p {
    color: var(--text-muted);
    font-size: 14px;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 0 20px 40px 20px;
}

.cat-card {
    position: relative;
    border-radius: 0;
    /* Sharp or slight radius? Let's go minimal radius */
    height: 220px;
    overflow: hidden;
    cursor: pointer;
    background: #f0f0f0;
}

.cat-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.cat-card:hover img {
    transform: scale(1.05);
}

.cat-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 15px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
}

.cat-title {
    font-family: var(--font-heading);
    font-size: 18px;
    letter-spacing: 0.5px;
}

.cat-count {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 3px;
    text-transform: uppercase;
}

/* --- Products Page --- */
.category-hero {
    height: 200px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

#cat-title-lg {
    position: relative;
    z-index: 2;
    font-family: var(--font-heading);
    font-size: 36px;
    letter-spacing: 2px;
    text-align: center;
}

#product-list-container {
    padding: 0 20px 60px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.product-item {
    display: flex;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.product-item:last-child {
    border-bottom: none;
}

.product-item:hover {
    background: #fafafa;
}

.pi-img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    margin-right: 20px;
    /* Round vs Square? Minimal Square */
}

.pi-info {
    flex: 1;
}

.pi-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.pi-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pi-price {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    white-space: nowrap;
    margin-left: 15px;
}

/* Badge */
.badge-sm {
    display: inline-block;
    font-size: 10px;
    padding: 2px 6px;
    background: #f5f5f5;
    color: #999;
    margin-bottom: 4px;
}

/* --- Drawer --- */
#menu-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 200;
    transition: right 0.4s var(--ease-out);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

#menu-drawer.active {
    right: 0;
}

.drawer-header {
    height: 60px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.drawer-header h2 {
    font-family: var(--font-heading);
    font-size: 18px;
}

.drawer-content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
}

#drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s;
}

#drawer-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.info-block {
    margin-bottom: 30px;
}

.info-block h3 {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 15px;
}

.info-block p,
.info-block a {
    display: block;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.drawer-sep {
    height: 1px;
    background: #f0f0f0;
    margin: 30px 0;
}

.wifi-pill {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: monospace;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-wifi {
    cursor: pointer;
    border: 1px dashed #ddd;
}

.drawer-footer {
    padding: 20px;
    text-align: center;
    font-size: 11px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Product Overlay (Full Screen Detail) --- */
.overlay-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    z-index: 300;
    transform: translateY(100%);
    transition: transform 0.4s var(--ease-out);
    overflow-y: auto;
}

.overlay-modal.active {
    transform: translateY(0);
}

.close-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 301;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    backdrop-filter: blur(5px);
}

.overlay-img {
    width: 100%;
    height: 50vh;
    background-size: cover;
    background-position: center;
}

.overlay-content {
    background: white;
    min-height: 50vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(-20px);
    padding: 40px 30px;
}

.overlay-details {
    max-width: 600px;
    margin: 0 auto;
}

.overlay-details h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.2;
}

.ov-price {
    font-size: 20px;
    color: var(--accent-color);
    margin-bottom: 25px;
    font-weight: 500;
}

#ov-desc {
    color: var(--text-muted);
    line-height: 1.8;
}

/* ==========================================
   PRODUCT DETAIL MODAL - ELEGANT REDESIGN
   ========================================== */

/* Modal Container (Full Screen Overlay) */
#product-overlay {
    background: white;
}

#product-overlay.active {
    transform: translateY(0);
}

/* Product Detail Card Layout */
.product-detail-card {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Image Section */
.pd-image {
    width: 100%;
    height: 45vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.pd-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient Overlay */
.pd-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, white, transparent);
    pointer-events: none;
}

/* Product Info Section */
.pd-info {
    flex: 1;
    padding: 25px;
    background: white;
    border-radius: 25px 25px 0 0;
    margin-top: -25px;
    position: relative;
    z-index: 1;
}

.pd-info h2 {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.2;
}

.pd-meta {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

#ov-desc {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

/* Options Section */
.ov-section {
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ov-section h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 0 0 15px 0;
    font-weight: 600;
}

/* Option and Extra List Styling */
.opt-list,
.extra-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.opt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    background: #fafafa;
    border: 1.5px solid #e8e8e8;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.opt-item:hover {
    border-color: var(--text-dark);
}

.opt-item.selected {
    background: var(--text-dark);
    border-color: var(--text-dark);
    color: white;
}

.opt-item.selected .opt-name {
    color: black;
}

.opt-item.selected .icon-radio,
.opt-item.selected .icon-check {
    background: white;
    border-color: white;
}

.opt-item.selected .icon-radio::after {
    background: var(--text-dark);
}

.opt-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
}

.opt-price {
    font-size: 14px;
    font-weight: 500;
    color: var(--accent-color);
}

/* Radio & Check Icons */
.icon-radio,
.icon-check {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-check {
    border-radius: 6px;
}

/* Bottom Price Section */
.pd-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    margin-top: auto;
    border-top: 1px solid #f0f0f0;
}

.pd-price {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Close Button Redesign */
.close-overlay {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 310;
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.close-overlay:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.close-overlay i {
    font-size: 20px;
    color: var(--text-dark);
}

/* Ingredients Area */
#ov-ingredients-area {
    background: #f8fdf9;
    padding: 15px;
    border-radius: 12px;
    border-left: 3px solid #22c55e;
}

#ov-ingredients-area h4 {
    color: #16a34a;
    margin: 0 0 8px 0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#ov-ingredients {
    margin: 0;
    color: #166534;
}

@media (min-width: 768px) {
    .grid-layout {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .cat-card {
        height: 300px;
    }
}

/* --- Drawer Service Buttons --- */
.drawer-btn {
    width: 100%;
    padding: 15px;
    border: 1px solid #eee;
    background: transparent;
    color: var(--text-dark);
    font-family: var(--font-heading);
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 4px;
}

.drawer-btn i {
    font-size: 18px;
}

.drawer-btn:hover {
    border-color: var(--text-dark);
    background: var(--text-dark);
    color: white;
}

.btn-waiter-dr {}

.btn-bill-dr {}


/* --- Product Options & Extras in Modal --- */
.prod-options-area {
    margin-top: 30px;
    border-top: 1px solid #f0f0f0;
    padding-top: 20px;
}

.opt-group {
    margin-bottom: 20px;
}

.opt-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-dark);
}

.opt-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opt-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: all 0.2s;
}

.opt-item.selected {
    border-color: var(--accent-color);
    background: var(--accent-bg);
    font-weight: 500;
}

.opt-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.opt-price {
    color: var(--text-muted);
    font-size: 13px;
}

/* Custom Checkbox/Radio UI icons */
.icon-check,
.icon-radio {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.icon-radio {
    border-radius: 50%;
}

.selected .icon-check,
.selected .icon-radio {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}

.selected .icon-check::after {
    content: '✓';
    font-size: 10px;
}

.selected .icon-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

/* Ingredients list */
.ing-list {
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
    font-style: italic;
}

/* --- Review Modal --- */
.review-modal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    transform: none;
    /* Override translateY from overlay-modal */
}

.review-modal.show {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.review-card {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 400px;
    padding: 30px;
    text-align: center;
}

.review-card .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.review-card .modal-header h3 {
    font-family: var(--font-heading);
    font-size: 22px;
    margin: 0;
}

.review-card .close-btn {
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.star-rating .rate-star {
    font-size: 32px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s, transform 0.2s;
}

.star-rating .rate-star:hover {
    transform: scale(1.2);
}

.star-rating .rate-star.fa-solid {
    color: #f59e0b;
}

.review-card textarea {
    width: 100%;
    height: 100px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 14px;
    resize: none;
    margin-bottom: 20px;
}

.btn-submit-review {
    width: 100%;
    padding: 15px;
    background: var(--text-dark);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-submit-review:hover {
    background: var(--accent-color);
}