/* Custom Thali Builder - Modern UI */
.thali-section { margin: 40px 0; }
.thali-title { 
    font-size: 1.8rem; font-weight: 700; color: #2d3748; 
    margin: 0 0 25px; padding: 0 0 15px; 
    border-bottom: 3px solid #f7fafc; position: relative;
}
.thali-title::after {
    content: ''; position: absolute; bottom: -3px; left: 0; 
    width: 60px; height: 3px; background: linear-gradient(90deg, #ff7043, #ff9a76);
}

.thali-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; padding: 20px 0;
}

.thali-item {
    border: 2px solid #e2e8f0; border-radius: 16px; 
    background: #fff; overflow: hidden; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.thali-item::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255,112,67,0.1), transparent);
    opacity: 0; transition: opacity 0.3s;
}
.thali-item:hover {
    transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-color: #ff7043;
}
.thali-item.selected {
    border-color: #ff7043; background: linear-gradient(135deg, #fff7f0, #fffae6);
    box-shadow: 0 12px 32px rgba(255,112,67,0.25);
}
.thali-item.selected::before { opacity: 1; }
.thali-item.disabled {
    opacity: 0.5; cursor: not-allowed; pointer-events: none;
    filter: grayscale(30%);
}

.ti-wrap {
    padding: 20px; height: 100%; display: flex; flex-direction: column;
}
.ti-image img {
    width: 100%; height: 140px; object-fit: cover; border-radius: 12px;
    margin-bottom: 15px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.ti-meta { flex: 1; }
.ti-name { 
    font-size: 1.1rem; font-weight: 600; color: #2d3748; 
    margin: 0 0 8px; line-height: 1.4;
}
.ti-desc {
    color: #718096; font-size: 0.9rem; line-height: 1.5; 
    margin-bottom: 15px; display: -webkit-box;
    -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ti-qty {
    display: flex; align-items: center; gap: 12px; margin-top: auto;
    background: #f7fafc; padding: 8px 12px; border-radius: 25px;
}
.qty-btn {
    width: 32px; height: 32px; border: none; border-radius: 50%;
    background: #fff; color: #4a5568; font-size: 1.2rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex; align-items: center; justify-content: center;
}
.qty-btn:hover { background: #ff7043; color: #fff; transform: scale(1.05); }
.qty-val {
    font-weight: 700; color: #2d3748; min-width: 24px; text-align: center;
    font-size: 1rem;
}
.ti-price {
    font-size: 1.3rem; font-weight: 800; color: #ff7043; 
    margin-top: 12px; text-align: right;
}
.free { color: #48bb78; background: rgba(72,187,120,0.1); padding: 4px 12px; border-radius: 20px; font-size: 1rem; }

.thali-summary {
    max-width: 420px; margin: 40px auto; background: #fff;
    border-radius: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    overflow: hidden; animation: slideUp 0.5s ease-out;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } }
.ts-head {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; padding: 25px 30px; text-align: center;
}
.ts-head h3 { margin: 0 0 20px; font-size: 1.6rem; font-weight: 700; }
.ts-progress { position: relative; }
.progress-bar {
    height: 6px; background: rgba(255,255,255,0.3); 
    border-radius: 3px; overflow: hidden; margin-bottom: 8px;
}
.progress-fill {
    height: 100%; background: linear-gradient(90deg, #ff7043, #ff9a76);
    width: 0%; transition: width 0.4s ease; border-radius: 3px;
}
.progress-text { font-size: 0.9rem; opacity: 0.9; }

.ts-lines { max-height: 300px; overflow-y: auto; padding: 25px 30px; }
.ts-lines h4 {
    font-size: 1.1rem; color: #2d3748; margin: 0 0 12px;
    font-weight: 600; padding-bottom: 8px; border-bottom: 2px solid #f7fafc;
}
.ts-row {
    display: flex; justify-content: space-between; padding: 10px 0;
    font-size: 0.95rem; color: #4a5568;
}
.ts-row strong { color: #2d3748; font-weight: 700; }
.ts-total-row {
    font-size: 1.2rem; font-weight: 800; color: #ff7043 !important;
    border-top: 2px solid #f7fafc; padding-top: 15px !important;
}
.ts-buttons { padding: 25px 30px; background: #f8f9ff; }
.ts-btn {
    display: block; width: 100%; padding: 16px 24px; 
    text-align: center; text-decoration: none; border-radius: 12px;
    font-weight: 700; font-size: 1rem; margin-bottom: 12px;
    transition: all 0.3s; border: none; cursor: pointer;
}
.ts-btn-web {
    background: linear-gradient(135deg, #ff7043, #ff9a76);
    color: #fff; box-shadow: 0 8px 25px rgba(255,112,67,0.3);
}
.ts-btn-wa {
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff; box-shadow: 0 8px 25px rgba(37,211,102,0.3);
}
.ts-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(0,0,0,0.2); }

.thali-toast {
    position: fixed; top: 30px; right: 30px; color: #fff;
    padding: 16px 24px; border-radius: 12px; font-weight: 600;
    font-size: 0.95rem; opacity: 0; transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999; box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}
.thali-toast.show {
    opacity: 1; transform: translateY(0);
}
.thali-toast.success { background: linear-gradient(135deg, #48bb78, #38a169); }
.thali-toast.info { background: linear-gradient(135deg, #4299e1, #3182ce); }
.thali-toast.warning { background: linear-gradient(135deg, #ed8936, #dd6b20); }

.no-items {
    grid-column: 1 / -1; text-align: center; color: #a0aec0;
    font-size: 1.1rem; padding: 40px; background: #f7fafc;
    border-radius: 12px; margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .thali-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
    .thali-summary { margin: 20px; max-width: none; }
    .ts-head, .ts-buttons { padding-left: 20px; padding-right: 20px; }
}
