/*
 * پایه‌ی مشترک بازطراحی — توکن‌ها و کامپوننت‌ها
 *
 * چرا CSS جدا و نه Tailwind:
 * استایل این بازطراحی به ده‌ها کلاس دلخواه نیاز دارد که در style.css کامپایل‌شده
 * نیستند، و هر کلاس تازه یعنی یک build دیگر. قبلاً یک بار همین باعث شد چیدمان
 * صفحه‌ی اصلی بشکند چون کسی فراموش کرد Tailwind را دوباره build کند. این فایل
 * مستقل است و build نمی‌خواهد.
 *
 * نام‌گذاری با پیشوند ad- تا با کلاس‌های Tailwind و ووکامرس قاطی نشود.
 *
 * همه‌چیز با ویژگی‌های منطقی (inline-start/end) نوشته شده، نه left/right،
 * چون سایت کاملاً راست‌به‌چپ است.
 *
 * @package Atadecor
 */

:root {
    /* رنگ — از سند طراحی بازطراحی */
    --ad-ink: #202321;
    --ad-ink-muted: #7C786E;
    --ad-surface: #ffffff;
    --ad-bg: #F5F2EB;
    --ad-sand: #E5E1D7;
    --ad-olive: #69705A;
    --ad-olive-hover: #555C47;
    --ad-success: #2E7D4F;
    --ad-success-bg: #E6F2EA;
    --ad-error: #B3392F;
    --ad-error-bg: #F8E7E5;
    --ad-star: #E0A526;

    /* گردی */
    --ad-radius-card: 16px;
    --ad-radius-btn: 14px;
    --ad-radius-input: 12px;
    --ad-radius-chip: 10px;

    /* سایه */
    --ad-shadow-card: 0 4px 12px rgba(0, 0, 0, .08);

    /* چیدمان */
    --ad-content: 1176px;
}

/* ——— ظرف محتوا ———
 *
 * عرض ۱۱۷۶ با حاشیه‌ی ۱۳۲ در دسکتاپ، طبق سند. روی نمایشگر کوچک‌تر حاشیه کم
 * می‌شود تا محتوا به لبه نچسبد.
 */
.ad-container {
    width: 100%;
    max-width: calc(var(--ad-content) + 264px);
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 992px) {
    .ad-container {
        padding-inline: 64px;
    }
}

@media (min-width: 1400px) {
    .ad-container {
        padding-inline: 132px;
    }
}

/* ——— کارت ——— */

.ad-card {
    background: var(--ad-surface);
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-card);
    padding: 20px;
}

.ad-card--raised {
    box-shadow: var(--ad-shadow-card);
    border-color: transparent;
}

.ad-card--flush {
    padding: 0;
    overflow: hidden;
}

.ad-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ad-sand);
}

.ad-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--ad-ink);
}

/* عنوان شماره‌دار کارت‌های تسویه حساب */
.ad-card__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 26px;
    margin-inline-end: 10px;
    border-radius: 999px;
    background: var(--ad-olive);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

/* ——— دکمه ——— */

.ad-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding-inline: 24px;
    border: 0;
    border-radius: var(--ad-radius-btn);
    background: var(--ad-olive);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, opacity .2s;
}

.ad-btn:hover,
.ad-btn:focus-visible {
    background: var(--ad-olive-hover);
    color: #fff;
}

.ad-btn[disabled],
.ad-btn.is-disabled {
    opacity: .5;
    cursor: not-allowed;
}

.ad-btn--block {
    width: 100%;
}

.ad-btn--ghost {
    background: var(--ad-surface);
    border: 1px solid var(--ad-sand);
    color: var(--ad-ink);
    font-weight: 500;
}

.ad-btn--ghost:hover,
.ad-btn--ghost:focus-visible {
    background: var(--ad-bg);
    border-color: var(--ad-olive);
    color: var(--ad-olive);
}

.ad-btn--quiet {
    min-height: 0;
    padding: 0;
    background: none;
    color: var(--ad-ink-muted);
    font-weight: 500;
    font-size: 14px;
}

.ad-btn--quiet:hover {
    background: none;
    color: var(--ad-olive);
}

/* ——— ورودی ——— */

.ad-field {
    display: block;
}

.ad-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ad-ink);
}

.ad-field__label .required {
    color: var(--ad-error);
    text-decoration: none;
    margin-inline-start: 2px;
}

.ad-input,
.ad-field input[type="text"],
.ad-field input[type="tel"],
.ad-field input[type="email"],
.ad-field input[type="number"],
.ad-field input[type="password"],
.ad-field select,
.ad-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-input);
    background: var(--ad-surface);
    color: var(--ad-ink);
    font-family: inherit;
    font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}

.ad-input:focus,
.ad-field input:focus,
.ad-field select:focus,
.ad-field textarea:focus {
    outline: none;
    border-color: var(--ad-olive);
    box-shadow: 0 0 0 3px rgba(105, 112, 90, .12);
}

.ad-field textarea {
    min-height: 96px;
    resize: vertical;
}

.ad-field__error {
    display: block;
    margin-top: 6px;
    color: var(--ad-error);
    font-size: 13px;
}

.ad-field.has-error .ad-input,
.ad-field.has-error input,
.ad-field.has-error select,
.ad-field.has-error textarea {
    border-color: var(--ad-error);
}

/* دو ستونه روی دسکتاپ، یک ستونه روی موبایل */
.ad-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .ad-grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .ad-grid-2 > .ad-span-2 {
        grid-column: 1 / -1;
    }
}

/* ——— چیپ ——— */

.ad-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--ad-radius-chip);
    background: var(--ad-bg);
    color: var(--ad-ink-muted);
    font-size: 13px;
    line-height: 1.8;
    text-decoration: none;
    white-space: nowrap;
}

.ad-chip--pill {
    border-radius: 999px;
}

.ad-chip--ok {
    background: var(--ad-success-bg);
    color: var(--ad-success);
}

.ad-chip--bad {
    background: var(--ad-error-bg);
    color: var(--ad-error);
}

a.ad-chip:hover {
    background: var(--ad-sand);
    color: var(--ad-ink);
}

/* ——— کارت رادیویی (روش ارسال و پرداخت) ——— */

.ad-radio-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-input);
    background: var(--ad-surface);
    cursor: pointer;
    transition: border-color .2s, background .2s;
}

.ad-radio-card + .ad-radio-card {
    margin-top: 10px;
}

.ad-radio-card:hover {
    border-color: var(--ad-olive);
}

/*
 * حالت انتخاب‌شده با :has روی خود کارت تشخیص داده می‌شود تا نیازی به JS نباشد.
 * برای مرورگرهای بدون :has، کلاس is-selected هم پشتیبانی می‌شود و جاوااسکریپت
 * صفحه آن را می‌گذارد.
 */
.ad-radio-card:has(input:checked),
.ad-radio-card.is-selected {
    border-color: var(--ad-olive);
    border-width: 2px;
    background: #F4F6EF;
    padding: 13px 15px;
}

.ad-radio-card__body {
    flex: 1 1 auto;
    min-width: 0;
}

.ad-radio-card__title {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--ad-ink);
}

.ad-radio-card__note {
    display: block;
    margin-top: 2px;
    font-size: 13px;
    color: var(--ad-ink-muted);
}

/* قیمت سمت چپ کارت، طبق طرح */
.ad-radio-card__price {
    flex: none;
    margin-inline-start: auto;
    font-size: 15px;
    font-weight: 700;
    color: var(--ad-ink);
}

/* ——— شمارنده‌ی تعداد ——— */

.ad-qty {
    display: inline-flex;
    align-items: center;
    flex: none;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-input);
    background: var(--ad-surface);
    overflow: hidden;
}

.ad-qty button {
    width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: none;
    color: var(--ad-ink-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.ad-qty button:hover:not([disabled]) {
    background: var(--ad-bg);
    color: var(--ad-olive);
}

.ad-qty button[disabled] {
    opacity: .4;
    cursor: not-allowed;
}

.ad-qty input {
    width: 48px;
    height: 44px;
    border: 0;
    background: transparent;
    text-align: center;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    color: var(--ad-ink);
    /* فلش‌های عددی مرورگر در این عرض کم جا نمی‌شوند و ظاهر را خراب می‌کنند. */
    -moz-appearance: textfield;
    appearance: textfield;
}

.ad-qty input::-webkit-outer-spin-button,
.ad-qty input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ——— مراحل خرید (stepper) ——— */

.ad-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 24px 0 32px;
    list-style: none;
    padding: 0;
}

.ad-stepper__item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ad-ink-muted);
    font-size: 14px;
    white-space: nowrap;
}

.ad-stepper__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: var(--ad-sand);
    color: var(--ad-ink-muted);
    font-size: 14px;
    font-weight: 700;
}

.ad-stepper__item.is-active {
    color: var(--ad-ink);
    font-weight: 700;
}

.ad-stepper__item.is-active .ad-stepper__num {
    background: var(--ad-olive);
    color: #fff;
}

.ad-stepper__item.is-done .ad-stepper__num {
    background: var(--ad-success);
    color: #fff;
}

.ad-stepper__line {
    width: 72px;
    height: 1px;
    margin-inline: 14px;
    background: var(--ad-sand);
    flex: none;
}

@media (max-width: 767px) {
    .ad-stepper__item span:last-child {
        display: none;
    }

    .ad-stepper__line {
        width: 32px;
        margin-inline: 8px;
    }
}

/* ——— نوارهای پیام ——— */

.ad-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: var(--ad-radius-input);
    font-size: 14px;
    line-height: 1.9;
}

.ad-alert--info {
    background: var(--ad-success-bg);
    color: var(--ad-ink);
}

.ad-alert--warn {
    background: #FDF6E3;
    color: #7A5B12;
}

.ad-alert--error {
    background: var(--ad-error-bg);
    color: var(--ad-error);
}

/* ——— چیدمان دوستونه‌ی سبد و تسویه ——— */

.ad-commerce-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: start;
}

@media (min-width: 992px) {
    .ad-commerce-layout {
        /* ستون راست محتوا (۷۸۰)، ستون چپ خلاصه (۳۷۶) — طبق طرح. */
        grid-template-columns: minmax(0, 780fr) minmax(0, 376fr);
    }

    .ad-commerce-aside {
        position: sticky;
        top: 24px;
    }
}

/* ——— ردیف‌های خلاصه‌ی سفارش ——— */

.ad-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    font-size: 14px;
    color: var(--ad-ink-muted);
}

.ad-total-row__value {
    color: var(--ad-ink);
    font-weight: 600;
}

.ad-total-row--grand {
    margin-top: 6px;
    padding-top: 14px;
    border-top: 1px solid var(--ad-sand);
    font-size: 16px;
    color: var(--ad-ink);
    font-weight: 700;
}

.ad-total-row--grand .ad-total-row__value {
    font-size: 18px;
}

.ad-trust {
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-size: 13px;
    color: var(--ad-ink-muted);
    line-height: 2.2;
}

/* ——— فوتر ———
 *
 * این چند حالت hover اینجا تعریف شده‌اند نه با کلاس Tailwind، چون
 * hover:text-secondary و hover:bg-secondary اصلاً در style.css کامپایل‌شده
 * وجود ندارند — کلاس بی‌وجود بی‌صدا هیچ‌کاری نمی‌کند و hover مرده می‌ماند.
 * نوشتنشان اینجا یعنی نیازی به build دوباره‌ی Tailwind نیست.
 */

.ad-footer-link {
    transition: color .2s;
}

.ad-footer-link:hover,
.ad-footer-link:focus-visible {
    color: #C9BEAA;
}

