/**
 * Woodmart + IRANYekanX typography 
 * 1) Persian-friendly line-height without touching icon fonts.
 * 2) Normalize Woodmart page-title size variable.
 */

:root {
    --lili-line-height-text: 1.85;
    --lili-line-height-heading: 1.45;
    --lili-line-height-ui: 1.45;

    /* Woodmart's default is 1.6; IRANYekanX needs a little more breathing room. */
    --wd-text-line-height: var(--lili-line-height-text) !important;
}

/* Normal content text. Keep icon/action elements out of this rule. */
body :where(
    p,
    li,
    .wd-text-block,
    .woocommerce-product-details__short-description,
    .woocommerce-Tabs-panel,
    .wd-tab-content,
    .wd-accordion-content,
    .wd-collapse-content,
    .entry-content,
    .wd-entry-content
) {
    line-height: var(--lili-line-height-text);
}

/* Long-form product/content copy benefits from a touch more line spacing. */
body :where(
    .woocommerce-product-details__short-description,
    .woocommerce-Tabs-panel,
    .wd-tab-content,
    .wd-accordion-content,
    .entry-content,
    .wd-entry-content
) :where(p, li) {
    line-height: 1.9;
}

/* Headings: compact enough to look professional, but safe for Persian glyphs. */
body :where(
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    .title,
    .entry-title,
    .product_title,
    .wd-entities-title
) {
    line-height: var(--lili-line-height-heading);
}

body.single-product .product_title {
    line-height: 1.5;
}

/* Accordion titles/content: prevent the compressed look visible on product pages. */
body.single-product .wd-accordion-title {
    display: flex;
    align-items: center;
    min-height: 48px;
    line-height: 1.5;
}

body.single-product .wd-accordion-content {
    padding-top: 12px;
    padding-bottom: 18px;
}

/* Product variation labels stay optically centered next to their controls. */
body.single-product table.variations .label,
body.single-product table.variations .label > *,
body.single-product table.variations label {
    line-height: var(--lili-line-height-ui);
}

/* Form/select controls should not inherit the large paragraph line-height. */
body :where(
    button,
    input,
    select,
    textarea,
    .button,
    .btn,
    .elementor-button
) {
    line-height: var(--lili-line-height-ui);
}

body select {
    line-height: normal;
}

body :where(.price, .amount, .woocommerce-Price-amount) {
    line-height: 1.35;
}

/*
 * Woodmart defines --wd-title-font-s directly on .wd-page-title and on its
 * size modifier classes. Override those local values, not only :root.
 */
body .wd-page-title,
body .wd-page-title.title-size-small,
body .wd-page-title.title-size-default,
body .wd-page-title.title-size-large,
body :where(.title-size-small, .title-size-default, .title-size-large) .wd-page-title {
    --wd-title-font-s: 22px !important;
}

@media (max-width: 1024px) {
    body .wd-page-title,
    body .wd-page-title.title-size-small,
    body .wd-page-title.title-size-default,
    body .wd-page-title.title-size-large,
    body :where(.title-size-small, .title-size-default, .title-size-large) .wd-page-title {
        --wd-title-font-s: 20px !important;
    }
}

@media (max-width: 767px) {
    body .wd-page-title,
    body .wd-page-title.title-size-small,
    body .wd-page-title.title-size-default,
    body .wd-page-title.title-size-large,
    body :where(.title-size-small, .title-size-default, .title-size-large) .wd-page-title {
        --wd-title-font-s: 18px !important;
    }
}
