/* Components CSS for Walnut Wala */

/* Footer Bottom Wrap */
.footer-bottom-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 0 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.footer-copy {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-hussain-link {
    color: var(--primary);
    text-decoration: none;
}

.footer-hussain-link:hover {
    text-decoration: underline;
}

.footer-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    font-size: 0.85rem;
}

.footer-policy-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.footer-policy-links a:hover {
    color: var(--primary);
}

@media (max-width: 640px) {
    .footer-bottom-wrap {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-policy-links {
        justify-content: center;
    }
}

/* Exit Popup */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.exit-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.exit-popup-card {
    background: #fff;
    width: 100%;
    max-width: 600px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.exit-popup-overlay.active .exit-popup-card {
    transform: scale(1);
}

.exit-popup-close {
    position: absolute;
    top: 1rem;
    right: 1.25rem;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 1.5rem;
    color: #000;
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.exit-popup-close:hover {
    background: #fee2e2;
    color: #ef4444;
}

.exit-popup-content {
    display: flex;
    align-items: center;
}

.exit-popup-image {
    flex: 1;
    min-height: 350px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exit-popup-image img {
    max-width: 85%;
    height: auto;
    object-fit: contain;
}

.exit-popup-text {
    flex: 1.2;
    padding: 2.5rem;
}

.exit-popup-text h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.exit-popup-text p {
    color: #4b5563;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

@media (max-width: 639px) {
    .exit-popup-content {
        flex-direction: column;
    }

    .exit-popup-image {
        min-height: 200px;
        width: 100%;
    }

    .exit-popup-text {
        padding: 1.5rem;
        text-align: center;
    }

    .exit-popup-text h2 {
        font-size: 1.5rem;
    }
}

/* WhatsApp Premium Floating Button */
.premium-whatsapp-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    background: #25D366 !important;
    color: #fff !important;
    display: flex !important;
    align-items: center !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    text-decoration: none !important;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4) !important;
    z-index: 9999999 !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    border: 2px solid #fff !important;
    animation: whatsappBounce 3s infinite !important;
}

.premium-whatsapp-btn img {
    width: 24px !important;
    height: 24px !important;
    margin-right: 6px !important;
}

.premium-whatsapp-btn:hover {
    transform: translateY(-5px) scale(1.05) !important;
    background: #128c7e !important;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.6) !important;
}

@keyframes whatsappBounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

@media (max-width: 768px) {
    .premium-whatsapp-btn {
        bottom: 20px !important;
        right: 20px !important;
        padding: 12px !important;
    }
    .premium-whatsapp-btn span {
        display: none !important;
    }
    .premium-whatsapp-btn img {
        margin-right: 0 !important;
    }
}

/* Toast Container */
#toastContainer {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
}

.custom-toast {
    background: rgba(0,0,0,0.85);
    color: #fff;
    padding: 12px 24px;
    border-radius: 50px;
    margin-top: 10px;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    animation: fadeInUp 0.3s ease;
    font-family: sans-serif;
}

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

.wishlist-btn i {
    transition: all 0.2s ease;
}

.wishlist-btn:hover i {
    transform: scale(1.2);
}

/* Side Cart */
.side-cart {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    visibility: hidden;
    transition: all 0.3s ease;
}

.side-cart.active {
    visibility: visible;
}

.side-cart-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.side-cart.active .side-cart-overlay {
    opacity: 1;
}

.side-cart-content {
    position: absolute;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

@media (max-width: 480px) {
    .side-cart-content {
        width: 100%;
        right: -100%;
    }
}

.side-cart.active .side-cart-content {
    right: 0;
}

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

.side-cart-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.side-cart-header .close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.side-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.side-cart-footer {
    padding: 1.5rem;
    border-top: 1px solid #eee;
    background: #f9fafb;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.side-cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.side-cart-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

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

.side-cart-item-title {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.side-cart-item-price {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
}

.side-cart-item-qty {
    font-size: 0.8rem;
    color: #666;
}

.side-cart-item-remove {
    background: none;
    border: none;
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.9rem;
}

/* Chatbot Styles */
.gemini-chatbot {
    position: fixed;
    bottom: 85px;
    right: 20px;
    z-index: 99999999 !important;
    font-family: 'Inter', sans-serif;
}

.chat-toggle-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #8b5cf6;
    color: white;
    border: 2px solid white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.chat-toggle-btn:hover {
    transform: scale(1.1) rotate(10deg);
    background: #7c3aed;
}

.chat-window {
    position: absolute;
    bottom: 65px;
    right: 0;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid #e5e7eb;
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-header {
    background: #8b5cf6;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-header-info i {
    font-size: 1.5rem;
}

.chat-header-info h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.status-online {
    font-size: 0.75rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-online::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
}

.close-chat-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.close-chat-btn:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f9fafb;
}

.message {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message {
    background: #f3f4f6;
    color: #1f2937;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.user-message {
    background: #8b5cf6;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 0.75rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.5rem;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    outline: none;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}

.chat-input-area input:focus {
    border-color: #8b5cf6;
}

.send-message-btn {
    background: #8b5cf6;
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.send-message-btn:hover {
    background: #7c3aed;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 12px;
    align-self: flex-start;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #9ca3af;
    border-radius: 50%;
    animation: typing 1s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Responsive */
@media (max-width: 480px) {
    .chat-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        bottom: 0;
    }
    .gemini-chatbot {
        bottom: 85px;
        right: 20px;
    }
    .chat-window.active {
        transform: none;
    }
}