/*
 * رنگ آیکون‌های تماس اینجا تعریف شده چون کلاس text-secondary در style.css
 * کامپایل‌شده اصلاً وجود ندارد — آیکون‌ها به مشکی پیش‌فرض می‌افتادند و روی
 * زمینه‌ی زغالی نسبت کنتراست ۱.۳۲ می‌دادند، یعنی عملاً نامرئی.
 */
.ad-footer-icon {
    color: #C9BEAA;
}

.ad-footer-social {
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    transition: color .2s, background-color .2s, border-color .2s;
}

.ad-footer-social:hover,
.ad-footer-social:focus-visible {
    background-color: #C9BEAA;
    border-color: #C9BEAA;
    color: var(--ad-ink);
}

/* ——— سبد خرید ——— */

.ad-visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.ad-cart__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.ad-cart__head-start {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ad-cart__title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: var(--ad-ink);
}

.ad-cart__continue {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ad-cart__promo {
    margin-bottom: 16px;
}

.ad-cart__promo a {
    color: inherit;
    text-decoration: underline;
}

.ad-cart__clear {
    font-size: 13px;
    color: var(--ad-error);
    text-decoration: none;
}

.ad-cart__clear:hover {
    text-decoration: underline;
}

/* ردیف کالا — گرید تا ستون‌ها در هر عرضی هم‌تراز بمانند */
.ad-cart-row {
    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) auto auto 32px;
    grid-template-areas: "media body qty total remove";
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--ad-sand);
}

.ad-cart-row:last-child {
    border-bottom: 0;
}

.ad-cart-row__media { grid-area: media; }
.ad-cart-row__body  { grid-area: body; min-width: 0; }
.ad-cart-row__qty   { grid-area: qty; }
.ad-cart-row__total { grid-area: total; text-align: center; }
.ad-cart-row__remove{ grid-area: remove; }

.ad-cart-row__media img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--ad-radius-chip);
    display: block;
}

.ad-cart-row__name {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.7;
}

.ad-cart-row__name a {
    color: var(--ad-ink);
    text-decoration: none;
}

.ad-cart-row__name a:hover {
    color: var(--ad-olive);
}

.ad-cart-row__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.ad-cart-row__unit {
    margin-top: 8px;
    font-size: 13px;
    color: var(--ad-ink-muted);
}

.ad-cart-row__total {
    font-size: 15px;
    font-weight: 700;
    color: var(--ad-ink);
    white-space: nowrap;
}

.ad-cart-row__total-label {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--ad-ink-muted);
    margin-bottom: 2px;
}

.ad-cart-row__remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: var(--ad-error-bg);
    color: var(--ad-error);
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    transition: background .2s;
}

.ad-cart-row__remove-btn:hover {
    background: var(--ad-error);
    color: #fff;
}

/* ووکامرس ورودی تعداد را داخل .quantity می‌گذارد؛ اینجا داخل قاب ad-qty است. */
.ad-qty .quantity {
    margin: 0;
    display: flex;
}

.ad-qty .quantity label {
    display: none;
}

.ad-cart__coupon {
    margin-top: 16px;
}

.ad-cart__coupon-label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ad-ink);
}

.ad-cart__coupon-row {
    display: flex;
    gap: 10px;
}

.ad-cart__coupon-row .ad-input {
    flex: 1 1 auto;
}

.ad-cart__coupon-row .ad-btn {
    flex: none;
    min-width: 110px;
}

/* موبایل: ردیف به کارت تبدیل می‌شود */
@media (max-width: 767px) {
    .ad-cart-row {
        grid-template-columns: 84px minmax(0, 1fr) 32px;
        grid-template-areas:
            "media body  remove"
            "qty   qty   qty"
            "total total total";
        row-gap: 14px;
    }

    .ad-cart-row__media img {
        width: 84px;
        height: 84px;
    }

    .ad-cart-row__qty { justify-self: stretch; }
    .ad-cart-row__qty .ad-qty { width: 100%; justify-content: space-between; }
    .ad-cart-row__remove { align-self: start; }

    .ad-cart-row__total {
        text-align: end;
        align-self: center;
    }

    .ad-cart-row__total-label {
        display: inline;
        margin-inline-end: 6px;
    }

    .ad-cart__coupon-row {
        flex-direction: column;
    }
}

/* ——— سبد خالی ——— */

.ad-cart-empty {
    max-width: 560px;
    margin: 48px auto;
    text-align: center;
}

.ad-cart-empty__icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--ad-bg);
    font-size: 40px;
}

.ad-cart-empty__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ad-ink);
}

.ad-cart-empty__text {
    margin: 0 0 18px;
    font-size: 14px;
    color: var(--ad-ink-muted);
}

.ad-cart-empty__cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 22px;
}

/* ——— خلاصه‌ی سفارش ——— */

.ad-summary__title {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 700;
    color: var(--ad-ink);
}

.ad-summary .ad-total-row--muted .ad-total-row__value {
    color: var(--ad-ink-muted);
    font-weight: 500;
}

.ad-summary__action {
    margin-top: 16px;
}

/* ووکامرس دکمه‌ی ادامه را با کلاس‌های خودش می‌سازد. */
.ad-summary .wc-proceed-to-checkout {
    padding: 0;
    margin: 16px 0 0;
}

.ad-summary .wc-proceed-to-checkout .checkout-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding-inline: 24px;
    border-radius: var(--ad-radius-btn);
    background: var(--ad-olive);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.ad-summary .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--ad-olive-hover);
    color: #fff;
}

/* =========================================================================
 * اسکین عناصر پیش‌فرض ووکامرس
 *
 * ووکامرس ده‌ها صفحه و پیام دارد که قالبشان را override نکرده‌ایم: نوتیس‌ها،
 * خطاهای اعتبارسنجی، صفحه‌ی تشکر، جزئیات سفارش، حساب کاربری، فرم ورود،
 * پیگیری سفارش. این بخش ظاهرشان را با سیستم طراحی یکی می‌کند، بدون اینکه
 * قالبشان دست بخورد — پس به‌روزرسانی ووکامرس چیزی را نمی‌شکند.
 * ========================================================================= */

/* ——— نوتیس‌ها ——— */

.woocommerce-notices-wrapper:empty {
    display: none;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error,
.woocommerce-noreviews,
p.no-comments {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px 16px;
    border: 0;
    border-radius: var(--ad-radius-input);
    background: var(--ad-bg);
    color: var(--ad-ink);
    font-size: 14px;
    line-height: 1.9;
    list-style: none;
}

/* نوار رنگی کنار پیام، سمت راست چون صفحه راست‌به‌چپ است. */
.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
    border-inline-start: 3px solid var(--ad-sand);
}

.woocommerce-message {
    background: var(--ad-success-bg);
    border-inline-start-color: var(--ad-success);
}

.woocommerce-error {
    background: var(--ad-error-bg);
    border-inline-start-color: var(--ad-error);
    color: var(--ad-error);
}

.woocommerce-error li {
    width: 100%;
    list-style: none;
}

.woocommerce-info {
    background: var(--ad-success-bg);
    border-inline-start-color: var(--ad-olive);
}

/*
 * ووکامرس آیکن‌های نوتیس را با ::before و فونت خودش می‌گذارد که در این قالب
 * لود نیست و به‌جای آیکن، مربع خالی نشان می‌داد.
 */
.woocommerce-info::before,
.woocommerce-message::before,
.woocommerce-error::before {
    content: none;
}

/* دکمه‌ی داخل نوتیس (مثل «مشاهده سبد خرید») کنار متن می‌نشیند، نه زیرش. */
.woocommerce-info .button,
.woocommerce-message .button {
    margin-inline-start: auto;
}

/* ——— دکمه‌های عمومی ووکامرس ——— */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
a.button.wc-backward,
a.button.wc-forward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border: 0;
    border-radius: var(--ad-radius-btn);
    background: var(--ad-olive);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    text-decoration: none;
    transition: background .2s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
a.button.wc-backward:hover,
a.button.wc-forward:hover {
    background: var(--ad-olive-hover);
    color: #fff;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt {
    background: var(--ad-olive);
}

.woocommerce .button.disabled,
.woocommerce .button:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* ——— فرم‌ها ——— */

.woocommerce form .form-row {
    margin: 0 0 16px;
    padding: 0;
}

.woocommerce form .form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--ad-ink);
}

.woocommerce form .form-row .required {
    color: var(--ad-error);
    text-decoration: none;
    border: 0;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row select {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-input);
    background: var(--ad-surface);
    color: var(--ad-ink);
    font-family: inherit;
    font-size: 15px;
    box-shadow: none;
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce form .form-row select:focus {
    outline: none;
    border-color: var(--ad-olive);
    box-shadow: 0 0 0 3px rgba(105, 112, 90, .12);
}

.woocommerce form .form-row textarea {
    min-height: 110px;
    resize: vertical;
}

/* حالت خطای اعتبارسنجی ووکامرس */
.woocommerce form .form-row.woocommerce-invalid input.input-text,
.woocommerce form .form-row.woocommerce-invalid select {
    border-color: var(--ad-error);
}

.woocommerce form .form-row.woocommerce-validated input.input-text {
    border-color: var(--ad-success);
}

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.checkout_coupon,
.woocommerce form.lost_reset_password {
    margin: 0 0 20px;
    padding: 20px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-card);
    background: var(--ad-surface);
}

/* ——— جدول‌ها (جزئیات سفارش، دانلودها، آدرس‌ها) ——— */

.woocommerce table.shop_table {
    width: 100%;
    margin: 0 0 20px;
    border: 1px solid var(--ad-sand);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--ad-radius-card);
    overflow: hidden;
    font-size: 14px;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--ad-sand);
    text-align: start;
    vertical-align: middle;
}

.woocommerce table.shop_table thead th {
    background: var(--ad-bg);
    font-weight: 700;
    color: var(--ad-ink);
}

.woocommerce table.shop_table tbody tr:last-child td {
    border-bottom: 0;
}

.woocommerce table.shop_table tfoot th,
.woocommerce table.shop_table tfoot td {
    background: var(--ad-bg);
    font-weight: 600;
}

/* ——— صفحه‌ی تشکر از خرید ——— */

.woocommerce .woocommerce-order {
    max-width: var(--ad-content);
    margin-inline: auto;
}

.woocommerce ul.woocommerce-thankyou-order-details,
.woocommerce ul.order_details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 24px;
    padding: 20px;
    border-radius: var(--ad-radius-card);
    background: var(--ad-bg);
    list-style: none;
}

.woocommerce ul.order_details li {
    flex: 1 1 160px;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 13px;
    color: var(--ad-ink-muted);
    text-transform: none;
}

.woocommerce ul.order_details li strong {
    display: block;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--ad-ink);
}

.woocommerce .woocommerce-order-overview__total strong,
.woocommerce .woocommerce-thankyou-order-received {
    color: var(--ad-success);
}

.woocommerce .woocommerce-thankyou-order-received {
    margin: 0 0 20px;
    padding: 16px 18px;
    border-radius: var(--ad-radius-input);
    background: var(--ad-success-bg);
    font-size: 16px;
    font-weight: 700;
}

.woocommerce .woocommerce-customer-details address {
    padding: 16px 18px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-card);
    font-style: normal;
    line-height: 2;
}

/* ——— حساب کاربری ——— */

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    margin: 0 0 20px;
    padding: 8px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-card);
    background: var(--ad-surface);
    list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a {
    display: block;
    padding: 10px 14px;
    border-radius: var(--ad-radius-chip);
    color: var(--ad-ink);
    font-size: 14px;
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li a:hover {
    background: var(--ad-bg);
}

.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a {
    background: var(--ad-olive);
    color: #fff;
    font-weight: 600;
}

/* ——— ریزه‌کاری‌ها ——— */

.woocommerce .woocommerce-breadcrumb {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--ad-ink-muted);
}

