/* ============================================
   Healthy Cuisine - QR Menu Styles
   Modern, Clean Design with Green Theme
   ============================================ */

/* CSS Variables */
:root {
    --primary: #00A896;
    --primary-dark: #008C7A;
    --primary-light: #00C9B0;
    --secondary: #F8F9FA;
    --accent: #FF6B6B;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --text-light: #fff;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 1.25rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.tagline {
    color: var(--text-light);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    background: var(--bg-white);
    padding: 0.5rem;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 76px;
    z-index: 90;
}

.nav-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-light);
}

.tab-btn.active {
    background: var(--primary);
    color: var(--text-light);
}

.tab-icon {
    font-size: 1.25rem;
}

.tab-label {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Main Content */
.main-content {
    flex: 1;
    padding-bottom: 80px;
}

/* Views */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-light);
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hero-description {
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Search */
.search-container {
    display: flex;
    align-items: center;
    background: var(--bg-white);
    margin: 1rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.search-icon {
    font-size: 1.1rem;
    margin-right: 0.75rem;
    opacity: 0.5;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    background: transparent;
    color: var(--text-dark);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* Filters */
.filters-container {
    display: flex;
    gap: 0.5rem;
    padding: 0 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.filters-container::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.filter-chip.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0 1rem 1rem;
}

.category-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.category-image {
    height: 100px;
    background-size: cover;
    background-position: center;
}

.category-info {
    padding: 0.875rem;
}

.category-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.category-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* View Header */
.view-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 126px;
    z-index: 80;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--primary);
    color: var(--text-light);
}

.back-icon {
    font-size: 1.1rem;
}

.view-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

/* Subcategory Navigation */
.subcategory-nav {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
}

.subcategory-nav::-webkit-scrollbar {
    display: none;
}

.subcategory-btn {
    padding: 0.6rem 1.25rem;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.subcategory-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.subcategory-btn.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* Items Container */
.items-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 1rem;
}

/* Menu Item Card */
.menu-item {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.item-image-container {
    position: relative;
    height: 120px;
    overflow: hidden;
}

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

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

.item-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--accent);
    color: var(--text-light);
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
}

.item-info {
    padding: 0.875rem;
}

.item-name {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.item-nutrition {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.item-nutrition span {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
}

.item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-price {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
}

.add-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* Cart FAB */
.cart-fab {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 60px;
    height: 60px;
    border: none;
    background: var(--primary);
    color: var(--text-light);
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.cart-fab:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

.cart-fab.pulse {
    animation: pulse 0.3s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: var(--text-light);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal-container {
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-light);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.modal-body {
    padding: 1.5rem;
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.modal-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--text-light);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.modal-tags .tag {
    background: var(--bg-light);
    color: var(--text-muted);
    padding: 0.3rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 500;
}

.modal-description {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.modal-nutrition {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.nutrition-item {
    background: var(--bg-light);
    padding: 0.75rem 0.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.nutrition-value {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.nutrition-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-light);
    padding: 0.5rem;
    border-radius: var(--radius-md);
}

.quantity-selector button {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-white);
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: var(--transition);
}

.quantity-selector button:hover {
    background: var(--primary);
    color: var(--text-light);
}

.quantity-selector span {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

.item-notes {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    resize: none;
    margin-bottom: 1rem;
    font-family: inherit;
}

.item-notes:focus {
    outline: none;
    border-color: var(--primary);
}

.modal-add-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    background: var(--primary);
    color: var(--text-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-add-btn:hover {
    background: var(--primary-dark);
}

/* Cart Modal */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header .modal-title {
    margin: 0;
}

.modal-header .modal-close {
    position: static;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Cart Items */
.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
}

.cart-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.cart-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-controls button {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
}

.cart-controls button:hover {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

/* Customer Info Section */
.customer-info-section {
    padding: 1.25rem;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin: 1rem;
}

.customer-info-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.form-group {
    margin-bottom: 0.75rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}

.form-group.required label::after {
    content: ' *';
    color: var(--accent);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

/* Cart Total Section */
.cart-total-section {
    padding: 1.25rem;
    background: var(--bg-white);
}

.cart-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.95rem;
}

.cart-row.total {
    border-top: 2px solid var(--border);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    font-weight: 700;
    font-size: 1.1rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    border: none;
    background: #25D366;
    color: var(--text-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: var(--transition);
}

.checkout-btn:hover {
    background: #1da851;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 2rem 1.5rem;
    padding-bottom: 5rem;
    text-align: center;
    flex-shrink: 0;
    width: 100%;
    margin-top: auto;
}

.footer-content {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.social-btn svg {
    width: 24px;
    height: 24px;
}

.social-btn:hover {
    transform: translateY(-4px) scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.social-btn.instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: transparent;
}

.social-btn.tiktok:hover {
    background: #000;
    border-color: #25F4EE;
    box-shadow: 0 0 0 2px #FE2C55, 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-btn.whatsapp:hover {
    background: #25D366;
    border-color: #25D366;
}

.powered-by {
    font-size: 0.85rem;
    opacity: 0.9;
    margin: 0.25rem 0;
}

.powered-by strong {
    font-weight: 700;
    color: #fff;
}

/* Subscribers View Styles */
#subscribers-view {
    padding: 1rem;
    padding-bottom: 100px;
}

.subscribers-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.subscribers-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.subscribers-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.plans-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.plan-card-front {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.plan-image {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.plan-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--plan-color) 0%, rgba(0, 0, 0, 0.6) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 1rem;
}

.plan-icon {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.plan-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.plan-kcals {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.plan-pricing {
    padding: 1rem;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.pricing-table th,
.pricing-table td {
    padding: 0.6rem 0.4rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.pricing-table th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.75rem;
}

.pricing-table td:first-child {
    text-align: left;
}

.pricing-table tbody tr:last-child td {
    border-bottom: none;
}

.plan-order-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--plan-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    margin-top: 0.75rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.plan-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.other-packages {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: center;
}

.other-packages h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.other-packages ul {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.other-packages li {
    padding: 0.5rem 0;
    color: #444;
    font-size: 0.9rem;
}

.vat-note {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 1rem;
}

.contact-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #25D366;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: transform 0.2s;
}

.contact-btn:hover {
    transform: scale(1.05);
}

/* Responsive */
@media (min-width: 768px) {
    .category-grid,
    .items-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-title {
        font-size: 2.25rem;
    }
    
    .modal-container {
        max-height: 80vh;
    }
    
    .modal-content {
        border-radius: var(--radius-xl);
    }
}

@media (min-width: 1024px) {
    .category-grid,
    .items-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .main-content {
        max-width: 1200px;
        margin: 0 auto;
    }
}
