@import url(./typography.css);
@import url(./variable.css);

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
}

/* Hide Vue-mounted blocks until the app compiles their template. */
[v-cloak] {
  display: none;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), opacity var(--transition-fast);
}

button,
input {
  font-family: inherit;
}

.site-container {
  width: 100%;
  max-width: calc(var(--container-max) + 80px);
  margin-inline: auto;
  padding-inline: 40px;
}

/* Breadcrumbs — Bootstrap RTL float/padding breaks flex item spacing */
.breadcrumb {
  --bs-breadcrumb-item-padding-x: 0;
  --bs-breadcrumb-margin-bottom: 0;
}

.breadcrumb-item {
  display: inline-flex;
  align-items: center;
}

.breadcrumb-item + .breadcrumb-item {
  padding-right: 0;
  padding-left: 0;
}

.breadcrumb-item + .breadcrumb-item::before {
  float: none;
  padding-right: 0;
  padding-left: 0;
  padding-inline: 4px;
}

/* Buttons */
.btn-primary-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-black);
  color: #fff;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.btn-primary-dark:hover {
  opacity: 0.9;
  color: #fff;
}

.btn-primary-dark img {
  width: 24px;
  height: 24px;
  display: block;
}

.btn-ghost-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  font-size: 16px;
  font-weight: 500;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-green-200);
  color: var(--color-heading);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.section-title {
  margin: 0;
  color: var(--color-heading);
  font-size: 30px;
  font-weight: 800;
  line-height: 60px;
  text-align: center;
}

.section-subtitle {
  margin: 4px 0 0;
  color: var(--color-muted);
  font-size: 18px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
}

.section-head .section-title {
  text-align: right;
  line-height: 60px;
}

/* Header */
.site-header {
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 1030;
  overflow-anchor: none;
  box-shadow: 0 0 0 rgba(15, 23, 42, 0);
  transition:
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.site-header.is-scrolled {
  background: #fff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 80px;
  padding-block: 12px;
  transition: height var(--transition-fast), gap var(--transition-fast), padding var(--transition-fast);
}

.header-brand-search {
  display: flex;
  align-items: center;
  gap: 20px;
  min-width: 0;
  transition: gap var(--transition-fast);
}

.header-brand img {
  width: 187px;
  height: 60px;
  object-fit: contain;
  transition: width var(--transition-fast), height var(--transition-fast);
}

.header-search-wrap {
  position: relative;
  min-width: 0;
}

.header-search {
  width: 300px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid rgba(228, 228, 231, 0.75);
  border-radius: var(--radius-pill);
  background: var(--color-bg-elevated);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  box-shadow: none;
  cursor: text;
  transition:
    width var(--transition-fast),
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.site-header.is-scrolled .header-search {
  border-color: #e4e4e7;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.header-search input {
  flex: 1;
  min-width: 0;
  height: 40px;
  border: 0;
  background: transparent;
  outline: none;
  text-align: right;
  color: var(--color-text);
  font-size: 14px;
  line-height: 20px;
  transition: height var(--transition-fast), font-size var(--transition-fast), line-height var(--transition-fast);
}

.header-search input::placeholder {
  color: var(--color-placeholder);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
  transition: gap var(--transition-fast);
}

/* باشگاه مشتریان — فقط موبایل (نسخه دسکتاپ در header-nav است) */
.header-club-mobile-link {
  display: none;
}

.header-actions-group {
  display: flex;
  align-items: center;
  gap: 16px;
  transition: gap var(--transition-fast);
}

.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: max-content;
  height: 40px;
  padding: 8px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-text);
  transition: width var(--transition-fast), height var(--transition-fast), padding var(--transition-fast), gap var(--transition-fast);
}

.header-icon-btn img:not(.header-user-chevron) {
  width: 27px;
  max-width: 27px;
  height: 27px;
  transition: width var(--transition-fast), height var(--transition-fast);
  filter: brightness(0%);
}

.header-login-btn img {
  filter: none;
}
.header-basket-btn {
  padding-right: 0;
}
.header-user-btn {
  width: auto;
  min-width: 40px;
}

.header-login-btn {
  width: auto;
  min-width: 40px;
  border-width: 1px;
  border-style: solid;
  border-color: #E4E4E7;
  padding: 0 16px;
  height: 35px;
  font-size: 14px;
  transition: 0.2s ease-in-out;
}

.header-login-btn img {
  transform: rotateY(180deg);
}

.header-login-btn:hover {
  border-color: #999;
}

.header-icon-btn .header-user-chevron {
  flex-shrink: 0;
  width: 12px;
  max-width: 12px;
  height: 12px;
  transition: transform .2s ease;
}

.header-badge {
  position: absolute;
  bottom: 2px;
  inset-inline-end: -2px;
  min-width: 20px;
  height: 20px;
  padding: 2.5px 4px 0;
  border: 1.5px solid #fff;
  border-radius: var(--radius-pill);
  background: var(--color-error);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    min-width var(--transition-fast),
    height var(--transition-fast),
    font-size var(--transition-fast),
    line-height var(--transition-fast);
}

.header-user-menu {
  position: relative;
}

.header-user-menu.is-open .header-user-chevron {
  transform: rotate(180deg);
}

.header-user-dropdown {
  position: absolute;
  z-index: 1050;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  width: min(280px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  color: #27272a;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.header-user-dropdown::after {
  content: "";
  position: absolute;
  top: -14px;
  inset-inline: -12px;
  height: 14px;
}

.header-user-menu.is-open .header-user-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header-user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 8px;
  border-bottom: 0px solid #f0f0f2;
  color: inherit;
  text-decoration: none;
  transition: background-color .15s ease;
}

.header-user-dropdown-head:hover {
  background: #fafafa;
}

.header-user-dropdown-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

.header-user-dropdown-user {
  flex: 1;
  min-width: 0;
  text-align: start;
}

.header-user-dropdown-name-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start; /* RTL: main-start = راست، کنار آواتار */
  width: 100%;
  min-width: 0;
}

.header-user-dropdown-name-cluster {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
}