.woocommerce .woocommerce-result-count {
    margin: 0;
    font-size: 14px;
    color: var(--ad-ink-muted);
}

.woocommerce nav.woocommerce-pagination ul {
    border: 0;
    display: flex;
    gap: 6px;
    justify-content: center;
}

.woocommerce nav.woocommerce-pagination ul li {
    border: 0;
    overflow: visible;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-chip);
    background: var(--ad-surface);
    color: var(--ad-ink);
    font-size: 14px;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--ad-olive);
    border-color: var(--ad-olive);
    color: #fff;
}

/* نوار پیشرفت «برای ارسال رایگان …» و پیام‌های مشابه */
.woocommerce .woocommerce-shipping-destination,
.woocommerce .woocommerce-shipping-calculator {
    font-size: 13px;
    color: var(--ad-ink-muted);
}

/* ——— خنثی‌کردن استایل قدیمی سبد ———
 *
 * در style.css کامپایل‌شده چیدمان سبد قبلی با !important نوشته شده:
 *   .woocommerce-cart-form { display: inline-flex; width: 75% !important }
 *   .cart-collaterals      { display: inline-flex; width: 25% !important }
 * به‌علاوه یک پس‌زمینه‌ی بژ روی .cart_totals.
 *
 * با چیدمان تازه (grid) این‌ها می‌جنگیدند: فرم و کارت کد تخفیف کنار هم فشرده
 * می‌شدند و ستون خلاصه به ۱۰۹ پیکسل می‌رسید. چون قواعد قدیمی !important دارند،
 * خنثی‌کردنشان هم ناچار !important می‌خواهد.
 *
 * عمداً فقط داخل .ad-cart اعمال می‌شود تا هیچ صفحه‌ی دیگری تحت تأثیر نباشد.
 */

.ad-cart .woocommerce-cart-form {
    display: block;
    width: 100% !important;
}

.ad-cart .cart-collaterals {
    display: block;
    width: 100% !important;
}

.ad-cart .cart-collaterals .cart_totals {
    width: 100% !important;
    background-color: var(--ad-surface) !important;
    border-radius: var(--ad-radius-card);
}

/* جدول سبد قدیمی دیگر وجود ندارد، ولی قاعده‌اش عرض ۱۵۰px را به هر جدولی که
   این کلاس‌ها را داشته باشد تحمیل می‌کند. */
.ad-cart table.shop_table {
    width: 100% !important;
}

/*
 * دکمه‌های شمارنده.
 *
 * style.css قاعده‌ی `.woocommerce-cart-form button` را دارد که پس‌زمینه‌ی زیتونی
 * و گردی ۱rem می‌دهد. ویژگی (specificity) آن با `.ad-qty button` برابر است، پس
 * نتیجه به ترتیب بارگذاری وابسته می‌شد و دکمه‌ها دایره‌ی زیتونی توپر می‌شدند.
 * اینجا ویژگی بالاتر گرفته شده تا نتیجه قطعی باشد.
 */
.ad-cart .ad-qty button,
.ad-qty > button {
    /* !important ناچاری است، نه سلیقه: قاعده‌ی تم خودش !important دارد و بدون
       آن، بالا بردن specificity هم اثری نداشت. */
    background-color: transparent !important;
    background-image: none !important;
    border-radius: 0 !important;
    /* قاعده‌ی تم متن دکمه را هم سفید می‌کرد؛ روی پس‌زمینه‌ی شفاف یعنی نامرئی. */
    color: var(--ad-ink-muted) !important;
    box-shadow: none;
    font-weight: 400;
}

.ad-cart .ad-qty button:hover:not([disabled]),
.ad-qty > button:hover:not([disabled]) {
    background-color: var(--ad-bg) !important;
    color: var(--ad-olive) !important;
}

/* ═══════════════════════════════════════════════════════════════════
   دراور مینی‌کارت
   ═══════════════════════════════════════════════════════════════════ */

/*
 * ظرف بیرونی همیشه در DOM هست و فقط با کلاس is-open دیده می‌شود.
 *
 * عمداً display:none نیست: با آن، انیمیشن اصلاً اجرا نمی‌شود چون عنصر در همان
 * فریم از جریان خارج است. به‌جایش visibility + opacity که هر دو انیمیشن‌پذیرند.
 */
.ad-drawer {
    position: fixed;
    inset: 0;
    z-index: 9999;
    visibility: hidden;
    pointer-events: none;
}

.ad-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
}

.ad-drawer__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(32, 35, 33, .55);
    opacity: 0;
    transition: opacity .22s ease;
}

.ad-drawer.is-open .ad-drawer__overlay {
    opacity: 1;
}

/*
 * پنل از سمت چپ می‌آید (طبق طرح).
 *
 * جای پنل با inset-inline-end نوشته شده که در صفحه‌ی راست‌به‌چپ یعنی چپ. اما
 * transform ویژگی منطقی ندارد و همیشه محور واقعی X را می‌گیرد، پس -۱۰۰٪ اینجا
 * دقیقاً به‌خاطر راست‌به‌چپ بودن سایت درست است. اگر روزی قالب چپ‌به‌راست شد،
 * این یک عدد باید +۱۰۰٪ شود.
 */
.ad-drawer__panel {
    position: absolute;
    inset-block: 0;
    inset-inline-end: 0;
    width: 440px;
    max-width: 100vw;
    display: flex;
    flex-direction: column;
    background-color: var(--ad-surface);
    box-shadow: 0 0 32px rgba(0, 0, 0, .18);
    transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.4, 0, .2, 1);
}

.ad-drawer.is-open .ad-drawer__panel {
    transform: translateX(0);
}

@media (prefers-reduced-motion: reduce) {
    .ad-drawer__overlay,
    .ad-drawer__panel {
        transition: none;
    }
}

@media (max-width: 480px) {
    .ad-drawer__panel {
        width: 100%;
    }
}

.ad-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--ad-sand);
    flex: 0 0 auto;
}

.ad-drawer__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--ad-ink);
}

.ad-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background-color: transparent;
    color: var(--ad-ink-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.ad-drawer__close:hover {
    background-color: var(--ad-bg);
    color: var(--ad-ink);
}

/*
 * بدنه تنها بخش اسکرول‌شونده است.
 *
 * min-height:0 لازم است: آیتم flex به‌صورت پیش‌فرض کوچک‌تر از محتوایش نمی‌شود،
 * پس بدون آن کل پنل بلند می‌شد و اسکرول به صفحه می‌افتاد نه به دراور.
 */
.ad-drawer .ad-drawer__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ——— نوار ارسال رایگان ——— */

.ad-mini-cart__shipping-bar {
    padding: 14px 20px;
    background-color: var(--ad-bg);
    flex: 0 0 auto;
}

.ad-mini-cart__shipping-bar p {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--ad-ink);
}

.ad-mini-cart__shipping-bar p.is-reached {
    margin-bottom: 0;
    color: var(--ad-success);
    font-weight: 600;
}

.ad-progress {
    height: 6px;
    border-radius: 999px;
    background-color: var(--ad-sand);
    overflow: hidden;
}

.ad-progress > span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background-color: var(--ad-olive);
    transition: width .3s ease;
}

/* ——— فهرست اقلام ——— */

/* ووکامرس `.woocommerce ul.cart_list` (ویژگی ۰،۲،۱) را با padding:0 دارد و بدون
   این پیشوند، padding و عرض ما بازنویسی می‌شد. */
.ad-drawer ul.ad-mini-cart__list {
    flex: 1 1 auto;
    width: auto;
    margin: 0;
    padding: 8px 20px;
    list-style: none;
}

.ad-mini-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 28px;
    gap: 12px;
    align-items: start;
    padding: 14px 0;
    border-bottom: 1px solid var(--ad-sand);
}

.ad-mini-row:last-child {
    border-bottom: 0;
}

/* ووکامرس به li ابزارک سبد clearfix (::before/::after با display:table) می‌دهد.
   داخل grid این‌ها خودشان یک خانه می‌گیرند و ستون‌ها یکی جابه‌جا می‌شوند. */
.ad-drawer ul.ad-mini-cart__list li.ad-mini-row::before,
.ad-drawer ul.ad-mini-cart__list li.ad-mini-row::after {
    content: none;
    display: none;
}

.ad-mini-row__media {
    width: 84px;
    height: 84px;
    border-radius: var(--ad-radius-chip);
    overflow: hidden;
    background-color: var(--ad-bg);
}

/* ووکامرس `ul.product_list_widget li img` تصویر را ۳۲px و شناور می‌کند. */
.ad-drawer ul.ad-mini-cart__list li .ad-mini-row__media img {
    float: none;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    display: block;
}

.ad-mini-row__name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.6;
    color: var(--ad-ink);
}

.ad-mini-row__name a {
    color: inherit;
    text-decoration: none;
}

.ad-mini-row__name a:hover {
    color: var(--ad-olive);
}

.ad-mini-row__sku {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--ad-ink-muted);
}

.ad-mini-row__meta {
    margin-top: 6px;
    font-size: 13px;
    color: var(--ad-ink);
}

.ad-mini-row__meta .quantity {
    font-weight: 600;
}

/*
 * دکمه‌ی حذف.
 *
 * کلاس remove ووکامرس در style.css رنگ و اندازه‌ی خودش را دارد؛ اینجا با
 * specificity بالاتر بازنویسی شده تا با بقیه‌ی دراور هم‌خوان باشد.
 */
.ad-drawer .ad-mini-row__remove,
.ad-drawer .ad-mini-row__remove.remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: transparent;
    color: var(--ad-ink-muted);
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    transition: background-color .15s ease, color .15s ease;
}

.ad-drawer .ad-mini-row__remove:hover {
    background-color: var(--ad-error-bg);
    color: var(--ad-error);
}

/* ——— پاورقی دراور ——— */

.ad-mini-cart__foot {
    flex: 0 0 auto;
    padding: 16px 20px 20px;
    border-top: 1px solid var(--ad-sand);
    background-color: var(--ad-surface);
}

.ad-drawer .woocommerce-mini-cart__total {
    margin: 0;
    padding: 0;
    border: 0;
}

.ad-mini-cart__note {
    margin: 6px 0 14px;
    font-size: 12px;
    color: var(--ad-ink-muted);
}

/*
 * دکمه‌های پاورقی.
 *
 * ووکامرس خودش دو لینک با کلاس‌های button و checkout تولید می‌کند و نمی‌شود
 * کلاس ad-btn را به آن‌ها داد، پس استایل بر اساس همان کلاس‌های ووکامرس نوشته
 * شده: اولی (مشاهده سبد) ثانویه و دومی (تسویه) اصلی.
 */
.ad-mini-cart__buttons {
    display: flex;
    flex-direction: column-reverse;
    gap: 10px;
    margin: 0;
}

.ad-drawer .ad-mini-cart__buttons .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-btn);
    background-color: var(--ad-surface);
    background-image: none;
    color: var(--ad-ink);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.ad-drawer .ad-mini-cart__buttons .button:hover {
    background-color: var(--ad-bg);
    border-color: var(--ad-ink-muted);
}

.ad-drawer .ad-mini-cart__buttons .button.checkout {
    border-color: var(--ad-olive);
    background-color: var(--ad-olive);
    color: #fff;
}

