/* =========================================================
   هارد تاپ - استایل اصلی قالب
   ساختار: ۱) پایه  ۲) هدر  ۳) سبد  ۴) موبایل  ۵) صفحه اصلی
           ۶) محصولات  ۷) فوتر  ۸) ووکامرس و صفحات داخلی
========================================================= */

@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn.woff2") format("woff2");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* ---------- ۱) پایه و متغیرها ---------- */

:root {
    /* رنگ‌ها */
    --primary: #5145a5;
    --primary-dark: #3f3590;
    --primary-soft: #eeecfa;
    --navy: #25205f;
    --navy-dark: #191642;
    --ink: #23223a;
    --muted: #666680;
    --line: #e8e8f0;
    --page: #f6f6fa;
    --white: #fff;
    --danger: #e5484d;
    --success: #1f9d6b;

    /* فاصله‌ها (همه چیز از همین مقیاس استفاده می‌کند) */
    --s1: 4px;
    --s2: 8px;
    --s3: 12px;
    --s4: 16px;
    --s5: 24px;
    --s6: 32px;
    --s7: 48px;
    --s8: 64px;
    --section: clamp(32px, 5vw, 56px);

    /* گوشه‌ها و سایه */
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --shadow-1: 0 1px 2px rgba(25, 22, 66, .06), 0 4px 16px rgba(25, 22, 66, .05);
    --shadow-2: 0 2px 4px rgba(25, 22, 66, .06), 0 12px 32px rgba(25, 22, 66, .10);

    --font: "Vazirmatn", Tahoma, "Segoe UI", Arial, sans-serif;
    --header-h: 120px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.9;
    direction: rtl;
    text-align: right;
    -webkit-font-smoothing: antialiased;
}

body.ht-no-scroll {
    overflow: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

button {
    cursor: pointer;
}

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4 {
    line-height: 1.5;
    margin: 0;
}

:focus-visible {
    outline: 3px solid rgba(81, 69, 165, .45);
    outline-offset: 2px;
}

.ht-container {
    width: 100%;
    max-width: 1240px;
    margin-inline: auto;
    padding-inline: 20px;
}

.ht-icon {
    width: 22px;
    height: 22px;
    flex: none;
}

.ht-icon-sm {
    width: 16px;
    height: 16px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
    white-space: nowrap;
}

.ht-skip {
    position: absolute;
    top: -60px;
    right: 16px;
    z-index: 999;
    padding: var(--s2) var(--s4);
    border-radius: var(--r-sm);
    background: var(--navy);
    color: #fff;
    transition: top .2s;
}

.ht-skip:focus {
    top: 8px;
}

/* دکمه‌ها */

.ht-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    min-height: 46px;
    padding: 0 var(--s5);
    border-radius: var(--r-sm);
    border: 1.5px solid transparent;
    font-size: 15px;
    font-weight: 700;
    transition: background .2s, color .2s, border-color .2s, transform .2s;
}

.ht-btn .ht-icon {
    width: 20px;
    height: 20px;
}

.ht-btn-light {
    background: #fff;
    color: var(--navy);
}

.ht-btn-light:hover {
    background: var(--primary-soft);
}

.ht-btn-outline {
    border-color: rgba(255, 255, 255, .45);
    color: #fff;
}

.ht-btn-outline:hover {
    background: rgba(255, 255, 255, .12);
}

.ht-badge {
    position: absolute;
    top: -7px;
    left: -7px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--danger);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    border: 2px solid #fff;
}


/* ---------- ۲) نوار بالا و هدر ---------- */

.ht-topbar {
    background: var(--navy);
    color: #e6e4ff;
    font-size: 13px;
}

.ht-topbar-inner {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s4);
}

.ht-topbar-phone {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
}

.ht-topbar-phone .ht-icon {
    width: 16px;
    height: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #fff;
    box-shadow: 0 2px 12px rgba(25, 22, 66, .06);
}

.admin-bar .site-header {
    top: 32px;
}

.header-main {
    min-height: 76px;
    padding-block: var(--s3);
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: var(--s5);
}

/* لوگو: یک قانون ساده و ثابت */

.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--s3);
    min-width: 0;
}

.brand img.custom-logo {
    display: block;
    height: 48px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, #6557c5, var(--navy));
    font-weight: 900;
    font-size: 18px;
}