.header-user-dropdown-tier {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

.header-user-dropdown-tier img {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.header-user-dropdown-name {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 22px;
  color: #09090b;
}

/* تولتیپ‌های Bootstrap به body append می‌شوند؛ فونت سایت را اعمال می‌کنیم */
.tooltip {
  --bs-tooltip-font-size: 13px;
  font-family: Dana, system-ui, sans-serif;
}

.tooltip .tooltip-inner {
  font-family: inherit;
  font-weight: 500;
  line-height: 1.45;
}

.header-user-dropdown-user small {
  display: block;
  font-size: 12px;
  line-height: 18px;
  color: #71717a;
}

.header-user-dropdown-head-chevron {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  opacity: .45;
}

.header-user-dropdown-points {
  padding: 8px 12px 0px;
}

.header-user-dropdown-points .account-points {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 48px;
  padding: 0 12px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 1000px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(180deg, #f2a54d 0%, #f6c489 48%, #fdd1a2 100%) border-box;
  box-shadow:
    0 0 10px #ffa23626,
    0 0 18px rgba(255, 208, 154, .35);
}

.header-user-dropdown-points .account-points__label {
  flex: 0 1 auto;
  font-size: 14px;
  line-height: 20px;
  font-weight: 400;
  color: #27272a;
  white-space: nowrap;
  text-align: right;
}

.header-user-dropdown-points .account-points__tier {
  font-weight: 700;
  color: #b45309;
}

.header-user-dropdown-points .account-points__value {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 28px;
  direction: ltr;
}

.header-user-dropdown-points .account-points__coin {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: block;
}

.header-user-dropdown-points .account-points__amount {
  margin: 0;
  font-size: 18px;
  line-height: 28px;
  font-weight: 700;
  color: #27272a;
  white-space: nowrap;
}

.header-user-dropdown__nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 8px;
}

.header-user-dropdown__nav a,
.header-user-dropdown__nav button.logout {
  width: 100%;
  box-sizing: border-box;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  line-height: 20px;
  color: #303038;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.header-user-dropdown__nav .account-sidebar-nav__icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  display: block;
  object-fit: contain;
}

.header-user-dropdown__nav a:hover:not(.logout),
.header-user-dropdown__nav a.is-active {
  background: #f4f4f5;
  color: #09090b;
}

.header-user-dropdown__nav a.is-active {
  font-weight: 600;
}

.header-user-dropdown__nav a:focus-visible,
.header-user-dropdown__nav button.logout:focus-visible {
  outline: 2px solid #16a34a;
  outline-offset: 2px;
}

.header-user-dropdown__nav .account-sidebar-nav-divider {
  margin: 4px 0;
  border-top: 1px solid #f0f0f2;
}

.header-user-dropdown__nav button.logout {
  color: #dc2626;
}

.header-user-dropdown__nav button.logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

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

.header-cart-preview {
  position: absolute;
  z-index: 1050;
  top: calc(100% + 6px);
  inset-inline-end: -8px;
  width: min(392px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #e4e4e7;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .1);
  color: #27272a;
  font-size: 13px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.header-cart-menu.is-open .header-cart-preview {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.header-cart-preview::after {
  content: "";
  position: absolute;
  top: -14px;
  inset-inline: -12px;
  height: 14px;
}

.header-cart-preview-head,
.header-cart-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
}

.header-cart-preview-head {
  border-bottom: 1px solid #e4e4e7;
}

.header-cart-preview-head strong {
  font-size: 16px;
  line-height: 24px;
}

.header-cart-preview-head span {
  color: #71717a;
  font-size: 12px;
  line-height: 18px;
}

.header-cart-preview-head b {
  color: #71717a;
  font-weight: 400;
}

.header-cart-preview-body {
  min-height: 96px;
}

.header-cart-preview-items {
  max-height: min(288px, 54vh);
  overflow-y: auto;
}

.header-cart-preview-loading,
.header-cart-preview-empty,
.header-cart-preview-error {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 120px;
  padding: 18px 14px;
  color: #71717a;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}

.header-cart-preview-loading[hidden],
.header-cart-preview-empty[hidden],
.header-cart-preview-error[hidden],
.header-cart-preview-items[hidden],
.header-cart-preview-footer[hidden] {
  display: none !important;
}

.header-cart-preview-error {
  color: #b91c1c;
}

.header-cart-preview-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #e4e4e7;
  border-top-color: #27272a;
  border-radius: 50%;
  animation: header-cart-spin .7s linear infinite;
  flex-shrink: 0;
}

.header-cart-preview.is-loading .header-cart-preview-head span {
  opacity: .55;
}

.header-cart-preview-item.is-updating {
  opacity: .55;
  pointer-events: none;
}

@keyframes header-cart-spin {
  to {
    transform: rotate(360deg);
  }
}

.header-cart-preview-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e4e7;
}

.header-cart-preview-item-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 75px;
  height: 75px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e4e4e7;

}

.header-cart-preview-item-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.header-cart-preview-item-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-height: 72px;
}

.header-cart-preview-item-heading {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.header-cart-preview-item-info h3 {
  margin: 0;
  min-width: 0;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  color: #27272a;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.header-cart-preview-item-brand {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
  font-weight: 700;
  color: #27272a;
}

.header-cart-preview-item-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.header-cart-preview-item-pricing {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.header-cart-preview-item-meta {
  display: flex;
  gap: 4px;
  align-items: center;
  color: #71717a;
  font-size: 11px;
  line-height: 16px;
}

.header-cart-preview-discount {
  padding: 3px 5px 0;
  border-radius: 999px;
  background: rgba(239, 68, 68, .1);
  color: #dc2626;
  font-size: 10px;
  line-height: 14px;
}

.header-cart-preview-item-meta del {
  color: #71717a;
  margin-top: 2px;
}

.header-cart-preview-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 0;
  color: #27272a;
}

.header-cart-preview-price span {
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
}

.header-cart-preview-price small,
.header-cart-preview-total small {
  font-size: 10px;
  font-weight: 400;
  line-height: 14px;
}

.header-cart-preview-quantity {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  width: 92px;
  min-width: 92px;
  padding: 2px 3px;
  border: 1px solid #f4f4f6;
  border-radius: 999px;
  background: #f4f4f6;
  direction: ltr;
}

.header-cart-preview-quantity button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  padding: 0;
  border-radius: 50%;
  background: #f4f4f6;
  color: #18191d;
  cursor: pointer;
}

.header-cart-preview-quantity button i {
  font-size: 14px;
}

.header-cart-preview-quantity [hidden] {
  display: none !important;
}

.header-cart-preview-quantity button img {
  width: 12px;
  height: 12px;
  object-fit: contain;
}

.header-cart-preview-quantity>span {
  min-width: 14px;
  color: #101114;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
}

.header-cart-preview-footer {
  border-top: 1px solid #f4f4f5;
}

.header-cart-preview-total {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 11px;
  line-height: 16px;
  align-items: flex-end;
}

.header-cart-preview-total>span {
  color: #71717a;
}

.header-cart-preview-total strong {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 17px;
  line-height: 24px;
  font-weight: 800;
}

.header-cart-preview-submit {
  flex: 1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #020617;
  color: #fff;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

@media (max-width: 991.98px) {
  .header-cart-preview {
    position: fixed;
    top: 76px;
    inset-inline: 12px;
    width: auto;
    max-width: 392px;
  }

  .header-cart-preview-item {
    grid-template-columns: 64px 1fr;
    gap: 8px;
    padding: 10px 12px;
  }

  .header-cart-preview-item-media {
    width: 64px;
    height: 64px;
  }

  .header-cart-preview-item-media img {
    width: 46px;
    height: 34px;
  }

  .header-cart-preview-item-info {
    min-height: 0;
  }

  .header-cart-preview-item-bottom {
    flex-wrap: wrap;
  }

  .header-cart-preview-footer {
    padding: 10px 12px;
  }

  .header-cart-preview-submit {
    font-size: 13px;
    min-height: 38px;
  }
}

.header-divider {
  width: 1px;
  height: 18px;
  background: var(--color-border-elevated);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  transition: height var(--transition-fast);
}

.header-nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
  padding-block: 4px 12px;
  overflow: visible;
  transition: padding var(--transition-fast);
}

.header-nav>a,
.header-nav>button,
.header-nav .nav-categories,
.header-nav .nav-routine-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  color: var(--color-text-secondary);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  white-space: nowrap;
  transition:
    padding var(--transition-fast),
    font-size var(--transition-fast),
    line-height var(--transition-fast),
    gap var(--transition-fast),
    color var(--transition-fast);
}

