.ai-title {
    /* font-size: 1.5rem; */
    font-size: calc(24px + 0.5vw);
}
.ai-subtitle {
    /* font-size: 0.9rem; */
    padding-bottom: 50px;
}

.from-blog .blog__item {
    cursor: pointer;
}

.from-blog__title {
    margin-bottom: 70px;
}

/*---------------------
  Blog
-----------------------*/

.blog__item {
    margin-bottom: 19px;
}

.blog__item__pic img {
    min-width: 100%;
}

.blog__item__text {
    padding-top: 25px;
}

.blog__item__text ul {
    margin-bottom: 15px;
}

.blog__item__text ul li {
    font-size: calc(13px + 0.3vw);
    color: #6f6d6d;
    list-style: none;
    display: inline-block;
    margin-right: 15px;
    padding-top: 0;
}

.blog__item__text ul li:last-child {
    margin-right: 0;
}

.blog__item__text h5 {
    margin-bottom: 12px;
    height: calc(var(--line-height) * 5em);
    line-height: var(--line-height);
    --line-height: 5.1px;
    line-height: 1.3rem;
    min-height: 42px;
    max-height: 42px;
}

.blog__item__text h5 a {
    font-size: calc(13px + 0.3vw);
    color: #1c1c1c;
    font-weight: 700;
}
.blog__item__text h3 a {
    font-size: 20px;
    color: #1c1c1c;
    font-weight: 700;
}

.blog__item__text p {
    margin-bottom: 25px;
    padding: 9px;
    overflow: hidden;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 12px;
    height: calc(var(--line-height) * 5em);
    line-height: var(--line-height);
    --line-height: 28.1px;
    line-height: -1rem;
    min-height: 95px;
    max-height: 95px;
}

.blog__item__text .blog__btn {
    display: inline-block;
    font-size: 14px;
    color: #1c1c1c;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #b2b2b2;
    padding: 14px 20px 12px;
    border-radius: 25px;
}

.blog__item__text .blog__btn span {
    position: relative;
    top: 1px;
    margin-left: 5px;
}

.blog__pagination {
    padding-top: 5px;
    position: relative;
}

.blog__pagination:before {
    position: absolute;
    left: 0;
    top: -29px;
    height: 1px;
    width: 100%;
    background: #000000;
    opacity: 0.1;
    content: "";
}

.img_blog {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.img_blog {
    width: 100%;
    height: 178px;
    object-fit: cover;
    border-radius: 5px;
}
@media (max-width: 768px) {
    .img_blog {
        height: 180px; /* ارتفاع کمتر برای دستگاه‌های موبایل */
    }
}
.section-title h3 {
    font-size: calc(21px + 0.6vw);
    font-weight: bolder;
}

.section-title h2 {
    font-size: calc(18px + 0.4vw);
    font-weight: bolder;
}
.caption h3 {
    font-size: calc(16px + 0.3vw);
}

/* ابتدا مطمئن شوید که خود عناصر h2 و h3 در .section-title موقعیت نسبی دارند */
.section-title h2,
.section-title h3 {
    position: relative;
    /* می‌توانید برای ایجاد فضای بیشتر در پایین متن، از padding-bottom استفاده کنید،
       این کار به ::after اجازه می‌دهد بدون اینکه روی متن بیفتد، در پایین قرار گیرد.
       مثال: padding-bottom: 0.5em; (این مقدار را مطابق نیاز تنظیم کنید)
       اگر نمی‌خواهید padding اضافه کنید، مقدار منفی bottom در ::after باید دقیق تنظیم شود.
    */
}

/* .section-title h3:after
{
    position: absolute;
    left: 0;
    bottom: -15px;
    top: 62px;
    right: 0;
    height: 3px;
    width: 92%;
    background: #e9e9e9;
    content: "";
    margin: 0 auto;
} */
.btn-detail {
    background-color: #525252;
    color: #ffffff;
    width: 100%;
    border-radius: 10px;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
}
.cursor-pointer {
    cursor: pointer;
}
.caption {
    font-size: calc(12px + 0.2vw);
    color: #1c1c1c;
    font-weight: bold;
    background: #ffffff;
    border-radius: 4px;
    position: absolute;
    bottom: 5%;
    z-index: 10;
    right: 9%;
    left: 10%;
    padding: 3%;
    width: 100%;
    text-align: center;
    width: 79%;
}

.image-category {
    position: relative;
    overflow: hidden;
    padding-bottom: 100%;
    box-shadow: 1px 1px 1px #d9d9d9;
    border-radius: 6px;
}
.image-category img {
    position: absolute;
    max-width: 100%;
    max-height: 100%;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%);
}