.brand-name {
    display: flex;
    flex-direction: column;
    line-height: 1.35;
}

.brand-name strong {
    color: var(--navy);
    font-size: 22px;
    direction: ltr;
    text-align: right;
}

.brand-name strong span,
.footer-brand span {
    color: #7668d4;
}

.brand-name small {
    color: var(--muted);
    font-size: 12px;
}

/* جستجو */

.search-form {
    height: 48px;
    display: flex;
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: var(--page);
    overflow: hidden;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.search-form:focus-within {
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(81, 69, 165, .12);
}

.search-form input[type="search"] {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: 0;
    padding: 0 var(--s4);
    background: transparent;
    font-size: 14px;
    color: var(--ink);
}

.search-form input[type="search"]::placeholder {
    color: #8a8aa0;
}

.search-form button {
    width: 54px;
    border: 0;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--primary);
    transition: background .2s;
}

.search-form button:hover {
    background: var(--primary-dark);
}

/* حساب و سبد (دسکتاپ) */

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--s2);
}

.ht-action {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    height: 48px;
    padding-inline: var(--s4);
    border-radius: var(--r-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    transition: background .2s, color .2s;
}

.ht-action:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.ht-menu-btn,
.ht-call-btn {
    display: none;
}

/* منوی اصلی */

.main-nav {
    border-top: 1px solid var(--line);
}

.nav-inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s5);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--s1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding-inline: var(--s4);
    font-size: 14px;
    font-weight: 600;
    color: #45445e;
    border-bottom: 2px solid transparent;
    transition: color .2s, border-color .2s;
}

.nav-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.nav-call {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    font-size: 14px;
    color: var(--muted);
}

.nav-call .ht-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* منوی بازشونده دسته‌بندی‌ها */

.nav-cats {
    position: relative;
    margin-inline-end: var(--s3);
}

.nav-cats-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    height: 38px;
    padding-inline: var(--s4);
    border: 0;
    border-radius: var(--r-sm);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.nav-cats-btn .ht-icon:first-child {
    width: 18px;
    height: 18px;
}

.nav-cats-panel {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 60;
    width: 560px;
    margin-top: 6px;
    padding: var(--s3);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--s1);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.nav-cats-panel::before {
    content: "";
    position: absolute;
    top: -8px;
    right: 0;
    left: 0;
    height: 8px;
}

.nav-cats:hover .nav-cats-panel,
.nav-cats:focus-within .nav-cats-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-cats-panel a {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s2) var(--s3);
    border-radius: var(--r-sm);
    font-size: 14px;
    font-weight: 500;
}

.nav-cats-panel a:hover {
    background: var(--primary-soft);
    color: var(--primary);
}

.nav-cats-panel img {
    width: 36px;
    height: 36px;
    flex: none;
    object-fit: contain;
    border-radius: 8px;
    background: var(--page);
    mix-blend-mode: multiply;
}


/* ---------- ۳) سبد خرید دسکتاپ ---------- */

.ht-header-cart {
    position: relative;
}

.ht-cart-trigger {
    display: flex;
    align-items: center;
    gap: var(--s3);
    height: 48px;
    padding-inline: var(--s3) var(--s4);
    border: 1.5px solid var(--line);
    border-radius: var(--r-md);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.ht-cart-trigger:hover {
    border-color: var(--primary);
}

.ht-cart-icon {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--r-sm);
    background: var(--primary-soft);
    color: var(--primary);
}

.ht-cart-icon .ht-icon {
    width: 21px;
    height: 21px;
}

.ht-cart-info {
    display: flex;
    flex-direction: column;
    line-height: 1.4;
}

.ht-cart-info strong {
    font-size: 14px;
    font-weight: 700;
}

.ht-cart-info small {
    font-size: 12px;
    color: var(--muted);
}

.ht-cart-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    z-index: 70;
    width: 360px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}

.ht-cart-dropdown::before {
    content: "";
    position: absolute;
    top: -12px;
    right: 0;
    left: 0;
    height: 12px;
}

.ht-header-cart:hover .ht-cart-dropdown,
.ht-header-cart:focus-within .ht-cart-dropdown,
.ht-header-cart.ht-cart-open .ht-cart-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ht-cart-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--s4);
    border-bottom: 1px solid var(--line);
    font-size: 14px;
}

.ht-cart-heading span {
    color: var(--muted);
    font-size: 13px;
}

