.page-content {
    max-width: 800px;
    padding: 40px 20px;
    text-align: center;
}

.page-content h1 {
    font-size: 32px;
    color: #075E54;
    margin-bottom: 16px;
}

.page-content p {
    font-size: 18px;
    color: #555;
    line-height: 1.8;
}

.page-content .badge {
    display: inline-block;
    background: #25D366;
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 14px;
    margin-top: 12px;
}

/* ============================================================
           أيقونة واتساب الثابتة
           ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 36px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.whatsapp-float:hover {
    transform: scale(1.05);
}

.whatsapp-float .icon-wrapper {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: box-shadow 0.3s ease;
}

.whatsapp-float .icon-wrapper:hover {
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float .icon-wrapper svg {
    width: 32px;
    height: 32px;
    fill: white;
}

/* ============================================================
           نافذة الدردشة
           ============================================================ */
.whatsapp-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 520px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18), 0 2px 10px rgba(0, 0, 0, 0.06);
    z-index: 9998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    animation: chatSlideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    direction: ltr;
}

@keyframes chatSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ============================================================
           رأس النافذة
           ============================================================ */
.chat-header {
    background: linear-gradient(135deg, #075E54 0%, #5e37a6 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header .header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
    flex-shrink: 0;
}

.chat-header .avatar svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.chat-header .header-text {
    color: white;
}

.chat-header .header-text .title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
}

.chat-header .header-text .status {
    font-size: 12px;
    opacity: 0.85;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-header .header-text .status .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(0.8);
    }
}

.chat-header .close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

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

/* ============================================================
           منطقة المحتوى (الرسائل)
           ============================================================ */
.chat-body {
    flex: 1;
    padding: 20px 16px 12px;
    overflow-y: auto;
    background: #ECE5DD;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d1d1d1' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    display: flex;
    flex-direction: column;
}

.chat-body::-webkit-scrollbar {
    width: 5px;
}

.chat-body::-webkit-scrollbar-track {
    background: transparent;
}

.chat-body::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
}

/* ============================================================
           الرسائل
           ============================================================ */
.message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 8px 8px 8px 0;
    margin-bottom: 6px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.message.bot {
    background: #ffffff;
    color: #1d1d1d;
    border-radius: 8px 8px 8px 0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.07);
    align-self: flex-start;
}

.message.user {
    background: #DCF8C6;
    color: #1d1d1d;
    border-radius: 8px 8px 0 8px;
    align-self: flex-end;
    margin-left: auto;
}

.message .bot-name {
    font-weight: 600;
    color: #075E54;
    display: block;
    margin-bottom: 2px;
}

/* ============================================================
           خيارات الأزرار
           ============================================================ */
.options-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0 4px;
    align-items: flex-start;
    width: 100%;
}

.option-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #ffffff;
    border: 1.5px solid #25D366;
    border-radius: 24px;
    color: #075E54;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    text-decoration: none;
    font-family: inherit;
}

