/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: var(--white);
    border-radius: 20px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes slideIn {
    from {
        transform: translateY(-50px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--light-gray) 0%, #f8f9fa 100%);
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    color: var(--secondary-color);
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 20px;
    cursor: pointer;
    color: var(--dark-gray);
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.close-modal:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 24px 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--light-gray) 0%, #f8f9fa 100%);
    border-radius: 0 0 20px 20px;
}

/* Modern Button Styles */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: var(--white);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #b8941f 100%);
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #b8941f 0%, #a07f1a 100%);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
}

/* Purchase Modal Specific */
.purchase-modal .product-summary {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.product-thumb {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
}

.product-details h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.product-details p {
    color: var(--dark-gray);
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.price-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.price-options label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.95rem;
}

.price-options input[type="radio"] {
    width: 18px;
    height: 18px;
}

.quantity-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: var(--light-gray);
    border-radius: 10px;
}

.qty-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #ddd;
    background: var(--white);
    color: var(--dark-gray);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.qty-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 5px;
    font-size: 1rem;
}

.total-section {
    text-align: right;
    padding: 15px;
    background: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: bold;
}

/* Cart Modal Specific */
.cart-modal {
    max-width: 650px;
    width: 90%;
}

.christmas-cart .modal-header h3 {
    color: var(--christmas-primary);
}

.cart-items {
    max-height: 450px;
    overflow-y: auto;
    margin-bottom: 25px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.cart-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-color) 0%, #b8941f 100%);
    border-radius: 15px 0 0 15px;
}

.cart-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.christmas-bullet {
    font-size: 1.8rem;
    margin-right: 5px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.cart-item-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
}

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

.cart-item-details h4 {
    color: var(--secondary-color);
    margin-bottom: 6px;
    font-size: 1.1rem;
    font-weight: 600;
}

.cart-item-details p {
    margin: 3px 0;
    font-size: 0.9rem;
    color: var(--dark-gray);
    line-height: 1.3;
}

.remove-item-btn {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-item-btn:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.remove-item-btn:active {
    transform: scale(0.95);
}

.cart-total {
    text-align: right;
    padding: 20px;
    background: linear-gradient(135deg, var(--light-gray) 0%, #e9ecef 100%);
    border-radius: 15px;
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: 700;
    border: 2px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    position: relative;
}

.cart-total::before {
    content: '🛒';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
}

 /* Order Confirmation Modal */
 .order-confirmation-modal {
     max-width: 600px;
     width: 90%;
 }

 /* Customer Details Modal */
 .customer-details-modal {
     max-width: 500px;
     width: 90%;
 }

#customer-details-form .form-group {
    margin-bottom: 20px;
}

#customer-details-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--secondary-color);
    font-weight: 500;
}

#customer-details-form input,
#customer-details-form textarea,
#customer-details-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

#customer-details-form input:focus,
#customer-details-form textarea:focus,
#customer-details-form select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

#customer-details-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 3000;
    transform: translateX(100%);
    animation: slideInRight 0.3s ease forwards;
}

@keyframes slideInRight {
    to {
        transform: translateX(0);
    }
}

/* Mobile Modal Adjustments */
@media (max-width: 768px) {
    .modal-overlay {
        background: rgba(0, 0, 0, 0.7) !important;
    }

    .modal-content {
        margin: 20px;
        max-width: calc(100% - 40px);
        max-height: calc(100% - 40px);
        background: #ffffff !important;
        color: #2c3e50 !important;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
        background: #ffffff !important;
        color: #2c3e50 !important;
    }

    .purchase-modal .product-summary {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .product-thumb {
        width: 100%;
        max-width: 150px;
        height: auto;
        margin: 0 auto 10px;
    }

    .quantity-selector {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .qty-controls {
        justify-content: center;
    }

    .cart-item {
        flex-direction: column;
        text-align: center;
        background: #ffffff !important;
        color: #2c3e50 !important;
    }

    .cart-item-image {
        align-self: center;
    }

    .remove-item-btn {
        align-self: flex-end;
        margin-top: 10px;
    }

    .cart-total {
        background: #ffffff !important;
        color: #2c3e50 !important;
    }

    .modal-footer {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}
