/* /* =========================
   GLOBAL
========================= */
* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    background: #f5f6fa;
}

/* =========================
   MAIN LAYOUT - 3 COLUMNS
========================= */
.container {
    display: grid;
    grid-template-columns: 150px 1fr 320px;
    gap: 12px;
    height: 100vh;
    padding: 12px;
}

/* =========================
   LEFT: SIDEBAR - CATEGORIES
========================= */
.sidebar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-btn {
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin: 0;
}

.category-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.category-btn.active {
    background: white;
    color: #667eea;
    border: 2px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(1.02);
}

/* =========================
   CENTER: ITEMS GRID
========================= */
.items {
    background: #f5f6fa;
    border-radius: 12px;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.items::-webkit-scrollbar {
    width: 8px;
}

.items::-webkit-scrollbar-track {
    background: transparent;
}

.items::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.items::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

.items h2 {
    margin: 0 0 16px 0;
    font-size: 22px;
    color: #1a202c;
    font-weight: 700;
}

.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    align-content: start;
}

.item-btn {
    background: white;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
}

.item-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.item-btn:active {
    transform: scale(0.96);
}

.item-btn img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.item-btn div {
    font-size: 13px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.3;
}

.item-price {
    font-size: 14px;
    font-weight: 700;
    color: #667eea;
    margin-top: 2px;
}

/* =========================
   RIGHT: CART
========================= */
.cart {
    background: white;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart h2 {
    margin: 0;
    padding: 14px;
    font-size: 16px;
    color: #1a202c;
    border-bottom: 1px solid #e1e8ed;
    background: white;
    font-weight: 700;
}

#cart-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

#cart-list::-webkit-scrollbar {
    width: 6px;
}

#cart-list::-webkit-scrollbar-track {
    background: transparent;
}

#cart-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

#cart-list>div {
    background: #f9fafb;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 10px;
    font-size: 12px;
    margin-bottom: 8px;
}

#cart-list b {
    font-size: 13px;
    color: #1a202c;
    display: block;
}

.cart-item-qty {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 6px;
}

.qty-btn {
    width: 22px;
    height: 22px;
    border: none;
    background: #e2e8f0;
    color: #374151;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 11px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-btn:hover {
    background: #cbd5e0;
}

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

/* =========================
   PAYMENT SECTION
========================= */
.payment-section {
    padding: 10px;
    background: #f7fafc;
    border-top: 1px solid #e1e8ed;
}

.payment-method-group {
    display: flex;
    align-items: center;
    padding: 8px;
    background: white;
    border-radius: 6px;
    margin-bottom: 6px;
    cursor: pointer;
    border: 1px solid #e1e8ed;
    transition: all 0.2s;
    gap: 8px;
}

.payment-method-group:hover {
    border-color: #667eea;
}

.payment-method-group input[type="radio"] {
    margin: 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

.payment-method-label {
    font-size: 12px;
    font-weight: 600;
    color: #2d3748;
    cursor: pointer;
    flex: 1;
}

/* =========================
   CART FOOTER
========================= */
.cart-footer {
    padding: 10px;
    border-top: 1px solid #e1e8ed;
    background: white;
}

#cart-total {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 8px;
    text-align: right;
    color: #667eea;
}

#submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

#submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

#submit-btn:active {
    transform: scale(0.98);
}

/* =========================
   MODAL
========================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    width: 500px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    padding: 18px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

#modal-body {
    overflow-y: auto;
    flex: 1;
}

#modal-body::-webkit-scrollbar {
    width: 6px;
}

#modal-body::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.modal-content h2 {
    margin: 0 0 12px;
    font-size: 22px;
    color: #1a202c;
    font-weight: 700;
}

.modal-content h3 {
    font-size: 13px;
    margin: 12px 0 8px;
    color: #718096;
    text-transform: uppercase;
    font-weight: 600;
}

.modal-content label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: #f3f4f6;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-content label:hover {
    background: #e5e7eb;
}

.modal-content input[type="radio"],
.modal-content input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #667eea;
}

.modal-content input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border-radius: 8px;
    border: 1px solid #e1e8ed;
    margin-top: 8px;
}

.modal-content button {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-content button:first-of-type {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: white;
}

.modal-content button:first-of-type:hover {
    background: #15803d;
}

.modal-content button:last-of-type {
    background: #e5e7eb;
    color: #374151;
}

.modal-content button:last-of-type:hover {
    background: #d1d5db;
}

/* =========================
   TABLET
========================= */
@media (max-width: 1024px) {
    .container {
        grid-template-columns: 120px 1fr 280px;
        gap: 10px;
        padding: 10px;
    }

    .grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }

    .item-btn {
        padding: 8px;
    }

    .item-btn img {
        width: 50px;
        height: 50px;
    }

    .item-btn div {
        font-size: 12px;
    }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
    .container {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 8px;
        padding: 8px;
    }

    .sidebar {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        height: auto;
        gap: 8px;
    }

    .category-btn {
        min-width: 100px;
        flex-shrink: 0;
    }

    .items {
        min-height: 50vh;
        padding: 12px;
    }

    .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .cart {
        max-height: 45vh;
    }

    .modal-content {
        width: 100%;
        height: 95vh;
        border-radius: 16px 16px 0 0;
    }

    .modal-content button {
        padding: 14px;
        font-size: 16px;
    }
}

*/