/* اعمال فونت ایران‌سنس ایکس */
.cps-brands-page-content,
.cps-brands-page-content *,
#cps-toast-container,
#cps-toast-container * {
    font-family: 'IRANSansX', 'IRANSansXFaNum', 'IRANSans', tahoma, sans-serif !important;
    box-sizing: border-box !important;
}

body.page-template-page-template-brands {
    background-color: #f8fafc;
}
.cps-brands-page-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px 40px;
}

body.page-template-page-template-brands .page-title { display: none !important; }
body.page-template-page-template-brands .wd-content-layout {
    padding-top: 0 !important;
    padding-block-start: 0 !important;
}

/* === دکمه بازگشت چسبنده === */
/* === دکمه بازگشت چسبنده و شیک === */
#cps-brand-back-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    margin-left: auto !important;
    margin-right: 0 !important;
    margin-bottom: 18px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50px !important;
    padding: 8px 18px 8px 14px !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05) !important;
    text-decoration: none !important;
    color: #1e293b !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    position: sticky !important;
    top: 15px !important;
    z-index: 99 !important;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
#cps-brand-back-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1) !important;
    border-color: #cbd5e1 !important;
    color: #0f172a !important;
}
#cps-brand-back-btn svg {
    width: 17px !important;
    height: 17px !important;
    margin-left: 6px !important;
    transform: rotate(180deg) !important;
    stroke: #ff1d48 !important;
    transition: transform 0.2s ease !important;
}
#cps-brand-back-btn:hover svg {
    transform: rotate(180deg) translateX(3px) !important;
}

/* === طراحی لوکس و اختصاصی هدر برند === */
#cps-selected-brand-area {
    display: none;
    margin-bottom: 25px !important;
}

.cps-brand-header-card {
    background: #ffffff !important;
    border-radius: 24px !important;
    border: 1px solid #f1f5f9 !important;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04), 0 2px 6px rgba(15, 23, 42, 0.02) !important;
    overflow: hidden !important;
    position: relative !important;
}

.cps-brand-header-banner {
    position: relative !important;
    height: 140px !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.cps-brand-banner-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.45) 100%) !important;
}

.cps-brand-header-content {
    padding: 0 24px 22px !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
}

/* کادر لوگوی هدر برند (حذف حاشیه‌های اضافه و پر شدن تمام‌عرض تصویر) */
.cps-brand-header-logo-wrapper {
    position: relative !important;
    margin-top: -45px !important;
    width: 86px !important;
    height: 86px !important;
    background: #ffffff !important;
    border-radius: 18px !important;
    border: 2px solid #ffffff !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    margin-bottom: 14px !important;
    z-index: 5 !important;
    padding: 0 !important;
}

.cps-brand-header-logo {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    border-radius: inherit !important;
}

@media (max-width: 600px) {
    .cps-brand-header-logo-wrapper {
        width: 68px !important;
        height: 68px !important;
        margin-top: -34px !important;
        border-radius: 14px !important;
        border-width: 2px !important;
        padding: 0 !important;
    }
    
    .cps-brand-header-logo {
        padding: 0 !important;
        border-radius: inherit !important;
    }
}

.cps-brand-header-logo-placeholder {
    font-size: 2.2rem !important;
    font-weight: 900 !important;
    color: #ff1d48 !important;
}

