@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #D9381E;
    --bg-color: #F5F5F7; /* Apple-esque light grey */
    --text-main: #1D1D1F;
    --text-muted: #86868B;
    --card-bg: rgba(255, 255, 255, 0.9);
    --border-subtle: rgba(0, 0, 0, 0.04);
    --shadow-soft: 0 10px 40px -10px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 40px -10px rgba(0,0,0,0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 40px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Splash Screen */
#splash-screen {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-color);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.6s;
}
#splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-logo {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
    animation: pulseLogo 1.2s infinite alternate cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes pulseLogo {
    0% { transform: scale(0.95); opacity: 0.7; }
    100% { transform: scale(1.05); opacity: 1; }
}

/* Sticky Wrap for Header & Nav */
.sticky-wrapper {
    position: sticky;
    top: -1px;
    z-index: 100;
    /* We can blur the wrapper entirely, or let children do it */
    background: rgba(245, 245, 247, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.app-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 15px;
    border-bottom: 1px solid var(--border-subtle);
}

.logo-wrap {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 60px;
    max-width: 150px;
    object-fit: contain;
}

.restaurant-name {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-main) 0%, #434343 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Category Nav - Sleek Pill Design */
.category-nav {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    margin-top: -1px; /* Align to header */
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    background: rgba(245, 245, 247, 0.65);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}
.category-nav::-webkit-scrollbar { display: none; }

.cat-btn {
    text-decoration: none;
    padding: 10px 24px;
    border-radius: 30px;
    background: white;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    transition: var(--transition);
}

.cat-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.3);
    transform: translateY(-2px);
}

/* Hero Campaigns */
.campaigns-wrapper {
    padding: 15px 20px 25px;
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.campaigns-wrapper::-webkit-scrollbar { display: none; }

.campaign-card {
    flex: 0 0 88%;
    scroll-snap-align: center;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-soft);
    position: relative;
    height: 200px;
    overflow: hidden;
    transform: scale(0.98);
    transition: var(--transition);
}
.campaign-card:first-child { transform: scale(1); }

.campaign-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

.campaign-overlay {
    position: absolute;
    z-index: 2;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.8) 100%);
    padding: 30px 20px 20px;
}

.campaign-tag {
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.campaign-title {
    color: white;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 6px;
}

.campaign-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 14px;
    font-weight: 400;
}

/* Menu Content */
.menu-section {
    padding: 10px 20px 30px;
    scroll-margin-top: 170px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.section-badge {
    margin-left: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

/* Premium Product Card */
.product-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.product-card:active {
    transform: scale(0.96) !important;
    background: #ffffff;
}

/* Featured / Chef Special Card */
.featured-badge {
    background: linear-gradient(135deg, #FFD700, #FDB931);
    color: #4a3600;
    font-size: 11px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.product-desc {
    font-size: 14px;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
    line-height: 1.4;
}

.product-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 8px;
}

.badge-icon {
    font-size: 13px;
    background: rgba(0,0,0,0.03);
    padding: 2px 6px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
}

.price-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(var(--primary-rgb), 0.05);
    padding: 8px 14px;
    border-radius: 12px;
    min-width: max-content;
}

.price {
    font-weight: 800;
    font-size: 17px;
    color: var(--text-main);
}

.old-price {
    font-size: 13px;
    font-weight: 500;
    color: #A1A1A6;
    text-decoration: line-through;
}

.currency {
    color: var(--primary);
    font-weight: 700;
}

.product-img-wrap {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #f0f0f0;
    position: relative;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.product-card:hover .product-img {
    transform: scale(1.08);
}

.add-icon {
    position: absolute;
    bottom: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(var(--primary-rgb), 0.4);
    pointer-events: none; /* Ignore clicks so card handles it */
}

/* Modal Details */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    width: 100%;
    border-radius: 32px 32px 0 0;
    padding: 0 0 30px 0;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-dragger {
    width: 40px;
    height: 5px;
    background: #E5E5EA;
    border-radius: 4px;
    margin: 15px auto;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 36px;
    height: 36px;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--text-main);
    z-index: 10;
    cursor: pointer;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #f0f0f0;
}

.modal-body {
    padding: 20px 25px;
}

.modal-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
    line-height: 1.2;
}

.modal-desc {
    font-size: 16px;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.modal-badge-item {
    font-size: 14px;
    background: var(--bg-color);
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--border-subtle);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    background: white;
    position: sticky;
    bottom: 0;
    border-top: 1px solid var(--border-subtle);
    box-shadow: 0 -10px 20px rgba(0,0,0,0.02);
}

.modal-price-col {
    display: flex;
    flex-direction: column;
}

.modal-price-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}