.header-nav>button,
.header-nav .nav-routine-trigger {
  border: 0;
  background: none;
  font-family: inherit;
  cursor: pointer;
}

.header-nav>a img,
.header-nav .nav-categories img {
  width: 20px;
  height: 20px;
  transition: width var(--transition-fast), height var(--transition-fast);
}

.header-nav>a:hover,
.header-nav>a.active,
.header-nav>button:hover,
.header-nav .nav-categories:hover,
.header-nav .nav-routine-wrap.is-open .nav-routine-trigger,
.nav-categories-wrap.is-open .nav-categories {
  color: var(--color-heading);
}

/* Routine builder multi-level hover tree */
.nav-routine-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-routine-trigger__chevron {
  font-size: 12px;
  line-height: 1;
  transition: transform 0.18s ease;
}

.nav-routine-wrap.is-open .nav-routine-trigger__chevron {
  transform: rotate(180deg);
}

.nav-routine-tree {
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border, #e4e4e7);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.1);
}

.nav-routine-tree--root {
  position: absolute;
  top: calc(100% - 2px);
  inset-inline-start: 0;
  z-index: 1050;
  padding-top: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.nav-routine-tree--root > .nav-routine-tree__item,
.nav-routine-tree--branch > .nav-routine-tree__item {
  position: relative;
  z-index: 1;
}

.nav-routine-tree--root::after {
  content: "";
  position: absolute;
  inset: 12px 0 0;
  z-index: 0;
  border: 1px solid var(--color-border, #e4e4e7);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.1);
  pointer-events: none;
}

.nav-routine-wrap.is-open > .nav-routine-tree--root {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-routine-tree--branch {
  position: absolute;
  top: -8px;
  /* RTL: open nested levels to the physical left */
  right: calc(100% - 2px);
  left: auto;
  z-index: 2;
  padding-right: 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(6px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s ease;
}

.nav-routine-tree--branch::after {
  content: "";
  position: absolute;
  inset: 0 12px 0 0;
  z-index: 0;
  border: 1px solid var(--color-border, #e4e4e7);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 24, 27, 0.1);
  pointer-events: none;
}

.nav-routine-tree__item {
  position: relative;
}

.nav-routine-tree__item.is-open > .nav-routine-tree--branch {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(0);
}

.nav-routine-tree__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--color-text-secondary, #3f3f46);
  font: 600 13px/20px Dana, sans-serif;
  text-decoration: none;
  text-align: right;
  cursor: pointer;
}

.nav-routine-tree__link--label {
  cursor: default;
}

.nav-routine-tree__link:hover,
.nav-routine-tree__item.is-open > .nav-routine-tree__link {
  background: #f4f4f5;
  color: var(--color-heading, #09090b);
}

.nav-routine-tree__chevron {
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1;
  color: #a1a1aa;
}

.nav-routine-tree__item.is-open > .nav-routine-tree__link .nav-routine-tree__chevron {
  color: var(--color-heading, #09090b);
}

.header-nav .nav-categories {
  padding-inline-start: 0;
  font-weight: 600;
}

.header-nav>.header-divider {
  margin-inline: 2px;
}

.nav-categories-wrap {
  position: static;
}

.mega-menu {
  position: absolute;
  top: calc(100% - 2px);
  inset-inline: 0;
  z-index: 1040;
  display: flex;
  align-items: stretch;
  min-height: 0;
  max-height: min(80vh, 640px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e8e8ea;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(4px);
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease,
    transform 0.2s ease;
}

.mega-menu::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: -14px;
  height: 14px;
}

.nav-categories-wrap.is-open .mega-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.mega-menu-sidebar {
  display: flex;
  flex-direction: column;
  flex: 0 0 200px;
  gap: 2px;
  padding: 12px 10px;
  border-inline-end: 1px solid #ececef;
  background: #fff;
  overflow-x: hidden;
  overflow-y: auto;
}

.mega-menu-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #27272a;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-align: right;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.mega-menu-cat>span:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.mega-menu-cat-chevron {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.45;
  transition: opacity var(--transition-fast), filter var(--transition-fast);
}

.mega-menu-cat:hover {
  background: rgba(255, 255, 255, 0.85);
}

.mega-menu-cat:hover .mega-menu-cat-chevron {
  opacity: 0.7;
}

.mega-menu-cat.is-active {
  background: #e9f4e4;
  color: #09090b;
  font-weight: 700;
}

.mega-menu-cat.is-active .mega-menu-cat-chevron {
  opacity: 1;
  filter: invert(48%) sepia(24%) saturate(800%) hue-rotate(63deg) brightness(95%) contrast(88%);
}

.mega-menu-panels {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  background: #fff;
  overflow: hidden;
}

.mega-menu-panel {
  display: none;
  height: 100%;
  max-height: 100%;
  padding: 20px 24px 24px;
  overflow-x: hidden;
  overflow-y: auto;
}

.mega-menu-panel.is-active {
  /* ستون‌های فشرده؛ بدون ردیف هم‌تراز که فاصله‌ی خالی وسط بسازد */
  display: block;
  columns: 5;
  column-gap: 24px;
}

.mega-menu-col,
.mega-menu-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  margin-bottom: 22px;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}

.mega-menu-col--stack {
  gap: 22px;
  margin-bottom: 0;
}

.mega-menu-col--stack>.mega-menu-group {
  margin-bottom: 0;
}

.mega-menu-heading {
  margin: 0 0 4px;
  color: #09090b;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.mega-menu-col>a,
.mega-menu-group>a {
  color: #71717a;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-align: right;
  transition: color var(--transition-fast);
}

.mega-menu-col>a:hover,
.mega-menu-group>a:hover {
  color: #09090b;
}

@media (min-width: 992px) {
  .site-header.is-scrolled .header-top {
    height: 64px;
    gap: 16px;
    padding-block: 8px;
  }

  .site-header.is-scrolled .header-brand-search {
    gap: 14px;
  }

  .site-header.is-scrolled .header-brand img {
    width: 148px;
    height: 48px;
  }

  .site-header.is-scrolled .header-search {
    width: 260px;
  }

  .site-header.is-scrolled .header-search input {
    height: 34px;
    font-size: 13px;
    line-height: 18px;
  }

  .site-header.is-scrolled .header-search>img {
    width: 14px;
    height: 14px;
  }

  .site-header.is-scrolled .header-actions {
    gap: 16px;
  }

  .site-header.is-scrolled .header-actions-group {
    gap: 12px;
  }

  .site-header.is-scrolled .header-icon-btn {
    padding: 0 8px;
    gap: 4px;
  }

  .site-header.is-scrolled .header-icon-btn img {
    width: 20px;
    height: 20px;
  }

  .site-header.is-scrolled .header-user-btn {
    min-width: 34px;
  }

  .site-header.is-scrolled .header-icon-btn .header-user-chevron {
    width: 10px;
    max-width: 10px;
    height: 10px;
  }

  .site-header.is-scrolled .header-badge {
    min-width: 18px;
    height: 18px;
    font-size: 11px;
    line-height: 14px;
  }

  .site-header.is-scrolled .header-divider {
    height: 14px;
  }

  .site-header.is-scrolled .header-nav {
    padding-block: 0 8px;
  }

  .site-header.is-scrolled .header-nav>a,
  .site-header.is-scrolled .header-nav>button,
  .site-header.is-scrolled .header-nav .nav-categories,
  .site-header.is-scrolled .header-nav .nav-routine-trigger {
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 18px;
  }

  .site-header.is-scrolled .header-nav .nav-categories {
    padding-inline-start: 0;
  }

  .site-header.is-scrolled .header-nav>a img,
  .site-header.is-scrolled .header-nav .nav-categories img {
    width: 16px;
    height: 16px;
  }

  /* Instant compact layout: animated height/padding fights Chrome scroll anchoring */
  .site-header [class^='header-']:not(.header-user-dropdown):not(.header-cart-preview),
  .site-header .nav-categories {
    transition: none;
  }

  .header-nav > a,
  .header-nav > button,
  .header-nav .nav-categories,
  .header-nav .nav-routine-trigger {
    transition: color var(--transition-fast);
  }
}

/* Footer */
.site-footer {
  margin-top: 40px;
  padding-block: 40px;
}

.footer-inner {
  border-radius: var(--radius-4xl);
  background: #18181b;
  color: #fafafa;
  padding: 56px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.1fr;
  gap: 32px;
}

.footer-brand img {
  width: 180px;
  height: auto;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  margin: 16px 0 0;
  color: #a1a1aa;
  font-size: 14px;
  line-height: 24px;
}

.footer-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.footer-brand .footer-trust img {
  width: auto;
  height: auto;
  max-width: 120px;
  max-height: 140px;
  filter: none;
}

.footer-col a.active {
  color: var(--color-green-200);
}

.footer-col h6 {
  margin: 0 0 16px;
  font-size: 14px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.footer-col a,
.footer-col .footer-link-btn {
  color: #a1a1aa;
  font-size: 14px;
}

.footer-col .footer-link-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  font: inherit;
}

.footer-col a:hover,
.footer-col .footer-link-btn:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  overflow: visible;
}

.footer-social a {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  overflow: visible;
  transition: background var(--transition-fast);
}

.footer-social a::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, var(--color-green-300), transparent);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 1.25px), #000 calc(100% - 0.25px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 1.25px), #000 calc(100% - 0.25px));
  transition: opacity var(--transition-fast);
}

.footer-social a img {
  position: relative;
  z-index: 1;
  width: 20px;
  height: 20px;
  object-fit: contain;
  display: block;
}

.footer-social a:hover {
  background: var(--color-green-300);
}

.footer-social a:hover::after {
  opacity: 1;
}

.footer-newsletter {
  margin-top: 24px;
}

.footer-newsletter label {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 600;
}

.footer-newsletter-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.footer-newsletter-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.footer-newsletter-form input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 16px;
  border: 1px solid #3f3f46;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #fff;
  text-align: right;
}

