/* Global header: desktop mega menu, reusable search and a left mobile drawer. */
.site-header.ts-header { position: relative; z-index: 60; padding: 0; background: #F3F3F3; color: #292929; direction: rtl; font-family: "Yekan Bakh FaNum", Tahoma, sans-serif; }
.ts-header a { color: inherit; }
.ts-header__shell { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(320px, 440px); grid-template-areas: "brand utility search" "nav nav actions"; align-items: center; gap: 24px 28px; width: min(88%, 1450px); margin-inline: auto; padding-block: 28px 20px; }
.ts-header__brand { grid-area: brand; display: block; max-width: 190px; text-decoration: none; font-size: 25px; font-weight: 900; }
.ts-header__logo { display: block; width: auto; max-width: 180px; height: 68px; object-fit: contain; }
.ts-header__utility { grid-area: utility; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; min-width: 0; }
.ts-header__utility a { padding-inline: 12px; color: #555; font-size: 12px; line-height: 1.8; text-decoration: none; }
.ts-header__utility a + a { border-inline-start: 1px solid #eccdd1; }
.ts-header__utility a:hover { color: #d81022; }
.ts-header__search { grid-area: search; min-width: 0; }
.ts-header__navigation { grid-area: nav; display: flex; align-items: center; gap: 26px; min-width: 0; }
.ts-header__primary { min-width: 0; flex: 1; }
.ts-header__nav-list { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; list-style: none; padding: 0; margin: 0; }
.ts-header__nav-list > li { position: relative; }
.ts-header__nav-list a { display: block; text-decoration: none; color: #333; font-size: 15px; line-height: 1.8; padding: 8px 2px; }
.ts-header__nav-list > .current-menu-item > a, .ts-header__nav-list > .current-menu-ancestor > a { color: #292929; font-weight: 800; background: #f8dfe2; border-radius: 20px; padding-inline: 10px; }
.ts-header__nav-list a:hover { color: #d81022; }
.ts-header__nav-list .sub-menu { display: none; position: absolute; top: 100%; right: 0; z-index: 110; min-width: 210px; max-width: 300px; list-style: none; padding: 10px; margin: 0; background: #fff; border: 1px solid #eee; border-radius: 14px; box-shadow: 0 12px 32px rgb(15 20 30 / 10%); }
.ts-header__nav-list li:hover > .sub-menu, .ts-header__nav-list li:focus-within > .sub-menu { display: block; }
.ts-header__nav-list .sub-menu li { position: relative; }
.ts-header__nav-list .sub-menu a { padding: 10px; border-radius: 8px; font-size: 13px; }
.ts-header__nav-list .sub-menu a:hover { background: #fff1f2; }
.ts-header__nav-list .sub-menu .sub-menu { top: 0; right: 100%; }
.ts-header__actions { grid-area: actions; display: flex; align-items: center; justify-content: flex-end; gap: 24px; }
.ts-header__account { display: inline-flex; align-items: center; justify-content: center; flex-direction: row; gap: 12px; min-height: 52px; padding: 12px 26px; border-radius: 15px; background: #292929; color: #fff !important; font-size: 14px; font-weight: 600; text-decoration: none; }
.ts-header__account svg { width: 21px; height: 21px; }
.ts-header__account:hover { background: #151515; }
.ts-header__mobile-toggle { display: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #e2e2e2; border-radius: 12px; background: #fff; color: #292929; cursor: pointer; }
.ts-announcement { background: #ed1024; color: #fff; }
.ts-announcement > a, .ts-announcement picture { display: block; }
.ts-announcement .ts-announcement__image { display: block; width: 100%; height: auto; margin: 0; }
.ts-announcement__texts { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; width: min(88%, 1450px); min-height: 40px; margin-inline: auto; padding-block: 8px; font-size: 12px; line-height: 1.9; }
.ts-announcement__texts a { color: #fff; text-decoration: none; }
/* Full-width category flyout, scoped to the header shell. */
.ts-header__category-toggle { display: inline-flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 50px; padding: 12px 18px; border: 0; border-radius: 15px; background: #ed1024; color: #fff; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.ts-header__category-toggle > svg:last-child { width: 16px; height: 16px; }
.ts-mega { position: absolute; right: 0; left: 0; top: calc(100% + 4px); z-index: 110; max-height: min(65dvh, 540px); overflow-y: auto; padding: 28px; border: 1px solid #eee; border-radius: 20px; background: #fff; box-shadow: 0 16px 44px rgb(15 20 30 / 12%); }
.ts-mega[hidden] { display: none; }
.ts-category-list { list-style: none; padding: 0; margin: 0; }
.ts-mega .ts-category-list--0 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.ts-category-list a { display: block; font-size: 13px; line-height: 1.9; text-decoration: none; overflow-wrap: anywhere; padding-block: 6px; }
.ts-mega .ts-category-list--0 > li > a { margin-block-end: 8px; color: #d81022; font-size: 15px; font-weight: 800; }
.ts-category-list a:hover { color: #d81022; }
.ts-category-list .ts-category-list { margin-inline-start: 10px; }
.ts-mega__all { display: inline-flex; padding: 12px 18px; margin-block-start: 24px; border-radius: 10px; background: #fff1f2; color: #d81022 !important; font-size: 13px; font-weight: 600; text-decoration: none; }
/* Mini cart: SSR fallback, enhanced through Store API with the customer's session. */
.ts-header-cart { position: relative; }
.ts-header-cart > summary { position: relative; display: grid; place-items: center; width: 44px; height: 48px; padding: 0; list-style: none; cursor: pointer; border-radius: 10px; color: #292929; }
.ts-header-cart > summary::-webkit-details-marker { display: none; }
.ts-header-cart > summary > svg { width: 27px; height: 27px; }
.ts-header-cart__count { position: absolute; top: 0; right: -2px; display: grid; place-items: center; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 20px; background: #ed1024; color: #fff; font-size: 10px; font-weight: 700; }
.ts-header-cart__panel { position: absolute; top: calc(100% + 14px); left: 0; z-index: 150; width: 370px; max-width: calc(100vw - 32px); padding: 20px; border: 1px solid #eee; border-radius: 22px; background: #fff; box-shadow: 0 14px 44px rgb(15 20 30 / 14%); }
.ts-header-cart:not([open]) .ts-header-cart__panel { display: none; }
.ts-header-cart__status { margin: 0; color: #777; font-size: 12px; line-height: 1.8; }
.ts-header-cart__status:not(:empty) { padding-block-end: 10px; }
.ts-mini-cart__heading { margin: 0 0 16px; color: #777; font-size: 12px; }
.ts-mini-cart__items { list-style: none; padding: 0; margin: 0; max-height: min(360px, 48dvh); overflow-y: auto; overscroll-behavior: contain; }
.ts-mini-cart__item { display: flex; gap: 12px; padding-block: 14px; border-block-end: 1px solid #eee; }
.ts-mini-cart__item:first-child { padding-block-start: 0; }
.ts-mini-cart__image { display: block; flex: 0 0 62px; height: 62px; border: 5px solid #f5f5f6; border-radius: 12px; overflow: hidden; }
.ts-mini-cart__image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ts-mini-cart__copy { flex: 1; min-width: 0; }
.ts-mini-cart__name { display: block; margin-block-end: 8px; font-size: 13px; font-weight: 700; line-height: 1.8; text-decoration: none; overflow-wrap: anywhere; }
.ts-mini-cart__variation { margin: 0 0 8px; color: #888; font-size: 11px; line-height: 1.8; }
.ts-mini-cart__item-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ts-mini-cart__quantity { display: inline-flex; flex: 0 0 auto; align-items: center; border: 3px solid #f7e9eb; border-radius: 11px; background: #fff; }
.ts-mini-cart__quantity button { display: grid; place-items: center; width: 27px; height: 29px; padding: 0; border: 0; border-radius: 7px; color: #d81022; background: #fff; font: inherit; font-size: 17px; cursor: pointer; }
.ts-mini-cart__quantity button:disabled { color: #bbb; cursor: default; }
.ts-mini-cart__quantity span { min-width: 22px; text-align: center; font-size: 12px; }
.ts-mini-cart__remove { display: grid; place-items: center; width: 28px; height: 32px; padding: 0; border: 0; border-radius: 8px; background: #fff0f1; color: #ed1024; font: inherit; font-size: 21px; cursor: pointer; }
.ts-mini-cart__price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px; margin-inline-start: auto; font-size: 13px; font-weight: 800; direction: rtl; }
.ts-mini-cart__price > span { font-size: 10px; font-weight: 400; color: #888; }
.ts-mini-cart__total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 18px; font-size: 14px; }
.ts-mini-cart__total .ts-mini-cart__price { font-size: 17px; }
.ts-mini-cart__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ts-mini-cart__actions a, .ts-mini-cart__shop { display: flex; justify-content: center; align-items: center; min-height: 45px; padding: 10px; border-radius: 12px; background: #f4f4f5; color: #292929; text-decoration: none; font-size: 13px; font-weight: 600; }
.ts-mini-cart__actions a:last-child { background: #ed1024; color: #fff; }
.ts-mini-cart__empty { margin: 20px 0; font-size: 15px; text-align: center; }
.ts-header-cart__content .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.ts-header-cart__content .woocommerce-mini-cart-item { position: relative; padding: 12px 0; border-block-end: 1px solid #eee; min-height: 75px; font-size: 13px; }
.ts-header-cart__content .woocommerce-mini-cart-item a { text-decoration: none; }
.ts-header-cart__content .woocommerce-mini-cart-item img { float: right; width: 56px; height: 56px; object-fit: contain; margin-inline-end: 12px; border-radius: 10px; }
.ts-header-cart__content .woocommerce-mini-cart-item .remove { float: left; color: #ed1024; font-size: 22px; }
.ts-header-cart__content .woocommerce-mini-cart__buttons { display: flex; gap: 10px; }
.ts-header-cart__content .woocommerce-mini-cart__buttons a { flex: 1; padding: 12px; border-radius: 10px; background: #ed1024; color: #fff; text-align: center; font-size: 12px; text-decoration: none; }
/* Native dialog supplies focus trapping and a modal top layer. */
body.ts-menu-open { overflow: hidden; }
.ts-mobile-menu { position: fixed; top: 0; bottom: 0; left: 0; right: auto; width: min(88vw, 390px); max-width: none; height: 100dvh; max-height: 100dvh; padding: 24px; border: 0; margin: 0; border-radius: 0 24px 24px 0; background: #fff; color: #292929; font-family: "Yekan Bakh FaNum", Tahoma, sans-serif; direction: rtl; overflow-y: auto; overscroll-behavior: contain; transform: translateX(-102%); transition: transform 200ms ease; }
.ts-mobile-menu[open] { display: flex; flex-direction: column; }
.ts-mobile-menu.is-visible { transform: none; }
.ts-mobile-menu::backdrop { background: rgb(15 20 30 / 48%); backdrop-filter: blur(3px); }
.ts-mobile-menu__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ts-mobile-menu__header h2 { margin: 0; font-size: 18px; font-weight: 800; }
.ts-mobile-menu__header button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #f4f4f5; cursor: pointer; }
.ts-mobile-menu__brand { display: block; align-self: flex-start; margin-block: 20px 24px; text-decoration: none; }
.ts-mobile-menu__brand .ts-header__logo { max-width: 150px; height: 60px; }
.ts-mobile-menu__links { list-style: none; padding: 0; margin: 0; }
.ts-mobile-menu__links > li { border-block-end: 1px solid #eee; }
.ts-mobile-menu__links li { position: relative; }
.ts-mobile-menu__links a { display: block; padding: 13px 0; font-size: 14px; line-height: 1.8; text-decoration: none; }
.ts-mobile-menu__links .current-menu-item > a { color: #d81022; font-weight: 700; }
.ts-mobile-menu__links .menu-item-has-children > a { padding-inline-end: 44px; }
.ts-mobile-menu__submenu-toggle { position: absolute; left: 0; top: 4px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: #fff1f2; color: #d81022; font-size: 20px; cursor: pointer; }
.ts-mobile-menu__links .sub-menu { display: none; list-style: none; padding: 0 14px 0 0; margin: 0 0 10px; border-inline-start: 1px solid #eee; }
.ts-mobile-menu__links .is-open > .sub-menu { display: block; }
.ts-mobile-menu__links .sub-menu a { font-size: 13px; }
.ts-mobile-menu__categories { margin-block-start: 22px; }
.ts-mobile-menu__categories summary, .ts-mobile-menu .ts-category-list summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; list-style: none; padding-block: 13px; cursor: pointer; font-size: 14px; line-height: 1.8; }
.ts-mobile-menu__categories summary::-webkit-details-marker { display: none; }
.ts-mobile-menu__categories > summary { font-weight: 700; }
.ts-mobile-menu__categories > summary > svg:first-child { color: #ed1024; }
.ts-mobile-menu .ts-category-list--0 { display: block; }
.ts-mobile-menu .ts-category-list__all { color: #d81022; font-size: 12px; }
.ts-mobile-menu .ts-header__utility { display: flex; flex-direction: column; align-items: stretch; gap: 0; padding-block: 24px; }
.ts-mobile-menu .ts-header__utility a { border: 0; padding: 10px 0; font-size: 13px; }
.ts-mobile-menu__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-block-start: 24px; margin-block-start: auto; }
.ts-mobile-menu__actions a { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 8px; border-radius: 12px; background: #fff1f2; color: #d81022; font-size: 12px; text-decoration: none; }
.ts-header :focus-visible { outline: 3px solid #ed1024; outline-offset: 3px; }
.ts-header__account:focus-visible, .ts-header__category-toggle:focus-visible { outline-color: #292929; }
@media (max-width: 1250px) {
 .ts-header__shell { grid-template-columns: auto minmax(0, 1fr) 360px; gap: 22px 20px; }
 .ts-header__logo { max-width: 155px; }
 .ts-header__utility a { padding-inline: 8px; font-size: 11px; }
 .ts-header__nav-list { gap: 10px 16px; }
 .ts-header__nav-list a { font-size: 13px; }
 .ts-header__actions { gap: 18px; }
 .ts-header__account { padding-inline: 22px; }
}
@media (max-width: 1000px) {
 .ts-header__shell { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "brand actions" "search search"; gap: 16px; padding-block: 16px; }
 .ts-header__shell > .ts-header__utility, .ts-header__navigation, .ts-header__account { display: none; }
 .ts-header__logo { max-width: 155px; height: 54px; }
 .ts-header__mobile-toggle { display: grid; }
 .ts-header__actions { gap: 14px; }
 .ts-header-cart__panel { position: fixed; top: var(--ts-cart-panel-top, 90px); right: 16px; left: 16px; width: auto; max-width: none; max-height: calc(100dvh - var(--ts-cart-panel-top, 90px) - 16px); overflow-y: auto; padding: 18px; }
 .ts-mini-cart__items { max-height: 42dvh; }
}
@media (max-width: 600px) {
 .ts-header__shell, .ts-announcement__texts { width: calc(100% - 32px); }
 .ts-announcement__texts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; text-align: center; font-size: 10px; }
 .ts-header__logo { max-width: 140px; height: 48px; }
 .ts-header__actions { gap: 10px; }
 .ts-header-cart > summary { width: 40px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) { .ts-mobile-menu { transition: none; } }