.cps-brand-header-details {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

.cps-brand-header-title-wrapper {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
}

.cps-brand-header-title {
    font-size: 1.55rem !important;
    font-weight: 900 !important;
    color: #0f172a !important;
    margin: 0 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
}

.cps-brand-header-count {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: linear-gradient(135deg, #fff1f2 0%, #ffe4e6 100%) !important;
    color: #e11d48 !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    padding: 4px 12px !important;
    border-radius: 50px !important;
    border: 1px solid #fecdd3 !important;
}

.cps-brand-header-count svg {
    stroke: #e11d48 !important;
}

.cps-brand-header-description-wrap {
    background: #f8fafc !important;
    border-right: 3px solid #e11d48 !important;
    border-radius: 4px 12px 12px 4px !important;
    padding: 10px 14px !important;
    margin-top: 4px !important;
}

.cps-brand-header-description {
    font-size: 12.5px !important;
    line-height: 1.7 !important;
    color: #475569 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}

@media (max-width: 600px) {
    .cps-brand-header-banner { height: 100px !important; }
    .cps-brand-header-content { padding: 0 14px 16px !important; }
    .cps-brand-header-logo-wrapper {
        width: 70px !important;
        height: 70px !important;
        margin-top: -35px !important;
        border-radius: 16px !important;
    }
    .cps-brand-header-title { font-size: 1.3rem !important; }
    .cps-brand-header-count { font-size: 11px !important; padding: 3px 10px !important; }
    .cps-brand-header-description { font-size: 11.5px !important; }
}

/* === گرید کارت‌های محصول === */
#cps-brand-products-area.cps-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
}
@media (max-width: 1024px) {
    #cps-brand-products-area.cps-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; }
}
@media (max-width: 768px) {
    #cps-brand-products-area.cps-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
}

/* === کارت محصول === */
.cps-custom-card {
    background: #ffffff !important;
    border: 1px solid #fecdd3 !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 0 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.2s ease-in-out !important;
}
.cps-custom-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08) !important;
    border-color: #fda4af !important;
}

.cps-card-img-wrap {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    background-color: #ffffff !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
}
.cps-card-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    display: block !important;
}

.cps-card-content {
    display: flex !important;
    flex-direction: column !important;
    padding: 10px 14px 14px 14px !important;
    flex-grow: 1 !important;
}

.cps-card-title-link {
    text-decoration: none !important;
}
.cps-card-title {
    font-size: 13.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.5 !important;
    margin: 0 0 10px 0 !important;
    text-align: center !important;
    height: 40px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

.cps-info-box {
    border: 1px dashed #fda4af !important;
    border-radius: 12px !important;
    padding: 8px 10px !important;
    margin-bottom: 10px !important;
    background-color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}
.cps-info-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 11.5px !important;
}
.cps-info-label {
    color: #334155 !important;
    font-weight: 600 !important;
}
.cps-info-val {
    color: #0f172a !important;
    font-weight: 700 !important;
    direction: ltr !important;
}

.cps-profit-row {
    align-items: center !important;
}
.cps-profit-val-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    direction: ltr !important;
}
.cps-profit-badge {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    font-size: 10.5px !important;
    font-weight: 800 !important;
    padding: 1px 6px !important;
    border-radius: 6px !important;
}
.cps-profit-amount {
    color: #16a34a !important;
    font-weight: 800 !important;
    font-size: 11.5px !important;
}

.cps-card-price-box {
    background-color: #fff1f2 !important;
    border-radius: 10px !important;
    padding: 6px 10px !important;
    text-align: center !important;
    margin-bottom: 10px !important;
}
.cps-main-price {
    color: #e11d48 !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    letter-spacing: -0.3px !important;
}

.cps-card-action-wrap {
    width: 100% !important;
    height: 32px !important;
}