.footer-newsletter-form button {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-green-200);
  color: var(--color-heading);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.footer-newsletter-form button img {
  width: 24px;
  height: 24px;
  display: block;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid #3f3f46;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #a1a1aa;
  font-size: 14px;
}

.footer-bottom a {
  color: var(--color-green-200);
}

.footer-bottom a:hover {
  color: var(--color-green-300);
}

.mobile-menu-btn {
  display: none;
}

/* Search suggest */
.search-suggest-layer {
  position: fixed;
  inset: 0;
  z-index: 1080;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 96px 24px 24px;
}

.search-suggest-layer[hidden] {
  display: none !important;
}

.search-suggest-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(24, 24, 27, 0.45);
  cursor: pointer;
}

.search-suggest-panel {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(80vh, 720px);
  overflow: auto;
  padding: 20px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.search-suggest-field {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  border-radius: var(--radius-pill);
  background: #f4f4f5;
}

.search-suggest-field img,
.search-suggest-field>i {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.search-suggest-field input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--color-heading);
  font-size: 14px;
  line-height: 20px;
  text-align: right;
}

.search-suggest-field input::placeholder {
  color: var(--color-placeholder);
}

.search-suggest-field input::-webkit-search-cancel-button,
.search-suggest-field input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.search-suggest-field input::-ms-clear {
  display: none;
}

.search-suggest-clear-input {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #52525b;
}

.search-suggest-clear-input[hidden] {
  display: none !important;
}

.search-suggest-min-hint {
  margin: 8px 0 0;
  padding: 0 4px;
  font-size: 12px;
  line-height: 18px;
  color: #a1a1aa;
}

.search-suggest-min-hint[hidden] {
  display: none !important;
}

.search-suggest-section {
  margin-top: 20px;
}

