/* =========================================================
   متغیرهای رنگ و طراحی پایه فروشگاه
   ========================================================= */
:root {
    --csh-primary: #2563eb;
    --csh-primary-dark: #1d4ed8;
    --csh-secondary: #0f172a;
    --csh-accent: #f59e0b;
    --csh-bg: #f8fafc;
    --csh-surface: #ffffff;
    --csh-text: #1e293b;
    --csh-muted: #64748b;
    --csh-border: #e2e8f0;
    --csh-radius: 14px;
    --csh-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.06), 0 4px 10px -6px rgba(15, 23, 42, 0.04);
}

body {
    background-color: var(--csh-bg);
    color: var(--csh-text);
}

/* کانتینر اختصاصی */
.csh-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

.csh-section {
    padding: 56px 0;
}

.csh-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 16px;
}

.csh-section-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--csh-secondary);
    margin: 0 0 6px 0;
}

.csh-section-desc {
    color: var(--csh-muted);
    font-size: 0.95rem;
    margin: 0;
}

.csh-view-all {
    color: var(--csh-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.csh-view-all:hover {
    color: var(--csh-primary-dark);
}

/* دکمه‌های اختصاصی */
.csh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none !important;
    transition: all 0.25s ease;
    cursor: pointer;
}

.csh-btn-primary {
    background-color: var(--csh-primary);
    color: #ffffff !important;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.csh-btn-primary:hover {
    background-color: var(--csh-primary-dark);
    transform: translateY(-2px);
}

.csh-btn-outline {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    border: 1.5px solid rgba(255, 255, 255, 0.35);
}

.csh-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.csh-btn-white {
    background-color: #ffffff;
    color: var(--csh-secondary) !important;
}

.csh-btn-white:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

/* =========================================================
   ۱. بخش هیرو (Hero Banner)
   ========================================================= */
.csh-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 68px 0;
    position: relative;
    overflow: hidden;
}

.csh-hero-grid {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 40px;
    align-items: center;
}

.csh-hero-tag {
    display: inline-block;
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.35);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 18px;
}

.csh-hero-title {
    font-size: 2.3rem;
    font-weight: 800;
    line-height: 1.35;
    color: #ffffff;
    margin: 0 0 16px 0;
}

.csh-hero-subtitle {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #cbd5e1;
    margin: 0 0 28px 0;
    max-width: 580px;
}

.csh-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.csh-hero-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 20px;
    padding: 34px 28px;
    text-align: center;
}

.csh-hero-card-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    padding: 5px 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.csh-hero-card h3 {
    color: #ffffff;
    font-size: 1.45rem;
    margin: 0 0 10px 0;
}

.csh-hero-card p {
    color: #e2e8f0;
    font-size: 0.95rem;
    margin: 0 0 20px 0;
}

.csh-hero-card-link {
    color: #fbbf24 !important;
    font-weight: 700;
    text-decoration: none;
}

/* =========================================================
   ۲. نوار مزایای خرید
   ========================================================= */
.csh-features {
    margin-top: -28px;
    position: relative;
    z-index: 5;
}

.csh-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.csh-feature-item {
    background: var(--csh-surface);
    border: 1px solid var(--csh-border);
    border-radius: var(--csh-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--csh-shadow);
}

.csh-feature-icon {
    font-size: 1.8rem;
    background: #eff6ff;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.csh-feature-item h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--csh-secondary);
}

.csh-feature-item p {
    margin: 0;
    font-size: 0.84rem;
    color: var(--csh-muted);
}

/* =========================================================
   ۳. دسته‌بندی‌های محبوب
   ========================================================= */
.csh-cat-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 18px;
}

.csh-cat-card {
    background: var(--csh-surface);
    border: 1px solid var(--csh-border);
    border-radius: var(--csh-radius);
    padding: 18px 14px;
    text-align: center;
    text-decoration: none !important;
    transition: all 0.25s ease;
}

.csh-cat-card:hover {
    transform: translateY(-4px);
    border-color: var(--csh-primary);
    box-shadow: var(--csh-shadow);
}

.csh-cat-thumb {
    width: 84px;
    height: 84px;
    margin: 0 auto 12px auto;
    border-radius: 50%;
    overflow: hidden;
    background: #f1f5f9;
    border: 2px solid #e2e8f0;
}

.csh-cat-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.csh-cat-card h3 {
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--csh-secondary);
    margin: 0 0 4px 0;
}

