/* Woodbridge Catering System - Public Styles */
/* Inspired by EZCater's clean, modern interface */

:root {
    --wb-primary: #2c5530;
    --wb-primary-hover: #1f3e23;
    --wb-secondary: #f8f9fa;
    --wb-border: #dee2e6;
    --wb-text: #212529;
    --wb-text-light: #6c757d;
    --wb-success: #28a745;
    --wb-danger: #dc3545;
    --wb-warning: #ffc107;
}

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

/* Progress Bar */
.wb-progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 20px 0;
    border-bottom: 2px solid var(--wb-border);
}

.wb-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.wb-progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: var(--wb-border);
}

.wb-progress-step.completed:not(:last-child)::after {
    background: var(--wb-success);
}

.wb-step-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--wb-secondary);
    border: 2px solid var(--wb-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    position: relative;
    z-index: 1;
}

.wb-progress-step.active .wb-step-number {
    background: var(--wb-primary);
    color: white;
    border-color: var(--wb-primary);
}

.wb-progress-step.completed .wb-step-number {
    background: var(--wb-success);
    color: white;
    border-color: var(--wb-success);
}

.wb-step-label {
    font-size: 14px;
    color: var(--wb-text-light);
    text-align: center;
}

.wb-progress-step.active .wb-step-label {
    color: var(--wb-primary);
    font-weight: 600;
}

/* Menu Header */
.wb-menu-header {
    text-align: center;
    margin-bottom: 40px;
}

.wb-menu-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    color: var(--wb-text);
}

.wb-subtitle {
    font-size: 18px;
    color: var(--wb-text-light);
    margin-bottom: 20px;
}

.wb-cart-summary {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background: var(--wb-secondary);
    padding: 12px 20px;
    border-radius: 8px;
}

.wb-cart-count {
    font-weight: 600;
    color: var(--wb-text);
}

/* Category Section */
.wb-category-section {
    margin-bottom: 50px;
}

.wb-category-title {
    font-size: 28px;
    margin-bottom: 25px;
    color: var(--wb-text);
    padding-bottom: 10px;
    border-bottom: 3px solid var(--wb-primary);
    display: inline-block;
}

/* Items Grid */
.wb-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.wb-menu-item {
    background: white;
    border: 1px solid var(--wb-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.wb-menu-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.wb-item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--wb-secondary);
}

.wb-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wb-item-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.wb-item-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--wb-text);
}

.wb-item-description {
    font-size: 14px;
    color: var(--wb-text-light);
    margin-bottom: 15px;
    line-height: 1.5;
    flex-grow: 1;
}

.wb-item-meta {
    margin-bottom: 15px;
}

.wb-dietary-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 8px;
}

.wb-tag {
    background: #e3f2e8;
    color: var(--wb-success);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.wb-serves-info {
    font-size: 13px;
    color: var(--wb-text-light);
}

.wb-item-footer {
    border-top: 1px solid var(--wb-border);
    padding-top: 15px;
    margin-top: auto;
}

.wb-item-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--wb-primary);
    margin-bottom: 12px;
}

.wb-price-unit {
    font-size: 14px;
    font-weight: 400;
    color: var(--wb-text-light);
}

.wb-add-to-cart {
    display: flex;
    gap: 10px;
    align-items: center;
}

.wb-quantity-input {
    width: 70px;
    padding: 8px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    text-align: center;
    font-size: 14px;
}

/* Buttons */
.wb-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.wb-btn-primary {
    background: var(--wb-primary);
    color: white;
}

.wb-btn-primary:hover {
    background: var(--wb-primary-hover);
}

.wb-btn-secondary {
    background: white;
    color: var(--wb-text);
    border: 1px solid var(--wb-border);
}

.wb-btn-secondary:hover {
    background: var(--wb-secondary);
}

.wb-btn-add-cart {
    flex: 1;
    background: var(--wb-primary);
    color: white;
    padding: 10px 16px;
}

.wb-btn-add-cart:hover {
    background: var(--wb-primary-hover);
}

.wb-btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

/* Bottom Cart Bar */
.wb-bottom-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 2px solid var(--wb-border);
    padding: 15px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.wb-bottom-cart-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wb-cart-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.wb-cart-total {
    font-size: 18px;
    font-weight: 700;
}

/* Cart Page */
.wb-cart-page,
.wb-checkout-page,
.wb-confirmation-page {
    max-width: 900px;
    margin: 0 auto;
}

.wb-cart-items {
    margin-bottom: 30px;
}