.search-suggest-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.search-suggest-section-head h3 {
  margin: 0;
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.search-suggest-clear-recent {
  border: 0;
  background: transparent;
  color: #71717a;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.search-suggest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #e4e4e7;
  border-radius: var(--radius-pill);
  background: #fff;
  color: #3f3f46;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}

.search-chip i {
  font-size: 14px;
  color: #71717a;
}

.search-suggest-banner {
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
  text-align: inherit;
  appearance: none;
}

.search-suggest-banner img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.search-suggest-results {
  margin-top: 8px;
}

.search-suggest-results[hidden],
.search-suggest-idle[hidden] {
  display: none !important;
}

.search-suggest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid #f4f4f5;
  color: inherit;
}

.search-suggest-row:last-child {
  border-bottom: 0;
}

.search-suggest-row-main {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--color-heading);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.search-suggest-row-main i {
  color: #71717a;
  font-size: 16px;
}

.search-suggest-row-main strong {
  font-weight: 700;
}

.search-suggest-row-meta {
  flex-shrink: 0;
  color: #2563eb;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.offcanvas-search {
  height: 100%;
  border-radius: 16px 16px 0 0;
}

body.search-suggest-open {
  overflow: hidden;
}

/* Mobile sidebar menu — Figma 490-12248 */
.offcanvas.offcanvas-start.offcanvas-mobile-nav {
  --bs-offcanvas-width: min(340px, 86vw);
  width: min(340px, 86vw);
  border: 0;
  border-radius: 24px 0 0 24px;
  background: #fff;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.12);
}

body:has(#mobileNav.show) .offcanvas-backdrop {
  z-index: 1040;
  background: rgba(0, 0, 0, 0.45);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

body:has(#mobileNav.show) .mobile-bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-nav-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow: auto;
  overscroll-behavior: contain;
}

.mobile-nav-screen {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mobile-nav-screen--drill {
  flex: 1;
  min-height: 0;
}

.mobile-nav-drill.mobile-category-drill {
  --shop-item-bg: #fff;
  --shop-item-bg-hover: #f4f4f5;
  --shop-item-border: #e4e4e7;
  --shop-item-shadow: none;
  --shop-text: #1c1c1e;
  --shop-muted: #71717a;
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
  background: transparent;
}

.mobile-nav-drill .offcanvas-shop-head {
  padding-inline: 4px 4px;
}

.mobile-nav-drill .offcanvas-shop-body {
  flex: 1;
  min-height: 0;
  max-height: none;
  padding-inline: 0;
}

.mobile-nav-link__trail {
  margin-inline-start: auto;
  font-size: 14px;
  color: #a1a1aa;
}

.mobile-nav-profile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  padding-inline: 4px;
}

.mobile-nav-profile-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-nav-avatar {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: #e8dfd2;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.mobile-nav-profile--guest {
  justify-content: flex-start;
  padding-inline: 0;
}

.mobile-nav-profile--guest .header-login-btn {
  width: 100%;
  justify-content: center;
  height: 40px;
  text-decoration: none;
}

.mobile-nav-profile--guest .header-login-btn:hover {
  color: var(--color-text);
  text-decoration: none;
}

.mobile-nav-socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0;
  padding: 10px 12px;
}

.mobile-nav-socials-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.mobile-nav-socials-label i {
  width: 20px;
  color: #71717a;
  font-size: 18px;
  text-align: center;
}

.mobile-nav-socials-list {
  padding-inline-start: 32px;
}

.mobile-nav-profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mobile-nav-profile-text strong {
  color: #1c1c1e;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
}

.mobile-nav-profile-text span {
  color: #8e8e93;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  direction: ltr;
  text-align: right;
}

.mobile-nav-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #3f3f46;
  font-size: 16px;
  text-decoration: none;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  color: #1c1c1e;
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.mobile-nav-link i {
  flex-shrink: 0;
  width: 22px;
  font-size: 18px;
  line-height: 1;
  color: #52525b;
  text-align: center;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus-visible {
  background: rgba(242, 242, 247, 0.9);
  color: #1c1c1e;
}

.mobile-nav-link.is-active {
  color: var(--color-primary, #5e9e49);
  font-weight: 600;
}

.mobile-nav-link.is-active i {
  color: var(--color-primary, #5e9e49);
}

.mobile-nav-link--button {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: inherit;
}

.mobile-nav-link--disclosure {
  justify-content: flex-start;
}

.mobile-nav-link--disclosure .mobile-nav-link__chevron {
  margin-inline-start: auto;
  font-size: 14px;
  color: #71717a;
  transition: transform 0.2s ease;
}

.mobile-nav-link--disclosure[aria-expanded='true'] .mobile-nav-link__chevron {
  transform: rotate(180deg);
}

.mobile-nav-submenu-panel {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-bottom: 4px;
}

.mobile-nav-submenu-panel[hidden] {
  display: none;
}

.mobile-nav-link--nested {
  min-height: 40px;
  padding-block: 8px;
  padding-inline-start: calc(12px + (var(--mobile-nav-nest, 0) * 16px));
  font-size: 13px;
  font-weight: 400;
}

.mobile-nav-link--nested i {
  font-size: 22px;
  color: #a1a1aa;
}

.mobile-nav-panel {
  margin-top: auto;
  padding: 16px;
  border-radius: 24px;
  background: #f2f2f7;
}

.mobile-nav-newsletter-title {
  margin: 0 0 12px;
  color: #1c1c1e;
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
}

.mobile-nav-newsletter-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.mobile-nav-newsletter-form input {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-pill);
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 12px rgba(0, 0, 0, 0.04);
  color: #1c1c1e;
  font-family: inherit;
  font-size: 13px;
  text-align: right;
}

.mobile-nav-newsletter-form input::placeholder {
  color: #a1a1aa;
}

.mobile-nav-newsletter-form button {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--color-green-200);
  color: #1c1c1e;
  font-size: 18px;
}

.mobile-nav-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 14px;
}

.mobile-nav-col h6 {
  margin: 0 0 8px;
  color: #1c1c1e;
  font-size: 12px;
  font-weight: 700;
  line-height: 18px;
}

.mobile-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.mobile-nav-col a {
  color: #3f3f46;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  text-decoration: none;
}

.mobile-nav-col a.is-active {
  color: var(--color-green-500);
  font-weight: 700;
}

.mobile-nav-banners {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.mobile-nav-banners span {
  display: block;
  min-height: 72px;
  border-radius: 16px;
  background: var(--color-green-200);
}

.mobile-nav-logout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 4px;
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
}

.mobile-nav-logout i {
  font-size: 16px;
  line-height: 1;
  transform: scaleX(-1);
}

/* Mobile shop categories offcanvas — Figma 536-30224 */
.offcanvas.offcanvas-bottom.offcanvas-shop {
  /* Let the sheet cap to the viewport so the list region can scroll (was max-content → unbounded height) */
  --bs-offcanvas-height: auto;
  --shop-sheet-radius: 32px;
  --shop-sheet-bg: #f2f2f7;
  --shop-item-bg: rgba(255, 255, 255, 0.82);
  --shop-item-bg-hover: rgba(255, 255, 255, 0.95);
  --shop-item-border: rgba(255, 255, 255, 0.65);
  --shop-item-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 0.5px 0 rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shop-handle: #d1d1d6;
  --shop-text: #1c1c1e;
  --shop-muted: #8e8e93;
  z-index: 1055;
  height: auto;
  max-height: 92vh;
  max-height: min(92vh, 100dvh);
  min-height: 0;
  border: 0;
  border-radius: var(--shop-sheet-radius) var(--shop-sheet-radius) 0 0;
  background: var(--shop-sheet-bg);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
  transition: border-radius 0.2s ease;
}

.offcanvas.offcanvas-bottom.offcanvas-shop.is-full {
  border-radius: 0;
}

.offcanvas-backdrop.show:has(+ .offcanvas-shop),
body:has(#mobileShop.show) .offcanvas-backdrop {
  z-index: 1050;
}

body:has(#mobileShop.show) .mobile-bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.offcanvas-shop.show {
  display: flex;
  flex-direction: column;
}

/* Vue mount: single flex child so head/footer stay fixed and body scrolls */
#mobile_shop_app {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
}

.offcanvas-shop-handle {
  flex-shrink: 0;
  width: 40px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: var(--radius-pill);
  background: var(--shop-handle);
}

.offcanvas-shop-head {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  min-height: 48px;
  padding: 10px 48px 12px;
}

.offcanvas-shop-back {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--shop-text);
  line-height: 1;
}

.offcanvas-shop-back img {
  width: 20px;
  height: 20px;
  display: block;
  transform: scaleX(-1);
}