.cps-btn-add-to-cart {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background-color: #700c28 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(112, 12, 40, 0.2) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}
.cps-btn-add-to-cart:hover {
    background-color: #55071d !important;
}

.cps-qty-controller-box {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background-color: #fff1f2 !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 2px 4px !important;
    border: 1px solid #ffe4e6 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

/* هایلایت زرد در حال پردازش کلیک */
.cps-qty-controller-box.is-qty-pending {
    border-color: #f59e0b !important;
    background-color: #fffbeb !important;
    box-shadow: 0 0 0 2.5px rgba(245, 158, 11, 0.35) !important;
}

/* هایلایت سبز موفقیت پس از ثبت تغییرات در سبد خرید */
.cps-qty-controller-box.is-qty-success {
    border-color: #10b981 !important;
    background-color: #ecfdf5 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.4) !important;
}
.cps-qty-ctrl-btn {
    width: 30px !important;
    height: 26px !important;
    min-height: 26px !important;
    max-height: 26px !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}
.cps-qty-ctrl-btn.plus {
    background-color: #9f1239 !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    box-shadow: 0 2px 4px rgba(159, 18, 57, 0.25) !important;
}
.cps-qty-ctrl-btn.plus:hover {
    background-color: #881337 !important;
}
.cps-qty-ctrl-btn.minus {
    background-color: #ffe4e6 !important;
    color: #9f1239 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
}
.cps-qty-ctrl-btn.minus:hover {
    background-color: #fecdd3 !important;
}
.cps-qty-value {
    font-size: 14.5px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    line-height: 1 !important;
}

/* === اسکلتون انیمیشنی چندرنگ و شاداب === */
@keyframes cpsShimmerRainbow {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.cps-skeleton-brand {
    pointer-events: none;
    user-select: none;
    background: #ffffff !important;
    border: 1px solid #fed7aa !important;
}
.cps-skeleton-brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(120deg, #fef3c7 20%, #fed7aa 40%, #fecdd3 60%, #fef3c7 80%);
    background-size: 250% 100%;
    animation: cpsShimmerRainbow 1.4s infinite linear;
}
.cps-skeleton-brand-title {
    width: 70%;
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(120deg, #f1f5f9 20%, #fed7aa 40%, #f1f5f9 80%);
    background-size: 250% 100%;
    animation: cpsShimmerRainbow 1.4s infinite linear;
}
.cps-skeleton-brand-count {
    width: 40%;
    height: 12px;
    border-radius: 10px;
    background: #f1f5f9;
}

.cps-card-skeleton {
    pointer-events: none;
    user-select: none;
}
.cps-skeleton-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background: linear-gradient(120deg, #fff1f2 20%, #fed7aa 40%, #e0e7ff 60%, #fff1f2 80%);
    background-size: 250% 100%;
    animation: cpsShimmerRainbow 1.4s infinite linear;
}
.cps-skeleton-line {
    height: 14px;
    border-radius: 6px;
    background: linear-gradient(120deg, #f1f5f9 20%, #fed7aa 40%, #f1f5f9 80%);
    background-size: 250% 100%;
    animation: cpsShimmerRainbow 1.4s infinite linear;
    margin-bottom: 8px;
}
.cps-skeleton-line.title { width: 80%; margin: 8px auto 10px; height: 16px; }
.cps-skeleton-box {
    height: 75px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    margin-bottom: 10px;
}
.cps-skeleton-line.price { height: 28px; border-radius: 10px; margin-bottom: 10px; }
.cps-skeleton-line.btn { height: 32px; border-radius: 8px; margin-bottom: 0; }

/* === آلارم شناور بهینه با ظاهر کارت مدرن === */
#cps-toast-container {
    position: fixed !important;
    top: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 999999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    pointer-events: none !important;
    width: 90% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
}

.cps-floating-toast {
    background: #0f172a !important;
    color: #ffffff !important;
    border-radius: 40px !important;
    padding: 6px 14px 6px 8px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    width: 100% !important;
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.cps-floating-toast.is-visible {
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}
.cps-floating-toast.is-fading {
    opacity: 0 !important;
    transform: translateY(-15px) scale(0.95) !important;
}
.cps-floating-toast.is-danger {
    background: #e11d48 !important;
}

.cps-toast-thumb {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    background: #ffffff !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    flex-shrink: 0 !important;
}

.cps-toast-body {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    text-align: right !important;
    line-height: 1.3 !important;
    overflow: hidden !important;
}

.cps-toast-title {
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

.cps-toast-status {
    font-size: 10.5px !important;
    color: #94a3b8 !important;
    white-space: nowrap !important;
}

.cps-toast-badge {
    background: #10b981 !important;
    color: #ffffff !important;
    padding: 3px 8px !important;
    border-radius: 20px !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
}

/* مخفی‌سازی کلاس‌های کمکی */
.hidden {
    display: none !important;
}
.cps-brands-page-content.brands-focus-mode .cps-brand-search-wrapper,
.cps-brands-page-content.brands-focus-mode .cps-brands-list-container {
    display: none !important;
}


/* ۳. عنوان کامل محصول بدون بریدگی */
.cps-card-title-link {
    text-decoration: none !important;
}
.cps-card-title {
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.5 !important;
    margin: 0 0 10px 0 !important;
    text-align: center !important;
    min-height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    word-break: break-word !important;
}

/* ۴. باکس مشخصات نقطه‌چین صورتی (تک‌خطی و ضد شکستگی) */
.cps-info-box {
    border: 1px dashed #fda4af !important;
    border-radius: 12px !important;
    padding: 6px 8px !important;
    margin-bottom: 10px !important;
    background-color: #ffffff !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}
.cps-info-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}
.cps-info-label {
    color: #475569 !important;
    font-weight: 600 !important;
    white-space: nowrap !important;
    font-size: 11px !important;
}
.cps-info-val {
    color: #0f172a !important;
    font-weight: 700 !important;
    direction: ltr !important;
    white-space: nowrap !important;
    font-size: 11px !important;
}

.cps-profit-row {
    align-items: center !important;
}
.cps-profit-val-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    direction: ltr !important;
    white-space: nowrap !important;
}
.cps-profit-badge {
    background-color: #dcfce7 !important;
    color: #15803d !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 1px 4px !important;
    border-radius: 4px !important;
    white-space: nowrap !important;
}
.cps-profit-amount {
    color: #16a34a !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    white-space: nowrap !important;
}

/* دکمه ناموجود / درخواست موجودی */
.cps-btn-out-of-stock {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background-color: #94a3b8 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    line-height: 32px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
}
.cps-btn-out-of-stock:hover {
    background-color: #64748b !important;
}

/* برای موبایل‌های باریک */
@media (max-width: 420px) {
    .cps-card-content {
        padding: 6px 8px 10px 8px !important;
    }
    .cps-info-label,
    .cps-info-val,
    .cps-profit-amount {
        font-size: 10px !important;
    }
    .cps-card-title {
        font-size: 11.5px !important;
    }
}



/* =========================================================
   استایل دکمه درخواست موجودی و مودال پاپ‌آپ
   ========================================================= */

/* دکمه اطلاع‌رسانی موجودی در کارت محصول */
.cps-btn-restock-notify {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background: #1e293b !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 0 8px !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
}
.cps-btn-restock-notify:hover:not(:disabled) {
    background: #0f172a !important;
    transform: translateY(-1px) !important;
}
.cps-btn-restock-notify.is-requested,
.cps-btn-restock-notify:disabled {
    background: #047857 !important;
    background-color: #047857 !important;
    color: #ffffff !important;
    border: none !important;
    cursor: default !important;
    transform: none !important;
    box-shadow: 0 2px 6px rgba(4, 120, 87, 0.25) !important;
    font-weight: 800 !important;
}

/* مودال پاپ‌آپ دریافت شماره */
.cps-restock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}
.cps-restock-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}
.cps-restock-modal-container {
    position: relative;
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    z-index: 10;
    animation: cpsModalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes cpsModalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.cps-restock-modal-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #f1f5f9;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.15s ease;
}
.cps-restock-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.cps-restock-modal-header {
    text-align: center;
    margin-bottom: 20px;
}
.cps-restock-modal-icon {
    font-size: 32px;
    margin-bottom: 8px;
}
.cps-restock-modal-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 6px;
}
.cps-restock-modal-subtitle {
    font-size: 12.5px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}
.cps-form-group-row {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}
.cps-form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}
.cps-form-group label {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}
.cps-form-group input {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    font-size: 13px !important;
    outline: none !important;
    transition: border-color 0.2s ease !important;
}
.cps-form-group input:focus {
    border-color: #0f172a !important;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1) !important;
}
.cps-form-error-msg {
    background: #fef2f2;
    border: 1px solid #fecdd3;
    color: #e11d48;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 14px;
    text-align: center;
}
.cps-btn-submit-restock {
    width: 100% !important;
    height: 44px !important;
    background: #0f172a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25) !important;
}
.cps-btn-submit-restock:hover {
    background: #1e293b !important;
}


/* مخفی‌سازی کامل هدر پیش‌فرض، عنوان و ناوبری دسته‌بندی‌های وودمارت در صفحات برند */
.tax-product_brand .page-title-default,
.tax-product_brand .woodmart-archive-shop,
.tax-product_brand .woodmart-show-categories,
.tax-product_brand .woodmart-product-categories,
.tax-product_brand .wd-nav-product-cat,
.tax-product_brand .title-shop-with-cats,
.tax-product_brand .shop-title-wrapper {
    display: none !important;
}






/* === نوار جستجو و تنظیم دقیق ذره‌بین و دکمه ضربدر در داخل فیلد === */
.cps-brand-search-wrapper,
.cps-product-search-wrapper {
    margin-bottom: 16px !important;
    padding-bottom: 0 !important;
    position: relative !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* اعمال ارتفاع و موقعیت ثابت برای المان‌های درون اینپوت */
#cps-brand-search-input,
#cps-product-search-input {
    width: 100% !important;
    height: 48px !important;
    line-height: 48px !important;
    padding: 0 45px 0 45px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50px !important;
    font-size: 13.5px !important;
    background: #ffffff !important;
    outline: none !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}
#cps-brand-search-input:focus,
#cps-product-search-input:focus {
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07) !important;
}

