/* ============================================================
   PRODUCTS SECTION v2
   مطابق با plan_card.html (بدون نیاز به تغییر قالب)
   ============================================================ */
.products-section {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

/* ==================== Header ==================== */
.products-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 2rem;
    margin-bottom: 2.5rem;
}

.products-header-text {
    max-width: 680px;
    text-align: start;
}

.products-header-text .section-title {
    margin-bottom: 0.5rem;
    text-wrap: balance;
}

.products-header-text .section-description {
    margin-bottom: 0;
    color: var(--color-text-secondary);
}

.products-all-link {
    flex-shrink: 0;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-md);
    white-space: nowrap;
}

/* ==================== Grid ==================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

/* ==================== Card ==================== */
.product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    overflow: hidden;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.product-card:hover {
    border-color: var(--color-electric-blue);
    box-shadow: var(--shadow-lg);
}

/* پلن ویژه (اختیاری: کلاس product-card-featured) */
.product-card-featured {
    border-color: var(--color-soft-gold);
    box-shadow: var(--shadow-md);
}

.product-card-featured::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--gradient-gold);
}

.product-card-featured:hover {
    border-color: var(--color-champagne-gold);
}

/* ==================== Badge (اختیاری) ==================== */
.product-badge {
    position: absolute;
    top: 1rem;
    inset-inline-end: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: var(--color-gold-light);
    color: var(--color-primary-navy);
    font-size: 0.75rem;
    font-weight: 700;
}

.product-badge-new {
    background: var(--color-sky-blue);
    color: var(--color-royal-blue);
}

.product-badge-best {
    background: var(--color-primary-navy);
    color: var(--color-white);
}

/* ==================== Title (آیکون + نام + کد) ==================== */
.product-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
}

.product-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    padding: 8px;
    background: var(--color-sky-blue);
    border-radius: 14px;
}

.product-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-title {
    min-width: 0;
}

.product-name {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
    color: var(--color-primary-navy);
}

.product-code {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    direction: ltr;
    text-align: start;
}

/* ==================== Specs (نوار مشخصات فنی) ==================== */
.product-specs {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    margin-bottom: 1.5rem;
    background: var(--color-off-white);
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.product-spec {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.875rem 0.5rem;
    color: var(--color-primary-navy);
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.product-spec + .product-spec {
    border-inline-start: 1px solid var(--color-border);
}

.spec-icon {
    display: inline-flex;
    color: var(--color-royal-blue);
}


/* ==================== Price ==================== */
.product-price {
    display: flex;
    flex-direction: column; /* چیدمان عمودی: قیمت بالا، دوره پایین */
    align-items: flex-end; /* همه چیز راست‌چین بشه (چون RTL هستیم) */
    gap: 0.25rem;
    margin-bottom: 1.5rem;
}

.price-main {
    display: flex;
    flex-direction: row; /* عدد و واحد کنار هم */
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.35rem;
    direction: rtl; /* چیدمان از راست: اول عدد، بعد واحد */
}

.price-value {
    font-size: 1.75rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-primary-navy);
    font-family: inherit;
    direction: ltr; /* خود عدد حتماً چپ‌چین باشه (برای ممیز فارسی) */
}

.price-currency {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.price-period {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    white-space: nowrap;
    margin-top: 0.25rem;
}

/* اسلش اضافی رو قوی‌تر حذف می‌کنیم */
.product-price .price-period::before,
.price-period::before {
    content: none !important;
    display: none !important;
}

/* ==================== Button ==================== */
.product-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
}

.product-btn.btn-outline {
    border-width: 1.5px;
}

.product-card-featured .product-btn {
    background: var(--gradient-gold);
    border-color: transparent;
    color: var(--color-primary-navy);
}

.product-card-featured .product-btn:hover {
    box-shadow: var(--shadow-glow-gold);
}

/* ==================== Responsive ==================== */
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

    .product-card {
        padding: 1.5rem 1.25rem;
    }
}