/* Food Menu Order System Styles */
/* Place this file in: /wp-content/plugins/food-menu-order-system/assets/css/style.css */

* {
    box-sizing: border-box;
}

.food-menu-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header Section */
.food-menu-header {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.food-menu-filters {
    display: flex;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.category-dropdown select,
.search-box input {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    min-width: 150px;
}

.search-box input {
    min-width: 200px;
}

.category-dropdown select:focus,
.search-box input:focus {
    outline: none;
    border-color: #3b82f6;
}

.order-type-selector {
    display: flex;
    gap: 0;
    background: #f3f4f6;
    border-radius: 25px;
    padding: 4px;
}

.order-type-btn {
    padding: 10px 30px;
    border: none;
    background: transparent;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #6b7280;
}

.order-type-btn.active {
    background: #1f2937;
    color: white;
}

.pickup-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
}

/* Content Layout */
.food-menu-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
}

/* Products Grid */
.section-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.product-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.product-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: #d1d5db;
}

.product-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #111827;
}

.product-description {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 15px;
    min-height: 40px;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

/* Order Summary */
.order-summary-section {
    position: relative;
}

.order-summary-sticky {
    position: sticky;
    top: 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
}

.order-summary-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

.order-summary-content {
    min-height: 200px;
    margin-bottom: 20px;
}

.empty-cart {
    text-align: center;
    padding: 40px 20px;
}

.empty-cart-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.empty-cart p {
    color: #9ca3af;
    font-size: 14px;
}

.cart-item {
    padding: 15px 0;
    border-bottom: 1px solid #f3f4f6;
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.cart-item-quantity {
    font-weight: 600;
    color: #111827;
    margin-right: 8px;
}

.cart-item-name {
    flex: 1;
    font-size: 14px;
    color: #111827;
}

.cart-item-price {
    font-weight: 600;
    color: #111827;
}

.cart-item-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.cart-item-action {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.cart-item-action:hover {
    color: #111827;
}

.order-summary-footer {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.subtotal-row {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #111827;
}

.checkout-btn {
    width: 100%;
    padding: 14px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.checkout-btn:hover {
    background: #111827;
}

/* Product Modal */
.product-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #111827;
}

.modal-body {
    padding: 40px 30px 30px;
}

.modal-body h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #111827;
    padding-right: 30px;
}

.modal-body > p {
    color: #6b7280;
    font-size: 14px;
    margin-bottom: 25px;
}

.variation-selector {
    margin-bottom: 25px;
}

.variation-selector label,
.special-instructions label {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: #111827;
}

.variation-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.variation-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.variation-option:hover {
    border-color: #d1d5db;
}

.variation-option.selected {
    border-color: #1f2937;
    background: #f9fafb;
}

.variation-name {
    font-weight: 500;
    color: #111827;
}

.variation-price {
    font-weight: 600;
    color: #111827;
}

.special-instructions {
    margin-bottom: 25px;
}

.special-instructions textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.special-instructions textarea:focus {
    outline: none;
    border-color: #3b82f6;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}

.modal-footer {
    display: flex;
    gap: 15px;
    align-items: center;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    overflow: hidden;
}

.qty-btn {
    background: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    color: #374151;
    transition: background 0.2s ease;
}

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

.quantity-selector input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #d1d5db;
    border-right: 1px solid #d1d5db;
    padding: 12px 8px;
    font-size: 16px;
    font-weight: 600;
}

.add-to-order-btn {
    flex: 1;
    padding: 14px 20px;
    background: #1f2937;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.add-to-order-btn:hover {
    background: #111827;
}

.add-to-order-btn:disabled {
    background: #d1d5db;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .food-menu-content {
        grid-template-columns: 1fr;
    }
    
    .order-summary-section {
        order: -1;
    }
    
    .order-summary-sticky {
        position: relative;
        top: 0;
    }
}

/* Delivery Form Styles */
.delivery-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-group label {
    font-weight: 600;
    color: #111827;
    font-size: 14px;
}

.form-group label .required {
    float: right;
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: #3b82f6;
}

.form-control::placeholder {
    color: #9ca3af;
}

.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
}

.input-with-icon .form-control {
    padding-left: 45px;
}

.full-width {
    width: 100%;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

@media (max-width: 768px) {
    .food-menu-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .food-menu-filters {
        flex-direction: column;
        width: 100%;
    }
    
    .category-dropdown select,
    .search-box input {
        width: 100%;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 30px 20px 20px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .quantity-selector {
        width: 100%;
        justify-content: center;
    }
    
    .add-to-order-btn {
        width: 100%;
    }
}