/* ============================================================
   RESET & BASE
============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    font-family: vazir;
}

:root {
    --teal: #14b8a6;
    --teal-dark: #0a7a80;
    --teal-pale: #bff3db;
    --teal-tint: #e3fbfd;
    --ink: #030712;
    --body-text: #1f2937;
    --muted: #6b7280;
    --muted-2: #4b5563;
    --border-1: #f0f0f0;
    --border-2: #d9d9d9;
    --border-3: #f3f4f6;
    --surface: #fcfcfd;
    --white: #ffffff;
    --badge: #ea580c;
    --brand-orange: #ea580c;
    --orange-hover: #c2410c;
    --danger: #ef4444;
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-soft: 0 1px 1px rgba(0, 0, 0, .05);
    --container: 1440px;
}

/* html {
    margin: 0;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
} */

 body {
   direction: rtl;
    text-align: right;
} 

a {
    color: inherit;
    text-decoration: none;
}

button {
    cursor: pointer;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

h1, h2, h3, p {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

input, select, textarea, button {
    
    font-size: 14px;
    color: inherit;
 
}

.icon {
    flex-shrink: 0;
    display: inline-block;
}

:focus-visible {
    outline: 2px solid var(--teal-dark);
    outline-offset: 2px;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 30px;
    width: 100%;
}

@media (max-width: 900px) {
    .container {
        padding: 0 16px;
    }
}

/* ============================================================
   PROMO BAR
============================================================ */
.promo-bar {
    background: url(../assets/image\ 95.png);
    background: url(../images/image\ 95.png);
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

/* ============================================================
   SITE HEADER
============================================================ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-1);
}

.site-header .container {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-top: 16px;
    padding-bottom: 16px;
    flex-wrap: wrap;
}

.ad-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.ad-logo__mark {
    width: 140px;
    height: 32px;
}

.site-search {
    flex: 1;
    min-width: 220px;
}

.site-search__field {
    width: 100%;
    max-width: 912px;
    margin-inline-start: auto;
    background: var(--white);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    color: var(--muted);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.site-search__field:hover,
.site-search__field:focus-visible {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .12);
}

.site-search__field span {
    font-weight: 500;
    letter-spacing: .01em;
}

.site-search__field .icon {
    width: 18px;
    height: 18px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.cart-widget {
    position: relative;
}

.icon-btn {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn .icon {
    width: 24px;
    height: 24px;
}

.cart-badge {
    position: absolute;
    top: -8px;
    left: -8px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--badge);
    border: 1.5px solid var(--white);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-widget {
    position: relative;
}

.account-trigger {
    display: flex;
    align-items: center;
    gap: 14px;
    background: none;
    border: none;
    padding: 4px;
    color: inherit;
    text-align: right;
}

.account-trigger__icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    flex-shrink: 0;
}

.account-trigger__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.account-trigger__greeting {
    font-size: 14px;
    font-weight: 500;
    color: rgba(0, 0, 0, .65);
    white-space: nowrap;
}

.account-trigger__label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    color: rgba(0, 0, 0, .88);
    white-space: nowrap;
}

.account-trigger .chevron {
    width: 14px;
    height: 14px;
    transition: transform .15s ease;
}

.account-widget.is-open .chevron {
    transform: rotate(180deg);
}

/* ============================================================
   DROPDOWN PANEL
============================================================ */
.dropdown-panel {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 220px;
    background: var(--white);
    border: 1px solid var(--border-1);
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(15, 23, 42, .12);
    padding: 8px;
    z-index: 40;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease;
}

.dropdown-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-panel a,
.dropdown-panel button.dropdown-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--body-text);
    background: none;
    border: none;
}

.dropdown-panel a:hover,
.dropdown-panel button.dropdown-item:hover {
    background: var(--border-3);
}

.dropdown-panel .divider-h {
    height: 1px;
    background: var(--border-1);
    margin: 6px 4px;
}

/* ============================================================
   CART PANEL
============================================================ */
.cart-panel {
    min-width: 360px;
    padding: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.cart-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-3);
}

.cart-panel__header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.cart-panel__header span {
    font-size: 13px;
    color: var(--muted);
    font-weight: 500;
}

.cart-panel__items {
    display: flex;
    flex-direction: column;
    padding: 8px 0;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-3);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item__thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-3);
    background: #f0fdf4;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.cart-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cart-item__name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cart-item__controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item__qty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    font-size: 15px;
    font-weight: 600;
    
    color: var(--ink);
}

.cart-item__btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-2);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
    flex-shrink: 0;
}

.cart-item__btn:hover {
    background: var(--border-3);
    border-color: var(--border-2);
}

.cart-item__btn .icon {
    width: 16px;
    height: 16px;
}