.ad-drawer .ad-mini-cart__buttons .button.checkout:hover {
    background-color: var(--ad-olive-hover);
    border-color: var(--ad-olive-hover);
}

/* ——— حالت خالی ——— */

.ad-mini-cart__empty {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 24px;
    text-align: center;
}

.ad-mini-cart__empty .woocommerce-mini-cart__empty-message {
    margin: 0;
    font-size: 15px;
    color: var(--ad-ink-muted);
}

.ad-mini-cart__empty .ad-btn {
    max-width: 240px;
}

/* ——— نشان تعداد در هدر ——— */

.ad-header-cart-count {
    position: absolute;
    inset-block-end: 50%;
    inset-inline-start: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background-color: var(--ad-olive);
    color: #fff;
    font-size: 12px;
    line-height: 1;
}

@media (min-width: 1024px) {
    .ad-header-cart-count {
        inset-inline-start: 1rem;
    }
}

/* سبد خالی: عنصر می‌ماند تا fragment جایی برای جایگزینی داشته باشد، ولی دیده نمی‌شود. */
.ad-header-cart-count.is-empty {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════════
   تسویه حساب
   ═══════════════════════════════════════════════════════════════════ */

.ad-checkout { padding-block: 24px 64px; }
.ad-checkout .ad-commerce-aside { position: sticky; top: 24px; align-self: start; }

/* کارت‌های شماره‌دار: شمارنده‌ی CSS تا کارت‌های مشروط (آدرس دوم) شماره نگیرند. */
.ad-checkout form.checkout { counter-reset: ad-step; }
.ad-steps, .ad-commerce-main { display: flex; flex-direction: column; gap: 16px; }
.ad-checkout .woocommerce-billing-fields { display: flex; flex-direction: column; gap: 16px; }

.ad-step-card { padding: 24px; }
.ad-step-card:not(.ad-step-card--plain) { counter-increment: ad-step; }

.ad-step-card__title {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 18px; font-size: 17px; font-weight: 700; color: var(--ad-ink);
}
.ad-step-card__title::before {
    content: counter(ad-step, persian);
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--ad-olive); color: #fff; font-size: 14px; font-weight: 700;
}

/* فیلدها: دو ستون، و فیلدهای عریض تمام‌عرض */
.ad-checkout .ad-fields {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px;
}
.ad-checkout .ad-fields .form-row {
    width: 100% !important; float: none !important; margin: 0 !important; padding: 0 !important;
}
.ad-checkout .ad-fields--address .form-row-wide,
.ad-checkout .ad-fields .woocommerce-input-wrapper > .country_to_state,
.ad-checkout .ad-fields #billing_address_1_field,
.ad-checkout .ad-fields #shipping_address_1_field,
.ad-checkout .ad-fields #billing_address_2_field,
.ad-checkout .ad-fields #shipping_address_2_field,
.ad-checkout .ad-fields #order_comments_field { grid-column: 1 / -1; }
.ad-checkout .ad-fields #billing_city_field,
.ad-checkout .ad-fields #billing_state_field,
.ad-checkout .ad-fields #billing_postcode_field { grid-column: auto; }

.ad-checkout .ad-fields label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--ad-ink-muted); }
.ad-checkout .ad-fields input.input-text,
.ad-checkout .ad-fields textarea,
.ad-checkout .ad-fields select,
.ad-checkout .ad-fields .select2-selection {
    width: 100%; min-height: 48px; padding: 10px 14px;
    border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-input);
    background: var(--ad-surface); color: var(--ad-ink); font-size: 15px;
}
.ad-checkout .ad-fields textarea { min-height: 96px; }
.ad-checkout .ad-fields input:focus, .ad-checkout .ad-fields textarea:focus, .ad-checkout .ad-fields select:focus {
    outline: 2px solid var(--ad-olive); outline-offset: 0; border-color: var(--ad-olive);
}
.ad-checkout .woocommerce-invalid input.input-text, .ad-checkout .woocommerce-invalid select { border-color: var(--ad-error); }

@media (max-width: 640px) {
    .ad-checkout .ad-fields { grid-template-columns: minmax(0, 1fr); }
    .ad-step-card { padding: 18px; }
}

/* ارسال به آدرس دیگر */
.ad-ship-toggle { margin: 0; font-size: 15px; font-weight: 600; }
.ad-ship-toggle label { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.ad-checkout .shipping_address { margin-top: 16px; }
.ad-step-card--plain:not(:has(.shipping_address)) { display: none; }

/* کارت‌های رادیویی ارسال/پرداخت */
.ad-checkout .woocommerce-shipping-methods { display: flex; flex-direction: column; gap: 10px; }
.ad-checkout .woocommerce-shipping-methods .ad-radio-card + .ad-radio-card,
.ad-checkout .wc_payment_methods .ad-radio-card + .ad-radio-card { margin-top: 0; }
.ad-checkout .ad-radio-card input[type="radio"] { accent-color: var(--ad-olive); width: 18px; height: 18px; flex: none; margin: 0; }

.ad-checkout ul.wc_payment_methods { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; border: 0; }
.ad-checkout .wc_payment_methods .ad-radio-card { flex-wrap: wrap; }
.ad-checkout .wc_payment_methods .ad-radio-card label { flex: 1 1 0; margin: 0; font-weight: 600; cursor: pointer; }
.ad-checkout .wc_payment_methods .payment_box {
    flex: 0 0 100%; margin: 0; padding: 10px 0 0; background: transparent; border: 0;
    font-size: 13px; color: var(--ad-ink-muted);
}
.ad-checkout .wc_payment_methods .payment_box::before { display: none; }
.ad-checkout #payment { background: transparent; border-radius: 0; }
.ad-checkout #payment .place-order { padding: 16px 0 0; margin: 0; }

/* دکمه‌ی ثبت سفارش (داخل کارت پرداخت) */
.ad-checkout #place_order {
    display: flex; align-items: center; justify-content: center; width: 100%; min-height: 52px;
    border: 0; border-radius: var(--ad-radius-btn); background: var(--ad-olive); color: #fff;
    font-size: 16px; font-weight: 700; cursor: pointer; float: none; transition: background .15s;
}
.ad-checkout #place_order:hover { background: var(--ad-olive-hover); }

.ad-checkout .woocommerce-terms-and-conditions-wrapper { margin-bottom: 14px; font-size: 13px; color: var(--ad-ink-muted); }

/* خلاصه‌ی سمت چپ: ردیف کالا */
.ad-review__items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ad-review__item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.ad-review__thumb { width: 56px; height: 56px; border-radius: var(--ad-radius-chip); overflow: hidden; background: var(--ad-bg); }
.ad-review__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-review__name { font-size: 13px; line-height: 1.7; color: var(--ad-ink); }
.ad-review__price { font-size: 13px; font-weight: 600; white-space: nowrap; }
.ad-place-order-proxy { margin-top: 16px; }
@media (max-width: 991px) { .ad-checkout .ad-commerce-aside { position: static; } }

/*
 * خنثی‌سازی قاعده‌های قدیمی تسویه حساب (style.css، بر پایه‌ی #customer_details و
 * #order_review با !important). IDها برای checkout.js ووکامرس می‌مانند، پس به‌جای
 * تغییر نام، ظاهرشان را اینجا ریست می‌کنیم. بیشتر !importantها ناچاری است:
 * قاعده‌ی قدیمی خودش !important دارد.
 */
.ad-checkout #customer_details {
    width: 100% !important; margin: 0; padding: 0; background: transparent !important;
    border-radius: 0; color: var(--ad-ink) !important; font-size: inherit !important;
}
.ad-checkout #order_review {
    width: 100% !important; color: var(--ad-ink) !important; border-radius: var(--ad-radius-card);
}
.ad-checkout #order_review_heading { display: block; }
.ad-checkout #customer_details .woocommerce-billing-fields__field-wrapper,
.ad-checkout #customer_details .woocommerce-shipping-fields__field-wrapper { margin: 0; display: grid; }
.ad-checkout #customer_details .woocommerce-billing-fields__field-wrapper .form-row { width: 100% !important; padding: 0 !important; }
.ad-checkout #customer_details h3 { margin: 0; }
.ad-checkout form.checkout input:not([type="checkbox"]):not([type="radio"]),
.ad-checkout form.checkout textarea {
    display: block; height: auto !important; min-height: 48px; border-radius: var(--ad-radius-input);
    border-color: var(--ad-sand); padding: 10px 14px;
}
.ad-checkout form.checkout textarea { min-height: 96px; height: auto !important; border-radius: var(--ad-radius-input); }
.ad-checkout form.checkout input[type="radio"], .ad-checkout form.checkout input[type="checkbox"] {
    width: 18px !important; height: 18px !important; min-height: 0; padding: 0;
}
.ad-checkout #order_review #payment { background: transparent !important; border-radius: 0 !important; }
.ad-checkout #order_review #payment .payment_box,
.ad-checkout #payment .payment_box { background: transparent !important; color: var(--ad-ink-muted) !important; border-radius: 0 !important; padding: 10px 0 0; }
.ad-checkout #payment .wc_payment_method label { color: var(--ad-ink); justify-content: flex-start !important; }
.ad-checkout #order_review #payment button, .ad-checkout #place_order {
    margin: 0 !important; padding: 0 20px !important; background-color: var(--ad-olive) !important;
    border-radius: var(--ad-radius-btn) !important; color: #fff !important;
}
.ad-checkout #place_order:hover { background-color: var(--ad-olive-hover) !important; }
.ad-checkout .ad-summary { background-color: var(--ad-surface) !important; }
.ad-checkout .woocommerce-checkout-review-order-table li { display: grid !important; }
.ad-checkout .woocommerce-checkout-review-order-table .ad-review__item { gap: 12px; }
.ad-checkout .ad-radio-card input[type="radio"] { height: 18px !important; width: 18px !important; }

/* کشور تک‌گزینه است (hidden input می‌ماند)؛ ردیف نمایشی‌اش فقط شلوغی است. */
.ad-checkout #billing_country_field, .ad-checkout #shipping_country_field { display: none; }

/* ووکامرس NoticeGroup خطاها را اولین فرزند form می‌گذارد؛ بدون این قاعده در
   grid یک ستون می‌گیرد و چیدمان را به‌هم می‌ریزد. */
.ad-checkout form.checkout > .woocommerce-NoticeGroup,
.ad-checkout form.checkout > .woocommerce-error,
.ad-checkout form.checkout > .woocommerce-message { grid-column: 1 / -1; }

