/* ===========================
   MODALS & OVERLAYS STYLES
   =========================== */

/* ==================== Modal Overlay Base ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* ==================== Login/Register Modal ==================== */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.login-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.login-modal-container {
    background: #F4F0EB;
    border-radius: 16px;
    max-width: 450px;
    width: 90%;
    padding: 40px;
    position: relative;
    transform: scale(0.8) translateY(30px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
}

.login-modal-overlay.active .login-modal-container {
    transform: scale(1) translateY(0);
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.login-modal-close:hover {
    background: #dc3545;
    color: white;
    transform: rotate(90deg);
}

.login-modal-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #2C2C2C;
}

.login-modal-form .form-group {
    margin-bottom: 20px;
}

.login-modal-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.login-modal-form input[type="text"],
.login-modal-form input[type="email"],
.login-modal-form input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
}

.login-modal-form input:focus {
    outline: none;
    border-color: #D85AFF;
    box-shadow: 0 0 0 3px rgba(216, 90, 255, 0.1);
}

.login-modal-form .remember-me {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.login-modal-form .remember-me input {
    width: 18px;
    height: 18px;
}

.login-modal-form .submit-btn {
    width: 100%;
    padding: 16px;
    background: #2C2C2C;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-modal-form .submit-btn:hover {
    background: #D85AFF;
}

.login-modal-links {
    text-align: center;
    margin-top: 25px;
}

.login-modal-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.login-modal-links a:hover {
    color: #D85AFF;
}

.login-modal-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.login-modal-divider::before,
.login-modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ddd;
}

.login-modal-divider span {
    padding: 0 15px;
    color: #999;
    font-size: 13px;
}

.social-login {
    display: flex;
    gap: 15px;
}

.social-login-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-login-btn:hover {
    background: #f5f5f5;
    border-color: #999;
}

.social-login-btn i {
    font-size: 18px;
}

.social-login-btn.google i {
    color: #db4437;
}

.social-login-btn.facebook i {
    color: #4267B2;
}

/* ==================== Quick View Modal ==================== */
.quickview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.quickview-modal.active {
    opacity: 1;
    visibility: visible;
}

.quickview-container {
    background: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    position: relative;
    transform: scale(0.9);
    transition: all 0.3s ease;
}

.quickview-modal.active .quickview-container {
    transform: scale(1);
}

.quickview-image {
    width: 50%;
    background: #f5f5f5;
}

.quickview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.quickview-content {
    width: 50%;
    padding: 40px;
    overflow-y: auto;
}

.quickview-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.quickview-close:hover {
    background: #dc3545;
    color: white;
}

.quickview-title {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2C2C2C;
}

.quickview-price {
    font-size: 22px;
    font-weight: 600;
    color: #D85AFF;
    margin-bottom: 20px;
}

.quickview-price del {
    color: #999;
    font-size: 16px;
    margin-right: 10px;
}

.quickview-description {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
}

.quickview-add-to-cart {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.quickview-add-to-cart .quantity {
    flex-shrink: 0;
}

.quickview-add-to-cart button {
    flex: 1;
    padding: 15px 30px;
    background: #2C2C2C;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.quickview-add-to-cart button:hover {
    background: #D85AFF;
}

.quickview-view-full {
    display: inline-block;
    margin-top: 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.quickview-view-full:hover {
    color: #D85AFF;
}

/* ==================== Size Guide Modal ==================== */
.size-guide-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.size-guide-modal.active {
    opacity: 1;
    visibility: visible;
}

.size-guide-container {
    background: white;
    border-radius: 12px;
    max-width: 700px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 40px;
    position: relative;
}

.size-guide-title {
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    color: #2C2C2C;
}

.size-guide-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.size-guide-table th,
.size-guide-table td {
    padding: 15px;
    text-align: center;
    border: 1px solid #eee;
}

.size-guide-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.size-guide-table tr:nth-child(even) {
    background: #fafafa;
}

.size-guide-notes {
    margin-top: 25px;
    padding: 15px;
    background: #fff9e6;
    border-radius: 8px;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* ==================== Cart Sidebar Modal ==================== */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: white;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    z-index: 999999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
}

.cart-sidebar.active {
    transform: translateX(0);
}

.cart-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cart-sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cart-sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    font-weight: 600;
    color: #2C2C2C;
}

.cart-sidebar-close {
    width: 35px;
    height: 35px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
    transition: all 0.3s ease;
}

.cart-sidebar-close:hover {
    background: #dc3545;
    color: white;
}

.cart-sidebar-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-sidebar-item {
    display: flex;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.cart-sidebar-item-image {
    width: 80px;
    height: 100px;
    flex-shrink: 0;
}

.cart-sidebar-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.cart-sidebar-item-info {
    flex: 1;
}

.cart-sidebar-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 5px;
    color: #333;
}

.cart-sidebar-item-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.cart-sidebar-item-price {
    font-weight: 600;
    color: #D85AFF;
}

.cart-sidebar-item-remove {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: color 0.3s ease;
}

.cart-sidebar-item-remove:hover {
    color: #dc3545;
}

.cart-sidebar-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    background: #f9f9f9;
}

.cart-sidebar-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.cart-sidebar-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cart-sidebar-btn {
    display: block;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cart-sidebar-btn.view-cart {
    background: #f5f5f5;
    color: #333;
}

.cart-sidebar-btn.view-cart:hover {
    background: #e0e0e0;
}

.cart-sidebar-btn.checkout {
    background: #2C2C2C;
    color: white;
}

.cart-sidebar-btn.checkout:hover {
    background: #D85AFF;
}

.cart-sidebar-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-sidebar-empty i {
    font-size: 60px;
    color: #ddd;
    margin-bottom: 20px;
}

.cart-sidebar-empty p {
    color: #999;
    font-size: 16px;
}

/* ==================== Notification Toast ==================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.toast-notification.active {
    transform: translateX(0);
}

.toast-notification.success {
    background: #4CAF50;
}

.toast-notification.error {
    background: #dc3545;
}

.toast-notification.warning {
    background: #ff9800;
}

.toast-notification i {
    font-size: 20px;
}

.toast-notification-message {
    font-size: 14px;
    font-weight: 500;
}

.toast-notification-close {
    background: none;
    border: none;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    margin-left: 10px;
    transition: opacity 0.3s ease;
}

.toast-notification-close:hover {
    opacity: 1;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .quickview-container {
        flex-direction: column;
        max-height: 90vh;
    }
    
    .quickview-image,
    .quickview-content {
        width: 100%;
    }
    
    .quickview-image {
        height: 300px;
    }
    
    .quickview-content {
        padding: 25px;
    }
    
    .login-modal-container {
        padding: 30px 25px;
    }
    
    .social-login {
        flex-direction: column;
    }
    
    .cart-sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .toast-notification {
        left: 15px;
        right: 15px;
        bottom: 15px;
    }
}