.modal-price {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-main);
}

.modal-old-price {
    font-size: 16px;
    color: #A1A1A6;
    text-decoration: line-through;
    margin-left: 8px;
    font-weight: 500;
}

.modal-add-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.3);
    transition: transform 0.2s;
}
.modal-add-btn:active {
    transform: scale(0.95);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

/* --- New Features V3 --- */

/* Sold Out Overlay */
.product-card.sold-out {
    opacity: 0.6;
    pointer-events: none;
    filter: grayscale(0.5);
    position: relative;
    cursor: not-allowed;
}
.product-card.sold-out::after {
    content: attr(data-sold-out-text);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    background: rgba(231, 76, 60, 0.95);
    color: white;
    padding: 6px 18px;
    font-size: 14px;
    font-weight: 900;
    border-radius: 6px;
    text-transform: uppercase;
    z-index: 50;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 2px solid white;
}

/* Floating Actions - Corporate Redesign */
.floating-actions {
    position: fixed;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    z-index: 1000;
    pointer-events: none;
}

.action-btn {
    pointer-events: auto;
    flex: 1;
    max-width: 150px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
}

.btn-wifi { 
    background: #ffffff;
    color: #1d1d1f;
    border: 1px solid #e5e5ea;
}

.btn-feedback {
    background: #1d1d1f;
    color: #ffffff;
}

.action-btn:active {
    transform: scale(0.95);
    background: #000000;
}

.action-btn svg {
    width: 20px;
    height: 20px;
}


/* Add labels for buttons */
.btn-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 480px) {
    .action-btn {
        height: 48px;
        padding: 0 8px;
        font-size: 11px;
    }
    .action-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 360px) {
    .btn-label {
        display: none;
    }
    .action-btn {
        max-width: 50px;
        border-radius: 50%;
    }
}

/* Feedback Form Styles */
.rating-stars {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 25px 0;
}
.rating-stars span {
    font-size: 36px;
    cursor: pointer;
    color: #e0e0e0;
    transition: all 0.2s ease;
}
.rating-stars span.active { 
    color: #f1c40f; 
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

#feedback-message {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 25px;
    font-family: inherit;
    font-size: 15px;
    background: #fdfdfd;
    min-height: 120px;
    resize: none;
}
#feedback-message:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.wifi-info-card {
    background: #fcfcfc;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    margin-top: 20px;
    border: 1px solid #eee;
}
.wifi-field {
    background: white;
    padding: 12px 15px;
    border-radius: 10px;
    margin: 12px 0;
    font-family: 'Courier New', Courier, monospace;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #eee;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.copy-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.copy-btn:hover { opacity: 0.9; }
.copy-btn:active { transform: scale(0.95); }

.feedback-success-msg {
    text-align: center;
    padding: 40px 20px;
}
.feedback-success-icon {
    font-size: 50px;
    color: #2ecc71;
    margin-bottom: 15px;
}
.submit-feedback-btn {
    width: 100%;
    background: #1d1d1f;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.submit-feedback-btn:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.submit-feedback-btn:active {
    transform: scale(0.98);
}

.submit-feedback-btn:disabled {
    background: #a1a1a6;
    cursor: not-allowed;
    transform: none;
}
