* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: #667eea;
    font-weight: 600;
}

/* Header */
.header {
    background: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    color: #667eea;
    margin-bottom: 5px;
}

.logo .tagline {
    font-size: 12px;
    color: #999;
}

.order-type {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.order-type.table {
    background: #e3f2fd;
    color: #1976d2;
}

.order-type.delivery {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header Cart Button */
.header-cart-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.header-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.header-cart-badge {
    background: #ff4757;
    color: white;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* Order Type Selection */
.order-type-selection {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 40px 20px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.3) 100%), 
                url('../../images/cup.png') center top / cover no-repeat;
    position: relative;
}

.order-type-selection h2 {
    text-align: center;
    color: white;
    font-size: 32px;
    margin-bottom: 50px;
    width: 100%;
}

.type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    max-width: 600px;
}

.type-card {
    background: white;
    border: none;
    padding: 40px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.type-card .icon {
    font-size: 60px;
    display: block;
    margin-bottom: 15px;
}

.type-card h3 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
}

.type-card p {
    color: #999;
    font-size: 14px;
}

/* Main Content */
.main-content {
    padding-bottom: 40px;
}

.main-content .container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

.menu-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.menu-section h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Categories */
.categories {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    margin-bottom: 30px;
    padding-bottom: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .categories {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 8px !important;
        overflow-x: visible !important;
    }
    
    .category-tab {
        width: 100% !important;
        text-align: center !important;
        padding: 10px 8px !important;
        font-size: 13px !important;
    }
}

.category-tab {
    padding: 10px 20px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
    font-weight: 500;
}

.category-tab:hover {
    border-color: #667eea;
    color: #667eea;
}

