/* 
   Taza Brew Cafe - Spooky Halloween Festive Edition 🎃
   Colors: Midnight Black, Pumpkin Orange, Ghost White, Witch Purple, Spooky Gold
*/

:root {
    --bg-color: #121015; /* Midnight Spooky Dark / Autumn */
    --primary-color: #ff7518; /* Vibrant Pumpkin Orange */
    --secondary-color: #9d4edd; /* Witch Purple */
    --accent-gold: #ffbe0b; /* Candy Corn Gold */
    --text-main: #f8f9fa; /* Ghost White */
    --text-muted: #b4a9bc; /* Haunted Mist */
    --card-bg: rgba(30, 24, 38, 0.92); /* Dark velvet glass */
    --border-radius: 20px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    overscroll-behavior: none;
    overscroll-behavior-x: none;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    background-image: 
        radial-gradient(ellipse at top, rgba(255, 117, 24, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at bottom, rgba(157, 78, 221, 0.1) 0%, transparent 60%);
}

/* Hero Header - Halloween Edition */
.hero {
    background: linear-gradient(135deg, #1b0f24, #ff5e00, #3c096c);
    background-size: 200% 200%;
    animation: spookyGradient 10s ease infinite alternate;
    color: white;
    text-align: center;
    padding: 3.5rem 1.2rem 4rem 1.2rem;
    border-bottom-left-radius: 40px;
    border-bottom-right-radius: 40px;
    box-shadow: 0 10px 35px rgba(255, 117, 24, 0.35);
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid rgba(255, 117, 24, 0.3);
}

@keyframes spookyGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

.hero::after {
    content: '🦇 🕷️ 🕸️ 🎃 🦇';
    position: absolute;
    bottom: 8px;
    left: 0;
    width: 100%;
    font-size: 1.1rem;
    letter-spacing: 12px;
    opacity: 0.6;
    pointer-events: none;
    text-shadow: 0 0 10px rgba(255, 117, 24, 0.8);
}

.brand-name {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 117, 24, 0.8), 0 0 30px rgba(255, 94, 0, 0.5);
}

.tagline {
    font-weight: 300;
    font-size: 1rem;
    opacity: 0.95;
    color: #ffecd1;
}

/* Container */
.container {
    max-width: 600px; /* Mobile first max width */
    margin: -2rem auto 0;
    padding: 0 1.5rem 3rem;
    position: relative;
    z-index: 10;
}

/* Search Bar */
.search-bar-container {
    position: relative;
    margin-bottom: 1.2rem;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 16px;
    font-size: 1.25rem;
    color: var(--primary-color);
    pointer-events: none;
}

#menuSearchInput {
    width: 100%;
    padding: 14px 44px 14px 46px;
    background: rgba(30, 24, 38, 0.9);
    border: 1.5px solid rgba(255, 117, 24, 0.3);
    border-radius: 30px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-main);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
    outline: none;
    transition: var(--transition);
}

#menuSearchInput:focus {
    border-color: #ff9e00;
    background: rgba(40, 30, 50, 0.95);
    box-shadow: 0 0 15px rgba(255, 117, 24, 0.4);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.no-results-message {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    background: rgba(30, 24, 38, 0.85);
    border: 1px dashed rgba(255, 117, 24, 0.3);
    border-radius: 20px;
    margin-top: 1rem;
    backdrop-filter: blur(5px);
}

.view-item-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffbe0b;
    margin-top: 4px;
}

/* Category Filters */
.category-filters {
    display: flex;
    overflow-x: auto;
    gap: 0.8rem;
    padding-bottom: 1rem;
    scrollbar-width: none; /* Firefox */
}
.category-filters::-webkit-scrollbar { display: none; }

.filter-btn {
    background: rgba(30, 24, 38, 0.85);
    border: 1px solid rgba(255, 117, 24, 0.25);
    padding: 0.6rem 1.2rem;
    border-radius: 30px;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
    transition: var(--transition);
}

.filter-btn.active, .filter-btn:active {
    background: linear-gradient(135deg, #ff7518, #e85d04);
    color: white;
    border-color: #ff9e00;
    box-shadow: 0 4px 18px rgba(255, 117, 24, 0.45);
}

/* Menu Grid */
.menu-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

/* Menu Card - Halloween Edition */
.menu-card {
    background: var(--card-bg);
    border: 1px solid rgba(255, 117, 24, 0.18);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    box-shadow: 0 8px 25px rgba(0,0,0,0.35);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.menu-card:hover {
    border-color: rgba(255, 117, 24, 0.45);
    box-shadow: 0 10px 30px rgba(255, 117, 24, 0.2);
}

.menu-card:active {
    transform: scale(0.98);
}

/* Pumpkin Card Corner Badge (Placed on Top-Left over the image) */
.pumpkin-card-decoration {
    position: absolute;
    top: 6px;
    left: 8px;
    font-size: 1.3rem;
    z-index: 6;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
    transition: transform 0.3s ease;
    user-select: none;
    pointer-events: none;
}

.menu-card:hover .pumpkin-card-decoration {
    transform: rotate(-15deg) scale(1.25);
}

.card-image {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    background: #1c1524;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
}

.item-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-main);
}

.item-price {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ff9e00;
    text-shadow: 0 0 10px rgba(255, 158, 0, 0.3);
    margin-bottom: 0.2rem;
}

