/* Shopping Cart Styles */

/* Cart Toggle Button (Fixed position) */
.cart-toggle {
    position: fixed;
    bottom: 30px;
    right: 110px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #e67e23;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s ease;
    overflow: visible;
}

.cart-toggle:hover {
    background: #d35400;
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.cart-toggle svg {
    width: 28px;
    height: 28px;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #c0392b;
    color: white;
    border-radius: 12px;
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    line-height: 1;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    max-width: 90vw;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    right: 0;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Header */
.cart-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.cart-close {
    background: none;
    border: none;
    font-size: 36px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.cart-close:hover {
    color: #333;
}

/* Cart Items */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    color: #999;
    padding: 40px 20px;
    font-size: 16px;
}

.cart-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    background: #fafafa;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.cart-item-image-placeholder {
    width: 80px;
    height: 80px;
    background: #e0e0e0;
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    color: #333;
    line-height: 1.3;
}

.cart-item-option {
    margin: 4px 0;
    font-size: 13px;
    color: #666;
}

.cart-item-price {
    margin: 8px 0 0 0;
    font-size: 16px;
    font-weight: bold;
    color: #e67e23;
}

.cart-item-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.cart-item-quantity {
    width: 60px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
}

.cart-item-remove {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.cart-item-remove:hover {
    background: #c0392b;
}

/* Cart Footer */
.cart-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: white;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

#cart-total-amount {
    color: #e67e23;
}

.checkout-btn {
    width: 100%;
    padding: 16px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.checkout-btn:hover:not(:disabled) {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
}

.checkout-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Notification */
.cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px 32px;
    background: #27ae60;
    color: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cart-notification::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    font-size: 18px;
}

.cart-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.cart-notification.error {
    background: #e74c3c;
}

.cart-notification.error::before {
    content: '✕';
}

/* Responsive Design */
@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }

    .cart-toggle {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .cart-toggle svg {
        width: 24px;
        height: 24px;
    }

    .cart-item {
        flex-direction: column;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
    }

    .cart-item-controls {
        flex-direction: row;
        justify-content: space-between;
        width: 100%;
    }
}

/* Success Message Styling */
.checkout-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

.checkout-cancelled {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    text-align: center;
}

/* Options Modal */
.options-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.options-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.options-modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.options-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.options-modal-close:hover {
    color: #333;
}

.options-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 22px;
}

.options-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

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

.option-select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.option-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.option-price {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.option-price strong {
    font-size: 18px;
    color: #333;
}

.add-to-cart-confirm {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-to-cart-confirm:hover {
    background: #45a049;
}