.card {
    font-family: "IranYekan", Helvetica, sans-serif;
    margin: 1em;
    text-align: center;
    margin-inline: auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgb(122 122 122 / 25%);
    padding: 0;
}
.card img {
    max-width: 100%;
    /* clip-path: polygon(0 0, 0 100%, 100% 85%, 100% 0%); */
}
.description {
    padding: 0 1em 1em 1em;
}
button {
    font-size: 1em;
    padding: 0.5em 1em;
    color: #fff;
    background-color: #818181;
    border: none;
}

.card:nth-child(odd) {
    background-color: #f5f5f5;
    color: #fff;
}

.mix > .card:nth-child(even) button {
    font-size: 1em;
    padding: 0.5em 1em;
    color: #ffffff;
    background-color: #fff;
    border: 1px solid #818181;
    border-radius: 17px;
    background: #606060;
}

.mix > .card:nth-child(odd) button {
    font-size: 1em;
    padding: 0.5em 1em;
    color: #000000;
    background-color: #fff;
    border: 1px solid #818181;
    border-radius: 17px;
    background: #ffffff;
}

.card:nth-child(odd) > div > p {
    color: #6e6e6e;
    font-size: calc(13px + 0.2vw);
}
.description > h2 {
    font-size: calc(17px + 0.1vw);
    font-weight: bold;
    color: #2d2d2d;
}
.more {
    font-family: "IranYekan";
}

/* pagination */

.page-item:last-child .page-link {
    border-top-left-radius: var(--bs-pagination-border-radius);
    border-bottom-left-radius: var(--bs-pagination-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.page-item:first-child .page-link {
    border-top-right-radius: var(--bs-pagination-border-radius);
    border-bottom-right-radius: var(--bs-pagination-border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

-- [dir="ltr"] .pagination .page-link[aria-label="Previous"] svg {
    transform: rotate(180deg);
}

-- .pagination .page-item.active .page-link {
    background-color: #5f9394;
    border-color: #5f9394;
    color: #fff;
}

.pagination .page-link {
    font-weight: bold;
    color: #292424;
}

.pagination .page-link:hover {
    background-color: #4c7f80;
    border-color: #4c7f80;
    color: #fff;
}

.pagination {
    background-color: #eef4f5;
    padding: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: center;
}

@media (max-width: 1000px) {
    .pagination {
        padding-bottom: 25px;
    }
}

.mic-visual-wrapper {
    position: relative;
    width: 50px;
    height: 50px;
    margin: 60px auto 20px;
}
.mic-pulse-ring {
    position: absolute;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(220, 53, 69, 0.4);
    z-index: 1;
    transform: scale(1);
}
.mic-visual {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #dc3545;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    position: absolute;
    top: 7px;
    left: 7px;
    z-index: 2;
}
.mic-visual i {
    font-size: 20px;
    color: white;
}
.mic-text {
    font-size: 16px;
    color: #444;
    margin-top: 12px;
    text-align: center;
}
#chat-history {
    margin-top: 20px;
    margin-bottom: 15px;
    padding: 10px;

    border-radius: 5px;

    text-align: right;
    direction: rtl;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 1000px;
}
.message {
    padding: 8px;
    margin-bottom: 8px;
    border-radius: 5px;
    clear: both;
}
.user-message {
    background-color: #e2f7ff;
    float: left;
    text-align: left;
}
.ai-message {
    background-color: #f3f3f3;
    float: right;
    text-align: right;
}

/* طراحی اصلی */
.ai-assistant-bar {
    width: 100%;
    max-width: 600px;
    margin: 20px auto;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.ai-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.ai-title {
    font-weight: 700;
    font-size: 18px;
    color: #2c3e50;
}

.ai-subtitle {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 4px;
}

/* حالت ورود متن */
.input-wrapper {
    display: flex;
    position: relative;
}

.ai-text-input {
    flex: 1;
    padding: 12px 50px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 14px;
    margin-right: 4rem;
    outline: none;
    transition: all 0.3s;
    background: #fff;
}

.ai-text-input:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.send-btn,
.mic-btn,
.stop-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s;
}

.send-btn {
    right: 40px;
    color: #3498db;
}

.mic-btn {
    right: 10px;
    color: #7f8c8d;
}

.mic-btn:hover,
.send-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

/* حالت ضبط صدا */
.voice-wrapper {
    display: flex;
    align-items: center;
    height: 50px;
}

.voice-visualizer {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 30px;
    padding: 0 15px;
}

.voice-bar {
    width: 4px;
    height: 10px;
    background: #3498db;
    border-radius: 2px;
    animation: voicePulse 1.2s infinite ease-in-out;
    transform-origin: bottom;
}

.voice-bar:nth-child(1) {
    animation-delay: 0.1s;
}
.voice-bar:nth-child(2) {
    animation-delay: 0.2s;
}
.voice-bar:nth-child(3) {
    animation-delay: 0.3s;
}
.voice-bar:nth-child(4) {
    animation-delay: 0.4s;
}
.voice-bar:nth-child(5) {
    animation-delay: 0.3s;
}
.voice-bar:nth-child(6) {
    animation-delay: 0.2s;
}
.voice-bar:nth-child(7) {
    animation-delay: 0.1s;
}
.voice-bar:nth-child(8) {
    animation-delay: 0s;
}

.stop-btn {
    right: 10px;
    color: #e74c3c;
    font-size: 16px;
}

/* انیمیشن‌ها */
@keyframes voicePulse {
    0%,
    100% {
        transform: scaleY(0.5);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1.8);
        opacity: 1;
    }
}

/* استایل‌های بخش چت */
#chat-history {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.message {
    padding: 10px 15px;
    margin-bottom: 10px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.message-user {
    background: #e3f2fd;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.message-bot {
    background: #f1f1f1;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.message-error {
    background: #ffebee;
    color: #c62828;
    text-align: center;
    margin: 0 auto;
    width: 90%;
}

/* استایل‌های محصولات در چت */
#chat-history .row {
    margin: 0 -5px;
}

#chat-history .card {
    border: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

#chat-history .card:hover {
    transform: translateY(-5px);
}