/* ═══ تک‌محصول: چیپ‌های کد و توضیحات جمع‌شونده ═══ */
.ad-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ad-chip-option {
    min-width: 56px; padding: 8px 14px; border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-chip);
    background: var(--ad-surface); color: var(--ad-ink); font-size: 14px; cursor: pointer;
    transition: border-color .15s, background .15s;
}
.ad-chip-option:hover { border-color: var(--ad-olive); }
.ad-chip-option.is-selected { border-color: var(--ad-olive); background: var(--ad-olive); color: #fff; font-weight: 700; }
.ad-chip-option:focus-visible { outline: 2px solid var(--ad-olive); outline-offset: 2px; }
.variations .value:has(.ad-chips) { width: 100% !important; }
.variations tr:has(.ad-chips) { flex-wrap: wrap; gap: 6px; }

.ad-collapsible.is-collapsed { max-height: 280px; overflow: hidden; position: relative; }
.ad-collapsible.is-collapsed::after {
    content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 80px;
    background: linear-gradient(to bottom, rgba(245,242,235,0), var(--ad-bg));
}
.ad-collapsible__toggle {
    display: block; margin: 12px auto 0; padding: 10px 24px; border: 1px solid var(--ad-sand);
    border-radius: var(--ad-radius-btn); background: var(--ad-surface); color: var(--ad-ink); cursor: pointer;
}
.ad-collapsible__toggle:hover { border-color: var(--ad-olive); }

/* ═══ کارت محصول ═══ */
.ad-product-card {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--ad-surface); border-radius: var(--ad-radius-card); overflow: hidden;
    box-shadow: var(--ad-shadow-card); transition: box-shadow .2s, transform .2s;
}
.ad-product-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.ad-product-card__media {
    position: relative; display: block; aspect-ratio: 1 / 1; background: var(--ad-bg); overflow: hidden;
}
.ad-product-card__img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-product-card__placeholder {
    position: absolute; inset: 0; background:
        linear-gradient(135deg, var(--ad-bg) 0%, var(--ad-sand) 100%);
}
.ad-product-card__badge {
    position: absolute; inset-block-start: 10px; inset-inline-start: 10px; padding: 3px 9px;
    border-radius: 8px; background: var(--ad-error-bg); color: var(--ad-error); font-size: 12px; font-weight: 700;
}
.ad-product-card__rate {
    position: absolute; inset-block-start: 10px; inset-inline-end: 10px; display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.92); font-size: 12px; font-weight: 600; color: var(--ad-ink);
}
.ad-product-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 14px 6px; flex: 1 1 auto; }
.ad-product-card__name {
    color: var(--ad-ink); font-size: 14px; font-weight: 600; line-height: 1.7; text-decoration: none;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 3.4em;
}
.ad-product-card__name:hover { color: var(--ad-olive); }
.ad-product-card__price { margin-top: auto; font-size: 15px; font-weight: 700; color: var(--ad-ink); display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ad-product-card__price del { color: var(--ad-ink-muted); font-size: 12px; font-weight: 400; }
.ad-product-card__price ins { text-decoration: none; }
.ad-product-card__out { color: var(--ad-ink-muted); font-weight: 600; }
.ad-product-card__bundle { color: var(--ad-olive); }
.ad-product-card.is-out .ad-product-card__img { opacity: .5; }
.ad-product-card__actions { display: flex; align-items: center; gap: 8px; padding: 10px 14px 14px; }
.ad-product-card .ad-product-card__cta { flex: 1 1 auto; min-height: 42px; font-size: 14px; padding: 0 12px; }
.ad-product-card .ad-product-card__cta.added::after { content: " ✓"; }

.ad-product-card__img { position: absolute; inset: 0; }
.ad-product-card .ad-product-card__cta { white-space: nowrap; padding: 0 8px; font-size: 13px; }
.ad-product-card__price del { color: #5f5b52; }

/* موبایل: لیست محصولات دو ستونه (تک‌ستونه یعنی هر کالا یک صفحه‌ی کامل) */
@media (max-width: 640px) {
    .archive-theme-product ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
    .archive-theme-product .ad-product-card__body { padding: 10px 10px 4px; gap: 6px; }
    .archive-theme-product .ad-product-card__name { font-size: 13px; min-height: 3.2em; }
    .archive-theme-product .ad-product-card__price { font-size: 13px; }
    .archive-theme-product .ad-product-card__actions { padding: 8px 10px 10px; gap: 6px; }
    .archive-theme-product .ad-product-card .ad-product-card__cta { min-height: 38px; font-size: 12px; }
    .archive-theme-product .ad-product-card__badge, .archive-theme-product .ad-product-card__rate { font-size: 11px; padding: 2px 6px; }
}
.ad-product-card .ad-product-card__img { width: 100% !important; height: 100% !important; max-width: none; }

/* قاعده‌ی قدیمی تم برای `.remove` متن «حذف محصول» را با ::after اضافه می‌کند؛
   دکمه‌ی ما فقط ضربدر است و آن متن از قاب بیرون می‌زد. */
.ad-cart .ad-cart-row__remove-btn::after,
.ad-cart .ad-cart-row__remove-btn::before { content: none !important; }
.ad-cart .ad-cart-row__remove-btn { font-size: 20px; }

/* روی پروداکشن، ووکامرس select واریاسیون را با Select2 هم می‌پوشاند؛ وقتی چیپ‌ها
   هستند، آن قاب تکراری نباید دیده شود. */
.variations .value:has(.ad-chips) .select2-container { display: none !important; }

/*
 * دکمه‌ی «ثبت سفارش» پایین کارت پرداخت و «ثبت سفارش و پرداخت» کنار خلاصه یک
 * کار می‌کردند (خواست کارفرما: یکی حذف شود). #place_order واقعی باید داخل
 * #payment بماند چون ووکامرس با fragment عوضش می‌کند و درگاه‌ها به آن می‌چسبند؛
 * پس فقط از دید پنهان می‌شود (نه display:none تا فوکوس/Enter فرم کار کند) و
 * دکمه‌ی کنار خلاصه آن را کلیک می‌کند.
 */
.ad-checkout #place_order {
    position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important;
    padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important;
    border: 0 !important; white-space: nowrap;
}
.ad-checkout #payment .place-order { padding: 0; }

/* ═══ مسیر خرید: کارت دسته و برند ═══ */
.ad-tiles__head { padding: 28px 0 18px; }
.ad-tiles__title { margin: 0; font-size: 28px; font-weight: 800; color: var(--ad-ink); }
.ad-tiles__intro { margin: 6px 0 0; color: var(--ad-ink-muted); }
.ad-tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .ad-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 1100px) { .ad-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ad-tile { display: flex; flex-direction: column; height: 100%; background: var(--ad-surface); border-radius: var(--ad-radius-card); overflow: hidden;
    box-shadow: var(--ad-shadow-card); text-decoration: none; color: inherit; transition: box-shadow .2s, transform .2s; }
a.ad-tile:hover { box-shadow: 0 8px 24px rgba(0,0,0,.12); transform: translateY(-2px); }
.ad-tile__media { display: block; position: relative; aspect-ratio: 4 / 3; background: var(--ad-bg); overflow: hidden; }
.ad-tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ad-tile__placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 56px; font-weight: 800; color: var(--ad-olive); background: linear-gradient(135deg, var(--ad-bg), var(--ad-sand)); }
.ad-tile__body { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 14px 16px; }
.ad-tile__name { font-size: 16px; font-weight: 700; color: var(--ad-ink); }
.ad-tile__note { font-size: 13px; color: var(--ad-ink-muted); white-space: nowrap; }
.ad-tile__note.is-soon { background: var(--ad-sand); color: #4a463e; padding: 2px 10px; border-radius: 999px; }
.ad-tile.is-soon { opacity: .75; cursor: default; }
.ad-tiles__empty { padding: 36px 0; text-align: center; color: var(--ad-ink-muted); }
.ad-tiles__all { margin: 28px 0 0; text-align: center; }

/*
 * نوار جستجوی هدر دسکتاپ.
 * ظرف هدر flex است و جستجو w-full داشت؛ روی نمایشگر ۱۴۴۰ عرضش ۸۹۵px (حدود دو
 * سوم هدر) می‌شد. حداکثر عرض می‌گیرد و بین لوگو و دکمه‌ها وسط‌چین می‌ماند.
 * (کلاس max-w-* در Tailwind کامپایل‌شده ممکن است نباشد، پس CSS خودمان.)
 */
@media (min-width: 1024px) {
    header .container > div:has(> .atadecor-search) {
        max-width: 560px;
        margin-inline: auto;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   هدر و فوتر موبایل
   ═══════════════════════════════════════════════════════════════════ */

/* ——— دکمه‌ی منو (همبرگر) و هم‌اندازه‌کردن دکمه‌های هدر ——— */
.ad-menu-btn {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; margin-inline-end: 10px; padding: 0;
    border: 0; border-radius: 12px; background-color: var(--ad-bg); color: var(--ad-ink);
    cursor: pointer; transition: background-color .15s ease, color .15s ease;
}
.ad-menu-btn:hover, .ad-menu-btn[aria-expanded="true"] { background-color: var(--ad-olive); color: #fff; }
.ad-menu-btn:focus-visible { outline: 2px solid var(--ad-olive); outline-offset: 2px; }

@media (max-width: 1023px) {
    /* دکمه‌های حساب و سبد هم ۴۴px (حداقل اندازه‌ی لمس)، هم‌شکل با همبرگر */
    header a[aria-label="My Account"],
    header a[aria-label="Shopping Cart"] {
        width: 44px !important; height: 44px !important; min-width: 44px; border-radius: 12px !important;
        background-color: var(--ad-bg) !important; justify-content: center;
    }
    header a[aria-label="Shopping Cart"] { margin-inline-start: 8px; }
}

/* ——— فوتر موبایل ——— */
@media (max-width: 1023px) {
    .ad-footer .ad-footer__brand,
    .ad-footer .ad-footer__links,
    .ad-footer .ad-footer__contact {
        width: 100% !important; max-width: none !important; min-width: 0 !important;
        padding: 0 0 28px !important; margin: 0 !important;
    }
    .ad-footer .ad-footer__links,
    .ad-footer .ad-footer__contact { padding-top: 24px !important; border-top: 1px solid rgba(255,255,255,.12); }

    .ad-footer .ad-footer__brand { text-align: center; }
    .ad-footer .ad-footer__text { font-size: 14px; line-height: 1.9; max-width: 460px; margin: 0 auto 16px; }

    .ad-footer h2 { margin: 0 0 16px !important; font-size: 16px; }

    /* لینک‌های دسترسی سریع: دو ستون */
    .ad-footer .nav-footer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
    .ad-footer .nav-footer li { margin: 0 !important; }
    .ad-footer .nav-footer a { display: block; padding: 10px 0; }

    /* راه‌های ارتباطی: هر مورد یک ردیف، آیکن کنار متن (نه وسط‌چین و زیر هم) */
    .ad-footer .ad-footer__contact > ul { display: flex !important; flex-direction: column; margin: 0 !important; gap: 14px; }
    .ad-footer .ad-footer__contact > ul > li {
        width: 100% !important; padding: 0 !important; margin: 0 !important;
        flex-direction: row !important; align-items: flex-start !important; justify-content: flex-start !important; text-align: start;
    }
    .ad-footer .ad-footer__contact > ul > li > div:first-child { margin: 0 0 0 0 !important; margin-inline-end: 14px !important; flex: none; }
    .ad-footer .ad-footer__contact p,
    .ad-footer .ad-footer__contact div { text-align: start !important; }
    .ad-footer .ad-footer__contact .pb-4 { padding-bottom: 6px; }

    /* شبکه‌های اجتماعی: وسط، و دکمه‌ی لمسی ۴۰px */
    .ad-footer .ad-footer__contact > ul > li:last-child { justify-content: center !important; padding-top: 8px !important; }
    .ad-footer .ad-footer__contact .ad-footer-social { width: 40px !important; height: 40px !important; }

    .ad-footer .ad-footer__brand > div { margin-bottom: 0 !important; }
}

/* دکمه‌ی شناور ماشین‌حساب (پایین-چپ) روی آیکن‌های شبکه‌ی اجتماعی می‌افتاد. */
@media (max-width: 1023px) {
    .ad-footer { padding-bottom: 76px; }
}

/* display:inline-flex دکمه‌ی همبرگر کلاس lg:hidden تیلویند را (که قبل‌تر بارگذاری می‌شود)
   روی دسکتاپ خنثی می‌کرد و دکمه‌ی منوی موبایل کنار لوگو دیده می‌شد. */
@media (min-width: 1024px) {
    .ad-menu-btn { display: none !important; }
}

/* ═══════════════════════════════════════════════════════════════════
   پنل منوی کشویی موبایل
   ═══════════════════════════════════════════════════════════════════ */

/* پس‌زمینه‌ی پشت پنل: تیره‌ی سبک به‌جای بلور ۴۰px (که صفحه را به لکه‌ی قهوه‌ای تبدیل می‌کرد) */
.backdrop {
    background-color: rgba(32, 35, 33, .55);
    -webkit-backdrop-filter: blur(2px);
            backdrop-filter: blur(2px);
}

#mobile-menu {
    width: min(86vw, 340px) !important;
    padding: 0 !important;
    background-color: var(--ad-bg);
    box-shadow: 0 0 32px rgba(0, 0, 0, .25);
    overscroll-behavior: contain;
}

/* سربرگ: لوگو و دکمه‌ی بستن */
#mobile-menu > div:first-child {
    margin: 0 !important; padding: 16px 18px !important;
    border-bottom: 1px solid var(--ad-sand) !important; background-color: var(--ad-surface);
}
.ad-menu-close {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    width: 44px; height: 44px; border: 0; border-radius: 12px; cursor: pointer;
    background-color: var(--ad-bg); color: var(--ad-ink); transition: background-color .15s, color .15s;
}
.ad-menu-close:hover { background-color: var(--ad-olive); color: #fff; }
.ad-menu-close:focus-visible { outline: 2px solid var(--ad-olive); outline-offset: 2px; }

/* تب‌ها: کنترل دوحالته (segmented) */
#mobile-menu > div:nth-child(2) {
    gap: 4px !important; margin: 16px 18px !important; padding: 4px; border-radius: 14px; background-color: var(--ad-sand);
}
#mobile-menu .tab-item-2 {
    height: 40px !important; border-radius: 10px !important; border: 0 !important;
    font-size: 14px; font-weight: 600; cursor: pointer;
    background: transparent !important; color: var(--ad-ink-muted) !important; box-shadow: none !important;
    transition: background-color .15s, color .15s;
}
#mobile-menu .tab-item-2.active { background: var(--ad-surface) !important; color: var(--ad-ink) !important; box-shadow: 0 1px 4px rgba(0,0,0,.12) !important; }

/* بدنه‌ی منو */
#mobile-menu > .flex.flex-col { padding: 0 18px 20px; flex: 1 1 auto; }
#mobile-menu ul { margin-bottom: 0 !important; }
#mobile-menu ul > li > a {
    min-height: 48px; padding-block: 0 !important; font-size: 16px; font-weight: 600;
    border-bottom: 1px solid var(--ad-sand);
}
#mobile-menu ul > li:last-child > a { border-bottom: 0; }
#mobile-menu ul > li > a:hover, #mobile-menu ul > li.current-menu-item > a { color: var(--ad-olive) !important; }
#mobile-menu .menu-item.menu-item-has-children { position: relative; }
#mobile-menu .menu-item.menu-item-has-children > a { width: 100%; padding-inline-end: 28px; }
#mobile-menu .menu-item.menu-item-has-children:after { top: 18px; color: var(--ad-ink-muted); }
#mobile-menu .menu-item .sub-menu {
    margin: 4px 0 8px; padding: 6px 14px !important; border-radius: 12px; background-color: var(--ad-surface); --tw-bg-opacity: 1;
}
#mobile-menu .menu-item .sub-menu a { min-height: 44px; font-size: 15px; font-weight: 500; border-bottom: 1px solid var(--ad-bg); }
#mobile-menu .menu-item .sub-menu li:last-child a { border-bottom: 0; }

