/* Hero Section Styles */
.hero-section {
    background: linear-gradient(135deg, #155dfc 0%, #4f39f6 100%);
    min-height: 500px;
    padding: 60px 24px;
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 60px;
    align-items: center;
}

.hero-content {
    color: white;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 32px;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px;
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: white;
    color: #3b82f6;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #3b82f6;
}

.hero-image {
    position: relative;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Chatbot Styles */
.chatbot-wrapper {
    position: fixed;
    bottom: 68px;
    right: 24px;
    z-index: 9999;
}

[dir="rtl"] .chatbot-wrapper {
    right: auto;
    left: 24px;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4f39f6;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 10px 15px -3px #d9d9d9, 0 4px 6px -4px rgba(231, 0, 11, 0.5);
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.6);
}

.chatbot-toggle .chatbot-text {
    color: #fff;

    text-align: center;
    font-family: "SF Pro";
    font-size: 14px;
    font-style: normal;
    font-weight: 510;
    line-height: 24px;
}

.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 48px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

[dir="rtl"] .chatbot-window {
    right: auto;
    left: 24px;
}

.chatbot-window.show {
    display: flex;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-header {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-status {
    display: flex;
    align-items: center;
    gap: 12px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ade80;
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.6);
}

.chatbot-status h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.status-text {
    font-size: 12px;
    opacity: 0.9;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chatbot-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chatbot-welcome {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: white;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
}

.welcome-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.welcome-message {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.quick-questions {
    margin-bottom: 20px;
}

.quick-label {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 12px;
    font-weight: 600;
}

.quick-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 8px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    text-align: start;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

[dir="rtl"] .quick-btn {
    text-align: right;
}

.quick-btn:hover {
    background: #2563eb;
    transform: translateX(-4px);
}

[dir="rtl"] .quick-btn:hover {
    transform: translateX(4px);
}

.manager-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chatbot-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    display: flex;
    gap: 8px;
    max-width: 85%;
}

.message.user {
    margin-left: auto;
    flex-direction: row-reverse;
}

[dir="rtl"] .message.user {
    margin-left: 0;
    margin-right: auto;
}

.message-bubble {
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot .message-bubble {
    background: white;
    color: #333;
}

.message.user .message-bubble {
    background: #3b82f6;
    color: white;
}

.chatbot-footer {
    padding: 16px;
    background: white;
    border-top: 1px solid #e9ecef;
    display: flex;
    gap: 8px;
    align-items: center;
}

.input-actions {
    display: flex;
    gap: 4px;
}

.action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f3f4f6;
    color: #6c757d;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.action-btn:hover {
    background: #e9ecef;
    color: #333;
}

.chatbot-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    outline: none;
}

.chatbot-input:focus {
    border-color: #3b82f6;
}

.send-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #3b82f6;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .chatbot-window {
        width: calc(100vw - 32px);
        height: calc(100vh - 100px);
        bottom: 16px;
        right: 16px;
    }

    [dir="rtl"] .chatbot-window {
        right: auto;
        left: 16px;
    }
}

/* Categories Section */
.categories-section {
    padding: 60px 24px;
    background: #ffffff;
}

.categories-container {
    max-width: 1400px;
    margin: 0 auto;
}

.categories-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
}