/* تثبیت دقیق آیکون ذره‌بین درون اینپوت بدون وابستگی به المان‌های زیرین */
.cps-brand-search-wrapper::before,
.cps-product-search-wrapper::before {
    content: '🔍';
    position: absolute !important;
    right: 18px !important;
    top: 24px !important; /* دقیقاً در نیمه ارتفاع ۴۸ پیکسلی اینپوت */
    transform: translateY(-50%) !important;
    font-size: 1.05rem !important;
    color: #94a3b8 !important;
    pointer-events: none !important;
    z-index: 2 !important;
    line-height: 1 !important;
}

/* تثبیت دقیق دکمه ضربدر قرمز شیشه‌ای درون اینپوت */
.cps-search-clear-btn {
    position: absolute !important;
    left: 14px !important;
    top: 24px !important; /* دقیقاً در نیمه ارتفاع ۴۸ پیکسلی اینپوت */
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    max-width: 22px !important;
    min-height: 22px !important;
    max-height: 22px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50% !important;
    background: rgba(225, 29, 72, 0.12) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(225, 29, 72, 0.28) !important;
    color: #e11d48 !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 5 !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.cps-search-clear-btn:hover {
    background: rgba(225, 29, 72, 0.88) !important;
    color: #ffffff !important;
    border-color: #e11d48 !important;
    transform: translateY(-50%) scale(1.08) !important;
    box-shadow: 0 2px 8px rgba(225, 29, 72, 0.35) !important;
}