.offcanvas-shop-title {
  margin: 0;
  color: var(--shop-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
  letter-spacing: 0;
}

.offcanvas-shop-title strong {
  color: var(--shop-text);
  font-weight: 700;
}

.offcanvas-shop-sep {
  margin-inline: 6px;
  color: var(--shop-muted);
  font-weight: 400;
}

.offcanvas-shop-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 4px 16px 8px;
  overflow: auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.offcanvas-shop-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.offcanvas-shop-item {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid var(--shop-item-border);
  border-radius: var(--radius-pill);
  background: var(--shop-item-bg);
  box-shadow: var(--shop-item-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--shop-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-align: right;
  text-decoration: none;
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.offcanvas-shop-item:hover,
.offcanvas-shop-item:focus-visible {
  background: var(--shop-item-bg-hover);
  color: var(--shop-text);
}

.offcanvas-shop-item.is-active {
  color: var(--color-primary, #5e9e49);
  font-weight: 600;
  border-color: rgba(94, 158, 73, 0.35);
}

.offcanvas-shop-item:active {
  background: rgba(255, 255, 255, 0.55);
}

/* Drill-down rows: title on the reading side, arrow-left trail for RTL “next” */
.offcanvas-shop-item--branch {
  gap: 12px;
}

.offcanvas-shop-item__label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: inherit;
}

.offcanvas-shop-item__trail {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  line-height: 0;
}

.offcanvas-shop-item__trail img {
  display: block;
  width: 20px;
  height: 20px;
}

.offcanvas-shop-all {
  gap: 8px;
  border-color: transparent;
  /* background: var(--color-green-200); */
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  color: #457a33;
  font-weight: 700;
}

.offcanvas-shop-all:hover,
.offcanvas-shop-all:focus-visible {
  background: var(--color-green-300);
  color: #3a682b;
}

.offcanvas-shop-all i {
  font-size: 16px;
  line-height: 1;
}

.offcanvas-shop-list.is-animating {
  animation: shop-list-in 0.22s ease;
}

@keyframes shop-list-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.offcanvas-shop-footer {
  flex-shrink: 0;
  padding: 16px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

.offcanvas-shop-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  border: 1px solid var(--shop-item-border);
  border-radius: var(--radius-pill);
  background: var(--shop-item-bg);
  box-shadow: var(--shop-item-shadow);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  color: var(--shop-text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.offcanvas-shop-cancel:hover,
.offcanvas-shop-cancel:focus-visible {
  background: var(--shop-item-bg-hover);
}

.offcanvas-shop-cancel:active {
  background: rgba(255, 255, 255, 0.55);
}

/* Routine builder offcanvas — Figma 536-27973 */
.offcanvas.offcanvas-top.offcanvas-routine {
  --bs-offcanvas-height: 100%;
  --bs-offcanvas-border-width: 0;
  --bs-offcanvas-bg: var(--color-green-100);
  z-index: 1060;
  /* col-* + mx-auto: centered width (not edge-to-edge) */
  right: 0;
  left: 0;
  margin-inline: auto;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  border: 0;
  background: var(--color-green-100);
}

.offcanvas-routine.show {
  display: flex;
  flex-direction: column;
}

.offcanvas-routine .offcanvas-routine-inner {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 24px 40px 32px;
  overflow: hidden;
}

.offcanvas-routine-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  gap: 16px;
  margin-bottom: 20px;
}

.offcanvas-routine-brand img {
  display: block;
  width: 160px;
  height: auto;
}

.offcanvas-routine-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #fff;
  color: var(--color-heading);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.offcanvas-routine-exit i {
  font-size: 14px;
  line-height: 1;
}

.offcanvas-routine-topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  direction: ltr;
}

.offcanvas-routine-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #fff;
  color: var(--color-heading);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.offcanvas-routine-cart img {
  display: block;
  width: 22px;
  height: 22px;
}

.offcanvas-routine-cart .header-badge {
  bottom: -2px;
  inset-inline-end: -5px;
}

.offcanvas-routine-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  flex: 1 1 auto;
  align-items: stretch;
  width: 100%;
  min-height: 0;
  gap: 28px;
  padding: 28px;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(15, 40, 20, 0.06);
  overflow: hidden;
}

.offcanvas-routine-form {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  max-width: none;
  padding: 8px 8px 0;
  overflow: hidden;
}

.offcanvas-routine-progress {
  margin-bottom: 16px;
}

.offcanvas-routine-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.offcanvas-routine-progress-label {
  color: var(--color-green-500);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.offcanvas-routine-step {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
}

.offcanvas-routine-progress-track {
  display: flex;
  justify-content: flex-start;
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--color-green-100);
}

.offcanvas-routine-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--color-green-500);
}

.offcanvas-routine-question {
  margin-bottom: 16px;
}

.offcanvas-routine-title {
  margin: 0;
  color: var(--color-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 40px;
}

.offcanvas-routine-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 200;
  line-height: 24px;
}

.offcanvas-routine-options {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  margin-bottom: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.offcanvas-routine-option {
  margin: 0;
  cursor: pointer;
}

.offcanvas-routine-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.offcanvas-routine-option-face {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-heading);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.offcanvas-routine-option-radio,
.offcanvas-routine-option-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--color-border-elevated);
  background: #fff;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.offcanvas-routine-option-radio {
  border-radius: 50%;
}

.offcanvas-routine-option-check {
  position: relative;
  border-radius: 6px;
}

.offcanvas-routine-option input:checked+.offcanvas-routine-option-face {
  border-color: var(--color-green-500);
  background: var(--color-green-50);
  box-shadow: 0 0 0 1px var(--color-green-500) inset;
}

.offcanvas-routine-option input:checked+.offcanvas-routine-option-face .offcanvas-routine-option-radio {
  border-color: var(--color-green-500);
  background: var(--color-green-500);
  box-shadow: inset 0 0 0 4px #fff;
}

.offcanvas-routine-option input:checked+.offcanvas-routine-option-face .offcanvas-routine-option-check {
  border-color: var(--color-green-500);
  background: var(--color-green-500);
}

.offcanvas-routine-option input:checked+.offcanvas-routine-option-face .offcanvas-routine-option-check::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 6px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.offcanvas-routine-option:hover .offcanvas-routine-option-face {
  border-color: var(--color-green-300);
}

.offcanvas-routine-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  flex-wrap: nowrap;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.offcanvas-routine-nav:has([data-wizard-back][hidden]) {
  justify-content: flex-end;
}

.offcanvas-routine-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-heading);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  cursor: pointer;
}

/* Figma: back arrow points right (RTL previous) */
.offcanvas-routine-back img {
  width: 18px;
  height: 18px;
  display: block;
  transform: scaleX(-1);
}

.offcanvas-routine-next {
  gap: 6px;
  padding: 12px 22px;
}

/* Figma: continue uses a single left chevron (down SVG → left) */
.offcanvas-routine-next>img {
  width: 20px;
  height: 20px;
  display: block;
  transform: rotate(90deg);
}

.offcanvas-routine-visual {
  position: relative;
  align-self: stretch;
  min-width: 0;
  max-width: none;
  min-height: 0;
  overflow: hidden;
  border-radius: 18px;
  background: var(--color-green-100);
}

.offcanvas-routine-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: opacity 0.2s ease;
}

.offcanvas-routine-visual img.is-fading {
  opacity: 0;
}

