/**
 * Urban Food Jungle - Public / Customer CSS
 * Mobile-first design for phone use
 */

/* ==================== LOADER ==================== */
.ufj-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}
.ufj-loader img {
    max-width: 120px;
    max-height: 120px;
}

/* ==================== HOMEPAGE ==================== */
.ufj-homepage {
    max-width: 480px;
    margin: 0 auto;
    padding: 8px 16px 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.ufj-banner {
    text-align: center;
    margin-bottom: 16px;
}
.ufj-banner img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}
.ufj-banner-text h1 {
    font-size: 28px;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
}

.ufj-subtitle {
    text-align: center;
    font-size: 16px;
    color: #555;
    margin: 4px 0 20px;
    font-weight: 500;
}

/* Kitchen Grid - 2 columns */
.ufj-kitchen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ufj-kitchen-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px 12px;
    text-decoration: none;
    color: #1a1a1a;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.ufj-kitchen-card:hover,
.ufj-kitchen-card:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.ufj-kitchen-card img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 8px;
}
.ufj-kitchen-card h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    line-height: 1.3;
}

.ufj-kitchen-placeholder {
    width: 80px;
    height: 80px;
    background: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #999;
    text-align: center;
    padding: 4px;
}

/* ==================== KITCHEN MENU ==================== */
.ufj-kitchen-menu {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.ufj-menu-header {
    text-align: center;
    margin-bottom: 20px;
}
.ufj-menu-header h2 {
    font-size: 22px;
    font-weight: 700;
    margin: 8px 0 0;
    color: #1a1a1a;
}
.ufj-kitchen-logo {
    max-width: 100px;
    height: auto;
    border-radius: 8px;
    margin: 8px auto;
    display: block;
}

.ufj-btn-back {
    display: inline-block;
    font-size: 14px;
    color: #666;
    text-decoration: none;
    padding: 8px 0;
    font-weight: 500;
}
.ufj-btn-back:hover {
    color: #1a1a1a;
}

.ufj-cat-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #e0e0e0;
}

/* Menu Item Card */
.ufj-menu-item {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s ease;
}
.ufj-menu-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ufj-item-image {
    width: 100%;
    height: 160px;
    overflow: hidden;
}
.ufj-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ufj-item-details {
    padding: 12px 16px;
}

.ufj-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}
.ufj-item-name {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #1a1a1a;
    flex: 1;
    padding-right: 8px;
}
.ufj-item-price {
    font-size: 16px;
    font-weight: 700;
    color: #2e7d32;
    white-space: nowrap;
}

.ufj-item-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 6px;
    line-height: 1.4;
}

.ufj-item-allergens,
.ufj-item-ingredients {
    font-size: 12px;
    color: #888;
    margin: 4px 0;
    line-height: 1.3;
}

.ufj-item-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    gap: 10px;
}

/* Quantity Control */
.ufj-qty-control {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}
.ufj-qty-minus,
.ufj-qty-plus {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
}
.ufj-qty-minus:active,
.ufj-qty-plus:active {
    background: #e0e0e0;
}
.ufj-qty-input {
    width: 40px;
    height: 36px;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    -moz-appearance: textfield;
}
.ufj-qty-input::-webkit-inner-spin-button,
.ufj-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to Cart Button */
.ufj-add-to-cart {
    flex: 1;
    height: 40px;
    border: none;
    background: #1a1a1a;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.ufj-add-to-cart:hover {
    background: #333;
}
.ufj-add-to-cart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ufj-add-to-cart.ufj-btn-success {
    background: #2e7d32;
}
.ufj-add-to-cart.ufj-btn-loading {
    background: #555;
}

/* ==================== FLOATING CART ==================== */
.ufj-floating-cart {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #1a1a1a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.15s ease;
}
.ufj-floating-cart:hover {
    transform: scale(1.1);
}
.ufj-cart-icon {
    font-size: 24px;
    color: #fff;
    line-height: 1;
}
.ufj-cart-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #e53935;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}
.ufj-cart-bounce {
    animation: ufj-bounce 0.4s ease;
}
@keyframes ufj-bounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ==================== NOTIFICATIONS ==================== */
.ufj-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    z-index: 100000;
    transition: transform 0.3s ease;
    max-width: 90%;
    text-align: center;
}
.ufj-notif-show {
    transform: translateX(-50%) translateY(0);
}
.ufj-notif-success {
    background: #2e7d32;
    color: #fff;
}
.ufj-notif-error {
    background: #c62828;
    color: #fff;
}

/* ==================== CART NOTICE ==================== */
.ufj-cart-notice {
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #e65100;
}

/* ==================== CHECKOUT FIELD ==================== */
#ufj-table-field {
    margin: 20px 0;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}
#ufj-table-field h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
}

/* ==================== KITCHEN CLOSED ==================== */
.ufj-kitchen-closed {
    text-align: center;
    padding: 40px 20px;
}
.ufj-kitchen-closed p {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
}

/* ==================== EMPTY STATES ==================== */
.ufj-no-items,
.ufj-empty-cart {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 15px;
}

/* ==================== CART SUMMARY ==================== */
.ufj-cart-summary {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}
.ufj-cart-summary h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
}
.ufj-cart-kitchen-group {
    margin-bottom: 16px;
}
.ufj-cart-kitchen-group h4 {
    font-size: 15px;
    font-weight: 600;
    color: #555;
    margin: 0 0 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #eee;
}
.ufj-cart-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
}
.ufj-cart-item-name { flex: 1; }
.ufj-cart-item-qty { width: 40px; text-align: center; color: #666; }
.ufj-cart-item-total { width: 60px; text-align: right; font-weight: 600; }

.ufj-cart-total {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 2px solid #1a1a1a;
    text-align: right;
    font-size: 18px;
}

.ufj-btn-checkout {
    display: block;
    width: 100%;
    padding: 14px;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 16px;
    transition: background 0.15s ease;
}
.ufj-btn-checkout:hover {
    background: #333;
    color: #fff;
}

/* ==================== THANK YOU ==================== */
.ufj-thankyou {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    font-size: 15px;
    color: #2e7d32;
}

/* ==================== RESPONSIVE ==================== */
@media (min-width: 768px) {
    .ufj-homepage,
    .ufj-kitchen-menu,
    .ufj-cart-summary {
        max-width: 600px;
    }
    .ufj-item-image {
        height: 200px;
    }
}
