/* ============================================================
   ASHBAB CAFE - Main Stylesheet
   File: assets/css/style.css
   ============================================================ */

/* ============================================================
   CSS Variables / Color Palette
   ============================================================ */
:root {
    --primary:    #FFD700; /* Yellow */
    --secondary:  #F2B705; /* Darker Yellow */
    --accent:     #FFF3CD;
    --dark:       #0A0A0A; /* Black */
    --light:      #1A1A1A; /* Dark gray */
    --text-dark:  #F8F9FA; /* Light text */
    --text-muted: #A0A0A0;
    --border:     #333333;
    --shadow:     0 4px 24px rgba(255, 215, 0, 0.10);
    --shadow-hover: 0 8px 36px rgba(255, 215, 0, 0.18);
    --radius:     16px;
    --radius-sm:  8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Override Bootstrap Text Colors for Dark Theme */
.text-muted { color: rgba(255, 255, 255, 0.85) !important; }
.text-dark { color: #FFFFFF !important; }

/* ============================================================
   Base Styles
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background: var(--light);
    overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { text-decoration: none; color: var(--primary); transition: var(--transition); }
a:hover { color: var(--secondary); }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ============================================================
   Navbar
   ============================================================ */
#mainNavbar {
    background: linear-gradient(135deg, var(--dark) 0%, #111111 100%);
    backdrop-filter: blur(12px);
    padding: 12px 0;
    transition: var(--transition);
    box-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

#mainNavbar.scrolled {
    padding: 8px 0;
    background: rgba(10,10,10,0.97);
}

.navbar-brand .brand-emoji { font-size: 1.8rem; }
.navbar-brand .brand-name  { font-size: 1.1rem; letter-spacing: 1px; color: var(--accent); }

.nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background: rgba(255,215,0,0.1);
}

.btn-cart {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.btn-cart:hover { transform: scale(1.05); box-shadow: 0 4px 15px rgba(255,215,0,0.4); }

.cart-badge {
    position: absolute;
    top: -8px; right: -8px;
    background: #e74c3c;
    color: white;
    font-size: 0.65rem;
    min-width: 18px; height: 18px;
    display: flex; align-items: center; justify-content: center;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--dark) 0%, #111111 40%, #222222 100%);
    display: flex; align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Ccircle cx='30' cy='30' r='4'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-text { position: relative; z-index: 2; }
.hero-badge {
    display: inline-block;
    background: rgba(255,215,0,0.15);
    border: 1px solid rgba(255,215,0,0.3);
    color: var(--primary);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    letter-spacing: 1px;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 800;
    color: white;
    line-height: 1.15;
    margin-bottom: 16px;
}

.hero-title span { color: var(--primary); }

.hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 1.1rem;
    margin-bottom: 36px;
    max-width: 500px;
}

.hero-image-wrap {
    position: relative; z-index: 2;
    text-align: center;
}

.hero-image-placeholder {
    width: 340px; height: 340px;
    background: linear-gradient(135deg, rgba(255,215,0,0.15), rgba(255,215,0,0.05));
    border: 2px solid rgba(255,215,0,0.2);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto;
    font-size: 8rem;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn-primary-cafe {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}

.btn-primary-cafe:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(255,215,0,0.4);
    color: #111;
}

.btn-outline-cafe {
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.5);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex; align-items: center; gap: 8px;
}

.btn-outline-cafe:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
    color: white;
    transform: translateY(-2px);
}

/* ============================================================
   Section Styles
   ============================================================ */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 40px;
}

.section-divider {
    width: 60px; height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 2px;
    margin: 12px auto 24px;
}

/* ============================================================
   Stats Cards
   ============================================================ */
.stats-section {
    background: var(--dark);
    padding: 40px 0;
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent);
}

.stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}

/* ============================================================
   Menu Cards
   ============================================================ */
.menu-section { padding: 80px 0; background: var(--light); }

.menu-filter { margin-bottom: 40px; }

.filter-btn {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-muted);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #111;
}

.menu-card {
    background: var(--dark);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    height: 100%;
}

.menu-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
}

.menu-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #111111, #222222);
}

.menu-card-img-placeholder {
    width: 100%; height: 200px;
    background: linear-gradient(135deg, var(--dark), #333333);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem;
}

.menu-card-body { padding: 20px; }

.menu-card-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.menu-card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 16px;
}