.option-btn:hover {
    background: #25D366;
    color: white;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.option-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.option-btn .icon {
    font-size: 16px;
}

.option-btn.whatsapp-btn {
    background: #25D366;
    color: white;
    border-color: #25D366;
    font-weight: 600;
}

.option-btn.whatsapp-btn:hover {
    background: #128C7E;
    border-color: #128C7E;
    transform: translateX(4px) scale(1.02);
}

/* ============================================================
           حقل الإدخال
           ============================================================ */
.input-container {
    display: none;
    flex-direction: column;
    gap: 10px;
    margin: 12px 0 4px;
    width: 100%;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-container.show {
    display: flex;
}

.input-container .input-wrapper {
    display: flex;
    gap: 8px;
    width: 100%;
}

.input-container input,
.input-container textarea {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.input-container input:focus,
.input-container textarea:focus {
    border-color: #25D366;
}

.input-container textarea {
    resize: vertical;
    min-height: 60px;
    border-radius: 16px;
}

.input-container .send-btn {
    padding: 10px 20px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    font-family: inherit;
    white-space: nowrap;
}

.input-container .send-btn:hover {
    background: #128C7E;
}

.input-container .close-input-btn {
    background: none;
    border: none;
    color: #999;
    font-size: 20px;
    cursor: pointer;
    padding: 0 4px;
    transition: color 0.3s ease;
}

.input-container .close-input-btn:hover {
    color: #dc3545;
}

/* ============================================================
           تفاصيل المنتج
           ============================================================ */
.product-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 12px 16px;
    margin: 8px 0;
    border: 1px solid #e9ecef;
    width: 100%;
}

.product-details .product-name {
    font-weight: 600;
    font-size: 15px;
    color: #075E54;
    margin-bottom: 4px;
}

.product-details .product-info {
    font-size: 13px;
    color: #555;
    line-height: 1.6;
}

.product-details .product-info span {
    display: inline-block;
    margin-right: 12px;
}

.product-details .in-stock {
    color: #25D366;
    font-weight: 600;
}

.product-details .out-of-stock {
    color: #dc3545;
    font-weight: 600;
}

/* ============================================================
           منتجات مشابهة
           ============================================================ */
.similar-products {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    width: 100%;
}

.similar-products-title {
    font-size: 13px;
    font-weight: 600;
    color: #075E54;
    margin-bottom: 4px;
}

.similar-product-item {
    padding: 8px 14px;
    background: #f8f9fa;
    border-radius: 16px;
    font-size: 13px;
    color: #075E54;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
}

.similar-product-item:hover {
    background: #25D366;
    color: white;
    transform: translateX(4px);
}

.similar-product-item .item-price {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
}

.similar-product-item:hover .item-price {
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================================
           تذييل النافذة
           ============================================================ */
.chat-footer {
    padding: 10px 16px 14px;
    background: #f0f0f0;
    border-top: 1px solid #e0e0e0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chat-footer .input-placeholder {
    flex: 1;
    padding: 10px 16px;
    background: white;
    border-radius: 24px;
    color: #999;
    font-size: 14px;
    border: 1px solid #e0e0e0;
    cursor: default;
}

.chat-footer .send-icon {
    width: 40px;
    height: 40px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: default;
    opacity: 0.6;
}

/* ============================================================
           التوافق مع الشاشات الصغيرة
           ============================================================ */
@media (max-width: 500px) {
    .whatsapp-chat-window {
        bottom: 80px;
        right: 10px;
        left: 10px;
        width: auto;
        max-width: none;
        height: 75vh;
        max-height: 75vh;
        border-radius: 16px;
    }

   

    .whatsapp-float {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float .icon-wrapper {
        width: 45px;
        height: 45px;
    }

    .chat-header {
        padding: 12px 16px;
    }

    .chat-body {
        padding: 16px 12px 8px;
    }
}

@media (min-width: 501px) and (max-width: 768px) {
    .whatsapp-chat-window {
        right: 16px;
        width: 340px;
    }
}

/* ============================================================
           دعم الوضع المظلم
           ============================================================ */
@media (prefers-color-scheme: dark) {
    .whatsapp-chat-window {
        background: #1a1a2e;
    }

    .chat-body {
        background: #16213e;
        background-image: none;
    }

    .message.bot {
        background: #2d2d44;
        color: #e8e8e8;
    }

    .message.user {
        background: #25D366;
        color: #1a1a2e;
    }

    .chat-footer {
        background: #1a1a2e;
        border-color: #2d2d44;
    }

    .chat-footer .input-placeholder {
        background: #2d2d44;
        color: #888;
        border-color: #3d3d55;
    }

    .option-btn {
        background: #2d2d44;
        color: #e8e8e8;
        border-color: #25D366;
    }

    .option-btn:hover {
        background: #25D366;
        color: #1a1a2e;
    }

    .option-btn.whatsapp-btn {
        background: #25D366;
        color: #1a1a2e;
    }

    .option-btn.whatsapp-btn:hover {
        background: #128C7E;
        color: white;
    }

    .product-details {
        background: #2d2d44;
        border-color: #3d3d55;
    }

    .product-details .product-info {
        color: #bbb;
    }

    .similar-product-item {
        background: #2d2d44;
        border-color: #3d3d55;
        color: #e8e8e8;
    }

    .similar-product-item:hover {
        background: #25D366;
        color: #1a1a2e;
    }
}