/* دسترسی سریع و شبکه‌ها */
.ad-menu-actions { display: flex; gap: 10px; margin-top: 20px; }
.ad-menu-action {
    flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
    border-radius: 12px; border: 1px solid var(--ad-sand); background-color: var(--ad-surface);
    color: var(--ad-ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.ad-menu-action:first-child { background-color: var(--ad-olive); border-color: var(--ad-olive); color: #fff; }
.ad-menu-action:hover { border-color: var(--ad-olive); }
.ad-menu-socials { display: flex; justify-content: center; gap: 10px; margin-top: 18px; padding: 0; list-style: none; }
.ad-menu-socials li { margin: 0 !important; }
.ad-menu-socials a {
    display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0 !important;
    border-radius: 50%; border: 1px solid var(--ad-sand); background-color: var(--ad-surface); color: var(--ad-ink) !important;
}

/* بدنه‌ی منو: محتوا از بالا می‌آید و دسترسی‌های سریع به پایین می‌چسبند
   (justify-between قدیمی بین سه بخش فاصله‌ی بی‌دلیل می‌انداخت و شبکه‌ها بریده می‌شدند). */
#mobile-menu > .flex.flex-col { justify-content: flex-start !important; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
#mobile-menu .ad-menu-actions { margin-top: auto; padding-top: 24px; }

/* پایین منو: دسترسی‌های سریع به کف پنل می‌چسبند و موقع اسکرول لیست دیده می‌مانند. */
#mobile-menu .ad-menu-foot {
    position: sticky; bottom: 0; margin: auto -18px 0; padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px));
    background-color: var(--ad-bg); border-top: 1px solid var(--ad-sand);
}
#mobile-menu .ad-menu-actions { margin-top: 0; padding-top: 0; }
#mobile-menu .ad-menu-socials { margin-top: 12px; }

/* تب دسته‌بندی‌ها: آکاردئون ساده */
.ad-menu-cats { list-style: none; margin: 0; padding: 0; }
.ad-menu-cats > li { border-bottom: 1px solid var(--ad-sand); }
.ad-menu-cats > li:last-child { border-bottom: 0; }
.ad-menu-cats summary, .ad-menu-cats .ad-menu-cats__link, .ad-menu-cats .ad-menu-cats__soon {
    display: flex; align-items: center; justify-content: space-between; min-height: 48px;
    font-size: 16px; font-weight: 600; color: var(--ad-ink); cursor: pointer; list-style: none; text-decoration: none;
}
.ad-menu-cats summary::-webkit-details-marker { display: none; }
/* همان آیکون فلشِ آیتم‌های دارای زیرمنو در تب «منوی اصلی» (icomoon \e903، ۱۲px، ضخیم) */
.ad-menu-cats summary::after { content: "\e903"; font-family: "icomoon"; font-size: 12px; font-weight: 700; color: var(--ad-ink-muted); transition: transform .15s; }
.ad-menu-cats details[open] > summary::after { transform: rotate(180deg); }
.ad-menu-cats .ad-menu-cats__soon { cursor: default; color: var(--ad-ink-muted); }
.ad-menu-cats .ad-menu-cats__soon em { font-style: normal; font-size: 12px; background: var(--ad-sand); padding: 2px 10px; border-radius: 999px; }
.ad-menu-cats details ul { list-style: none; margin: 0 0 10px; padding: 6px 14px; background: var(--ad-surface); border-radius: 12px; }
.ad-menu-cats details ul a { display: flex; align-items: center; justify-content: space-between; min-height: 44px; font-size: 15px; font-weight: 500; color: var(--ad-ink); text-decoration: none; border-bottom: 1px solid var(--ad-bg); }
.ad-menu-cats details ul li:last-child a { border-bottom: 0; }
.ad-menu-cats details ul a small { color: var(--ad-ink-muted); font-size: 12px; }

/* h-full (۱۰۰٪) با نوار مدیر وردپرس (کاربر واردشده) پنل را ۴۶px پایین‌تر می‌برد و کف آن
   از صفحه بیرون می‌زد؛ بالا و پایین را صریح به نمای‌گاه می‌چسبانیم. */
#mobile-menu { top: 0; bottom: 0; height: auto !important; }

/* ═══ «چرا آتادکور؟» ═══ */
.ad-why-grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .ad-why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ad-why-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ad-why-card { display: flex; flex-direction: column; align-items: center; }
/* عنوان: شکستن متعادل (نه «ترکیب‌شده، نه / تکی») */
.ad-why-card .title-public { text-wrap: balance; text-align: center; margin-bottom: 10px; }
/* متن: justify با خط آخر وسط‌چین؛ در کارت‌های باریک شکاف بین کلمه‌ها زیاد نمی‌شود چون موبایل تک‌ستونه است */
.ad-why-card p { text-align: justify; text-align-last: center; text-justify: inter-word; hyphens: auto; line-height: 2; width: 100%; }

/* آیکن‌های «از کجا شروع کنیم؟»: بعد از حذف حاشیه‌ی شفاف، همه هم‌اندازه و کمی بزرگ‌تر */
.ad-start-icon { width: 56px !important; height: 56px !important; }

