/* ========== Reset و پایه ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    direction: rtl;
}

body {
    font-family: 'YekanBakhFaNum', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f6f7f8;
    color: #1f2937;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== فونت‌ها ========== */
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-Black.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'YekanBakhFaNum';
    src: url('./font/YekanBakhFaNum-ExtraBlack.woff2') format('woff2');
    font-weight: 950;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    src: url('./font/material-symbols-v39-latin-regular.woff2') format('woff2');
    font-display: block;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'liga';
}

/* ========== چیدمان اصلی ========== */
.page-main {
    padding-bottom: 4rem;
}
.page-main > * + * {
    margin-top: 3rem;
}

.container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    padding-top: 1.5rem;
}
@media (min-width: 640px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .container { padding-left: 0; padding-right: 0; }
}

/* ========== هیرو جدید فول‌ویدث (بنر بالای صفحه) ========== */
.hero-banner {
    width: 100%;
    margin: 0;
}
.hero-banner-image {
    width: 100%;
    height: auto;
}
.hero-banner-image--mobile {
    display: block;
}
.hero-banner-image--desktop {
    display: none;
}
@media (min-width: 768px) {
    .hero-banner-image--desktop {
        display: block;
    }
    .hero-banner-image--mobile {
        display: none;
    }
}

/* ========== هیرو قدیمی (در صورت نیاز) ========== */
.hero {
    position: relative;
    background: linear-gradient(to left, #2563eb, #1d4ed8);
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    color: #fff;
    display: flex;
    align-items: center;
    min-height: 280px;
}
@media (min-width: 768px) {
    .hero { min-height: 450px; flex-direction: row-reverse; }
}

.hero-image-wrap {
    display: none;
    width: 50%;
    height: 100%;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) {
    .hero-image-wrap { display: flex; }
}
.hero-image-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 25px 25px rgba(0,0,0,0.15));
}

.hero-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}
@media (min-width: 768px) {
    .hero-content { width: 50%; padding: 4rem; }
}

.hero-badge {
    background: rgba(37, 99, 235, 0.5);
    backdrop-filter: blur(4px);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    border: 1px solid #60a5fa;
}

.hero-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1rem;
}
@media (min-width: 768px) {
    .hero-title { font-size: 3rem; }
}
@media (min-width: 1024px) {
    .hero-title { font-size: 3.75rem; }
}

.hero-desc {
    color: #dbeafe;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 28rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* ========== دکمه‌ها ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
    border: none;
}
.btn-primary {
    background: #fff;
    color: #1e3a8a;
}
.btn-primary:hover {
    background: #f3f4f6;
}
.btn-outline {
    background: transparent;
    color: #fff;
    border: 1px solid #60a5fa;
}
.btn-outline:hover {
    background: #1e40af;
}
.btn-blue {
    background: #1e3a8a;
    color: #fff;
    width: 100%;
    justify-content: center;
    padding: 0.625rem 1rem;
}
.btn-blue:hover {
    background: #1e40af;
}
.btn-accent {
    background: #E8325F;
    color: #fff;
    padding: 0.875rem 2rem;
    box-shadow: 0 10px 15px -3px rgba(232, 50, 95, 0.3);
}
.btn-accent:hover {
    background: #d0204b;
}
.btn-icon {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}
.btn-icon:hover {
    background: #f9fafb;
}

.icon-sm { font-size: 16px; }
.icon-md { font-size: 18px; }

/* ========== سکشن‌های محتوا ========== */
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: nowrap;
    gap: 0.5rem;
}
.section-head--end { align-items: center; }

.section-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 1;
    min-width: 0;
}

.section-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2563eb;
    display: flex;
    align-items: center;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}