#chat-history .product-price {
    margin: 10px 0;
}

#chat-history .old-price {
    text-decoration: line-through;
    color: #999;
    font-size: 0.9em;
    display: block;
}

#chat-history .new-price {
    color: #e53935;
    font-weight: bold;
    font-size: 1.1em;
}

#chat-history .price {
    font-weight: bold;
    color: #2e7d32;
}
.ai-assistant-bar {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 15px;
    margin: 20px auto;
    max-width: 900px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    direction: rtl;
    font-family: "Vazir", sans-serif;
}

/* هدر */
.ai-header {
    text-align: center;
    margin-bottom: 15px;
}

.ai-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    display: block;
}

.ai-subtitle {
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* تاریخچه چت */
.ai-chat-history {
    overflow-y: auto;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

.message {
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 8px;
    max-width: 80%;
}

.message-user {
    background: #3498db;
    color: #fff;
    margin-left: auto;
    text-align: right;
}

.message-bot {
    background: #ecf0f1;
    color: #2c3e50;
    margin-right: auto;
    text-align: right;
}

.message-error {
    background: #e74c3c;
    color: #fff;
    margin-right: auto;
}

/* کانتینر ورودی */
.ai-input-container {
    display: flex;
    justify-content: center;
}

.input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 25px;
    padding: 5px 10px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ai-text-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px;
    font-size: 1rem;
    direction: rtl;
    background: transparent;
}

.send-btn,
.mic-btn {
    background: transparent;
    border: none;
    color: #3498db;
    font-size: 1.2rem;
    padding: 8px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.send-btn:hover,
.mic-btn:hover {
    color: #2980b9;
}

/* حالت ضبط صدا */
.voice-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 25px;
    padding: 10px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-visualizer {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.voice-bar {
    width: 4px;
    height: 20px;
    background: #3498db;
    border-radius: 2px;
    animation: voiceWave 0.8s ease-in-out infinite alternate;
}

.voice-bar:nth-child(2) {
    animation-delay: 0.1s;
}
.voice-bar:nth-child(3) {
    animation-delay: 0.2s;
}
.voice-bar:nth-child(4) {
    animation-delay: 0.3s;
}
.voice-bar:nth-child(5) {
    animation-delay: 0.4s;
}
.voice-bar:nth-child(6) {
    animation-delay: 0.5s;
}
.voice-bar:nth-child(7) {
    animation-delay: 0.6s;
}
.voice-bar:nth-child(8) {
    animation-delay: 0.7s;
}

@keyframes voiceWave {
    0% {
        height: 10px;
    }
    100% {
        height: 30px;
    }
}

.stop-btn {
    background: #e74c3c;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.stop-btn:hover {
    background: #c0392b;
}

/* استایل کارت محصولات */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* .card-img-top {
    object-fit: cover;
    height: 100%;
} */

.card-body {
    padding: 15px;
    text-align: center;
}

.card-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px;
}

.product-price {
    margin: 10px 0;
}

.product-price .text-muted {
    font-size: 0.9rem;
}

.product-price .fw-bold {
    font-size: 1.1rem;
}

.btn-outline-primary {
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.9rem;
    transition: background 0.3s ease, color 0.3s ease;
}

.btn-outline-primary:hover {
    background: #3498db;
    color: #fff;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .ai-assistant-bar {
        padding: 10px;
    }

    .ai-title {
        font-size: 1.2rem;
    }

    .ai-subtitle {
        font-size: 0.8rem;
    }

    .input-wrapper,
    .voice-wrapper {
        max-width: 100%;
    }

    .card {
        margin-bottom: 15px;
    }
}
.price-product {
    font-size: 1.25rem; /* اندازه فونت بزرگ‌تر، قابل تنظیم */
    font-weight: bold; /* اختیاری: برای برجسته‌تر شدن */
    color: #000; /* اختیاری: رنگ دلخواه */
}

/* === START: General & Card Styles === */
.tailwind-inspired-card {
    background-color: #fff;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tailwind-inspired-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.tailwind-inspired-card__image-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 256px;
    background-color: #f3f4f6;
}

.tailwind-inspired-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease-in-out;
}

