/* Bong Bo - Customer Mobile-First CSS */

* { box-sizing: border-box; }

body {
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    padding-bottom: 80px;
    -webkit-tap-highlight-color: transparent;
}

/* Header */
.customer-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #eee;
}

/* Category horizontal scroll */
.category-scroll {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.category-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
    flex-shrink: 0;
    padding: 6px 16px;
    border-radius: 20px;
    background: #f0f0f0;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    transition: all 0.2s;
}
.cat-pill.active {
    background: #6B9B37;
    color: #fff;
}

/* Product grid */
.product-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 10px 12px;
}

.product-card-cust {
    background: #fff;
    border-radius: 12px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: transform 0.15s;
    border: 2px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.product-card-cust:active {
    transform: scale(0.97);
    border-color: #6B9B37;
}
.product-card-cust .p-img {
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}
.product-card-cust .p-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-card-cust .p-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    padding: 8px 10px 0;
}
.product-card-cust .p-prices {
    margin: 4px 0 2px;
    padding: 0 10px 10px;
}
.product-card-cust .p-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 2px;
}
.product-card-cust .size-tag {
    background: #6B9B37;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.product-card-cust .size-tag.size-l {
    background: #3498db;
}
.product-card-cust .price-val {
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.95rem;
}
.product-card-cust .p-desc {
    padding: 0 10px;
}

/* Floating cart bar */
.cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #6B9B37;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 200;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.15);
}
.cart-bar.empty {
    display: none;
}
.cart-bar .cart-badge {
    background: #fff;
    color: #6B9B37;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 8px;
}

/* Cart offcanvas */
.cart-item-cust {
    border-bottom: 1px solid #f0f0f0;
    padding: 10px 0;
}
.cart-item-cust:last-child {
    border-bottom: none;
}

/* Checkout form */
.checkout-section {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

/* Modal customization */
.modal-cust .btn-group .btn {
    font-size: 0.85rem;
    padding: 6px 10px;
}
.modal-cust .form-check-label {
    font-size: 0.9rem;
}

/* Payment page */
.payment-container {
    max-width: 440px;
    margin: 0 auto;
    padding: 16px;
}
.qr-box {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.qr-box img {
    max-width: 280px;
    width: 100%;
}
.bank-info {
    background: #fff9f0;
    border: 1px solid #f0d9b5;
    border-radius: 12px;
    padding: 14px;
    margin-top: 12px;
    font-size: 0.9rem;
}
.bank-info .label {
    color: #999;
    font-size: 0.8rem;
}
.bank-info .value {
    font-weight: 600;
}

/* Status messages */
.status-waiting {
    text-align: center;
    padding: 40px 20px;
}
.status-waiting .spinner-grow {
    width: 3rem;
    height: 3rem;
    color: #6B9B37;
}

/* Success page */
.success-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 440px;
    margin: 0 auto;
}
.success-icon {
    font-size: 4rem;
    color: #28a745;
    animation: popIn 0.5s ease;
}
@keyframes popIn {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* Cancelled page */
.cancelled-container {
    text-align: center;
    padding: 60px 20px;
    max-width: 440px;
    margin: 0 auto;
}

/* Delivery type toggle */
.delivery-toggle .btn {
    border-radius: 20px;
    font-size: 0.9rem;
    padding: 8px 20px;
}
.delivery-toggle .btn-check:checked + .btn-outline-primary {
    background: #6B9B37;
    border-color: #6B9B37;
    color: #fff;
}

/* Quantity stepper */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 12px;
}
.qty-stepper .btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.qty-stepper .qty-val {
    font-size: 1.1rem;
    font-weight: 600;
    min-width: 30px;
    text-align: center;
}

@media (min-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (min-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 800px;
        margin: 0 auto;
    }
}