.category-tab.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .menu-grid {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

.menu-item {
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
}

.menu-item:hover {
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.menu-item h3 {
    font-size: 16px;
    color: #333;
    flex: 1;
}

.price {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
    margin-left: 10px;
}

.description {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* Quantity Selector */
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.btn-qty {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.btn-qty:hover {
    background: #f0f0f0;
}

.qty-input {
    width: 50px;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.instructions {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
    font-family: inherit;
}

.btn-add-cart {
    width: 100%;
    padding: 10px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-add-cart:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

/* Cart Section */
.cart-section {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.cart-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.empty-cart {
    text-align: center;
    color: #999;
    padding: 40px 20px;
}

.cart-items {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.item-name {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.item-qty {
    color: #999;
    font-size: 12px;
}

.item-notes {
    color: #667eea;
    font-size: 11px;
    margin-top: 4px;
}

.item-price {
    text-align: right;
}

.btn-remove {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    margin-top: 4px;
}

.btn-remove:hover {
    background: #ff3838;
}

.cart-total {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.total-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.total-row strong {
    color: #667eea;
    font-size: 16px;
}

/* Customer Details */
.customer-details {
    margin-bottom: 15px;
}

.input-field {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.delivery-info,
.table-info {
    margin-top: 10px;
}

.btn-submit {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: white;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal h2 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 24px;
}

.modal p {
    color: #666;
    margin-bottom: 10px;
    font-size: 14px;
}

.modal strong {
    color: #333;
    font-weight: 700;
}

.order-message {
    margin: 20px 0;
    color: #667eea;
    font-weight: 500;
}

.btn-primary {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #5568d3;
}

/* Responsive */
@media (max-width: 768px) {
    .main-content .container {
        grid-template-columns: 1fr;
    }

    .cart-section {
        position: static;
        order: 2;
    }

    .menu-section {
        order: 1;
    }

    .type-grid {
        grid-template-columns: 1fr;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .categories {
        flex-direction: column;
        gap: 8px;
    }

    .category-tab {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .header .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 10px;
    }

    .header-right {
        flex-direction: row;
        gap: 10px;
    }

    .header-cart-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .logo h1 {
        font-size: 20px;
    }

    .logo .tagline {
        font-size: 10px;
    }

    .order-type {
        padding: 6px 10px;
        font-size: 12px;
    }

    .order-type-selection h2 {
        font-size: 24px;
    }

    .menu-item {
        padding: 20px;
    }

    .item-header {
        flex-direction: column;
        align-items: start;
        gap: 5px;
    }

    .price {
        margin-left: 0;
    }

    /* Mobile cart slide-in */
    .cart-section {
        position: fixed;
        right: -100%;
        top: 0;
        height: 100vh;
        width: 85%;
        max-width: 400px;
        z-index: 1001;
        transition: right 0.3s ease;
        border-radius: 0;
        overflow-y: auto;
    }

    .cart-section.cart-open {
        right: 0;
    }

    .cart-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-bottom: 15px;
        border-bottom: 1px solid #eee;
        margin-bottom: 15px;
    }

    .cart-close {
        display: block;
        background: none;
        border: none;
        font-size: 28px;
        cursor: pointer;
        color: #999;
    }

    .floating-cart {
        display: flex;
    }
}

@media (max-width: 480px) {
    .menu-section {
        padding: 15px;
    }

    .cart-section {
        padding: 15px;
        width: 100%;
    }

    .menu-grid {
        grid-template-columns: 1fr;
    }

    .modal {
        margin: 10px;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }

    .order-type-selection {
        padding: 20px;
    }

    .type-card {
        padding: 30px 20px;
    }
}

/* Floating Cart Button */
.floating-cart {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.5);
    z-index: 1000;
    align-items: center;
    gap: 10px;
}

.cart-badge {
    background: #ff4757;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-right: 5px;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

/* Cart Header for desktop */
.cart-header {
    display: none;
}

.cart-close {
    display: none;
}

/* Cart Quantity Controls */
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cart-qty {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cart-qty {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-cart-qty:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.cart-item-price {
    font-weight: 700;
    color: #667eea;
    min-width: 80px;
    text-align: right;
}

/* Quantity Display */
.qty-display {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
}

/* Item Actions */
.item-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

/* Empty Cart */
.empty-cart {
    text-align: center;
    padding: 40px 20px;
}

.empty-icon {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.empty-cart small {
    color: #999;
    font-size: 13px;
}

/* Success Modal Improvements */
.success-modal {
    max-width: 450px;
}

.success-icon {
    font-size: 60px;
    margin-bottom: 10px;
}

.order-details {
    text-align: left;
    margin: 20px 0;
}

.order-number {
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-bottom: 20px;
}

.order-summary {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.order-summary h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #666;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    margin-bottom: 8px;
    color: #333;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding-top: 10px;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    color: #667eea;
}

.order-message {
    background: #e8f5e9;
    padding: 12px;
    border-radius: 8px;
    color: #2e7d32;
    font-size: 14px;
    text-align: center;
}

.estimated-time {
    text-align: center;
    margin-top: 15px;
    color: #666;
}

/* Total Final Row */
.total-final {
    font-size: 18px;
    padding-top: 10px;
    border-top: 2px solid #eee;
    margin-top: 5px;
}

/* Form Group */
.customer-details h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555;
}

.input-error {
    border-color: #ff4757 !important;
    box-shadow: 0 0 0 3px rgba(255, 71, 87, 0.1) !important;
}

/* Delivery Map Styles */
.delivery-info {
    margin-top: 10px;
}

.address-search {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.address-search .input-field {
    flex: 1;
    margin-bottom: 0;
}

.btn-search {
    padding: 10px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-search:hover {
    background: #5a6fd6;
}

.btn-location {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-location:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-location:active {
    transform: translateY(0);
}

.delivery-map {
    height: 250px;
    width: 100%;
    border-radius: 10px;
    margin-bottom: 10px;
    border: 2px solid #ddd;
    overflow: hidden;
}

.selected-address {
    background: #e8f5e9;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #2e7d32;
    margin-bottom: 10px;
    border-left: 3px solid #4CAF50;
}

/* Mobile Map Adjustments */
@media (max-width: 480px) {
    .delivery-map {
        height: 200px;
    }
    
    .btn-location {
        font-size: 13px;
        padding: 10px;
    }
    
    .selected-address {
        font-size: 12px;
        padding: 8px 10px;
    }
}