.menu-card-actions { display: flex; gap: 8px; }

.btn-add-cart {
    flex: 1;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #111;
    border: none;
    padding: 10px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-add-cart:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.btn-add-cart:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.badge-unavailable {
    position: absolute; top: 12px; right: 12px;
    background: rgba(220,53,69,0.9);
    color: white;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ============================================================
   Cart Page
   ============================================================ */
.cart-section { padding: 120px 0 60px; min-height: 100vh; }

.cart-item {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex; align-items: center; gap: 16px;
    transition: var(--transition);
}

.cart-item-img {
    width: 80px; height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
}

.qty-control {
    display: flex; align-items: center; gap: 12px;
}

.qty-btn {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}

.qty-btn:hover {
    background: var(--primary);
    color: #111;
}

.qty-num { font-weight: 700; font-size: 1.1rem; min-width: 28px; text-align: center; }

/* ============================================================
   Order Summary
   ============================================================ */
.order-summary {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: sticky; top: 90px;
}

.summary-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.95rem;
}

.summary-row:last-child { border-bottom: none; }
.summary-total { font-weight: 700; font-size: 1.2rem; color: var(--primary); }

/* ============================================================
   Checkout
   ============================================================ */
.checkout-section { padding: 120px 0 60px; min-height: 100vh; }

.form-label { font-weight: 600; font-size: 0.9rem; color: var(--text-dark); margin-bottom: 6px; }

.form-control, .form-select {
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255,215,0,0.1);
    outline: none;
}

/* ============================================================
   Payment Method Cards
   ============================================================ */
.payment-option {
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.payment-option:hover, .payment-option.selected {
    border-color: var(--primary);
    background: rgba(255,215,0,0.05);
}

.payment-option i { font-size: 2rem; color: var(--primary); margin-bottom: 8px; }
.payment-option p { margin: 0; font-weight: 600; font-size: 0.9rem; }

/* ============================================================
   Order Tracking
   ============================================================ */
.tracking-section { padding: 120px 0 60px; min-height: 100vh; }

.tracking-card {
    background: var(--dark);
    border-radius: var(--radius);
    padding: 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    max-width: 640px;
    margin: 0 auto;
}

.progress-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex; align-items: flex-start; gap: 20px;
    position: relative; padding-bottom: 32px;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
    content: '';
    position: absolute;
    left: 20px; top: 40px;
    width: 2px; height: calc(100% - 8px);
    background: var(--border);
}

.timeline-item:last-child::before { display: none; }

.timeline-item.done::before { background: var(--primary); }

.timeline-dot {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--border);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; z-index: 1;
    transition: var(--transition);
}

.timeline-item.done .timeline-dot {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #111;
    box-shadow: 0 4px 12px rgba(255,215,0,0.3);
}

.timeline-item.active .timeline-dot {
    background: var(--secondary);
    color: #111;
    animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(242,183,5,0.4); }
    50%       { box-shadow: 0 0 0 10px rgba(242,183,5,0); }
}

.timeline-content { flex: 1; padding-top: 8px; }
.timeline-title { font-weight: 700; margin-bottom: 2px; }
.timeline-time  { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================================
   About / Contact Section
   ============================================================ */
.about-hero-section {
    padding: 120px 0 60px 0;
}
.about-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--light), #111111);
}

.contact-section { padding: 80px 0; background: var(--dark); }
.contact-section h2 { color: white; }
.contact-section p, .contact-section a { color: rgba(255,255,255,0.75); }
.contact-section a:hover { color: var(--accent); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: #000000;
    color: rgba(255,255,255,0.6);
    text-align: center;
    padding: 20px;
    font-size: 0.875rem;
}

.site-footer a { color: var(--accent); }

/* ============================================================
   Menu Page Wrapper
   ============================================================ */
.menu-page-wrapper {
    min-height: 100vh;
    padding-top: 90px;
    background: var(--light);
}

/* ============================================================
   Cart & Checkout
   ============================================================ */
.cart-section, .checkout-section {
    min-height: 100vh;
    padding-top: 100px;
    padding-bottom: 60px;
}

/* ============================================================
   Toast Notifications
   ============================================================ */