/* === ردیف پیشنهادات ۱۲ جستجوی اخیر با اسکرول عرضی و دکمه‌های کاملاً مشروط === */
.cps-recent-inline-strip {
    display: none;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
    padding: 2px 4px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    animation: cpsRecentSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

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

/* نوار افقی اسکرول‌پذیر کپسول‌های تاریخچه */
.cps-recent-tags-row {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* جلوگیری از چندخطی شدن و حفظ ساختار تک‌خطی */
    gap: 7px !important;
    flex: 1 1 auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: none !important; /* فایرفاکس */
    -ms-overflow-style: none !important; /* اینترنت اکسپلورر */
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 2px !important;
}

.cps-recent-tags-row::-webkit-scrollbar {
    display: none !important; /* کروم و سافاری */
}

/* کپسول‌های شیشه‌ای ۱۲ جستجوی اخیر */
.cps-recent-glass-pill {
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    border-radius: 50px !important;
    padding: 5px 12px !important;
    height: 30px !important;
    box-sizing: border-box !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    color: #334155 !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important; /* ممانعت از فشرده شدن کپسول‌ها */
}

.cps-recent-glass-pill:hover {
    background: #ffffff !important;
    border-color: #fecdd3 !important;
    color: #e11d48 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.08) !important;
}

.cps-recent-pill-icon {
    font-size: 10px !important;
    opacity: 0.6 !important;
    line-height: 1 !important;
}

.cps-recent-pill-text {
    line-height: 1 !important;
}

/* دکمه سطل‌آشغال: در حالت اولیه کاملاً مخفی، باز شدن فقط همزمان با کلیک */
.cps-recent-trash-btn {
    display: none;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    min-height: 30px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(226, 232, 240, 0.9) !important;
    color: #94a3b8 !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.cps-recent-trash-btn:hover {
    background: #fff1f2 !important;
    border-color: #fecdd3 !important;
    color: #e11d48 !important;
    transform: translateY(-1px) scale(1.05) !important;
    box-shadow: 0 4px 10px rgba(225, 29, 72, 0.12) !important;
}


/* ممانعت از نمایش باکس جستجوی کلی برندها زمانی که کاربر درون صفحه یک برند قرار دارد */
.cps-brands-page-content.brands-focus-mode .cps-brand-search-wrapper {
    display: none !important;
}

.cps-brands-page-content.brands-focus-mode .cps-product-search-wrapper {
    display: block !important;
}

/* تضمین دریافت رویداد کلیک روی کارت‌های برند */
.cps-brand-item {
    cursor: pointer !important;
    user-select: none !important;
    -webkit-user-select: none !important;
}

.cps-brand-item * {
    pointer-events: none !important; /* هدایت کلیک فرزندان به خود کارت اصلی */
}





/* استایل دکمه کالاهای قفل‌شده VIP */
.cps-btn-locked {
    width: 100% !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    background: #475569 !important;
    color: #f8fafc !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: not-allowed !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 6px !important;
    white-space: nowrap !important;
    box-shadow: none !important;
    opacity: 0.9 !important;
}

/* بج روی تصویر کالاهای انحصاری VIP */
.cps-card-img-wrap {
    position: relative !important;
}
.cps-vip-card-badge {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #9333ea !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 2px 7px !important;
    border-radius: 6px !important;
    z-index: 4 !important;
    box-shadow: 0 2px 6px rgba(147, 51, 234, 0.4) !important;
    letter-spacing: -0.2px !important;
}
.cps-custom-card.is-vip-locked {
    border-color: #cbd5e1 !important;
    background-color: #fafafa !important;
}
/* ==========================================================================
   محصولات تخفیف‌خورده: نشان درصد روی تصویر، قیمت قبلی خط‌خورده و تایمر
   ========================================================================== */
.cps-badge-discount {
    position: absolute !important;
    bottom: 8px !important;
    right: 8px !important;
    left: auto !important;
    top: auto !important;
    z-index: 21 !important;
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 1px !important;
    min-width: 44px !important;
    padding: 5px 9px 4px !important;
    border-radius: 12px !important;
    border: 2px solid #ffffff !important;
    background: linear-gradient(145deg, #ff4d6d 0%, #e11d48 55%, #9f1239 100%) !important;
    color: #ffffff !important;
    line-height: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    pointer-events: none !important;
    box-shadow: 0 4px 12px rgba(190, 18, 60, 0.38) !important;
}
.cps-badge-discount::after {
    content: "" !important;
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(115deg, rgba(255,255,255,0) 35%, rgba(255,255,255,0.28) 50%, rgba(255,255,255,0) 65%) !important;
    pointer-events: none !important;
}
.cps-badge-discount .cps-disc-pct {
    font-size: 15px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.3px !important;
    color: #ffffff !important;
}
.cps-badge-discount .cps-disc-pct small {
    font-size: 9px !important;
    font-weight: 800 !important;
    margin-left: 2px !important;
    opacity: 0.92 !important;
}
.cps-badge-discount .cps-disc-txt {
    font-size: 9px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    letter-spacing: 0.2px !important;
    color: #ffe4e6 !important;
}

/* کارت دارای تخفیف */
.cps-custom-card.is-on-sale {
    position: relative !important;
    border: 1.5px solid #fda4af !important;
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.16), 0 0 0 3px rgba(251, 113, 133, 0.10) !important;
}
.cps-custom-card.is-on-sale::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 4px !important;
    z-index: 25 !important;
    background: linear-gradient(90deg, #f43f5e, #e11d48, #fb923c) !important;
    border-radius: 18px 18px 0 0 !important;
    pointer-events: none !important;
}

/* کادر قیمت: تایمر + قیمت قبلی + قیمت جدید */
.cps-card-price-box.has-discount {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ffffff !important;
    border: 1px dashed #fb7185 !important;
    border-radius: 12px !important;
    padding: 8px 6px !important;
}
.cps-card-price-box.has-discount .bunak-cd { margin: 0 !important; }
.cps-old-price {
    display: block !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #94a3b8 !important;
    text-decoration: line-through !important;
    text-decoration-color: #ef4444 !important;
    text-decoration-thickness: 2px !important;
    white-space: nowrap !important;
    line-height: 1.3 !important;
}
.cps-card-price-box.has-discount .cps-main-price {
    color: #be123c !important;
    font-size: 18px !important;
}

@media (max-width: 480px) {
    .cps-badge-discount { min-width: 40px !important; padding: 4px 7px 3px !important; border-radius: 10px !important; bottom: 6px !important; right: 6px !important; }
    .cps-badge-discount .cps-disc-pct { font-size: 13px !important; }
    .cps-badge-discount .cps-disc-txt,
    .cps-badge-discount .cps-disc-pct small { font-size: 8px !important; }
    .cps-old-price { font-size: 11px !important; }
    .cps-card-price-box.has-discount .cps-main-price { font-size: 16px !important; }
}

/* ==========================================================================
   باکس برندِ دارای کالای تخفیف‌خورده: نوار تخفیف پایین کارت با درخشش
   ========================================================================== */
.cps-brand-item.has-sale {
    padding-bottom: 26px !important;
    border-color: #fda4af !important;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.16), 0 0 0 2px rgba(251, 113, 133, 0.12) !important;
}
.cps-brand-item.has-neon-effect.has-sale { border-color: var(--cps-highlight-color, #ff1d48) !important; }
.cps-brand-sale-ribbon {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 20px !important;
    z-index: 7 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
    overflow: hidden !important;
    background: linear-gradient(100deg, #f43f5e 0%, #e11d48 55%, #fb923c 100%) !important;
    color: #ffffff !important;
    line-height: 1 !important;
    box-shadow: 0 -2px 8px rgba(225, 29, 72, 0.25) !important;
}
.cps-brand-sale-ribbon::after {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 40% !important;
    left: -60% !important;
    background: linear-gradient(115deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.45) 50%, rgba(255,255,255,0) 100%) !important;
    animation: cpsBrandSaleShine 2.8s ease-in-out infinite !important;
    pointer-events: none !important;
}
@keyframes cpsBrandSaleShine {
    0%   { left: -60%; }
    55%, 100% { left: 130%; }
}
/* ویژگی‌ها با ویژگی‌ساز بالاتر تعریف شده‌اند تا قانون عمومی «.cps-brand-item span» (عرض ۱۰۰٪، رنگ تیره) آن‌ها را خراب نکند */
.cps-brand-item .cps-brand-sale-ribbon .cps-brand-sale-pct {
    display: inline-flex !important;
    flex: 0 0 13px !important;
    align-items: center !important;
    justify-content: center !important;
    width: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    height: 13px !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    color: #e11d48 !important;
    font-size: 9px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
.cps-brand-item .cps-brand-sale-ribbon .cps-brand-sale-txt {
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #ffffff !important;
    font-size: 10.5px !important;
    font-weight: 900 !important;
    letter-spacing: 0.2px !important;
    line-height: 1 !important;
    text-align: center !important;
    overflow: visible !important;
    text-overflow: clip !important;
}
@media (max-width: 600px) {
    .cps-brand-item.has-sale { padding-bottom: 23px !important; }
    .cps-brand-item .cps-brand-sale-ribbon { height: 18px !important; }
    .cps-brand-item .cps-brand-sale-ribbon .cps-brand-sale-txt { font-size: 9.5px !important; }
}
@media (prefers-reduced-motion: reduce) {
    .cps-brand-sale-ribbon::after { animation: none !important; }
}