/* ═══ دکمه‌ی علاقه‌مندی روی کارت محصول ═══ */
.atadecor-wishlist-button {
    display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; cursor: pointer;
    width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ad-ink);
    box-shadow: 0 1px 6px rgba(0,0,0,.15); transition: transform .15s, color .15s, background .15s;
    -webkit-tap-highlight-color: transparent;
}
.atadecor-wishlist-button:hover { transform: scale(1.08); color: #c0392b; }
.atadecor-wishlist-button:focus-visible { outline: 2px solid var(--ad-olive); outline-offset: 2px; }
.atadecor-wishlist-button .atadecor-wishlist-icon { display: block; pointer-events: none; }
.atadecor-wishlist-button.is-active { color: #c0392b; }
.atadecor-wishlist-button.is-active .atadecor-wishlist-icon path { fill: currentColor; }
.atadecor-wishlist-button.is-loading { opacity: .6; pointer-events: none; }
.ad-product-card > .atadecor-wishlist-button { position: absolute; inset-block-start: 10px; inset-inline-end: 10px; z-index: 2; }
.ad-product-card__rate { inset-block-start: auto; inset-block-end: 10px; inset-inline-end: auto; inset-inline-start: 10px; }
@media (max-width: 640px) {
    .atadecor-wishlist-button { width: 32px; height: 32px; }
    .atadecor-wishlist-button .atadecor-wishlist-icon { width: 18px; height: 18px; }
    .ad-product-card > .atadecor-wishlist-button { inset-block-start: 8px; inset-inline-end: 8px; }
}

/* ═══ حساب کاربری ═══ */
.ad-account { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; padding-block: 32px 48px; }
.ad-account__side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; }
.ad-account__profile {
    display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--ad-surface);
    border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-card);
}
.ad-account__avatar {
    flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--ad-olive); color: #fff;
    display: grid; place-items: center; font-size: 20px; font-weight: 700;
}
.ad-account__who { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ad-account__name { font-size: 15px; color: var(--ad-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-account__phone { font-size: 13px; color: var(--ad-ink-muted); text-align: end; }
.ad-account__nav { background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-card); padding: 8px; }
.ad-account__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ad-account__link {
    display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
    color: var(--ad-ink); font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s, color .15s;
}
.ad-account__link:hover { background: var(--ad-bg); color: var(--ad-ink); }
.ad-account__link.is-active { background: var(--ad-olive); color: #fff; }
.ad-account__link.is-logout { color: var(--ad-error); margin-top: 6px; border-top: 1px solid var(--ad-sand); border-radius: 0 0 12px 12px; padding-top: 14px; }
.ad-account__link.is-logout:hover { background: var(--ad-error-bg); }
.ad-account__icon { flex: none; }

.ad-account__main { min-width: 0; }
.ad-account__head { margin-bottom: 16px; }
.ad-account__title { margin: 0; font-size: 22px; font-weight: 800; color: var(--ad-ink); }
.ad-account__panel { background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-card); padding: 24px; }
.ad-account .ad-card { background: var(--ad-bg); border-color: transparent; }
.ad-account .ad-card h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.ad-muted { color: var(--ad-ink-muted); font-size: 13px; }
.ad-lead { margin: 0 0 16px; }
.ad-link { color: var(--ad-olive); font-weight: 700; text-decoration: none; font-size: 14px; }
.ad-link:hover { text-decoration: underline; }

/* پیشخوان */
.ad-dash { display: flex; flex-direction: column; gap: 20px; }
.ad-dash__hello h2 { margin: 0 0 4px; font-size: 18px; font-weight: 800; }
.ad-dash__hello p { margin: 0; color: var(--ad-ink-muted); font-size: 14px; }
.ad-dash__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ad-dash__tile {
    display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--ad-radius-card);
    background: var(--ad-bg); color: var(--ad-olive); text-decoration: none; transition: box-shadow .2s, transform .2s;
}
.ad-dash__tile:hover { box-shadow: var(--ad-shadow-card); transform: translateY(-2px); }
.ad-dash__tile strong { font-size: 24px; color: var(--ad-ink); line-height: 1.2; }
.ad-dash__tile span { font-size: 13px; color: var(--ad-ink-muted); }
.ad-dash__nudge {
    display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: var(--ad-radius-card);
    background: #FBF4E2; color: #6b5314; font-size: 14px; text-decoration: none;
}
.ad-dash__recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-dash__recent-head h3 { margin: 0; font-size: 16px; }
.ad-dash__recent-head a { color: var(--ad-olive); font-size: 14px; font-weight: 700; text-decoration: none; }

/* سفارش‌ها */
.ad-orders { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ad-order__link {
    display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--ad-radius-card);
    background: var(--ad-bg); color: var(--ad-ink); text-decoration: none; transition: box-shadow .2s;
}
.ad-order__link:hover { box-shadow: var(--ad-shadow-card); color: var(--ad-ink); }
.ad-order__thumbs { flex: none; display: flex; }
.ad-order__thumbs img, .ad-order__noimg { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; background: var(--ad-sand); border: 2px solid var(--ad-bg); }
.ad-order__thumbs img + img, .ad-order__thumbs img + .ad-order__noimg { margin-inline-start: -16px; }
.ad-order__info { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.ad-order__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ad-order__top strong { font-size: 14px; }
.ad-order__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ad-ink-muted); }
.ad-order__total { color: var(--ad-ink); font-weight: 700; margin-inline-start: auto; }
.ad-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.ad-badge--ok { background: var(--ad-success-bg); color: var(--ad-success); }
.ad-badge--warn { background: #FBF0D6; color: #8a6410; }
.ad-badge--info { background: #E3EDF7; color: #285a8a; }
.ad-badge--bad { background: var(--ad-error-bg); color: var(--ad-error); }
.ad-badge--muted { background: var(--ad-sand); color: var(--ad-ink-muted); }
.ad-pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.ad-pager .ad-btn { min-height: 40px; font-size: 14px; }
.ad-pager__now { font-size: 14px; color: var(--ad-ink-muted); }
.ad-empty { text-align: center; padding: 36px 16px; background: var(--ad-bg); border-radius: var(--ad-radius-card); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ad-empty p { margin: 0; }

/* جزئیات سفارش */
.ad-vorder { display: flex; flex-direction: column; gap: 16px; }
.ad-vorder__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ad-vorder__head > div { display: flex; flex-direction: column; gap: 2px; }
.ad-vorder__head span:not(.ad-badge) { color: var(--ad-ink-muted); font-size: 13px; }
.ad-vorder__items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ad-vorder__items li { display: flex; align-items: center; gap: 12px; }
.ad-vorder__img img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; display: block; background: var(--ad-sand); }
.ad-vorder__img:empty { width: 56px; height: 56px; border-radius: 10px; background: var(--ad-sand); }
.ad-vorder__name { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; }
.ad-vorder__name a { color: var(--ad-ink); text-decoration: none; }
.ad-vorder__name a:hover { color: var(--ad-olive); }
.ad-vorder__name .wc-item-meta { list-style: none; margin: 4px 0 0; padding: 0; font-size: 12px; font-weight: 400; color: var(--ad-ink-muted); }
.ad-vorder__name .wc-item-meta p { display: inline; margin: 0; }
.ad-vorder__qty { color: var(--ad-ink-muted); font-size: 13px; }
.ad-vorder__line { font-weight: 700; font-size: 14px; white-space: nowrap; }
.ad-vorder__totals { margin: 0; border-top: 1px solid var(--ad-sand); padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.ad-vorder__totals div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.ad-vorder__totals dt { color: var(--ad-ink-muted); }
.ad-vorder__totals dd { margin: 0; font-weight: 600; }
.ad-vorder__totals .is-grand { font-size: 16px; padding-top: 8px; border-top: 1px dashed var(--ad-sand); }
.ad-vorder__totals .is-grand dt, .ad-vorder__totals .is-grand dd { color: var(--ad-ink); font-weight: 800; }
.ad-vorder__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ad-vorder address { font-style: normal; line-height: 1.9; font-size: 14px; }
.ad-vorder .ad-card p { margin: 0 0 4px; font-size: 14px; }
.ad-vorder__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; border-inline-start: 2px solid var(--ad-sand); padding-inline-start: 16px; }
.ad-timeline li { position: relative; }
.ad-timeline li::before { content: ""; position: absolute; inset-inline-start: -23px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--ad-olive); }
.ad-timeline time { display: block; font-size: 12px; color: var(--ad-ink-muted); margin-bottom: 2px; }
.ad-timeline p { margin: 0; font-size: 14px; }

/* آدرس‌ها */
.ad-addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ad-address header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.ad-address header h3 { margin: 0; }
.ad-address address { font-style: normal; line-height: 1.9; font-size: 14px; }

/* فرم‌ها */
.ad-form { display: flex; flex-direction: column; gap: 16px; }
.ad-form__title { margin: 0; font-size: 17px; font-weight: 800; }
.ad-form__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ad-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ad-account .ad-field { margin: 0 0 14px; }
.ad-account .ad-field label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ad-ink); }
.ad-account .ad-field .required { color: var(--ad-error); text-decoration: none; }
.ad-account .ad-field small { display: block; margin-top: 6px; font-size: 12px; color: var(--ad-ink-muted); }
.ad-account .ad-field input[readonly], .ad-account .ad-field input:disabled { background: var(--ad-sand); color: var(--ad-ink-muted); cursor: not-allowed; }
.ad-account .woocommerce-address-fields__field-wrapper { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.ad-account .woocommerce-address-fields__field-wrapper .form-row { float: none; width: auto; }
.ad-account .woocommerce-address-fields__field-wrapper .form-row-wide,
.ad-account .woocommerce-address-fields__field-wrapper #billing_address_1_field,
.ad-account .woocommerce-address-fields__field-wrapper #shipping_address_1_field { grid-column: 1 / -1; }
.ad-account .select2-container .select2-selection--single { min-height: 48px; border-radius: var(--ad-radius-input); border-color: var(--ad-sand); display: flex; align-items: center; }
.ad-narrow { max-width: 460px; margin-inline: auto; }

/* ورود */
.ad-login { max-width: 420px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 32px 24px; }
.ad-login h2 { margin: 0; font-size: 20px; }
.ad-login p { margin: 0; }
.ad-login__icon { width: 56px; height: 56px; border-radius: 50%; background: var(--ad-bg); color: var(--ad-olive); display: grid; place-items: center; }

/* علاقه‌مندی‌ها در حساب */
.ad-wl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.ad-account .ad-wl-grid .ad-product-card { background: var(--ad-bg); box-shadow: none; }

/* تبلت و موبایل */
@media (max-width: 900px) {
    .ad-account { grid-template-columns: minmax(0, 1fr); gap: 16px; padding-block: 16px 32px; }
    .ad-account__side { position: static; min-width: 0; }
    .ad-account__nav { max-width: 100%; scrollbar-width: none; }
    .ad-account__nav::-webkit-scrollbar { display: none; }
    .ad-account__nav { overflow-x: auto; padding: 6px; -webkit-overflow-scrolling: touch; }
    .ad-account__nav ul { flex-direction: row; gap: 4px; width: max-content; min-width: 100%; }
    .ad-account__link { padding: 10px 14px; white-space: nowrap; }
    .ad-account__link.is-logout { margin-top: 0; border-top: 0; border-radius: 12px; padding-top: 10px; }
    .ad-account__panel { padding: 16px; }
    .ad-account__title { font-size: 19px; }
}
@media (max-width: 640px) {
    .ad-dash__tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .ad-dash__tile { padding: 12px 8px; align-items: center; text-align: center; }
    .ad-dash__tile strong { font-size: 20px; }
    .ad-dash__tile span { font-size: 11px; }
    .ad-grid-2, .ad-addresses, .ad-vorder__cols, .ad-account .woocommerce-address-fields__field-wrapper { grid-template-columns: 1fr; }
    .ad-wl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .ad-order__thumbs img, .ad-order__noimg { width: 44px; height: 44px; }
    .ad-order__total { margin-inline-start: 0; }
    .ad-form__actions .ad-btn { flex: 1 1 auto; }
}

/* ═══ هیرو صفحهٔ اول: هم‌عرض کادر محتوا، نه تمام‌صفحه ═══ */
.ad-hero-wrap { padding-block: 20px 8px; }
.ad-hero { border-radius: 24px; }
.ad-hero__inner { min-height: 380px; padding: 40px 28px; }
@media (min-width: 768px) { .ad-hero__inner { min-height: 420px; padding: 48px 48px; } }
@media (min-width: 1024px) { .ad-hero__inner { min-height: 460px; padding: 56px 64px; } }
@media (max-width: 640px) { .ad-hero-wrap { padding-block: 12px 4px; } .ad-hero { border-radius: 18px; } .ad-hero__inner { min-height: 340px; padding: 32px 20px; } }

/* ═══ انتخاب فایل — یکدست با دکمه‌ها (به‌جای ظاهر پیش‌فرض مرورگر) ═══ */
input[type="file"] {
    width: 100%; padding: 8px; border: 1px dashed var(--ad-sand); border-radius: var(--ad-radius-input);
    background: var(--ad-surface); color: var(--ad-ink-muted); font-family: inherit; font-size: 14px; cursor: pointer;
}
input[type="file"]::file-selector-button {
    margin-inline-end: 12px; padding: 8px 16px; border: 0; border-radius: var(--ad-radius-chip);
    background: var(--ad-olive); color: #fff; font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .2s;
}
input[type="file"]:hover::file-selector-button { background: var(--ad-olive-hover); }

/* آخرین کارت تنها در گرید فرد: کل ردیف را پر کند تا یتیم نماند */
@media (max-width: 767px) {
    .ad-grid-orphan > :last-child:nth-child(odd) { grid-column: 1 / -1; }
    .ad-grid-orphan > :last-child:nth-child(odd)[style*="aspect-ratio"],
    .ad-grid-orphan > :last-child:nth-child(odd) [style*="aspect-ratio"] { aspect-ratio: 2 / 1 !important; }
}

/* ═══ sec-27..39 landing modules (shared) ═══ */
.ad-min0 { min-width: 0; }

/* ═══ sec-33 amazing products (mobile label) ═══ */
.ad-amazing-label { background: var(--ad-sand); color: var(--ad-olive); margin-block-end: 8px; }

/* ═══ sec-38 custom banners ═══ */
.ad-banners { display: grid; grid-template-columns: 1fr; gap: 12px; }
.ad-banners__item { display: block; min-width: 0; }
.ad-banners__img { display: block; width: 100%; height: auto; border-radius: var(--ad-radius-card); }
@media (min-width: 768px) {
    .ad-banners--2, .ad-banners--4 { grid-template-columns: repeat(2, 1fr); }
    .ad-banners--3 { grid-template-columns: repeat(3, 1fr); }
    .ad-banners { gap: 16px; }
}
@media (min-width: 1024px) {
    .ad-banners--4 { grid-template-columns: repeat(4, 1fr); }
}

/* ═══ sec-39 categories background ═══ */
.ad-cat-bg-empty { position: absolute; inset: 0; background: var(--ad-sand); }
.ad-cat-name {
    position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 5;
    padding: 24px 12px 10px; color: #fff; font-weight: 700; text-align: center;
    background: linear-gradient(to top, rgba(32, 35, 33, .65), transparent);
}
@media (min-width: 1024px) { .ad-cat-name { display: none; } }

/* ═══ placeholders, chips, directory cards, pager, empty state (sec-40/41, archives, blog) ═══ */
.ad-ph { display: flex; align-items: center; justify-content: center; background: var(--ad-sand); color: var(--ad-olive); font-weight: 700; overflow: hidden; }
.ad-ph--avatar { width: 100%; height: 100%; font-size: 48px; }
.ad-ph--card { width: 100%; height: 100%; min-height: 100%; font-size: 56px; }
.ad-ph--wide { display: flex; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--ad-radius-card); }
.ad-ph--post { width: 100%; aspect-ratio: 16 / 10; }
.ad-ph--thumb { flex: none; width: 100px; height: 80px; border-radius: var(--ad-radius-chip); }
.ad-ph--cover { position: absolute; inset: 0; border-radius: var(--ad-radius-card); }
@media (min-width: 1280px) { .ad-ph--post { width: 375px; height: 300px; aspect-ratio: auto; } }