.csh-cat-card span {
    font-size: 0.82rem;
    color: var(--csh-muted);
}

/* =========================================================
   ۴. کارت محصولات ووکامرس
   ========================================================= */
.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
    margin: 0 !important;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
    display: none !important;
}

.woocommerce ul.products li.product {
    width: 100% !important;
    margin: 0 !important;
    background: var(--csh-surface);
    border: 1px solid var(--csh-border);
    border-radius: var(--csh-radius);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    transition: all 0.25s ease;
}

.woocommerce ul.products li.product:hover {
    transform: translateY(-4px);
    box-shadow: var(--csh-shadow);
    border-color: #cbd5e1;
}

.woocommerce ul.products li.product img {
    border-radius: 10px;
    margin-bottom: 14px;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 1rem !important;
    font-weight: 700;
    color: var(--csh-secondary);
    line-height: 1.5;
    margin-bottom: 8px;
}

.woocommerce ul.products li.product .price {
    color: var(--csh-primary) !important;
    font-weight: 800;
    font-size: 1.05rem;
    margin-bottom: 14px;
}

.woocommerce ul.products li.product .button {
    width: 100%;
    text-align: center;
    background-color: #eff6ff !important;
    color: var(--csh-primary) !important;
    border-radius: 10px;
    font-weight: 700;
    padding: 10px 14px;
    transition: all 0.2s ease;
}

.woocommerce ul.products li.product .button:hover {
    background-color: var(--csh-primary) !important;
    color: #ffffff !important;
}

.custom-discount-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;
    z-index: 3;
}

/* =========================================================
   ۵. بنر تبلیغاتی میانی
   ========================================================= */
.csh-promo-banner {
    background: linear-gradient(120deg, #1d4ed8 0%, #0f172a 100%);
    border-radius: 20px;
    padding: 40px 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    color: #ffffff;
}

.csh-promo-badge {
    display: inline-block;
    background: #f59e0b;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.82rem;
    padding: 4px 12px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.csh-promo-text h2 {
    color: #ffffff;
    font-size: 1.65rem;
    margin: 0 0 8px 0;
}

.csh-promo-text p {
    color: #cbd5e1;
    margin: 0;
}

/* =========================================================
   ۶. بخش مقالات و مجله
   ========================================================= */
.csh-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.csh-blog-card {
    background: var(--csh-surface);
    border: 1px solid var(--csh-border);
    border-radius: var(--csh-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
}

.csh-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--csh-shadow);
}

.csh-blog-thumb img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.csh-blog-placeholder {
    height: 200px;
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
}

.csh-blog-body {
    padding: 20px;
}

.csh-blog-date {
    font-size: 0.8rem;
    color: var(--csh-muted);
}

.csh-blog-body h3 {
    font-size: 1.1rem;
    margin: 8px 0 10px 0;
}

.csh-blog-body h3 a {
    color: var(--csh-secondary);
    text-decoration: none;
}

.csh-blog-body p {
    color: var(--csh-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 14px;
}

.csh-read-more {
    color: var(--csh-primary);
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
}

/* باکس ضمانت صفحه تکی محصول */
.product-guarantee-badge {
    margin-top: 16px;
    padding: 12px 16px;
    background-color: #eff6ff;
    border-right: 4px solid var(--csh-primary);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.product-guarantee-badge strong {
    color: var(--csh-secondary);
    font-size: 0.95rem;
}

.product-guarantee-badge span {
    color: var(--csh-muted);
    font-size: 0.85rem;
}

.csh-empty-notice {
    background: #fff;
    border: 1px dashed var(--csh-border);
    padding: 20px;
    border-radius: 12px;
    color: var(--csh-muted);
    text-align: center;
}

/* =========================================================
   واکنش‌گرایی (Responsive) برای تبلت و موبایل
   ========================================================= */
@media (max-width: 1024px) {
    .csh-hero-grid {
        grid-template-columns: 1fr;
    }
    .csh-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .csh-cat-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .csh-hero {
        padding: 44px 0;
    }
    .csh-hero-title {
        font-size: 1.65rem;
    }
    .csh-features {
        margin-top: 20px;
    }
    .csh-features-grid,
    .csh-blog-grid {
        grid-template-columns: 1fr;
    }
    .csh-cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .woocommerce ul.products {
        grid-template-columns: 1fr;
    }
    .csh-promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 30px 22px;
    }
    .csh-section-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