.cart-item__price {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    white-space: nowrap;
    
    min-width: 90px;
    text-align: left;
}

.cart-panel__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid var(--border-3);
}

.cart-panel__total {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: var(--ink);
}

.cart-panel__total span:first-child {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

.btn-checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: var(--radius-sm);
    background: #ea580c;
    color: #fff;
    border: none;
    font-weight: 700;
    font-size: 15px;
    transition: background .15s ease;
    white-space: nowrap;
}

.btn-checkout:hover {
    background: #c2410c;
}

.cart-widget:hover .dropdown-panel.cart-panel,
.cart-widget:focus-within .dropdown-panel.cart-panel {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ============================================================
   CATEGORY NAV
============================================================ */
.category-nav {
    background: var(--white);
    border-bottom: 1px solid var(--border-1);
    box-shadow: var(--shadow-soft);
}

.category-nav .container {
    display: flex;
    align-items: center;
    gap: 50px;
    height: 64px;
}

.category-dropdown {
    position: relative;
    flex-shrink: 0;
}

.category-dropdown__trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--body-text);
    font-size: 16px;
    font-weight: 500;
}

.category-dropdown__trigger .icon {
    width: 20px;
    height: 20px;
}

.category-dropdown__trigger .chevron {
    width: 14px;
    height: 14px;
    transition: transform .15s ease;
}

.category-dropdown.is-open .chevron {
    transform: rotate(180deg);
}

.category-panel {
    min-width: 420px;
    padding: 12px;
}

.nav-divider {
    width: 1px;
    height: 14px;
    background: var(--border-2);
    flex-shrink: 0;
}

.category-nav__links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.category-nav__links li {
    flex-shrink: 0;
}

.category-nav__links a {
    display: block;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--body-text);
    white-space: nowrap;
}

.category-nav__links a:hover {
    background: var(--border-3);
}

.category-nav__links a.is-active {
    background: var(--teal-pale);
    font-weight: 600;
}

/* ============================================================
   SEARCH OVERLAY
============================================================ */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    z-index: 80;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 90px 16px 40px;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-overlay.is-open {
    display: flex;
}

.search-modal {
    width: 100%;
    max-width: 960px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    overflow: hidden;
}

.search-modal__field {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid var(--teal);
    border-radius: var(--radius);
    margin: 12px;
    padding: 4px;
}

.search-modal__field input {
    flex: 1;
    border: none;
    outline: none;
    
    font-size: 15px;
    font-weight: 500;
    padding: 10px 8px;
    color: var(--ink);
    background: transparent;
}

.search-modal__close,
.search-modal__submit {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.search-modal__close:hover,
.search-modal__submit:hover {
    background: var(--border-3);
}

.search-modal__close .icon,
.search-modal__submit .icon {
    width: 18px;
    height: 18px;
}

.search-modal__body {
    padding: 4px 20px 24px;
    max-height: 65vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.search-state {
    display: none;
}

.search-state.is-visible {
    display: block;
}

.search-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink);
    margin: 16px 0 12px;
    
}

.trending-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trending-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--border-2);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
    background: var(--white);
    color: var(--body-text);
    
}

.trending-pill:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.trending-pill .icon {
    width: 14px;
    height: 14px;
}

.search-promo {
    margin-top: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 140px;
    background: linear-gradient(120deg, #2b6cb0, #63b3ed);
}

.search-promo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-chip-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 620px) {
    .category-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.category-chip {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    background: var(--teal-tint);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--body-text);
    text-align: right;
    
}

.category-chip:hover {
    background: var(--teal-pale);
}

.category-chip .icon {
    width: 22px;
    height: 22px;
}

.product-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 620px) {
    .product-result-grid {
        grid-template-columns: 1fr;
    }
}

.product-result {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border-3);
    border-radius: var(--radius);
    padding: 12px;
}

.product-result__thumb {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--border-3);
    flex-shrink: 0;
}

.product-result__info {
    flex: 1;
    min-width: 0;
}

.product-result__name {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
    
}

.product-result__price {
    margin-top: 6px;
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
}

.product-result__price .price-new {
    color: var(--teal-dark);
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
}

.product-result__price .price-old {
    color: var(--muted);
    font-size: 12px;
    text-decoration: line-through;
    white-space: nowrap;
}

.search-view-all {
    display: block;
    text-align: center;
    margin: 20px auto 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--teal-dark);
}

.search-view-all:hover {
    text-decoration: underline;
}

.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 48px 0 32px;
    text-align: center;
}

.search-empty .icon {
    width: 40px;
    height: 40px;
}

.search-empty p {
    font-size: 15px;
    font-weight: 500;
    color: var(--muted);
}