.ht-cart-items {
    max-height: 290px;
    overflow-y: auto;
    padding-inline: var(--s4);
}

.ht-cart-item {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding-block: var(--s3);
    border-bottom: 1px solid #f0f0f5;
}

.ht-cart-item:last-child {
    border-bottom: 0;
}

.ht-cart-thumb img {
    width: 60px !important;
    height: 60px !important;
    object-fit: contain;
    margin: 0 !important;
    border-radius: 8px;
    background: var(--page);
}

.ht-cart-product {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: var(--s1);
}

.ht-cart-product a,
.ht-cart-product strong {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.7;
}

.ht-cart-product small {
    color: var(--muted);
    font-size: 13px;
}

.ht-cart-product span {
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

.ht-cart-empty {
    padding: var(--s6) var(--s3);
    text-align: center;
    color: var(--muted);
    font-size: 14px;
}

.ht-cart-total {
    display: flex;
    justify-content: space-between;
    padding: var(--s4);
    border-top: 1px solid var(--line);
    font-size: 14px;
}

.ht-cart-total strong {
    color: var(--primary);
}

.ht-cart-actions {
    display: flex;
    gap: var(--s2);
    padding: 0 var(--s4) var(--s4);
}

.ht-cart-actions a,
.ht-cart-shop {
    flex: 1;
    padding: var(--s3) var(--s2);
    text-align: center;
    border-radius: var(--r-sm);
    font-size: 13px;
    font-weight: 700;
}

.ht-cart-view {
    color: var(--primary) !important;
    background: var(--primary-soft);
}

.ht-cart-checkout {
    color: #fff !important;
    background: var(--primary);
}

.ht-cart-checkout:hover {
    background: var(--primary-dark);
}

.ht-cart-shop {
    display: block;
    margin: 0 var(--s4) var(--s4);
}


/* ---------- ۴) موبایل: منوی کشویی، نوار پایین، پیام ---------- */

.ht-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    visibility: hidden;
    pointer-events: none;
    transition: visibility 0s linear .3s;
}

.ht-drawer.is-open {
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.ht-overlay {
    position: absolute;
    inset: 0;
    background: rgba(20, 18, 50, .55);
    opacity: 0;
    transition: opacity .3s;
}

.ht-drawer.is-open .ht-overlay {
    opacity: 1;
}

.ht-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(86vw, 340px);
    display: flex;
    flex-direction: column;
    background: #fff;
    transform: translateX(100%);
    transition: transform .3s ease;
    box-shadow: var(--shadow-2);
}

.ht-drawer.is-open .ht-drawer-panel {
    transform: translateX(0);
}

.ht-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s3) var(--s4);
    border-bottom: 1px solid var(--line);
    font-size: 16px;
}

.ht-drawer-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: var(--r-sm);
    background: var(--page);
    color: var(--ink);
}

.ht-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: var(--s2) var(--s4) var(--s4);
}

.ht-drawer-title {
    margin: var(--s5) 0 var(--s2);
    font-size: 14px;
    color: var(--muted);
    font-weight: 700;
}

.ht-drawer-list a {
    display: flex;
    align-items: center;
    gap: var(--s3);
    min-height: 48px;
    padding-inline: var(--s2);
    border-bottom: 1px solid #f0f0f5;
    font-size: 15px;
    font-weight: 600;
}

.ht-drawer-list a .ht-icon-sm {
    margin-inline-start: auto;
    color: #a09cc9;
}

.ht-drawer-cats a {
    font-weight: 500;
}

.ht-drawer-cats img {
    width: 36px;
    height: 36px;
    flex: none;
    object-fit: contain;
    border-radius: 8px;
    background: var(--page);
    mix-blend-mode: multiply;
}

.ht-drawer-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--s2);
    margin: var(--s3) var(--s4) calc(var(--s4) + env(safe-area-inset-bottom, 0px));
    min-height: 48px;
    border-radius: var(--r-md);
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* نوار ناوبری پایین (فقط موبایل) */

.ht-bottom-nav {
    display: none;
}