/* Modal - Glassmorphism */
.modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: flex-end; /* Slide from bottom for mobile */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    overscroll-behavior: contain;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #1c1524;
    border-top: 2px solid rgba(255, 117, 24, 0.4);
    color: var(--text-main);
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    overscroll-behavior: contain;
    touch-action: pan-y;
}

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

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(30, 24, 38, 0.85);
    border: 1px solid rgba(255, 117, 24, 0.3);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ff9e00;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.modal-image-container {
    width: 100%;
    height: auto;
    background: #150f1c;
}

.modal-image-container img {
    width: 100%;
    height: auto;
    display: block;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
}

.modal-details {
    padding: 2rem 1.5rem;
}

.modal-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.modal-header-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 117, 24, 0.3);
    max-width: 70%;
}

.modal-header-info p {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tags-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tag {
    background: var(--secondary-color);
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

/* Gallery Mode Styles */
.gallery-container { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1rem; }
.gallery-item { width: 100%; overflow: hidden; border-radius: var(--border-radius); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: auto; display: block; object-fit: contain; }

.not-available { opacity: 0.7; } 
.unavailable-badge { position: absolute; top: 10px; right: 10px; background: rgba(217, 83, 79, 0.9); color: white; padding: 5px 10px; border-radius: 5px; font-size: 0.8rem; font-weight: 600; box-shadow: 0 2px 5px rgba(0,0,0,0.2); } 

.card-image { position: relative; }

.no-pic-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0;
    color: #999;
    font-weight: 700;
    font-size: 1.2rem;
    object-fit: cover;
}

/* Modal Order Action Controls */
.modal-order-action {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.qty-selector {
    display: flex;
    align-items: center;
    background: #f0ebe7;
    border-radius: 30px;
    padding: 4px;
}

.qty-btn {
    background: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: var(--transition);
}

.qty-btn:active {
    transform: scale(0.92);
}

#modalQtyDisplay {
    padding: 0 16px;
    font-weight: 700;
    font-size: 1.1rem;
    min-width: 45px;
    text-align: center;
    color: var(--text-main);
}

.add-to-cart-btn {
    flex: 1;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(140, 95, 77, 0.3);
    transition: var(--transition);
}

.add-to-cart-btn:active {
    transform: scale(0.97);
}

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

/* Floating Cart Bar (Bottom Bar) */
.floating-cart {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(120px);
    width: calc(100% - 32px);
    max-width: 500px;
    background: linear-gradient(135deg, var(--primary-color), #5C3D2E);
    color: white;
    padding: 14px 22px;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 30px rgba(92, 61, 46, 0.45);
    z-index: 90;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-cart.visible {
    transform: translateX(-50%) translateY(0);
}

.floating-cart:active {
    transform: translateX(-50%) scale(0.98);
}

.floating-cart-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-badge {
    background: #ff5722;
    color: white;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
}

.cart-label {
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
}

.cart-view-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffd8be;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Cart Modal / Drawer */
.cart-modal-content {
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.cart-header h2 {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
}

.close-modal-btn {
    background: #f4ede7;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-main);
}

.cart-items-container {
    padding: 1rem 1.5rem;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cart-item-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
}

.cart-item-media {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 117, 24, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cart-item-thumb-placeholder {
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-unit-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cart-qty-ctrl {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a2035;
    border: 1px solid rgba(255, 117, 24, 0.3);
    padding: 3px 8px;
    border-radius: 20px;
}

.cart-qty-btn {
    background: #3d2f4d;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff7518;
    transition: all 0.15s ease;
}

.cart-qty-btn:hover, .cart-qty-btn:active {
    background: #ff7518;
    color: #ffffff;
}

.cart-item-qty {
    font-weight: 800;
    font-size: 1.05rem;
    min-width: 20px;
    text-align: center;
    color: #ffffff !important;
}

.cart-item-subtotal {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-color);
    min-width: 65px;
    text-align: right;
}

.cart-empty-message {
    text-align: center;
    color: var(--text-muted);
    padding: 2.5rem 1rem;
    font-size: 1rem;
}

.cart-footer {
    padding: 1.2rem 1.5rem 2rem 1.5rem;
    background: #17111d;
    border-top: 1px solid rgba(255, 117, 24, 0.2);
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
    font-size: 1.2rem;
}

.cart-grand-total {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 800;
}

.cart-action-buttons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.clear-cart-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #e0d8ce;
    padding: 12px 18px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.clear-cart-btn:hover {
    background: rgba(217, 83, 79, 0.2);
    border-color: #d9534f;
    color: #ff8b88;
}

.pay-counter-badge {
    flex: 1;
    background: linear-gradient(135deg, #ff7518, #e55a00);
    color: #ffffff;
    padding: 12px 18px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(255, 117, 24, 0.35);
    letter-spacing: 0.3px;
}

/* App Footer Links & Developer Section */
.app-footer {
    margin-top: 3rem;
    padding: 2.5rem 1.5rem 6.5rem 1.5rem; /* Extra bottom padding so floating cart won't block */
    background: #f3ede8;
    border-top: 1px solid #e4d8cf;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    margin: 0 auto 1.5rem auto;
}

@media (min-width: 480px) {
    .footer-links {
        flex-direction: row;
    }
}

.footer-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-radius: 30px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}

.location-btn {
    background: #ffffff;
    color: var(--primary-color);
    border: 1.5px solid var(--primary-color);
}

.location-btn:hover, .location-btn:active {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.dev-btn {
    background: linear-gradient(135deg, #2b3a4a, #1a222c);
    color: #ffffff;
    border: 1.5px solid #2b3a4a;
}

.dev-btn:hover, .dev-btn:active {
    background: linear-gradient(135deg, #1f2a36, #121820);
    box-shadow: 0 6px 15px rgba(27, 38, 49, 0.3);
    transform: translateY(-2px);
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}