.wb-cart-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    margin-bottom: 15px;
}

.wb-cart-item-info {
    flex: 1;
}

.wb-cart-item-info h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.wb-item-price {
    font-size: 14px;
    color: var(--wb-text-light);
}

.wb-special-requests {
    font-size: 13px;
    color: var(--wb-text-light);
    margin-top: 5px;
}

.wb-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.wb-cart-quantity {
    width: 80px;
    padding: 8px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    text-align: center;
    font-size: 16px;
}

.wb-quantity-label {
    font-size: 14px;
    color: var(--wb-text-light);
}

.wb-cart-item-subtotal {
    font-size: 20px;
    font-weight: 700;
    color: var(--wb-text);
    min-width: 100px;
    text-align: right;
}

.wb-btn-remove {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--wb-danger);
    background: white;
    color: var(--wb-danger);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wb-btn-remove:hover {
    background: var(--wb-danger);
    color: white;
}

.wb-cart-summary-box {
    background: var(--wb-secondary);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.wb-cart-summary-box h3 {
    margin-bottom: 15px;
}

.wb-summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 16px;
}

.wb-summary-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--wb-border);
    color: var(--wb-text-light);
}

.wb-cart-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* Checkout Form */
.wb-checkout-form {
    background: white;
}

.wb-form-section {
    margin-bottom: 35px;
    padding: 25px;
    background: white;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
}

.wb-form-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
    color: var(--wb-text);
}

.wb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.wb-form-group {
    display: flex;
    flex-direction: column;
}

.wb-form-group:last-child {
    margin-bottom: 0;
}

.wb-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--wb-text);
}

.wb-form-group input,
.wb-form-group select,
.wb-form-group textarea {
    padding: 12px;
    border: 1px solid var(--wb-border);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
}

.wb-form-group input:focus,
.wb-form-group select:focus,
.wb-form-group textarea:focus {
    outline: none;
    border-color: var(--wb-primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.wb-form-group small {
    margin-top: 5px;
    color: var(--wb-text-light);
    font-size: 12px;
}

.wb-order-summary-checkout {
    background: var(--wb-secondary);
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.wb-order-summary-checkout h3 {
    margin-bottom: 15px;
}

.wb-total-line {
    border-top: 2px solid var(--wb-border);
    padding-top: 15px;
    margin-top: 10px;
    font-size: 18px;
}

.wb-deposit-note {
    margin-top: 15px;
    color: var(--wb-warning);
    text-align: center;
}

.wb-form-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

#wb-checkout-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 6px;
    display: none;
}

#wb-checkout-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#wb-checkout-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Confirmation Page */
.wb-confirmation-page {
    text-align: center;
    padding: 40px 20px;
}

.wb-success-icon {
    width: 80px;
    height: 80px;
    background: var(--wb-success);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin-bottom: 20px;
}

.wb-order-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--wb-primary);
    margin-bottom: 30px;
}

.wb-confirmation-message {
    background: white;
    border: 1px solid var(--wb-border);
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: left;
}

.wb-next-steps {
    margin-top: 25px;
}

.wb-next-steps h3 {
    margin-bottom: 15px;
}

.wb-next-steps ul {
    list-style: none;
    padding: 0;
}

.wb-next-steps li {
    padding: 10px 0;
    padding-left: 30px;
    position: relative;
}

.wb-next-steps li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--wb-success);
    font-weight: bold;
}

/* Empty Cart */
.wb-empty-cart {
    text-align: center;
    padding: 60px 20px;
}

.wb-empty-cart h2 {
    margin-bottom: 15px;
}

.wb-empty-cart p {
    margin-bottom: 25px;
    color: var(--wb-text-light);
}

/* Responsive */
@media (max-width: 768px) {
    .wb-progress-bar {
        flex-wrap: wrap;
    }
    
    .wb-progress-step {
        flex-basis: 50%;
        margin-bottom: 20px;
    }
    
    .wb-items-grid {
        grid-template-columns: 1fr;
    }
    
    .wb-cart-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .wb-cart-item-quantity,
    .wb-cart-item-subtotal {
        width: 100%;
    }
    
    .wb-form-row {
        grid-template-columns: 1fr;
    }
    
    .wb-cart-actions,
    .wb-form-actions {
        flex-direction: column;
    }
    
    .wb-bottom-cart-content {
        flex-direction: column;
        gap: 15px;
    }
}

/* Loading State */
.wb-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wb-spinner {
    border: 3px solid var(--wb-border);
    border-top: 3px solid var(--wb-primary);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