.ht-bn-item {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: var(--s2) 0;
    border: 0;
    background: transparent;
    color: #6f6e88;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

.ht-bn-item.is-active {
    color: var(--primary);
}

.ht-bn-icon {
    position: relative;
    display: grid;
    place-items: center;
    width: 40px;
    height: 28px;
    border-radius: 14px;
    transition: background .2s;
}

.ht-bn-item.is-active .ht-bn-icon {
    background: var(--primary-soft);
}

.ht-bn-icon .ht-badge {
    top: -5px;
    left: 3px;
}

/* پیام «به سبد اضافه شد» */

.ht-toast {
    position: fixed;
    right: var(--s4);
    left: var(--s4);
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
    z-index: 150;
    max-width: 420px;
    margin-inline: auto;
    padding: var(--s3) var(--s4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s4);
    border-radius: var(--r-md);
    background: var(--navy-dark);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .25s, transform .25s, visibility .25s;
}

.ht-toast.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ht-toast a {
    flex: none;
    padding: var(--s1) var(--s3);
    border-radius: var(--s2);
    background: #fff;
    color: var(--navy);
    font-size: 13px;
    font-weight: 700;
}


/* ---------- ۵) صفحه اصلی ---------- */

.ht-section {
    margin-block: var(--section);
}

.ht-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: var(--s4);
    margin-bottom: var(--s5);
}

.ht-section-head h2 {
    color: var(--navy-dark);
    font-size: 24px;
    font-weight: 800;
}

.ht-section-head p {
    margin: var(--s1) 0 0;
    color: var(--muted);
    font-size: 14px;
}

.ht-link-more {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: var(--s1);
    padding: var(--s2) var(--s3);
    border-radius: var(--r-sm);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    transition: background .2s;
}

.ht-link-more:hover {
    background: var(--primary-soft);
}

/* بنر ساده (بدون اسلایدر) */

.ht-hero {
    padding-top: var(--s5);
}

.ht-hero-panel {
    padding: var(--s7) var(--s7);
    border-radius: var(--r-lg);
    color: #fff;
    background:
        radial-gradient(circle at 15% 50%, rgba(133, 119, 232, .35), transparent 40%),
        linear-gradient(112deg, #211c59, #5144a0);
    background-size: cover;
    background-position: center;
}

.ht-hero-panel h1 {
    max-width: 620px;
    font-size: clamp(26px, 3.4vw, 38px);
    font-weight: 800;
    line-height: 1.6;
}

.ht-hero-panel p {
    max-width: 560px;
    margin: var(--s3) 0 var(--s5);
    color: rgba(255, 255, 255, .85);
    font-size: 16px;
}

/* نوار مزیت‌ها */

.ht-trust {
    margin-top: var(--s5);
}

.ht-trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s4);
}

.ht-trust-grid li {
    display: flex;
    align-items: center;
    gap: var(--s3);
    padding: var(--s4);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

.ht-trust-icon {
    width: 48px;
    height: 48px;
    flex: none;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--primary-soft);
    color: var(--primary);
}

.ht-trust-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.6;
}

.ht-trust-text strong {
    font-size: 15px;
    font-weight: 700;
}

.ht-trust-text small {
    color: var(--muted);
    font-size: 13px;
}

/* دسته‌بندی‌ها */

.category-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: var(--s4);
}

.category-card {
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    padding: var(--s3);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    transition: transform .22s, box-shadow .22s, border-color .22s;
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #d5d0f1;
    box-shadow: var(--shadow-2);
}

.category-image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 0.82;
    padding: var(--s3);
    border-radius: var(--r-sm);
    background: var(--page);
    overflow: hidden;
}

.category-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    mix-blend-mode: multiply;
    transition: transform .3s;
}

.category-card:hover .category-image img {
    transform: scale(1.06);
}

.category-title {
    min-height: 3.4em;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-inline: var(--s1);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-align: center;
}

/* درباره فروشگاه */

.ht-about-card {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--s6);
    padding: var(--s6);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.ht-about-text h2 {
    margin-bottom: var(--s4);
    color: var(--navy-dark);
    font-size: 22px;
    font-weight: 800;
}

.ht-about-text p {
    margin: 0 0 var(--s4);
    color: #3d3c55;
    font-size: 15px;
    line-height: 2.1;
    text-align: justify;
}

.ht-about-text p:last-child {
    margin-bottom: 0;
}

.ht-about-side {
    align-self: start;
    display: flex;
    flex-direction: column;
    gap: var(--s3);
    padding: var(--s5);
    border-radius: var(--r-md);
    color: #fff;
    background: linear-gradient(150deg, var(--navy), var(--primary));
}