.toast-container { z-index: 9999; }

.custom-toast {
    background: var(--dark);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    padding: 16px 20px;
}

/* ============================================================
   Loading / Skeleton
   ============================================================ */
.skeleton {
    background: linear-gradient(90deg, #222222 25%, #333333 50%, #222222 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card { height: 300px; margin-bottom: 24px; }
.skeleton-text { height: 16px; margin-bottom: 8px; }
.skeleton-text.short { width: 60%; }

/* Page Loader */
#pageLoader {
    position: fixed; inset: 0;
    background: var(--dark);
    display: flex; align-items: center; justify-content: center;
    z-index: 99999;
    transition: opacity 0.5s, visibility 0.5s;
}

#pageLoader.hidden { opacity: 0; visibility: hidden; }

.loader-logo {
    width: 80px; height: 80px;
    object-fit: contain;
    animation: spin-logo 2s linear infinite;
}

@keyframes spin-logo {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ============================================================
   Promo Section
   ============================================================ */
.promo-section { padding: 80px 0; background: var(--light); }

.promo-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius);
    padding: 40px;
    color: #111;
    position: relative;
    overflow: hidden;
}

.promo-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background-color: var(--dark);
    color: var(--text-dark);
    text-align: center;
    padding: 24px 0;
    margin-top: 40px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .mobile-nav-list .nav-link {
        font-size: 0.75rem !important;
        padding: 6px 8px !important;
    }
    .mobile-nav-list .nav-link i {
        display: none !important;
    }
    .site-footer {
        padding: 16px 0;
        font-size: 0.85rem;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    .hero-image-wrap { display: block; margin-top: 30px; }
    .hero-title { font-size: 2rem; }
    .menu-card-img, .menu-card-img-placeholder { height: 160px; }
    .hero-image-placeholder { width: 180px; height: 180px; font-size: 4rem; }
    .tracking-card { padding: 20px; }
    
    /* Section Paddings */
    .hero-section { padding-top: 100px; min-height: auto; padding-bottom: 60px; }
    .about-section, .contact-section, .promo-section { padding: 40px 0; }
    .about-hero-section { padding: 80px 0 40px 0; }
    .tracking-section, .cart-section, .checkout-section { padding-top: 80px; padding-bottom: 40px; }
    .menu-page-wrapper { padding-top: 70px; }
    
    /* Timeline adjustments */
    .timeline-item { padding-bottom: 24px; gap: 12px; }
    .timeline-item::before { left: 16px; top: 32px; height: calc(100% - 4px); }
    .timeline-dot { width: 32px; height: 32px; font-size: 0.85rem; }
    
    /* Cart Item adjustments */
    .cart-item { flex-direction: column; align-items: flex-start; gap: 12px; }
    .cart-item-img { width: 60px; height: 60px; }
    .cart-item .flex-grow-1 { width: 100%; }
    .cart-item .text-end { text-align: left !important; margin-left: 0 !important; width: 100%; display: flex; justify-content: space-between; align-items: center; }
    
    /* Category Filter */
    .menu-filter { overflow-x: auto; white-space: nowrap; padding-bottom: 10px; text-align: left; -webkit-overflow-scrolling: touch; }
    .menu-filter::-webkit-scrollbar { height: 4px; }
    .menu-filter .filter-btn { display: inline-block; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 1.7rem; }
    .section-title { font-size: 1.5rem; }
    .contact-card { padding: 20px; }
    .order-summary { padding: 20px; }
    
    #trackingForm .input-group { flex-direction: column; gap: 8px !important; }
    #trackingForm .input-group > * { border-radius: 50px !important; width: 100%; text-align: center; justify-content: center; }
    
    /* Menu Grid Adjustments for Mobile (2 Columns) */
    .menu-card-body { padding: 12px; }
    .menu-card-name { font-size: 0.95rem; }
    .menu-card-price { font-size: 1rem; margin-bottom: 12px; }
    .menu-card-category { font-size: 0.65rem; }
    .menu-card-actions { gap: 4px; }
    .btn-add-cart { padding: 6px 8px; font-size: 0.75rem; }
    .action-btn { width: 32px; height: 32px; font-size: 0.8rem; }
    .menu-card-img, .menu-card-img-placeholder { height: 120px; }
}