.ad-chips { display: flex; gap: 8px; margin: 0 0 24px; padding: 0 0 8px; list-style: none; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ad-chips > li { flex: none; }
.ad-chip { display: inline-flex; align-items: center; min-height: 44px; padding-inline: 20px; border: 1px solid var(--ad-sand); border-radius: 999px; background: var(--ad-surface); color: var(--ad-ink); font-size: 14px; white-space: nowrap; text-decoration: none; transition: background .2s, color .2s; }
.ad-chip:hover, .ad-chip:focus-visible { border-color: var(--ad-olive); color: var(--ad-olive); }
.ad-chip.is-active { background: var(--ad-olive); border-color: var(--ad-olive); color: #fff; }

.ad-dir-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .ad-dir-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ad-dir-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; } }
.ad-dir-card { display: flex; flex-direction: column; overflow: hidden; background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-card); transition: box-shadow .2s; }
.ad-dir-card:hover { box-shadow: var(--ad-shadow-card); }
.ad-dir-card__media { display: block; aspect-ratio: 4 / 3; background: var(--ad-sand); overflow: hidden; }
.ad-dir-card__img { width: 100%; height: 100%; object-fit: cover; }
.ad-dir-card__logo { max-width: 55%; max-height: 55%; object-fit: contain; filter: brightness(0) invert(1); }
.ad-dir-card__body { display: flex; flex-direction: column; flex: 1; gap: 6px; padding: 16px; }
.ad-dir-card__title { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.6; color: var(--ad-ink); }
.ad-dir-card__title a { color: inherit; text-decoration: none; }
.ad-dir-card__sub { font-size: 14px; color: var(--ad-olive); font-weight: 600; }
.ad-dir-card__text { margin: 0 0 8px; font-size: 14px; line-height: 1.9; color: var(--ad-ink-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ad-dir-card__cta { margin-top: auto; align-self: flex-start; }

.ad-pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 32px; }
.ad-pager .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; padding-inline: 8px; border: 1px solid var(--ad-sand); border-radius: 999px; background: var(--ad-surface); color: var(--ad-ink); font-size: 15px; text-decoration: none; }
.ad-pager a.page-numbers:hover { border-color: var(--ad-olive); color: var(--ad-olive); }
.ad-pager .page-numbers.current { background: var(--ad-olive); border-color: var(--ad-olive); color: #fff; font-weight: 700; }

.ad-empty { padding: 40px 20px; text-align: center; background: var(--ad-surface); border: 1px dashed var(--ad-sand); border-radius: var(--ad-radius-card); color: var(--ad-ink-muted); }
.ad-empty p { margin: 0; font-size: 16px; line-height: 2; }
.ad-empty__title { margin: 0 0 8px; font-size: 20px; font-weight: 800; color: var(--ad-ink); }

/* ═══ sec-42 / sec-43 request forms ═══ */
.ad-form-msg { padding: 12px 16px; margin-bottom: 16px; background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-input); font-size: 15px; font-weight: 700; text-align: center; }
.ad-form-msg p { margin: 0; }
.ad-form label { display: block; font-size: 14px; font-weight: 600; color: var(--ad-ink); }
.ad-form .input, .ad-form .textarea, .ad-form select { width: 100%; min-height: 44px; padding-inline: 14px; background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-input); font-family: inherit; font-size: 15px; color: var(--ad-ink); transition: border-color .2s, box-shadow .2s; }
.ad-form .textarea { min-height: 120px; padding-block: 10px; }
.ad-form .input:focus, .ad-form .textarea:focus, .ad-form select:focus { outline: 0; border-color: var(--ad-olive); box-shadow: 0 0 0 3px rgba(105, 112, 90, .2); }
.ad-form .input:user-invalid, .ad-form .textarea:user-invalid, .ad-form select:user-invalid { border-color: var(--ad-error); background: var(--ad-error-bg); }
.ad-form .select2-container { width: 100% !important; }
.ad-form .select2-container .select2-selection--single { display: flex; align-items: center; height: 44px; background: var(--ad-surface); border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-input); }
.ad-form .select2-container .select2-selection__rendered { padding-inline: 14px; line-height: 44px; color: var(--ad-ink); }
.ad-form .select2-container .select2-selection__arrow { height: 44px; }
.ad-form .select2-container--open .select2-selection--single, .ad-form .select2-container--focus .select2-selection--single { border-color: var(--ad-olive); }
.ad-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 768px) { .ad-form-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; } }
.ad-upload-box { padding: 16px; background: var(--ad-surface); border: 1px dashed var(--ad-olive); border-radius: var(--ad-radius-card); }
.ad-form .ad-file { display: block; width: 100%; padding: 8px; font-family: inherit; font-size: 14px; color: var(--ad-ink-muted); }
.ad-form .ad-file::file-selector-button { min-height: 40px; margin-inline-end: 12px; padding-inline: 18px; border: 0; border-radius: var(--ad-radius-btn); background: var(--ad-olive); color: #fff; font-family: inherit; font-weight: 700; cursor: pointer; }
.ad-form .ad-file::file-selector-button:hover { background: var(--ad-olive-hover); }
.ad-previews img { border-color: var(--ad-sand) !important; border-radius: var(--ad-radius-chip) !important; }
.ad-form-submit { min-height: 48px; padding-inline: 28px; border-radius: var(--ad-radius-btn); }
.ad-form-submit[disabled] { opacity: .6; cursor: not-allowed; }

/* متن مخصوص صفحه‌خوان/موتور جستجو (H1 جایگزین) */
.screen-reader-text {
    position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ——— دفترچه‌ی آدرس + نقشه ——— */
.ad-hidden-field { display: none !important; }

.ad-addr-card__row {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ad-addr-card__row .ad-step-card__title { margin-bottom: 4px; }
.ad-addr-card__row p { margin: 0; }

.ad-addr-page-head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px;
}
.ad-addr-page-head .ad-lead { margin: 0; }
.ad-addr-book { display: grid; gap: 12px; }

.ad-addr-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 20px; }
.ad-addr-view[hidden] { display: none; }
.ad-addr-list { display: grid; gap: 10px; margin-bottom: 16px; }

.ad-addr-row-card {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px;
    border: 1px solid var(--ad-sand); border-radius: var(--ad-radius-input); background: var(--ad-surface);
}
.ad-addr-list .ad-addr-row-card { cursor: pointer; }
.ad-addr-list .ad-addr-row-card:hover { border-color: var(--ad-olive); }
.ad-addr-row-card.is-default { border-color: var(--ad-olive); }
.ad-addr-row-card__main { flex: 1 1 auto; min-width: 0; }
.ad-addr-row-card__main strong { display: flex; align-items: center; gap: 8px; color: var(--ad-ink); }
.ad-addr-row-card__main p { margin: 4px 0 0; font-size: 14px; line-height: 1.8; color: var(--ad-ink-muted); }
.ad-addr-row-card__tools { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ad-addr-row-card__tools .ad-link { background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.ad-link--danger { color: var(--ad-error); }
.ad-addr-radio {
    flex: 0 0 18px; width: 18px; height: 18px; margin-top: 3px;
    border: 2px solid var(--ad-sand); border-radius: 50%;
}
.ad-addr-row-card.is-default .ad-addr-radio { border-color: var(--ad-olive); box-shadow: inset 0 0 0 3px var(--ad-surface); background: var(--ad-olive); }

.ad-addr-form { display: grid; gap: 16px; }
.ad-addr-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ad-addr-presets { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.ad-addr-presets .ad-chip { cursor: pointer; border: 1px solid var(--ad-sand); background: var(--ad-surface); }
.ad-addr-presets .ad-chip:hover { border-color: var(--ad-olive); }
.ad-addr-actions { display: flex; gap: 10px; }
.ad-addr-actions .ad-btn:first-child { flex: 1; }
.ad-addr-hint { margin: 8px 0 0; font-size: 13px; }
.ad-field input.is-invalid, .ad-field select.is-invalid, .ad-field textarea.is-invalid { border-color: var(--ad-error); }

.ad-addr-map { position: relative; border-radius: var(--ad-radius-input); overflow: hidden; border: 1px solid var(--ad-sand); }
.ad-addr-map__canvas { height: 260px; background: var(--ad-bg); z-index: 0; }
.ad-addr-map__pin {
    position: absolute; inset-inline-start: 50%; top: 50%; z-index: 500; pointer-events: none;
    width: 26px; height: 26px; margin: -34px 0 0 -13px;
    background: var(--ad-olive); border: 3px solid #fff; border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg); box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
.ad-addr-map__pin::after {
    content: ""; position: absolute; inset: 6px; border-radius: 50%; background: #fff;
}
.ad-addr-map__locate {
    position: absolute; inset-inline-end: 10px; bottom: 10px; z-index: 600;
    padding: 8px 12px; border: 1px solid var(--ad-sand); border-radius: 999px;
    background: var(--ad-surface); color: var(--ad-ink); font: inherit; font-size: 13px; cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
}
.ad-addr-map .leaflet-control-attribution { font-size: 10px; }
.ad-addr-drawer { z-index: 10000; }
@media (max-width: 480px) { .ad-addr-row { grid-template-columns: 1fr; } }

/* محصول بدون قیمت: استعلام و کانال‌های سفارش */
.ad-product-card__inquiry { font-size: 13px; color: var(--ad-ink-muted); font-weight: 600; }
.ad-order { display: grid; gap: 10px; width: 100%; }
.ad-order__note { margin: 0; font-size: 14px; color: var(--ad-ink-muted); line-height: 1.8; }
.ad-order__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.ad-order__btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: var(--ad-radius-input); border: 1px solid var(--ad-olive); color: var(--ad-olive); background: var(--ad-surface); font-weight: 700; text-decoration: none; }
.ad-order__btn--phone { background: var(--ad-olive); color: #fff; }
.ad-order__btn:hover { filter: brightness(.95); }