.ht-about-side h3 {
    font-size: 18px;
    font-weight: 800;
}

.ht-about-side p {
    margin: 0 0 var(--s2);
    color: rgba(255, 255, 255, .85);
    font-size: 14px;
}


/* ---------- ۶) کارت محصولات (صفحه اصلی و فروشگاه) ---------- */

.ht-shop-page {
    padding-bottom: var(--s7);
}

.ht-shop-hero {
    padding: var(--s6) var(--s6);
    margin-bottom: var(--s5);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.ht-shop-eyebrow {
    display: inline-block;
    margin-bottom: var(--s2);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    direction: ltr;
}

.ht-shop-hero h1 {
    color: var(--navy-dark);
    font-size: 28px;
    font-weight: 800;
}

.ht-shop-hero p {
    margin: var(--s2) 0 0;
    color: var(--muted);
    font-size: 15px;
}

.ht-shop-line {
    width: 56px;
    height: 4px;
    margin-top: var(--s4);
    border-radius: 4px;
    background: var(--primary);
}

.ht-shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--s3);
    margin-bottom: var(--s5);
    padding: var(--s3) var(--s4);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
}

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

.ht-shop-toolbar .woocommerce-ordering {
    margin: 0;
}

.ht-shop-toolbar select {
    min-width: 190px;
    height: 42px;
    padding: 0 var(--s3);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    color: var(--ink);
    font-size: 14px;
}

.ht-products ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--s4) !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ht-products ul.products::before,
.ht-products ul.products::after {
    display: none !important;
}

.ht-products ul.products li.product {
    position: relative;
    float: none !important;
    width: auto !important;
    margin: 0 !important;
    padding: var(--s3) !important;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    text-align: right !important;
    overflow: hidden;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}

.ht-products ul.products li.product:hover {
    border-color: #d5d0f1;
    box-shadow: var(--shadow-2);
    transform: translateY(-3px);
}

.ht-products ul.products li.product a.woocommerce-LoopProduct-link {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.ht-products ul.products li.product a img {
    width: 100% !important;
    aspect-ratio: 1 / 1;
    height: auto !important;
    object-fit: contain;
    margin: 0 0 var(--s3) !important;
    border-radius: var(--r-sm);
    background: #fff;
}

.ht-products .woocommerce-loop-product__title {
    margin: 0 0 var(--s2) !important;
    padding: 0 !important;
    min-height: 3.4em;
    color: var(--ink) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.7 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ht-products ul.products li.product .price {
    margin: auto 0 var(--s3) !important;
    color: var(--primary) !important;
    font-size: 15px !important;
    font-weight: 800;
    line-height: 1.6;
}

.ht-products ul.products li.product .price del {
    display: block;
    color: #9a9ab0 !important;
    font-size: 13px;
    font-weight: 400;
}

.ht-products ul.products li.product .price ins {
    text-decoration: none;
}

.ht-products .star-rating {
    margin: 0 0 var(--s2) !important;
    color: #e5a52b;
}

.ht-products ul.products li.product .button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin: 0 !important;
    padding: 0 var(--s3) !important;
    border: 0 !important;
    border-radius: var(--r-sm) !important;
    background: var(--primary) !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700;
    text-align: center;
    transition: background .2s;
}

.ht-products ul.products li.product .button:hover {
    background: var(--primary-dark) !important;
}

.ht-products ul.products li.product .button.loading {
    opacity: .7;
}

.ht-products ul.products li.product a.added_to_cart {
    display: none;
}

.ht-products ul.products li.product .onsale {
    top: var(--s3) !important;
    right: var(--s3) !important;
    left: auto !important;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 2px var(--s3);
    border-radius: 8px !important;
    background: var(--danger) !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.8;
}

.ht-products .woocommerce-pagination {
    margin-top: var(--s6);
}

.ht-products .woocommerce-pagination ul {
    display: flex;
    justify-content: center;
    gap: var(--s2);
    border: 0 !important;
}

.ht-products .woocommerce-pagination ul li {
    border: 0 !important;
}

.ht-products .woocommerce-pagination ul li a,
.ht-products .woocommerce-pagination ul li span {
    min-width: 42px;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line) !important;
    border-radius: var(--r-sm);
    background: #fff;
}

.ht-products .woocommerce-pagination ul li span.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
}

.ht-shop-page .term-description {
    margin-bottom: var(--s5);
    color: var(--muted);
    font-size: 14px;
    line-height: 2;
}