.section-link:hover { color: #1e40af; }
.section-link .material-symbols-outlined {
    margin-right: 0.25rem;
    transform: scaleX(-1);
}

/* ========== دسته‌بندی‌ها (کارت‌های تصویری) ========== */
.categories-scroll {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    user-select: none;
    touch-action: pan-x pan-y;
    -webkit-user-select: none;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    position: relative;
    z-index: 1;
}
.categories-scroll::-webkit-scrollbar { display: none; }
.categories-scroll img {
    -webkit-user-drag: none;
}

@media (max-width: 767px) {
    .container .categories-wrapper {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
    .categories-scroll {
        margin: 0;
        width: 100%;
    }
    .categories-grid {
        gap: 0.75rem;
        padding: 0;
        width: max-content;
        min-width: 100%;
    }
    .category-item {
        width: calc((100vw - 2rem - 2.25rem) / 4);
        flex-shrink: 0;
    }
}
@media (min-width: 768px) {
    .categories-scroll {
        margin: 0;
    }
    .categories-grid {
        display: flex;
        gap: 1.5rem;
        padding: 0;
        width: 100%;
    }
    .category-item { width: calc((100% - 7.5rem) / 6); }
}
@media (min-width: 1024px) {
    /* دسکتاپ: ۶ کارت دسته‌بندی در یک ردیف (۶ آیتم + ۵ فاصله ۱.۵rem) */
    .categories-grid {
        gap: 1.5rem;
    }
    .category-item {
        width: calc((100% - 7.5rem) / 6);
    }
}

.categories-grid {
    display: flex;
    gap: 1rem;
    padding: 0;
}

.category-item {
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-image-wrap {
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    margin-bottom: 0.75rem;
    transition: box-shadow 0.3s ease;
}
.category-item:hover .category-image-wrap {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.category-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-name {
    text-align: center;
    font-weight: 600;
    color: #1f2937;
}

/* کاروسل دسته‌بندی با فلش چپ و راست - بدون افست از بغل */
.categories-wrapper {
    position: relative;
    margin-left: -1rem;
    margin-right: -1rem;
    width: calc(100% + 2rem);
}
@media (min-width: 640px) {
    .categories-wrapper {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
        width: calc(100% + 3rem);
    }
}
@media (min-width: 1024px) {
    /* وقتی container پدینگ بغل ندارد، از کادر بیرون نزند */
    .container .categories-wrapper {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }
}
.carousel-side-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
}
.categories-wrapper .carousel-prev {
    right: 100%;
    margin-right: 0.5rem;
}
.categories-wrapper .carousel-next {
    left: 100%;
    margin-left: 0.5rem;
}
#categoryNext {
    top: 93px;
}
#categoryPrev {
    top: 95px;
}

@media (max-width: 767px) {
    .categories-wrapper .carousel-prev {
        left: 0.5rem;
        right: auto;
        margin-right: 0;
        margin-left: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 10;
        pointer-events: auto;
    }
    .categories-wrapper .carousel-next {
        right: 0.5rem;
        left: auto;
        margin-left: 0;
        margin-right: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        z-index: 10;
        pointer-events: auto;
    }
    .categories-wrapper .carousel-nav-btn {
        width: 1.75rem;
        height: 1.75rem;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    .categories-wrapper .carousel-nav-btn .material-symbols-outlined {
        font-size: 18px;
    }
    #categoryNext,
    #categoryPrev {
        top: 50px;
        transform: none;
    }
}

/* ========== کارت‌های ویژگی (ارسال، گارانتی و...) ========== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 1024px) {
    .features-grid { grid-template-columns: repeat(4, 1fr); }
}

/* وقتی features-grid بیرون از container قرار می‌گیرد */
.page-main > .features-grid {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
}
@media (min-width: 640px) {
    .page-main > .features-grid { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .page-main > .features-grid { padding-left: 0; padding-right: 0; }
}

.feature-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    transition: box-shadow 0.15s;
}
.feature-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

.feature-icon {
    width: 3rem;
    height: 3rem;
    background: #eff6ff;
    color: #2563eb;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.feature-title {
    font-weight: 700;
    color: #111827;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.feature-desc {
    font-size: 0.75rem;
    color: #6b7280;
}

/* ========== کاروسل محصولات ========== */
.carousel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.carousel-nav {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.75rem;
}
.carousel-nav-btn {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 9999px;
    background: #fff;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    cursor: pointer;
    transition: background 0.15s;
    color: #13369D;
}
.carousel-nav-btn .material-symbols-outlined {
    color: #13369D;
}
.carousel-nav-btn:hover {
    background: #13369D;
    color: #fff;
    border-color: #13369D;
}
.carousel-nav-btn:hover .material-symbols-outlined {
    color: #fff;
}

.carousel-track-wrap {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 0 -1rem;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-x pan-y;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 1rem;
    scroll-behavior: smooth;
}
.carousel-track-wrap::-webkit-scrollbar { display: none; }
.carousel-track-wrap img {
    -webkit-user-drag: none;
}

.featured-carousel {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    padding: 0 1rem;
}
@media (min-width: 1024px) {
    .featured-carousel {
        gap: 1.5rem;
        justify-content: flex-start;
    }
}
@media (min-width: 768px) {
    .carousel-track-wrap { margin: 0; }
    .featured-carousel { padding: 0; }
    .carousel-track-wrap { scroll-padding-inline: 0; }
}

/* کارت محصول – دسکتاپ ۵ کارت، موبایل ۱ کارت، اسلاید یکی‌یکی با اسنپ کامل */
.product-card {
    flex-shrink: 0;
    scroll-snap-align: start;
    background: #ffffff;
    border-radius: 0.75rem;
    padding: 0.75rem;
    border: 1px solid transparent;
    box-shadow: none;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s, border-color 0.3s;
    position: relative;
    display: flex;
    user-select: none;
    flex-direction: column;
}
.product-card:hover {
    border-color: #13369D;
}
/* موبایل: ۱ کارت کامل در هر اسلاید */
@media (max-width: 767px) {
    .product-card {
        width: 100%;
        min-width: 100%;
    }
}
/* تبلت: ۲ کارت */
@media (min-width: 768px) and (max-width: 1023px) {
    .product-card {
        width: calc((100% - 1rem) / 2);
    }
}
/* دسکتاپ: ۵ کارت */
@media (min-width: 1024px) {
    .product-card {
        width: calc((100% - 6rem) / 5);
    }
}
@media (min-width: 768px) {
    .product-card {
        min-height: 22rem;
    }
}

.product-image-wrap {
    position: relative;
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.product-badge.discount,
.product-badge.limited,
.product-badge.out-of-stock {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: #E8325F;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.product-wishlist {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    padding: 0;
    border-radius: 9999px;
}
.product-wishlist:hover { color: #ef4444; }

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
}
.product-rating > span { font-size: 0.75rem; }
.product-rating > span:first-child { color: #facc15; }
.product-rating > span:nth-child(2) { font-weight: 600; color: #374151; }
.product-rating > span:nth-child(3) { color: #9ca3af; }
.product-rating .star { color: #facc15; font-size: 0.75rem; }
.product-rating .score { font-size: 0.75rem; font-weight: 600; color: #374151; }
.product-rating .count { font-size: 0.75rem; color: #9ca3af; }

.product-title {
    font-weight: 700;
    font-size: 0.875rem;
    color: #000;
    line-height: 2em;
    margin-bottom: 0.5rem;
    min-height: 2.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-title a {
    color: #000;
    text-decoration: none;
}

/* مخفی کردن ویژگی‌ها فقط در کاروسل محصولات ویژه (تخفیف‌خورده‌ها) صفحه اصلی */
section[data-carousel="featured"] .product-specs {
    display: none;
}

@media (min-width: 640px) {
    .product-title {
        margin-bottom: 0.75rem;
    }
}

.product-desc {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.product-price-wrap {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.product-price {
    font-size: 1.125rem;
    font-weight: 700;
    color: #000;
}
.product-price-old {
    font-size: 0.875rem;
    color: #9ca3af;
    text-decoration: line-through;
    margin-bottom: 0.25rem;
}
.product-card .btn { width: 100%; justify-content: center; }

/* ====== ساختار کارت محصولات شبیه ui archive ====== */
.product-badge.discount,
.product-badge.limited,
.product-badge.out-of-stock {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    font-size: 10px;
    font-weight: 600;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    line-height: 1.2;
    background: #E8325F;
    color: #fff;
}

.product-badge-mobile {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.375rem;
}

.product-badge-mobile .product-badge {
    position: static;
    white-space: nowrap;
}

/* دسکتاپ: بج روی عکس، سمت راست بالا */
@media (min-width: 640px) {
    .product-badge-mobile {
        position: absolute;
        top: 0.75rem;
        right: 0.75rem;
        margin-top: 0;
        z-index: 10;
    }

    .product-badge-mobile .product-badge {
        position: static;
    }
}

.product-content {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
    height: 100%;
}
@media (min-width: 640px) {
    .product-content {
        flex-direction: column;
    }
}

.product-image-wrapper {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: relative;
}

.product-image-container {
    aspect-ratio: 1;
    width: 6rem;
    height: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    position: relative;
}
@media (min-width: 640px) {
    .product-image-container {
        width: 100%;
        height: auto;
        margin-bottom: 0.75rem;
    }
}

.product-image {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    border-radius: 0.75rem;
}

.product-info {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: #4b5563;
    margin-bottom: 0;
}
@media (min-width: 640px) {
    .product-specs {
        margin-bottom: 0.75rem;
    }
}

@media (min-width: 1024px) {
    .product-specs {
        font-size: 11px;
    }
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9fafb;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border: 1px solid #f3f4f6;
}

.spec-icon {
    width: 0.875rem;
    height: 0.875rem;
    color: rgba(19, 54, 157, 0.6);
    flex-shrink: 0;
}

.spec-text {
    font-weight: 500;
}

.product-footer {
    margin-top: auto;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.75rem;
}

@media (max-width: 767px) {
    .product-footer {
        margin-top: 12px; /* فاصله بالای خط جداکننده از ویژگی‌ها */
        padding-top: 0.75rem; /* مثل دسکتاپ، فقط بالای خط فاصله داریم */
    }
}

.product-price-wrapper {
    display: flex;
    flex-direction: column;
}

.product-price-old {
    font-size: 0.75rem;
    color: #9ca3af;
    text-decoration: line-through;
    text-decoration-color: #f87171;
}

/* آیکون تومان در کارت محصول – موبایل: کوچکتر */
@media (max-width: 767px) {
    .product-price-wrapper .toman-icon svg {
        width: 14px !important;
        height: 14px !important;
    }
}

/* آیکون تومان در کارت محصول – دسکتاپ: کوچکتر */
@media (min-width: 640px) {
    .product-price-wrapper .toman-icon svg {
        width: 14px !important;
        height: 14px !important;
    }
}

.product-cart-button {
    background: #13369D;
    color: white;
    border-radius: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    outline: none;
    -webkit-tap-highlight-color: transparent;
}
.product-cart-button:hover {
    background: #0D256D;
}

.product-cart-button.is-loading {
    opacity: 0.9;
    cursor: wait;
    pointer-events: none;
}

.product-cart-button.added-success {
    background: #10b981;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.4);
    transform: scale(1.05);
}
.product-cart-button.added-success:hover {
    background: #059669;
}

.product-cart-button.is-error {
    background: #dc2626;
}

.product-cart-icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    color: inherit;
}

.product-cart-icon--check {
    display: none;
}
.product-cart-button.added-success .product-cart-icon--cart {
    display: none;
}
.product-cart-button.added-success .product-cart-icon--check {
    display: block;
}

.product-cart-icon--spinner {
    display: none;
}
.product-cart-button.is-loading .product-cart-icon--cart,
.product-cart-button.is-loading .product-cart-icon--check {
    display: none;
}
.product-cart-button.is-loading .product-cart-icon--spinner {
    display: block;
    animation: cart-spinner-rotate 0.8s linear infinite;
}

@keyframes cart-spinner-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========== بنرهای دوگانه (گیمینگ / گجت) ========== */
.promo-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .promo-grid { grid-template-columns: repeat(2, 1fr); }
}

.promo-banner {
    position: relative;
    border-radius: 1.5rem;
    overflow: hidden;
    padding: 2rem;
    min-height: 16rem;
    display: flex;
    align-items: center;
}
@media (min-width: 768px) {
    .promo-banner { padding: 3rem; min-height: 20rem; }
}

.promo-banner--dark {
    background: #111827;
}
.promo-banner--dark::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, #000, #111827, transparent);
    z-index: 10;
}

.promo-banner--light {
    background: #F3F4F6;
}
.promo-banner--light::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to left, #fff, #F3F4F6, transparent);
    z-index: 10;
}

.promo-banner img {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 66.666%;
    object-fit: cover;
}
.promo-banner--light img { object-fit: contain; }
.promo-banner--dark img { opacity: 0.8; }

/* بنرهای تمام‌عرض سفارشی داخل promo-grid */
.promo-grid-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 1.5rem;
}

.promo-content {
    position: relative;
    z-index: 20;
    width: 75%;
}

.promo-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: block;
}
.promo-banner--dark .promo-label { color: #ef4444; }
.promo-banner--light .promo-label { color: #6b7280; }

.promo-title {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}
.promo-banner--dark .promo-title { color: #fff; }
.promo-banner--light .promo-title { color: #111827; }

.promo-banner--dark .btn { color: #111827; background: #fff; }
.promo-banner--dark .btn:hover { background: #f3f4f6; }
.promo-banner--light .btn { background: #1e3a8a; color: #fff; }
.promo-banner--light .btn:hover { background: #1e40af; }

/* ========== بنر سه‌تایی (اسپیکر، هدفون، مینی‌پی‌سی) ========== */
.banners-three {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* موبایل: دو بنر کنار هم */
    gap: 1.5rem;
}
@media (min-width: 768px) {
    .banners-three {
        display: flex;       /* دسکتاپ: سه‌تایی کنار هم */
        gap: 1.5rem;
    }
    .banner-tile {
        flex: 1;             /* هر سه بنر هم‌عرض */
    }
}

.banner-tile {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    cursor: pointer;
}
@media (max-width: 767px) {
    .banners-three .banner-tile:last-child {
        grid-column: 1 / -1; /* در ردیف بعدی، روی هر دو ستون */
        width: calc((100% - 1.5rem) / 2); /* همان عرض یک بنر بالایی */
        justify-self: center; /* وسط گرید */
    }
}
.banner-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.banner-tile:hover img {
    transform: scale(1.05);
}

/* ========== بنر ساده پرمیوم (فقط تصویر) ========== */
.premium-banner {
    width: 100%;
    margin: 0;
}
.premium-banner::before {
    content: none;
}
.premium-banner > img {
    display: block;
    width: 100%;
    height: auto;
}
.premium-banner .premium-content {
    position: relative;
    z-index: 20;
    width: 100%;
    padding: 2rem;
}
@media (min-width: 768px) {
    .premium-banner .premium-content { width: 50%; padding: 4rem; }
}

.premium-banner-image {
    display: block;
    width: 100%;
    height: auto;
    max-width: 80rem;
    margin: 3.5rem auto 0;
    border-radius: 25px;
}
@media (max-width: 767px) {
    .premium-banner-image {
        max-width: calc(100% - 2rem); /* 1rem از هر طرف مثل container */
        border-radius: 12px;
    }
}

.premium-label-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.premium-label-line {
    width: 2rem;
    height: 2px;
    background: #E8325F;
}
.premium-label {
    color: #E8325F;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.premium-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
    .premium-title { font-size: 3rem; }
}
.premium-desc {
    color: #9ca3af;
    font-size: 1.125rem;
    margin-bottom: 2rem;
    max-width: 28rem;
    font-weight: 300;
}

/* ========== برندها – اسلایدر عکس ========== */
.brands-box {
    background: #fff;
    border-radius: 1rem;
    padding: 12px 0;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

.brands-carousel {
    opacity: 1;
}

.brands-box .carousel-track-wrap {
    /* برای حرکت پیوسته (marquee) اسنپ را خاموش کن */
    scroll-snap-type: none;
    scroll-padding-inline: 0;
    scroll-behavior: auto;
}

.brands-slider .brand-item {
    flex-shrink: 0;
    scroll-snap-align: none;
    width: calc((100% - 1rem) / 2);
    min-width: calc((100% - 1rem) / 2);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
}
@media (max-width: 767px) {
    .brands-slider .brand-item {
        width: calc((100% - 2rem) / 3);
        min-width: calc((100% - 2rem) / 3);
    }
}
@media (min-width: 768px) {
    .brands-slider .brand-item {
        width: calc((100% - 3rem) / 4);
        min-width: calc((100% - 3rem) / 4);
    }
}
@media (min-width: 1024px) {
    .brands-slider .brand-item {
        width: calc((100% - 6rem) / 7);
        min-width: calc((100% - 6rem) / 7);
    }
}
.brands-slider .brand-item img {
    height: 3.75rem;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: grayscale(0.4);
    opacity: 0.85;
    transition: filter 0.3s, opacity 0.3s;
}
.brands-slider .brand-item:hover img {
    filter: grayscale(0);
    opacity: 1;
}
@media (min-width: 768px) {
    .brands-slider .brand-item img { height: 4.25rem; }
}
@media (min-width: 1024px) {
    .brands-slider .brand-item img { height: 4.75rem; }
}

/* سازگاری با ساختار قدیمی (svg, h3) */
.brand-item {
    flex-shrink: 0;
    width: calc((100% - 1rem) / 2);
    display: flex;
    justify-content: center;
    align-items: center;
}
@media (max-width: 767px) {
    .brand-item { width: calc((100% - 1rem) / 2); }
}
@media (min-width: 1024px) {
    .brand-item { width: 23%; }
}
.brand-item img {
    height: 2rem;
    width: auto;
    object-fit: contain;
}
@media (min-width: 768px) {
    .brand-item img { height: 2.5rem; }
}
.brand-item svg {
    height: 2rem;
    width: auto;
    fill: #9ca3af;
    cursor: pointer;
    transition: fill 0.3s;
}
.brand-item:hover svg { fill: #000; }
.brand-item h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #9ca3af;
    cursor: pointer;
    transition: color 0.3s;
}
.brand-name-serif { font-family: serif; letter-spacing: 0.1em; }
.brand-name-italic { font-style: italic; letter-spacing: 0.05em; }
@media (min-width: 768px) {
    .brand-item svg { height: 2.5rem; }
    .brand-item h3 { font-size: 1.5rem; }
}
.brand-logo-circle {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid #9ca3af;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: border-color 0.3s;
}
.brand-item:hover .brand-logo-circle { border-color: #A50034; }
.brand-logo-circle span {
    color: #9ca3af;
    font-weight: 700;
    transition: color 0.3s;
}
.brand-logo-circle span:first-of-type {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    font-size: 0.75rem;
}
.brand-item:hover .brand-logo-circle span { color: #A50034; }
.brand-logo-square {
    width: 2.5rem;
    height: 2.5rem;
    background: #9ca3af;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}
.brand-item:hover .brand-logo-square { background: #FF6900; }
.brand-logo-square .text-white { color: #fff; font-weight: 700; font-size: 1.125rem; }

/* ========== سوالات متداول ========== */
.faq-list > * + * { margin-top: 1rem; }

.faq-item {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
}
.faq-item:hover { box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1); }

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.5rem;
    font-weight: 600;
    color: #111827;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }

/* دکمهٔ معلق سبد خرید گوشهٔ پایین-راست */
.floating-cart-button {
    position: fixed;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 40;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: #13369D; /* رنگ سازمانی (همان primary دکمه‌ها) */
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.25);
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.floating-cart-button:hover {
    background: #0D256D;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 15px 25px -5px rgba(0,0,0,0.3);
}
.floating-cart-button .material-symbols-outlined {
    font-size: 22px;
    color: #ffffff !important;
}
@media (max-width: 767px) {
    .floating-cart-button {
        left: 1rem;
        bottom: 1rem;
        width: 3rem;
        height: 3rem;
    }
}

.floating-cart-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1.15rem;
    height: 1.15rem;
    padding: 0 0.15rem;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.9);
}
.floating-cart-badge.is-visible {
    display: inline-flex;
}

.faq-item .material-symbols-outlined {
    color: #9ca3af;
    transition: transform 0.3s;
}
.faq-item[open] .material-symbols-outlined {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1rem 1.5rem 1.5rem;
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.625;
    border-top: 1px solid #f3f4f6;
    padding-top: 1rem;
}

/* ========== بلاگ ========== */
.blog-header {
    margin-bottom: 1.5rem;
}
.blog-header .section-title { margin-bottom: 0.5rem; }
.blog-label {
    color: #E8325F;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.blog-scroll {
    overflow-x: auto;
    -ms-overflow-style: none;
    scrollbar-width: none;
    margin: 0 -1rem;
    user-select: none;
    -webkit-user-select: none;
}
.blog-scroll::-webkit-scrollbar { display: none; }
.blog-scroll img {
    -webkit-user-drag: none;
}

.blog-grid {
    display: flex;
    gap: 1rem;
    padding: 0 1rem;
}

.blog-card {
    cursor: pointer;
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    flex-shrink: 0;
    width: calc((100% - 1rem) / 2);
}
.blog-card:hover { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1); }
@media (min-width: 1024px) {
    .blog-scroll { margin: 0; }
    .blog-card {
        width: calc((100% - 3rem) / 4); /* 4 کارت در دسکتاپ */
        max-width: none;
    }
}

@media (max-width: 767px) {
    .blog-scroll {
        scroll-snap-type: x mandatory;
        scroll-padding: 0 1rem;
    }
    .blog-grid > * {
        scroll-snap-align: start;
        scroll-snap-stop: always;
    }
}

.blog-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-tag {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(4px);
    padding: 0.25rem 0.625rem;
    border-radius: 0.5rem;
    font-size: 11px;
    font-weight: 700;
}
.blog-card-tag--blue { color: #1e3a8a; }
.blog-card-tag--green { color: #15803d; }
.blog-card-tag--purple { color: #7e22ce; }
.blog-card-tag--amber { color: #b45309; }

.blog-card-body { padding: 1.25rem; }

.blog-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card:hover .blog-card-title { color: #2563eb; }

.blog-card-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: #13369D;
    text-decoration: none;
}
.blog-card-link:hover { color: #E8325F; }
.blog-card-link .material-symbols-outlined { margin-left: 0.25rem; font-size: 14px; }

/* ========== یوتیلیتی ========== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }

img.h-8 {
    color: rgba(0, 106, 255, 1);
    opacity: 0;
}