.see-more {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.see-more:hover {
    color: #dc2626;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
    gap: 20px;
}

.category-card {
    position: relative; /* ضروري للـ overlay */
    overflow: hidden;
    width: 212px;
    height: 212px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding: 35.39px 40.446px;
    gap: 12.639px;
    flex-shrink: 0;
    border-radius: 12.639px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* إزالة أي تأثير لينك افتراضي */
.category-card:link,
.category-card:visited,
.category-card:hover,
.category-card:active {
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* الـ Overlay (الطبقة الملونة فوق الصورة) */
.category-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* فوق الصورة */
    pointer-events: none; /* عشان الـ click يروح للـ link */
}

/* النص */
.category-card h3 {
    position: relative;
    z-index: 2; /* فوق الـ overlay */
    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* Brands Section - Updated with Row Layout */
.brands-section {
    padding: 60px 24px;
    background: #ffffff;
}

.brands-container {
    max-width: 1400px;
    margin: 0 auto;
}

.brands-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.brands-title {
    font-size: 28px;
    font-weight: 700;
    color: #dc2626;
    margin: 0;
}

.view-all {
    font-size: 16px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
}

.view-all:hover {
    color: #dc2626;
}

.view-all i {
    font-size: 14px;
}

[dir="rtl"] .view-all i {
    transform: scaleX(-1);
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.brand-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border-color: #dc2626;
}

.brand-logo {
    width: 60px;
    height: 60px;
    min-width: 60px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo img {
    max-width: 40px;
    max-height: 40px;
    object-fit: contain;
}

.brand-info {
    flex: 1;
    text-align: left;
}

[dir="rtl"] .brand-info {
    text-align: right;
}

.brand-name {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    text-transform: capitalize;
}

.brand-items {
    font-size: 13px;
    color: #9ca3af;
    margin: 0;
}

@media (max-width: 992px) {
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .brands-grid {
        grid-template-columns: repeat(1, 1fr);
    }

    .brands-section {
        padding: 32px 16px;
    }
}

/* Promo Banners Section */
.promo-banners-section {
    padding: 60px 24px;
    background: #f8f9fa;
}

.promo-container {
    max-width: 1400px;
    margin: 0 auto;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

/* الكارت */
.promo-banner {
    border-radius: 12.055px;
    padding: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.promo-banner:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.promo-banner.green {
    background: linear-gradient(90deg, #00a63e 0%, #00c950 100%);
}

.promo-banner.orange {
    background: linear-gradient(90deg, #ff6900 0%, #ff8904 100%);
}

/* النص */
.promo-content {
    flex: 1 1 0;
    color: #ffffff;
    z-index: 1;
    text-align: left;
}

[dir="rtl"] .promo-content {
    text-align: right;
}

.promo-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #ffffff;
}

.promo-subtitle {
    font-size: 15px;
    margin: 0 0 20px 0;
    opacity: 0.95;
    color: #ffffff;
    max-width: 380px;
}

/* الصورة */
.promo-image {
    flex: 0 0 auto;
    width: 200px;
    max-width: 32%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.promo-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    opacity: 0.8;
}

[dir="rtl"] .promo-banner {
    flex-direction: row-reverse;
}

.promo-btn {
    background: #ffffff;
    color: #f54900;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.promo-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 1200px) {
    .promo-banner {
        padding: 28px;
        gap: 20px;
    }

    .promo-image {
        width: 170px;
        max-width: 35%;
    }

    .promo-title {
        font-size: 22px;
    }

    .promo-subtitle {
        font-size: 14px;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .promo-banners-section {
        padding: 40px 20px;
    }

    .promo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .promo-banner {
        padding: 24px;
        min-height: 180px;
        flex-direction: row;
    }

    [dir="rtl"] .promo-banner {
        flex-direction: row-reverse;
    }

    .promo-image {
        width: 140px;
        max-width: 40%;
    }

    .promo-title {
        font-size: 20px;
    }

    .promo-subtitle {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    [dir="rtl"] .promo-banner {
        flex-direction: column;
    }

    .promo-content {
        text-align: center;
    }

    .promo-subtitle {
        max-width: 100%;
    }

    .promo-image {
        width: 120px;
        max-width: 60%;
    }
}

@media (max-width: 1200px) {
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .category-card {
        width: 100%;
        height: 212px;
    }

    .offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .promo-banner {
        padding: 28px;
    }

    .promo-image {
        max-width: 160px;
    }
}

@media (max-width: 768px) {
    .categories-section {
        padding: 40px 20px;
    }

    .section-title {
        font-size: 24px;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .category-card {
        width: 100%;
        height: 180px;
        padding: 30px 35px;
    }

    .category-card h3 {
        font-size: 18px;
    }

    .offers-section {
        padding: 40px 20px;
    }

    .offers-title {
        font-size: 24px;
    }

    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .product-card {
        padding: 12px;
    }

    .product-image {
        height: 180px;
    }

    .brands-section {
        padding: 40px 20px;
    }

    .brands-title {
        font-size: 24px;
    }

    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .brand-card {
        padding: 16px 20px;
    }

    .brand-logo {
        width: 50px;
        height: 50px;
        min-width: 50px;
    }

    .brand-logo img {
        max-width: 32px;
        max-height: 32px;
    }

    .brand-name {
        font-size: 16px;
    }

    .brand-items {
        font-size: 12px;
    }

    .promo-banners-section {
        padding: 40px 20px;
    }

    .promo-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .promo-banner {
        padding: 24px;
        min-height: 180px;
    }

    .promo-title {
        font-size: 20px;
    }

    .promo-subtitle {
        font-size: 14px;
    }

    .promo-image {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .categories-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .see-more {
        font-size: 14px;
    }

    .category-card {
        height: 160px;
        padding: 25px 30px;
    }

    .category-card h3 {
        font-size: 16px;
    }

    .offers-grid {
        grid-template-columns: 1fr;
    }

    .product-footer {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .add-to-cart-btn {
        width: 100%;
        justify-content: center;
    }

    .brands-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .brands-title {
        font-size: 20px;
    }

    .view-all {
        font-size: 14px;
    }

    .brands-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .brand-card {
        padding: 14px 18px;
        gap: 14px;
    }

    .brand-logo {
        width: 48px;
        height: 48px;
        min-width: 48px;
    }

    .brand-logo img {
        max-width: 30px;
        max-height: 30px;
    }

    .brand-name {
        font-size: 15px;
        margin-bottom: 2px;
    }

    .brand-items {
        font-size: 11px;
    }

    .promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    [dir="rtl"] .promo-banner {
        flex-direction: column;
    }

    .promo-content {
        margin-bottom: 20px;
    }

    .promo-title {
        font-size: 18px;
    }

    .promo-image {
        max-width: 120px;
    }
}

.cashback-section {
    padding: 40px 24px;
    background: #f3f4f6;
}

.cashback-container {
    max-width: 1300px;
    margin: 0 auto;
}

.cashback-card {
    display: grid;
    grid-template-columns: 38% 62%;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
    background: linear-gradient(90deg, #ff7a00 0%, #ff5b00 100%);
}

.cashback-image {
    position: relative;
    background: #000;
}

.cashback-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cashback-content {
    padding: 40px 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #ffffff;
}

.cashback-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 12px 0;
}

.cashback-text {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
    max-width: 420px;
    margin: 0 0 22px 0;
}

.cashback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: 6px;
    background: #ffffff;
    color: #ff5b00;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.cashback-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

[dir="rtl"] .cashback-card {
    direction: rtl;
    grid-template-columns: 62% 38%;
}

[dir="rtl"] .cashback-content {
    text-align: right;
}

@media (max-width: 1024px) {
    .cashback-card {
        grid-template-columns: 1.2fr 1.8fr;
    }

    .cashback-content {
        padding: 32px 32px;
    }

    .cashback-title {
        font-size: 22px;
    }
}

@media (max-width: 768px) {
    .cashback-section {
        padding: 32px 16px;
    }

    .cashback-card {
        grid-template-columns: 1fr;
    }

    .cashback-content {
        padding: 24px 20px 28px;
    }

    .cashback-text {
        max-width: 100%;
    }
}

.best-goods-section {
    padding: 40px 24px;
    background: #ffffff;
}

.best-goods-container {
    max-width: 1400px;
    margin: 0 auto;
}

.best-goods-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff3b3b;
    margin-bottom: 20px;
}

.best-goods-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.best-good-card {
    position: relative;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #f0f0f0;
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 0 1px #f7f7f7;
}

.best-discount {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff3b3b;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
}

.best-image {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.best-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.best-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.best-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.best-brand {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    text-transform: lowercase;
}

.best-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.best-rating .stars i {
    font-size: 12px;
    color: #fbbf24;
}

.best-count {
    font-size: 11px;
    color: #9ca3af;
}

.best-footer {
    margin-top: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.best-price {
    font-size: 14px;
    font-weight: 700;
    color: #ff3b3b;
}

.best-add-btn {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    font-size: 11px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.best-add-btn i {
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1024px) {
    .best-goods-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .best-goods-section {
        padding: 32px 16px;
    }

    .best-goods-title {
        font-size: 20px;
    }

    .best-goods-row {
        grid-template-columns: 1fr;
    }
}

.deals-section {
    padding: 60px 24px;
    background: #ffffff;
}

.deals-container {
    max-width: 1400px;
    margin: 0 auto;
}

.deals-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    column-gap: 24px;
    margin-bottom: 24px;
}

.deals-title {
    font-size: 24px;
    font-weight: 700;
    color: #ff3b3b;
    margin: 0;
}

.deals-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.deals-tab {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.deals-tab.active {
    background: #ff3b3b;
    color: #ffffff;
    border-color: #ff3b3b;
}

.deals-tab:hover {
    border-color: #ff3b3b;
    color: #ff3b3b;
}

.deals-view-all {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.deals-view-all i {
    font-size: 14px;
}

[dir="rtl"] .deals-view-all i {
    transform: scaleX(-1);
}

/* Grid */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 18px;
}

/* Card */
.deal-card {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f1f1f1;
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 0 0 1px #f9fafb;
}

.deal-badge.new {
    position: absolute;
    left: 14px;
    top: 16px;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    background: #dc2626;
    border-radius: 999px;
}

.deal-wishlist {
    position: absolute;
    right: 14px;
    top: 16px;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
}

[dir="rtl"] .deal-badge.new {
    left: auto;
    right: 14px;
}

[dir="rtl"] .deal-wishlist {
    right: auto;
    left: 14px;
}

.deal-image {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deal-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.deal-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.deal-name {
    font-size: 13px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.deal-brand {
    font-size: 11px;
    color: #9ca3af;
    margin: 0;
    text-transform: lowercase;
}

.deal-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.deal-rating .stars i {
    font-size: 12px;
    color: #fbbf24;
}

.deal-count {
    font-size: 11px;
    color: #9ca3af;
}

.deal-footer {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.deal-price {
    font-size: 14px;
    font-weight: 700;
    color: #ff3b3b;
}

.deal-add-btn {
    border-radius: 999px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    padding: 6px 16px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.deal-add-btn i {
    font-size: 13px;
}

/* Responsive */
@media (max-width: 1200px) {
    .deals-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .deals-header {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

    .deals-title {
        text-align: left;
    }
}

@media (max-width: 768px) {
    .deals-section {
        padding: 40px 16px;
    }

    .deals-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .deals-grid {
        grid-template-columns: 1fr;
    }

    .deals-title {
        font-size: 20px;
    }

    .deals-tabs {
        justify-content: flex-start;
    }
}

.chatbot-messages {
    scroll-behavior: smooth;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
}

.message {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.message.user {
    align-items: flex-end;
}

.message.bot {
    align-items: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    word-wrap: break-word;
}

.message.user .message-bubble {
    background: #007bff;
    color: white;
}

.message.bot .message-bubble {
    background: #f1f3f5;
    color: #333;
}

.message.bot.loading .message-bubble {
    background: #e9ecef;
    font-style: italic;
}

.products-message .message-bubble,
.categories-message .message-bubble {
    max-width: 95%;
    padding: 15px;
}