.tailwind-inspired-card:hover .tailwind-inspired-card__image {
    transform: scale(1.1);
}

.tailwind-inspired-card__image-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.tailwind-inspired-card:hover .tailwind-inspired-card__image-overlay {
    opacity: 1;
}

.tailwind-inspired-card__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.tailwind-inspired-card__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    transition: color 0.3s ease-in-out;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.5em;
}

.tailwind-inspired-card:hover .tailwind-inspired-card__title {
    color: #4b5563;
}

.tailwind-inspired-card__description {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.625;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

.tailwind-inspired-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.tailwind-inspired-card__price-section .current-price {
    font-size: calc(18px + 0.2vw);
    font-weight: 700;
    color: #1f2937;
    direction: rtl;
}

.tailwind-inspired-card__action-button {
    background-color: #ad8431;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 9999px;
    text-decoration: none;
    transition: background-color 0.3s ease-in-out, transform 0.3s ease-in-out;
    font-weight: 500;
}

.tailwind-inspired-card__action-button:hover {
    background-color: #374151;
    transform: scale(1.05);
    color: white;
}

.section_all_category {
    padding-top: 40px;
    padding-bottom: 40px;
}

.category-item-wrapper {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.category-item-wrapper > a {
    text-decoration: none;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    transition: transform 0.3s ease;
}

.category-item-wrapper > a:hover {
    transform: translateY(-5px);
}

.category-item-wrapper .image-circle-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background-color: #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.category-item-wrapper > a:hover .image-circle-wrapper {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: scale(1.05);
}

.category-item-wrapper .image-circle-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-item-wrapper .category-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    transition: color 0.3s ease;
    margin-top: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 130px;
}

.category-item-wrapper > a:hover .category-title {
    color: #007bff;
}
/* === END: General & Card Styles === */