.offcanvas-routine-back:disabled,
.offcanvas-routine-next:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.offcanvas-routine-visual-copy {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 48px 28px 28px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 70%);
  color: #fff;
}

.offcanvas-routine-visual-copy h3 {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  line-height: 34px;
}

.offcanvas-routine-visual-copy p {
  margin: 0;
  /* max-width: 28ch; */
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  opacity: 0.92;
}

body:has(#routineBuilder.show) .mobile-bottom-nav {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Routine result — Figma 536-34540 (+ desktop layout) */
.offcanvas-routine-result {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  padding: 28px 32px 32px;
  border-radius: 40px;
  background: #fff;
  box-shadow: 0 8px 40px rgba(15, 40, 20, 0.06);
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.offcanvas-routine-result[hidden] {
  display: none !important;
}

.offcanvas-routine-panel[hidden] {
  display: none !important;
}

.routine-result-intro {
  margin-bottom: 24px;
}

.routine-result-title {
  margin: 0 0 8px;
  color: var(--color-heading);
  font-size: 28px;
  font-weight: 700;
  line-height: 40px;
}

.routine-result-lead {
  margin: 0;
  color: var(--color-muted);
  font-size: 15px;
  font-weight: 400;
  line-height: 24px;
}

.routine-result-layout {
  display: grid;
  grid-template-columns: minmax(240px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.routine-result-summary {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--color-border-soft);
  border-radius: 24px;
  background: var(--color-green-50);
}

.routine-result-summary-title {
  margin: 0;
  color: var(--color-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.routine-result-summary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.routine-result-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(15, 40, 20, 0.08);
}

.routine-result-summary-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.routine-result-summary-q {
  color: var(--color-muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.routine-result-summary-a {
  color: var(--color-heading);
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.routine-result-restart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-heading);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}

.routine-result-restart:hover {
  border-color: var(--color-green-300);
  background: #fff;
}

.routine-result-main {
  min-width: 0;
}

/* Figma 536-37879 — segmented routine tabs + sticky */
.routine-result-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  flex-shrink: 0;
  align-items: stretch;
  gap: 4px;
  margin: 0 0 12px;
  padding: 8px 6px 18px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

/* پوشش سفید تا عنوان مرحله‌ها زیر تب sticky دیده نشود */
.routine-result-tabs::before {
  content: "";
  position: absolute;
  inset: -12px -8px 0;
  z-index: -1;
  background: #fff;
}

.routine-result-tabs::after {
  content: "";
  position: absolute;
  inset: 8px 0 auto;
  height: calc(100% - 26px);
  z-index: -1;
  border-radius: var(--radius-pill);
  background: #f2f3f5;
  box-shadow: 0 6px 18px rgba(20, 30, 40, 0.08);
  pointer-events: none;
}

.routine-result-tab {
  position: relative;
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 10px 14px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--color-heading);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  cursor: pointer;
  overflow: hidden;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.routine-result-tab-icon {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
}

.routine-result-tab-icon img {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  display: block;
}

.routine-result-tab.is-active {
  background: #fff;
  box-shadow: 0 2px 10px rgba(20, 30, 40, 0.08);
}

.routine-result-tab[data-result-tab="morning"].is-active .routine-result-tab-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 196, 64, 0.55) 0%, rgba(255, 196, 64, 0) 70%);
}

.routine-result-tab[data-result-tab="night"].is-active .routine-result-tab-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 123, 212, 0.4) 0%, rgba(74, 123, 212, 0) 70%);
}

.routine-result-tab[data-result-tab="weekly"].is-active .routine-result-tab-icon::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 58, 74, 0.22) 0%, rgba(47, 58, 74, 0) 70%);
}

.routine-result-stages {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.routine-result-empty {
  margin: 0;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}

.routine-result-stage-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.routine-result-stage-label {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px solid rgba(94, 158, 73, 0.35);
  background: rgba(94, 158, 73, 0.08);
  color: #3f6b32;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.routine-result-stage-title {
  margin: 0;
  flex: 1 1 140px;
  min-width: 0;
  color: var(--color-heading);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
  scroll-margin-top: 88px;
}

.routine-result-card .product-title a {
  color: inherit;
  text-decoration: none;
}

.routine-result-card .product-title a:hover {
  color: var(--color-discount);
}

.routine-result-stage-title.routine-result-stage-title--with-desc {
  margin-bottom: 0;
}

.routine-result-stage-desc {
  margin: 0 0 14px;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 22px;
  white-space: pre-line;
}

.routine-result-swiper {
  width: 100%;
  overflow: hidden;
}

.routine-result-swiper .swiper-slide {
  height: auto;
  width: 260px;
}

@media (min-width: 992px) {
  .routine-result-swiper .swiper-slide {
    width: 356px;
  }
}

.routine-result-card {
  width: 100%;
  height: 100%;
}

/* Routine builder result cards use product-media from home.css only on PDP/product pages — inline minimal discount chips */
.routine-result-card .product-media-discount-chips {
  top: 12px;
  left: 12px;
  gap: 5px;
  max-width: calc(100% - 76px);
}

.routine-result-card .product-media {
  --product-discount-chip-h: 28px;
  position: relative;
}

.routine-result-card .product-discount-badge {
  top: 12px;
  left: 12px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  box-shadow: -4px 4px 12px rgba(246, 51, 154, 0.22);
}

.routine-result-card .product-special-tier-badge {
  padding: 0 7px;
  border-radius: 10px;
}

.routine-result-card .product-special-tier-badge__text {
  font-size: 10px;
}

.routine-result-card .product-card--discounted .product-media:has(.product-discount-timer.is-active) .product-media-discount-chips {
  max-width: calc(50% - 12px);
}

/* Purchase points chip on product cards (product-price partial). */
.product-price-points {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #8a6a1e;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.product-price-points img {
  flex-shrink: 0;
  display: block;
}

@media (min-width: 992px) {
  .routine-result-card .product-price-old-rows {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    row-gap: 2px;
  }

  .routine-result-card .product-price-old-rows .product-price-old--mid {
    margin-top: 0;
  }

  .routine-result-card .product-price-old-rows .product-price-old {
    width: auto;
    flex: 0 1 auto;
    max-width: 100%;
  }
}

.routine-result-add {
  position: relative;
  cursor: pointer;
}

.routine-result-add .routine-result-add-badge {
  top: -4px;
  bottom: auto;
  inset-inline-end: -4px;
}

.routine-result-add .routine-result-add-badge[hidden] {
  display: none;
}

.routine-result-add i {
  font-size: 22px;
  line-height: 1;
}

.routine-result-card:hover .routine-result-add i,
.routine-result-add:hover i,
.routine-result-add:focus-visible i {
  color: #fff;
}

.routine-result-restart-mobile {
  display: none;
}

/* Routine result product options */
.offcanvas.routine-product-options {
  --bs-offcanvas-height: max-content;
  --bs-offcanvas-border-width: 0;
  z-index: 1090;
  width: 100%;
  max-width: 600px;
  margin-inline: auto;
  border-radius: 28px 28px 0 0;
  border: 0;
  background: #fff;
}

body.routine-product-options-open .offcanvas-backdrop {
  z-index: 1080 !important;
}

.routine-product-options-inner {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.routine-product-options-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.routine-product-options-eyebrow {
  display: block;
  margin-bottom: 6px;
  color: var(--color-muted);
  font-size: 12px;
  line-height: 20px;
}

.routine-product-options-header h2 {
  max-width: 380px;
  margin: 0;
  color: var(--color-heading);
  font-size: 20px;
  font-weight: 700;
  line-height: 30px;
}

.routine-product-options-close {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border-soft);
  border-radius: 50%;
  background: #fff;
  color: var(--color-heading);
  cursor: pointer;
}

.routine-product-options-product {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--color-border-soft);
  border-radius: 20px;
  background: var(--color-bg-main);
}

