@font-face {
    font-family: "IRANYekanX";
    src: url("fonts/IRANYekanX-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 500;
    font-display: swap;
}
@font-face {
    font-family: "IRANYekanX";
    src: url("fonts/IRANYekanX-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
}
@font-face {
    font-family: "IRANYekanXFaNum";
    src: url("fonts/IRANYekanXFaNum-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 500;
    font-display: swap;
}
@font-face {
    font-family: "IRANYekanXFaNum";
    src: url("fonts/IRANYekanXFaNum-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 600 900;
    font-display: swap;
}

/* Persian typography. */
body.dq-theme,
body.dq-theme :is(h1, h2, h3, h4, h5, h6, input, button, select, textarea, .btn, .heading-title) {
    font-family: "IRANYekanX", Tahoma, Arial, sans-serif;
}
html[lang|="fa"] body.dq-theme,
html[lang|="fa"] body.dq-theme :is(h1, h2, h3, h4, h5, h6, input, button, select, textarea, .btn, .heading-title) {
    font-family: "IRANYekanXFaNum", Tahoma, Arial, sans-serif;
}
body.dq-theme { font-size: 14px; line-height: 1.8; }

/* Preserve the original digits in product names, including model numbers. */
body.dq-theme :is(
    .art-name, .art-name .art-name-link, .pd-name, .pd-assoc-name, .cart-item-title, .cart-item-link,
    .product-name, .offcanvas-cart-item .name, #compare-tab .name, .table-compare td > a.fwm,
    .instasearch-hit-wrapper > .text-truncate > .text-truncate:first-child
) {
    font-family: "IRANYekanX", Tahoma, Arial, sans-serif;
}

/* Header */
body.dq-theme .btn-primary { --bs-btn-bg: var(--dq-brand); --bs-btn-border-color: var(--dq-brand); }
body.dq-theme .instasearch-term {
    min-height: 50px;
    background: var(--dq-soft);
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 13px;
    transition: background-color .2s, border-color .2s, box-shadow .2s;
}
body.dq-theme .instasearch-term:hover { border-color: var(--dq-border); }
body.dq-theme .instasearch-term:focus {
    background: #fff;
    border-color: var(--dq-brand);
    box-shadow: 0 0 0 4px var(--dq-brand-soft);
}
body.dq-theme .dq-account-link {
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 46px;
    padding: 8px 20px;
    margin-inline-end: 8px;
    border-radius: 999px;
    background: var(--dq-ink);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s, transform .2s var(--dq-ease);
}
body.dq-theme .dq-account-link:hover { background: var(--dq-brand); color: #fff; transform: translateY(-1px); }
body.dq-theme .shopbar-button { transition: background-color .2s, color .2s; }
body.dq-theme .shopbar-button:hover { background: var(--dq-soft); color: var(--dq-brand); }
body.dq-theme .smm { --smm-accent: var(--dq-brand); --smm-ink: var(--dq-ink); --smm-muted: var(--dq-muted); --smm-border: var(--dq-border); gap: 0; }
body.dq-theme .megamenu-container { align-items: center; justify-content: flex-start; min-height: 52px; }
body.dq-theme .megamenu-section { background: #fff; border-block: 1px solid var(--dq-border); }
body.dq-theme .megamenu-section .navbar { padding-block: 0; }
body.dq-theme .smm-links { flex-wrap: nowrap; gap: 0; align-items: stretch; }
body.dq-theme .smm-links > .smm-item { display: flex; }

/* Navigation links share one rhythm: tall hit area, animated brand underline. */
body.dq-theme .smm-links :is(.smm-link, .smm-trigger) {
    position: relative;
    min-height: 52px;
    padding: 0 14px;
    gap: 8px;
    border-radius: 0;
    white-space: nowrap;
    transition: color .2s;
}
body.dq-theme .smm-links :is(.smm-link, .smm-trigger)::after {
    content: "";
    position: absolute;
    inset-inline: 14px;
    bottom: 0;
    height: 3px;
    border-radius: 3px 3px 0 0;
    background: var(--dq-brand);
    transform: scaleX(0);
    transition: transform .25s var(--dq-ease);
}
body.dq-theme .smm-trigger { font-size: 14px; font-weight: 700; color: var(--dq-ink); }
body.dq-theme .smm-link { font-size: 13px; font-weight: 500; color: var(--dq-muted); }
body.dq-theme .smm-links :is(.smm-link, .smm-trigger):is(:hover, [aria-expanded="true"]) { color: var(--dq-brand); }
body.dq-theme .smm-links :is(.smm-link, .smm-trigger):is(:hover, [aria-expanded="true"])::after,
body.dq-theme .smm .is-selected > :is(.smm-link, .smm-trigger)::after,
body.dq-theme .smm .is-ancestor > :is(.smm-link, .smm-trigger)::after { transform: scaleX(1); }
body.dq-theme .smm-trigger .icon:first-child { color: var(--dq-brand); }
body.dq-theme .smm-trigger .icon:last-child:not(:first-child) { width: 12px; height: 12px; color: var(--dq-muted); transition: transform .2s; }
body.dq-theme .smm-trigger[aria-expanded="true"] .icon:last-child:not(:first-child) { transform: rotate(180deg); }
body.dq-theme .smm-badge {
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--dq-brand);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.5;
}
body.dq-theme .smm-panel { border: 1px solid var(--dq-border); border-radius: var(--dq-radius-sm); box-shadow: var(--dq-shadow-hover); }

/* Overflow dropdown built by homepage.js. */
body.dq-theme .dq-more { position: relative; display: flex; }
body.dq-theme .dq-more[hidden] { display: none; }
body.dq-theme .smm-links > [hidden] { display: none; }
body.dq-theme .dq-more-panel {
    position: absolute;
    top: 100%;
    inset-inline-end: 0;
    z-index: 1030;
    display: flex;
    flex-direction: column;
    min-width: 240px;
    max-height: 70vh;
    padding: 8px;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--dq-border);
    border-radius: var(--dq-radius-sm);
    box-shadow: var(--dq-shadow-hover);
}
body.dq-theme .dq-more-panel[hidden] { display: none; }
body.dq-theme .dq-more-panel :is(.smm-link, .smm-label) {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
    color: var(--dq-ink);
    font-size: 13px;
}
body.dq-theme .dq-more-panel .smm-link::after { display: none; }
body.dq-theme .dq-more-panel .smm-link:hover { background: var(--dq-soft); }
body.dq-theme .dq-more-panel .smm-label { color: var(--dq-muted); font-size: 11px; font-weight: 700; }

@media (min-width: 992px) {
    body.dq-theme #header {
        position: sticky;
        top: -36px;
        z-index: 1020;
        background: #fff;
        transition: box-shadow .25s var(--dq-ease);
    }
    body.dq-theme #header.is-stuck { box-shadow: 0 10px 28px -14px rgb(23 26 33 / .28); }
    body.dq-theme .menubar-section { height: 36px; min-height: 36px; background: var(--dq-soft); border-bottom: 1px solid var(--dq-border); }
    body.dq-theme .menubar-section .menubar { min-height: 36px; padding-block: 0; }
    body.dq-theme .menubar-section .menubar-link { padding-block: 6px; color: var(--dq-muted); font-size: 11px; font-weight: 500; }
    body.dq-theme .menubar-section .menubar-link:hover { color: var(--dq-brand); }
    body.dq-theme .shopbar-section { padding-block: 12px; border-bottom: 0; }
    body.dq-theme .shopbar-col-group-brand { gap: 16px; min-width: 0; }
    body.dq-theme .shopbar-search { max-width: 680px; min-width: 0; }
    body.dq-theme .shopbar-col-group-tools { margin-inline-start: auto; flex-shrink: 0; }
    body.dq-theme .shopbar-tools { padding-block: 0; gap: 4px; }
    body.dq-theme .shopbar-tools .shopbar-button-label,
    body.dq-theme .shopbar-tools .shopbar-button-label-sm { display: none !important; }
    body.dq-theme .shopbar-tools .shopbar-button { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 10px; border-radius: 50%; }
    body.dq-theme .shopbar-tools .shopbar-button-icon { --icon-size: 22px; font-size: 22px; }
    body.dq-theme .shopbar-tools .shopbar-tool { padding-inline: 0; }
}
@media (max-width: 991.98px) {
    body.dq-theme .shopbar-section { border-bottom: 1px solid var(--dq-border); }
    body.dq-theme .instasearch-term { min-height: 44px; }
}
@media (max-width: 575.98px) {
    body.dq-theme .shop-logo .brand.textual { font-size: 1.7rem; }
    body.dq-theme .shopbar-tools { justify-content: space-between; gap: 6px; padding-inline: 8px; }
    body.dq-theme .shopbar-tools .shopbar-button-label,
    body.dq-theme .shopbar-tools .shopbar-button-label-sm { display: none !important; }
    body.dq-theme .shopbar-tools .shopbar-tool { padding: 0; flex: 0 0 44px; }
    body.dq-theme .shopbar-tools .shopbar-button { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; min-width: 44px; padding: 8px; }
    body.dq-theme .shopbar-tools .shopbar-button-icon { --icon-size: 22px; font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
    body.dq-theme .smm-links :is(.smm-link, .smm-trigger)::after,
    body.dq-theme .dq-account-link { transition: none; }
}

/* Hero zone sits outside the content container so a banner section can span the viewport. */
body.dq-theme .dq-home-hero { width: 100%; max-width: 100%; }

/* Footer */
body.dq-theme #footer { margin-top: var(--dq-section-gap); background: var(--dq-soft); border-top: 1px solid var(--dq-border); }
body.dq-theme .footer-social-wrapper { padding-block: 28px 4px; }
body.dq-theme .footer-social .btn-social {
    width: 44px;
    height: 44px;
    margin-inline: 4px;
    background: #fff;
    border: 1px solid var(--dq-border);
    color: var(--dq-ink);
    transition: background-color .2s, color .2s, transform .2s var(--dq-ease), border-color .2s;
}
body.dq-theme .footer-social .btn-social:hover { background: var(--dq-brand); border-color: var(--dq-brand); color: #fff; transform: translateY(-2px); }
body.dq-theme .footer-main-wrapper { padding-block: 28px 20px; }
body.dq-theme .dq-carousel { min-height: 220px; }
body.dq-theme .footer-main.container { padding-inline: 12px; }
body.dq-theme .footer-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 800;
    color: var(--dq-ink);
}
@media (min-width: 768px) {
    body.dq-theme .footer-title::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--dq-brand); flex: none; }
}
body.dq-theme .footer-links .menu-link { display: inline-block; padding-block: 5px; color: var(--dq-muted); font-size: 13px; text-decoration: none; transition: color .2s; }
body.dq-theme .footer-links .menu-link:hover { color: var(--dq-brand); }
body.dq-theme .footer-newsletter .form-control { min-height: 48px; border-radius: 999px; }
body.dq-theme .footer-bottom-wrapper { border-top: 1px solid var(--dq-border); background: #fff; }
body.dq-theme .footer-bottom { padding-block: 14px; color: var(--dq-muted); font-size: 12px; }
body.dq-theme .footer-bottom a { color: inherit; }

/* Shared surfaces */
body.dq-theme .breadcrumb { font-size: 12px; }
body.dq-theme .breadcrumb a { color: var(--dq-muted); text-decoration: none; }
body.dq-theme .breadcrumb a:hover { color: var(--dq-brand); }
body.dq-theme :is(.form-control, .form-select) { border-radius: var(--dq-radius-sm); border-color: var(--dq-border); }
body.dq-theme :is(.form-control, .form-select):focus { border-color: var(--dq-brand); box-shadow: 0 0 0 4px var(--dq-brand-soft); }
body.dq-theme .btn { border-radius: 999px; font-weight: 700; }
body.dq-theme .page-link { border-radius: 10px; }

/* Catalog pages (category, brand, new products, product detail) share the home page card and section-head language. */
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid:not(.artlist-sub-categories) {
    --dq-card-min: 210px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--dq-card-min)), 1fr));
    gap: 16px;
    margin: 0 0 1.5rem;
}
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid.artlist-2-cols { --dq-card-min: 340px; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid.artlist-3-cols { --dq-card-min: 280px; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid.artlist-5-cols { --dq-card-min: 240px; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid.artlist-6-cols { --dq-card-min: 190px; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist:not(.artlist-sub-categories) > .art {
    width: auto;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--dq-border);
    border-radius: var(--dq-radius-sm);
    background: #fff;
    transition: box-shadow .25s var(--dq-ease), transform .25s var(--dq-ease), border-color .2s;
}
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist:not(.artlist-sub-categories) > .art:hover {
    border-color: transparent;
    box-shadow: var(--dq-shadow-hover);
    transform: translateY(-3px);
}
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-lines > .art { margin-block-end: 12px; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .art-name { font-size: .86rem; line-height: 1.9; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .art-price { font-weight: 800; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .page-title h1 { font-weight: 800; }

/* Section heads on the product page: same marker bar and weight as the home page. */
body.dq-theme .pd-section .block-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 0 0 16px;
    padding: 0;
    border: 0;
}
body.dq-theme .pd-section .block-title :is(h2, h3) {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    color: var(--dq-ink);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.6;
}
body.dq-theme .pd-section .block-title :is(h2, h3)::before {
    content: "";
    flex: none;
    width: 5px;
    height: 1.15em;
    border-radius: 4px;
    background: var(--dq-brand);
}
body.dq-theme .pd-section .pc-ranked .block-title h3::before,
body.dq-home .pc-ranked .block-title h3::before { display: none; }

/* Tabs use the brand accent instead of the Flex warning color. */
body.dq-theme .nav-tabs-line .nav-link.active::before { background: var(--dq-brand); }
body.dq-theme .nav-tabs-line .nav-link:hover { color: var(--dq-brand); }
body.dq-theme .nav-tabs-line .nav-link .badge-warning { background: var(--dq-brand); color: #fff; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid:not(.artlist-sub-categories) > .skip-content-container { position: absolute; }
body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid:not(.artlist-sub-categories)::after { display: none; }
@media (max-width: 575.98px) {
    body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist-grid:not(.artlist-sub-categories) { --dq-card-min: 150px; gap: 10px; }
    body.dq-theme .page:is(.category-page, .manufacturer-page, .recently-added-products-page) .artlist:not(.artlist-sub-categories) > .art { padding: 10px; }
}
@media (max-width: 575.98px) {
    body.dq-theme .art-delivery-info { white-space: normal; }
}

.block-title h3,
.art-name {
    overflow-wrap: anywhere;
}