/* === START: AI Assistant UI/UX Styles (FINAL & RESPONSIVE) === */
/* --- AI Search Box Container --- */
.ai-search-container {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
@media (max-width: 576px) {
    .ai-search-container {
        padding: 0.5rem;
    }
}
.ai-search-title {
    font-size: clamp(1.5rem, 1.2rem + 2vw, 2.2rem);

    color: #255b5c;
}
.ai-search-subtitle {
    font-size: clamp(0.9rem, 0.8rem + 0.5vw, 1.1rem);
    color: #555;
    margin-bottom: 1.5rem;
}
/* --- AI Search Form --- */
.ai-search-form {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 6px;
    background-color: #dddddd3b;
    border-radius: 50px;
    padding: 5px;
    border: 1px solid #878787;
    transition: box-shadow 0.3s ease;
}
.ai-search-form:focus-within {
    box-shadow: 0 0 0 3px rgba(37, 91, 92, 0.2);
    border-color: #255b5c;
}
#ai-prompt-input {
    flex-grow: 1;
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: calc(12px + 0.2vw);
    padding: 0 0px 0 5px;
    color: #333;
    text-align: right;
}
.icon-btn {
    border: none;
    background-color: #55555524;
    color: #555;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}
.icon-btn:hover {
    background-color: #e0e0e0;
    color: #255b5c;
}
.submit-btn {
    border: none;
    background-color: #db8e00d4;
    color: white;
    padding: 0 15px;
    height: 48px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.submit-btn:hover {
    background-color: #1e494a;
}
.submit-btn i {
    font-size: 1.2rem;
}
/* --- Speech Status Indicator --- */
.speech-status-indicator {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    color: #255b5c;
    font-weight: 500;
}
.listening-animation {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #255b5c;
    animation: listening-pulse 1.5s infinite ease-in-out;
}
@keyframes listening-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* --- AI Modal Layout (Scroll Fix) --- */
#aiResponseModal .modal-content {
    display: flex;
    flex-direction: column;
    height: 100vh; /* ارتفاع کامل صفحه */
    border-radius: 0;
    border: none;
}
#aiResponseModal .modal-header {
    background-color: #fff;
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}
#aiResponseModal .modal-header .modal-logo {
    height: 24px;
    margin-left: 10px;
}
#aiResponseModal .modal-body {
    flex-grow: 1;
    padding: 1rem;
    background-color: #f0f2f5;
    overflow-y: hidden;
    display: flex;
    flex-direction: column;
}
#aiResponseModal .ai-chat-history {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 10px; /* برای زیبایی اسکرول بار */
}
#aiResponseModal .modal-footer {
    flex-shrink: 0;
    background-color: #fff;
    border-top: 1px solid #e9ecef;
    padding: 1rem;
    box-shadow: 0 -5px 15px -5px rgba(0, 0, 0, 0.05);
}
/* --- Chat Input Form in Modal --- */
.ai-chat-input-form {
    width: 100%;
    display: flex;
    flex-direction: row-reverse; /* برای چیدمان RTL */
    align-items: center;
    gap: 10px;
    background-color: #f0f2f5;
    border-radius: 50px;
    padding: 8px;
    border: 1px solid #ddd;
}
#ai-chat-input {
    flex-grow: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 1rem;
    padding: 0 15px;
    color: #333;
    text-align: right;
}
#ai-chat-input::placeholder {
    color: #999;
}

/* --- Chat Message Bubbles --- */
.user-message-wrapper,
.ai-message-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 85%;
}
.user-message-wrapper {
    margin-left: auto;
    flex-direction: row-reverse;
}
.ai-message-wrapper {
    margin-right: auto;
}
.message-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-top: 5px;
}
.user-message-wrapper .message-icon {
    background-color: #e0e0e0;
    color: #555;
}
.ai-message-wrapper .message-icon {
    background-color: #d4edda;
    color: #155724;
}
.message-content {
    padding: 12px 18px;
    border-radius: 1.2rem;
}
.user-message {
    background-color: #255b5c;
    color: white;
    border-top-right-radius: 0;
}
.ai-message {
    background-color: #fff;
    color: #333;
    border-top-left-radius: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.ai-message p:last-child {
    margin-bottom: 0;
}
.error-icon {
    background-color: #f8d7da;
    color: #721c24;
}
.error-message {
    background-color: #fff;
    border: 1px solid #f5c6cb;
}

/* --- Typing Indicator & Recommended Products --- */
.loading-indicator-wrapper {
    /* Same as .ai-message-wrapper */
}
.typing-indicator {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background-color: #fff;
    border-radius: 1.2rem;
    border-top-left-radius: 0;
}
.typing-indicator span {
    height: 8px;
    width: 8px;
    background-color: #999;
    border-radius: 50%;
    display: inline-block;
    margin: 0 2px;
    animation: bounce 1.4s infinite ease-in-out both;
}
.typing-indicator span:nth-of-type(2) {
    animation-delay: -0.8s;
}
.typing-indicator span:nth-of-type(3) {
    animation-delay: -0.4s;
}
@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}
.ai-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.ai-product-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #eee;
}
.ai-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}
.ai-product-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.ai-product-card-info {
    padding: 10px;
}
.ai-product-card-info h5 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ai-product-card-info p {
    font-size: 0.85rem;
    color: #255b5c;
    font-weight: 500;
    margin: 0;
}
/* === END: Fullscreen AI Chat Modal Styles === */