/* ---------- ۷) فوتر ---------- */

.site-footer {
    margin-top: var(--s8);
    color: #d6d4e8;
    background: var(--navy-dark);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr 1.3fr;
    gap: var(--s6);
    padding-block: var(--s7) var(--s6);
}

.footer-brand {
    display: inline-block;
    color: #fff;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 1px;
    direction: ltr;
}

.footer-about p {
    margin: var(--s3) 0 var(--s4);
    color: #b9b6d4;
    font-size: 14px;
    line-height: 2;
}

.footer-phone-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
    min-height: 44px;
    padding-inline: var(--s4);
    border-radius: var(--r-sm);
    background: rgba(255, 255, 255, .1);
    color: #fff;
    font-weight: 700;
    transition: background .2s;
}

.footer-phone-btn:hover {
    background: rgba(255, 255, 255, .18);
}

.footer-phone-btn .ht-icon {
    width: 20px;
    height: 20px;
}

.footer-col h3 {
    margin-bottom: var(--s4);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.footer-col li + li {
    margin-top: var(--s2);
}

.footer-col li a {
    color: #c9c6e2;
    font-size: 14px;
    transition: color .2s;
}

.footer-col li a:hover {
    color: #fff;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--s2);
    font-size: 14px;
    color: #c9c6e2;
}

.footer-contact .ht-icon {
    width: 18px;
    height: 18px;
    margin-top: 6px;
    color: #9d93ea;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.footer-bottom .ht-container {
    padding-block: var(--s4);
    text-align: center;
}

.footer-bottom small {
    color: #9a96bd;
    font-size: 13px;
}


/* ---------- ۸) ووکامرس و صفحات داخلی ---------- */

.ht-wc-main {
    padding-block: var(--s4) var(--s7);
    min-height: 45vh;
}

.woocommerce-breadcrumb {
    margin: 0 0 var(--s4) !important;
    color: var(--muted);
    font-size: 13px !important;
}

.woocommerce-breadcrumb a:hover {
    color: var(--primary);
}

.basic-content {
    padding-block: var(--s6) var(--s7);
    min-height: 45vh;
}

.basic-article {
    margin-bottom: var(--s5);
    padding: var(--s6);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
}

.basic-article h1 {
    margin-bottom: var(--s4);
    color: var(--navy-dark);
    font-size: 26px;
    font-weight: 800;
}

.entry-content {
    overflow-wrap: anywhere;
}

/* دکمه‌ها و فرم‌ها */

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
    padding: 12px var(--s5);
    border-radius: var(--r-sm);
    background: var(--primary);
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    line-height: 1.6;
    transition: background .2s;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
    background: var(--primary-dark);
    color: #fff;
}

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce-page input.input-text {
    padding: 10px var(--s3);
    border: 1.5px solid var(--line);
    border-radius: var(--r-sm);
    background: #fff;
    font-family: inherit;
    font-size: 14px;
}

.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(81, 69, 165, .12);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    border-radius: var(--r-sm);
    font-size: 14px;
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--primary) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--primary) !important;
}

/* صفحه تک محصول */

.single-product div.product .product_title {
    color: var(--navy-dark);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.6;
}

.single-product div.product p.price,
.single-product div.product span.price {
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
}

.single-product div.product form.cart .single_add_to_cart_button {
    min-height: 48px;
}

.single-product div.product .woocommerce-tabs ul.tabs li a {
    font-weight: 700;
}

/* ۴۰۴ */

.ht-404 {
    padding-block: var(--s8);
    text-align: center;
}

.ht-404 strong {
    display: block;
    color: var(--primary);
    font-size: 72px;
    font-weight: 900;
    line-height: 1.2;
}

.ht-404 h1 {
    margin: var(--s2) 0 var(--s5);
    font-size: 22px;
}

.ht-404 .ht-button,
.ht-404 .ht-button-primary {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0 var(--s5);
    border-radius: var(--r-sm);
    background: var(--primary);
    color: #fff;
    font-weight: 700;
}


/* =========================================================
   ریسپانسیو
========================================================= */

