/* Cart and Order Management Styles */

.cart-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #cc9796, #b8898a);
    color: white;
    padding: 1rem;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.2);
    z-index: 98;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.cart-panel.hidden {
    transform: translateY(100%);
}

.cart-panel.empty {
    display: none;
}

.cart-panel-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cart-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cart-icon-panel {
    font-size: 1.5rem;
    position: relative;
}

.cart-count-panel {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.cart-total-panel {
    font-weight: bold;
    font-size: 1.1rem;
}

.cart-actions {
    display: flex;
    gap: 1rem;
}

.btn-view-cart,
.btn-checkout-panel {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-height: 40px;
}

.btn-view-cart {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.btn-view-cart:hover {
    background: rgba(255,255,255,0.3);
}

.btn-checkout-panel {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
}

.btn-checkout-panel:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

/* Cart Modal */
.cart-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
}

.cart-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    padding: 0.5rem;
}

.cart-item {
    display: flex;
    flex-direction: column;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

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

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    background: #cc9796;
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    min-width: 30px;
    min-height: 30px;
}

.quantity-btn:hover {
    background: #b8898a;
}

.cart-item-extras {
    margin-top: 0.5rem;
    padding-left: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.cart-item-extra {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.2rem;
}

.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 1rem;
    text-align: right;
    color: #cc9796;
}

.checkout-btn {
    background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 1rem;
    transition: all 0.3s ease;
    min-height: 44px;
}

.checkout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

/* Extras Modal */
.extras-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1001;
}

.extras-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.extras-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.extras-category {
    margin-bottom: 1.5rem;
}

.extras-category h4 {
    color: #8b4513;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.extras-category.required h4::after {
    content: ' *';
    color: #e74c3c;
}

.extras-category p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
    font-style: italic;
}

.extras-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.extra-option {
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.extra-option:hover {
    border-color: #cc9796;
    background: #f9f9f9;
}

.extra-option.selected {
    border-color: #cc9796;
    background: #f0f8ff;
}

.extra-option input {
    margin-right: 0.8rem;
}

.extra-option-info {
    flex: 1;
}

.extra-option-name {
    font-weight: bold;
    color: #333;
}

.extra-option-description {
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.2rem;
}

.extra-option-price {
    font-weight: bold;
    color: #cc9796;
}

.extras-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Checkout Modal */
.checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1002;
}

.checkout-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.checkout-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #eee;
}

.checkout-header h2 {
    color: #8b4513;
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: bold;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #cc9796;
}

.form-group small {
    color: #666;
    font-size: 0.8rem;
}

.required {
    color: #e74c3c;
}

.payment-info {
    background: #e3f2fd;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border-left: 4px solid #2196f3;
}

.payment-info h4 {
    color: #1565c0;
    margin-bottom: 0.5rem;
}

.payment-methods {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.payment-method {
    flex: 1;
    padding: 0.5rem;
    text-align: center;
    background: #f5f5f5;
    border-radius: 5px;
    font-size: 0.9rem;
    min-width: 80px;
}

.order-summary {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.order-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
}

.order-summary-item-extras {
    padding-left: 1rem;
    font-size: 0.9rem;
    color: #666;
}

.checkout-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-primary {
    background: linear-gradient(45deg, #cc9796, #c98a89);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    flex: 2;
    transition: all 0.3s ease;
    min-height: 44px;
}

.btn-secondary:hover,
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
    transform: translateX(400px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.notification.show {
    transform: translateX(0);
}

/* Product Cards */
.add-to-cart {
    background: linear-gradient(45deg, #8b4513, #8b4513);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    width: 100%;
    min-height: 44px;
    text-decoration: none;
    text-align: center;
    display: inline-block;
}

.add-to-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(76,175,80,0.3);
    background: #ff6b6b;
    color: white;
    text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cart-panel-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cart-actions {
        width: 100%;
        justify-content: center;
    }
    
    .btn-view-cart,
    .btn-checkout-panel {
        flex: 1;
        padding: 0.8rem 1rem;
    }
    
    .checkout-actions {
        flex-direction: column;
    }
    
    .checkout-actions .btn-secondary,
    .checkout-actions .btn-primary {
        flex: none;
        width: 100%;
    }
    
    .payment-methods {
        flex-direction: column;
    }
    
    .payment-method {
        flex: none;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .extras-actions {
        flex-direction: column;
    }

    .extras-actions .btn-secondary,
    .extras-actions .btn-primary {
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cart-content,
    .checkout-content,
    .extras-content {
        padding: 1.5rem;
        width: 95%;
    }
}