.product-card {
    background-color: #fff;
    border-radius: 16px; /* گوشه های گردتر */
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid transparent; /* برای هاور */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1); /* انیمیشن نرم تر */
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(37, 91, 92, 0.15);
    border-color: #f0f0f0;
}

.product-card a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card__image-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
}

.product-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.product-card:hover .product-card__image {
    transform: scale(1.15);
}

/* لایه گرادیانت ملایم روی تصویر برای خوانایی بهتر متن (اگر در آینده متنی روی عکس بیاید) */
.product-card__image-container::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.6s ease;
}

.product-card:hover .product-card__image-container::after {
    opacity: 1;
}

.product-card__content {
    font-size: calc(15px + 0.2vw);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: center; /* متن ها وسط چین می شوند */
    padding: 12px;
}

.product-card__title {
    font-size: calc(14px + 0.2vw);
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    line-height: 1.5;
    height: 3em; /* 2 * 1.5em, فضا برای دو خط */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-bottom: 59px;
}

/* خط جداکننده زیبا در زیر عنوان */
.product-card__title::after {
    content: "";
    display: block;
    width: 50px;
    height: 2px;
    background-color: #cdac67; /* رنگ طلایی */
    margin: 0.75rem auto 1rem; /* فاصله بالا و پایین */
    transition: width 0.4s ease;
}

.product-card:hover .product-card__title::after {
    width: 80px; /* خط در حالت هاور کشیده تر می شود */
}

.product-card__footer {
    display: flex;
    flex-direction: column; /* قیمت و CTA زیر هم قرار می گیرند */
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.product-card__price {
    font-size: calc(12px + 0.2vw);
    font-weight: 500;
    color: #555;
    margin-bottom: 0.75rem; /* فاصله بین قیمت و دکمه */
}

.product-card__price small {
    font-size: 0.8rem;
    font-weight: 400;
}

.product-card__cta {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background-color: #255b5c; /* سبز اصلی */
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.product-card:hover .product-card__cta {
    background-color: #cdac67; /* طلایی در حالت هاور */
    box-shadow: 0 4px 15px rgba(205, 172, 103, 0.4);
    transform: scale(1.05);
}

/* برای فاصله بهتر در موبایل */
.g-3 {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}
@media (min-width: 992px) {
    .g-lg-4 {
        --bs-gutter-x: 1.5rem;
        --bs-gutter-y: 1.5rem;
    }
}

/* Banner video container */
.banner-video-wrapper {
    width: 100%;
    height: clamp(200px, 40vw, 500px);
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    /* iOS Safari sometimes doesn't clip <video> with border-radius unless masked */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
}

.banner-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    border-radius: inherit;
    max-width: none; /* avoid subtle shrink/overflow rounding on some devices */
}

/* Caption under the banner */
.banner-caption {
    text-align: center;
    margin-top: 20px;
}

.banner-caption h1 {
    margin: 0;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-size: clamp(24px, 4.2vw, 33px);
    background: linear-gradient(135deg, #111827 0%, #2b2b2b 60%, #db8e00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: fadeUp 0.6s ease-out both;
}

.banner-caption h1::after {
    content: "";
    display: block;
    width: 170px;
    height: 3px;
    margin: 18px auto 0;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        #db8e00d4 0%,
        rgba(219, 142, 0, 0.25) 100%
    );
    box-shadow: 0 2px 8px rgba(219, 142, 0, 0.35);
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.banner-caption span {
    display: inline-block;
    margin-top: 6px;
    font-weight: 700;
    padding: 4px 10px;
    color: #255b5c;
    font-size: clamp(24px, 4.2vw, 33px);
}

/* No fixed mobile height; clamp above adapts across devices */