@media (max-width: 1100px) {

    .header-main {
        gap: var(--s4);
    }

    .ht-action span {
        display: none;
    }

    .ht-action {
        padding-inline: var(--s3);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ht-about-card {
        grid-template-columns: 1fr;
    }
}

/* تبلت: ۳ ستون؛ در صفحه اصلی تعداد کالاها طوری محدود می‌شود که ردیف ناقص نماند */
@media (min-width: 681px) and (max-width: 899px) {

    .ht-products ul.products {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ht-home-products ul.products li.product:nth-child(n+7) {
        display: none;
    }

    .ht-home-sale ul.products li.product:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 900px) {

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    }

    .ht-topbar-phone {
        display: none;
    }

    .ht-topbar-inner {
        justify-content: center;
        min-height: 34px;
        font-size: 12px;
        text-align: center;
    }

    .site-header,
    .admin-bar .site-header {
        position: relative;
        top: 0;
    }

    .main-nav,
    .header-actions {
        display: none;
    }

    .header-main {
        min-height: 0;
        padding-block: var(--s3);
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        gap: var(--s2) var(--s3);
    }

    .ht-menu-btn,
    .ht-call-btn {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1.5px solid var(--line);
        border-radius: var(--r-md);
        background: #fff;
        color: var(--ink);
    }

    .ht-call-btn {
        color: var(--primary);
    }

    .brand {
        justify-self: center;
    }

    .brand img.custom-logo {
        height: 40px;
        max-width: 160px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        font-size: 15px;
    }

    .brand-name strong {
        font-size: 19px;
    }

    .brand-name small {
        font-size: 11px;
    }

    .search-form {
        grid-column: 1 / -1;
        grid-row: 2;
        height: 46px;
    }

    .ht-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 90;
        display: flex;
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: #fff;
        border-top: 1px solid var(--line);
        box-shadow: 0 -4px 20px rgba(25, 22, 66, .07);
    }

    .ht-section-head h2 {
        font-size: 20px;
    }

    .ht-trust-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s3);
    }

    .ht-trust-grid li {
        padding: var(--s3);
    }

    .ht-trust-icon {
        width: 40px;
        height: 40px;
    }

    .ht-trust-icon .ht-icon {
        width: 20px;
        height: 20px;
    }

    /* در موبایل فقط عنوان هر مزیت نمایش داده می‌شود تا کارت‌ها کوتاه و مرتب بمانند */
    .ht-trust-text small {
        display: none;
    }

    .ht-trust-text strong {
        font-size: 14px;
        line-height: 1.6;
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s3);
    }

    .site-footer {
        margin-top: var(--s7);
    }
}

@media (min-width: 600px) and (max-width: 900px) {

    /* روی تبلت کارت دسته‌بندی افقی می‌شود تا بیش از حد بزرگ نشود */
    .category-card {
        flex-direction: row;
        align-items: center;
    }

    .category-image {
        width: 88px;
        flex: none;
        aspect-ratio: 1 / 1;
    }

    .category-title {
        flex: 1;
        justify-content: flex-start;
        text-align: right;
        min-height: 0;
    }
}

@media (max-width: 680px) {

    .ht-container {
        padding-inline: var(--s4);
    }

    .ht-section-head {
        align-items: flex-start;
    }

    .ht-section-head p {
        display: none;
    }

    .ht-hero-panel {
        padding: var(--s6) var(--s5);
    }

    .ht-hero-panel p {
        font-size: 14px;
    }

    .ht-products ul.products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: var(--s3) !important;
    }

    .ht-products ul.products li.product {
        padding: var(--s2) !important;
    }

    .ht-products .woocommerce-loop-product__title {
        font-size: 13px !important;
    }

    .ht-products ul.products li.product .price {
        font-size: 14px !important;
    }

    .ht-shop-hero {
        padding: var(--s5);
    }

    .ht-shop-hero h1 {
        font-size: 22px;
    }

    .ht-shop-toolbar .woocommerce-ordering,
    .ht-shop-toolbar select {
        width: 100%;
    }

    .ht-about-card {
        padding: var(--s5);
        gap: var(--s5);
    }

    .ht-about-text h2 {
        font-size: 19px;
    }

    .ht-about-text p {
        text-align: right;
        line-height: 2;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--s5);
        padding-block: var(--s6) var(--s5);
    }

    .basic-article {
        padding: var(--s4);
    }
}

@media (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px;
    }
}

/* دراپ‌داون سبد فقط روی دستگاه‌هایی با ماوس */
@media (hover: none), (max-width: 900px) {
    .ht-cart-dropdown {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