.routine-product-options-media {
  display: grid;
  flex: 0 0 70px;
  place-items: center;
  width: 70px;
  height: 70px;
  overflow: hidden;
  border-radius: 14px;
  background: var(--color-green-50);
}

.routine-product-options-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.routine-product-options-price {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--color-muted);
}

.routine-product-options-price del {
  font-size: 13px;
}

.routine-product-options-price strong {
  color: var(--color-heading);
  font-size: 22px;
  line-height: 30px;
}

.routine-product-options-price small {
  color: var(--color-muted);
  font-size: 11px;
  font-weight: 400;
}

.routine-product-options-fields {
  display: flex;
  flex-direction: column;
  gap: 26px;
  margin-top: 28px;
}

.routine-product-option-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}

.routine-product-option-label {
  color: var(--color-muted);
  font-size: 13px;
  line-height: 22px;
}

.routine-product-option-label strong,
.routine-product-option-label span {
  color: var(--color-heading);
}

.routine-product-size-options,
.routine-product-color-options {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.routine-product-size-options button {
  min-width: 86px;
  padding: 9px 16px;
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--color-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.routine-product-size-options button.is-selected {
  border-color: var(--color-heading);
  background: var(--color-heading);
  color: #fff;
}

.routine-color-swatch {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 0 transparent;
}

.routine-color-swatch.is-selected {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--color-heading);
}

.routine-swatch-brown {
  background: #5a1d23;
}

.routine-swatch-red {
  background: #8d1c23;
}

.routine-swatch-coral {
  background: #d53640;
}

.routine-swatch-caramel {
  background: #c58463;
}

.routine-swatch-terracotta {
  background: #bd594d;
}

.routine-swatch-rose {
  background: #c58489;
}

.routine-swatch-mauve {
  background: #a8757e;
}

.routine-swatch-pink {
  background: #b78b94;
}

.routine-product-options-footer {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: auto;
  padding-top: 32px;
}

.routine-product-add {
  width: 100%;
}

.routine-product-cart-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.routine-product-cart-state[hidden],
.routine-product-add[hidden] {
  display: none !important;
}

.routine-product-quantity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 170px;
  min-width: 170px;
  padding: 5px 7px;
  border: 1px solid var(--color-border-elevated);
  border-radius: var(--radius-pill);
  background: #fff;
  direction: ltr;
}

.routine-product-quantity button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-bg-elevated);
  color: var(--color-heading);
  cursor: pointer;
}

.routine-product-quantity button i {
  font-size: 20px;
}

.routine-product-quantity button img {
  width: 17px;
  height: 17px;
}

.routine-product-quantity button [hidden] {
  display: none !important;
}

.routine-product-add:disabled,
.routine-product-quantity button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.routine-product-quantity>span {
  min-width: 24px;
  color: var(--color-heading);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.routine-product-cart-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.routine-product-cart-copy strong {
  color: var(--color-heading);
  font-size: 15px;
}

.routine-product-cart-copy a {
  color: var(--color-muted);
  font-size: 12px;
}

.routine-product-cart-copy a span {
  color: var(--color-green-500);
}

/* Early-result modal — Figma 536-28313 */
.modal-routine-early {
  z-index: 1080;
  --bs-modal-bg: #fff;
}

.modal-routine-early .modal-routine-early-dialog {
  width: calc(100% - 32px);
  max-width: 552px;
  margin-inline: auto;
}

.modal-routine-early-content {
  overflow: hidden;
  border: 0;
  border-radius: 32px;
  padding: 8px 8px 16px;
  background: #fff;
  box-shadow: 0 20px 56px rgba(15, 40, 20, 0.2);
}

.modal-routine-early-media {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: var(--color-green-100);
}

.modal-routine-early-media img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 540 / 221;
  object-fit: cover;
  object-position: center top;
}

/* فیگما: X روی تصویر، گوشه چپ */
.modal-routine-early-close {
  position: absolute;
  top: 12px;
  left: 12px;
  right: auto;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 50%;
  background: #fff;
  color: var(--color-heading);
  box-shadow: none;
  cursor: pointer;
}

.modal-routine-early-close i {
  font-size: 14px;
  line-height: 1;
}

.modal-routine-early-close--mobile {
  display: none;
}

.modal-routine-early-body {
  position: relative;
  padding: 8px 8px 0;
  text-align: start;
  background: #fff;
}

.modal-routine-early-title {
  margin: 8px 0;
  color: var(--color-heading);
  font-size: 24px;
  font-weight: 700;
  line-height: 36px;
}

.modal-routine-early-text {
  margin: 0 0 24px;
  color: var(--color-muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

/* ادامه سوال‌ها چپ | دیدن نتیجه راست */
.modal-routine-early-actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.modal-routine-early-continue,
.modal-routine-early-result {
  direction: rtl;
}

.modal-routine-early-continue {
  flex: 1 1 0;
  min-width: 0;
  max-width: max-content;
  min-height: 48px;
  gap: 6px;
  padding: 12px 20px;
  font-size: 15px;
  line-height: 22px;
}

.modal-routine-early-continue>img {
  width: 18px;
  height: 18px;
  display: block;
  flex-shrink: 0;
  transform: rotate(90deg);
}

/* دکمه گلسی آیفون — Figma 536-28333 */
.modal-routine-early-result {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  min-height: 48px;
  padding: 12px 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.28) 100%),
    rgba(242, 242, 247, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.06),
    0 0.5px 0 rgba(0, 0, 0, 0.04),
    0 4px 16px rgba(0, 0, 0, 0.06);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  backdrop-filter: blur(24px) saturate(180%);
  color: #1c1c1e;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.modal-routine-early-result::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  z-index: -1;
  height: 50%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.modal-routine-early-result:hover,
.modal-routine-early-result:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.36) 100%),
    rgba(242, 242, 247, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    inset 0 -0.5px 0 rgba(0, 0, 0, 0.05),
    0 0.5px 0 rgba(0, 0, 0, 0.04),
    0 8px 22px rgba(0, 0, 0, 0.08);
}

.modal-routine-early-result:active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.2) 100%),
    rgba(232, 232, 237, 0.9);
}

body:has(.modal-routine-early.show) .modal-backdrop {
  z-index: 1075;
  background: rgba(20, 30, 25, 0.55);
}