/**
 * Real Estate Favorites Cart Styles
 */

/* Cart Container */
.ref-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.ref-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.ref-cart-header h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.ref-cart-count-display {
    background: #fa831d;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Cart Grid */
.ref-cart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

/* Cart Item */
.ref-cart-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ref-cart-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-4px);
    border-color: #fa831d;
}

/* Cart Item Image */
.ref-cart-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.ref-cart-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ref-cart-item:hover .ref-cart-image img {
    transform: scale(1.05);
}

.ref-cart-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(250, 131, 29, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ref-cart-item:hover .ref-cart-image::after {
    opacity: 1;
}

/* Cart Item Content */
.ref-cart-content {
    padding: 20px;
}

.ref-cart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 12px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-cart-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fa831d;
    margin-bottom: 8px;
}

.ref-cart-address {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ref-cart-meta {
    color: #9ca3af;
    font-size: 0.8rem;
    margin-bottom: 16px;
    font-style: italic;
}

/* Cart Actions */
.ref-cart-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ref-cart-actions .ref-view-listing {
    background: #fa831d;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex: 1;
    text-align: center;
}

.ref-cart-actions .ref-view-listing:hover {
    background: #e6730a;
    transform: translateY(-1px);
}

.ref-cart-actions .ref-remove-from-cart {
    background: #313131;
    color: white;
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.ref-cart-actions .ref-remove-from-cart:hover {
    background: #403f3f;
    transform: translateY(-1px);
}

/* Send to Friend Section */
.ref-send-to-friend-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.ref-send-to-friend-section h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 24px 0;
    text-align: center;
}

.ref-form-group {
    margin-bottom: 20px;
}

.ref-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.ref-form-group input,
.ref-form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.ref-form-group input:focus,
.ref-form-group textarea:focus {
    outline: none;
    border-color: #fa831d;
    box-shadow: 0 0 0 3px rgba(250, 131, 29, 0.1);
    transform: translateY(-1px);
}

.ref-form-group textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

.ref-send-to-friend-btn {
    background: linear-gradient(135deg, #fa831d 0%, #e6730a 100%);
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ref-send-to-friend-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #e6730a 0%, #d4620a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(250, 131, 29, 0.3);
}

.ref-send-to-friend-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Cart Actions */
.ref-cart-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
    justify-content: center;
}

.ref-clear-cart-btn {
    background: #313131;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ref-clear-cart-btn:hover {
    background: #403f3f;
    transform: translateY(-1px);
}

/* Empty Cart */
.ref-empty-cart,
.ref-empty-cart-message {
    text-align: center;
    color: #6b7280;
    font-size: 1.125rem;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    border: 2px dashed #d1d5db;
}

.ref-empty-cart-message p {
    margin: 0;
    font-size: 1.1rem;
}

/* Cart Count Badge */
.ref-cart-count {
    /* background: #fa831d; */
    color: #fa831d;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
    display: inline-block;
}

/* Cart Button */
.ref-cart-btn {
    /* background: #fa831d; */
    color: #fa831d;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ref-cart-btn:hover {
    /* background: #e6730a; */
    transform: translateY(-1px);
}

.ref-cart-btn.in-cart {
    /* background: #10b981; */
    color: #10b981;
}

.ref-cart-btn.in-cart:hover {
    /* background: #059669; */
    color: #059669;
}

.ref-cart-btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Notifications */
.ref-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.ref-notification.ref-success {
    background: #10b981;
}

.ref-notification.ref-error {
    background: #ef4444;
}

.ref-notification.ref-warning {
    background: #f59e0b;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ref-cart-container {
        padding: 15px;
    }
    
    .ref-cart-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .ref-cart-header h3 {
        font-size: 1.5rem;
    }
    
    .ref-cart-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .ref-cart-actions {
        flex-direction: column;
    }
    
    .ref-cart-actions .ref-view-listing,
    .ref-cart-actions .ref-remove-from-cart {
        flex: none;
    }
    
    .ref-send-to-friend-section {
        padding: 20px;
        margin-top: 30px;
    }
    
    .ref-send-to-friend-section h3 {
        font-size: 1.5rem;
    }
    
    .ref-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .ref-cart-image {
        height: 180px;
    }
    
    .ref-cart-content {
        padding: 15px;
    }
    
    .ref-cart-title {
        font-size: 1.1rem;
    }
    
    .ref-cart-price {
        font-size: 1.3rem;
    }
}

/* Loading States */
.ref-cart-container.loading {
    opacity: 0.7;
    pointer-events: none;
}

.ref-cart-container.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #fa831d;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Animation for cart items */
.ref-cart-item {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation for multiple items */
.ref-cart-item:nth-child(1) { animation-delay: 0.1s; }
.ref-cart-item:nth-child(2) { animation-delay: 0.2s; }
.ref-cart-item:nth-child(3) { animation-delay: 0.3s; }
.ref-cart-item:nth-child(4) { animation-delay: 0.4s; }
.ref-cart-item:nth-child(5) { animation-delay: 0.5s; }
