/* UI/UX Pro Max pass — preserve Tehran Tolid's visual identity, refine interaction quality. */
:root {
  --ui-motion-fast: 160ms;
  --ui-motion-base: 240ms;
  --ui-motion-reveal: 380ms;
  --ui-ease-out: cubic-bezier(.16, 1, .3, 1);
  --ui-focus: #b9ff37;
}

html {
  scroll-padding-top: 108px;
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: #b9ff37;
  color: #0b0f0d;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

a,
button,
input[type="submit"],
input[type="button"],
select,
summary {
  touch-action: manipulation;
}

a,
button,
input[type="submit"],
input[type="button"],
select,
summary,
[role="button"] {
  cursor: pointer;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid #fff !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 5px rgba(83, 132, 6, .96) !important;
}

:where(a, button, input, select, textarea, summary, [tabindex]) {
  scroll-margin-top: 112px;
  scroll-margin-bottom: 112px;
}

.skip-link {
  position: fixed;
  z-index: 2000;
  top: 10px;
  right: 12px;
  padding: 11px 15px;
  border-radius: 10px;
  background: #b9ff37;
  color: #0b0f0d;
  font-size: 12px;
  font-weight: 900;
  transform: translateY(-160%);
  transition: transform var(--ui-motion-fast) var(--ui-ease-out);
}

.skip-link:focus {
  transform: translateY(0);
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity var(--ui-motion-reveal) ease-out, transform var(--ui-motion-reveal) var(--ui-ease-out);
  will-change: opacity, transform;
}

.reveal.visible {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.btn,
.mode-card,
.product-card,
.category-strip a,
.selection-help,
.choice-grid > a,
.footer-lead-actions a {
  -webkit-tap-highlight-color: transparent;
}

.btn:active,
.mode-card:active,
.product-card:active,
.category-strip a:active,
.selection-help:active,
.choice-grid > a:active,
.mobile-header-support:active {
  filter: brightness(.9);
  transition-duration: 80ms !important;
}

.product-card {
  position: relative;
  isolation: isolate;
}

.product-card::after {
  content: "";
  position: absolute;
  z-index: 5;
  pointer-events: none;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255, 255, 255, .055);
}

.catalog-products .product-card::after {
  box-shadow: inset 0 1px rgba(255, 255, 255, .75);
}

.product-media > img,
.category-strip a > i,
.card-arrow {
  transition: transform var(--ui-motion-base) var(--ui-ease-out), filter var(--ui-motion-base) ease, background-color var(--ui-motion-fast) ease, color var(--ui-motion-fast) ease;
}

.form-grid input,
.form-grid textarea,
.form-grid select,
.simple-page input,
.simple-page textarea,
.simple-page select,
.auth input,
.form-card input,
.form-card textarea {
  transition: border-color var(--ui-motion-fast) ease, box-shadow var(--ui-motion-fast) ease, background-color var(--ui-motion-fast) ease;
}

:where(input, textarea, select):disabled {
  cursor: not-allowed;
  opacity: .62;
}

:where(input, textarea, select):user-invalid {
  border-color: #b83218 !important;
  box-shadow: 0 0 0 3px rgba(184, 50, 24, .1) !important;
}

.flash button,
.zoom-trigger,
.image-lightbox button,
.menu-toggle {
  min-width: 44px;
  min-height: 44px;
}

@media (hover: hover) and (pointer: fine) {
  .product-card:hover .product-media > img {
    transform: scale(1.025);
  }

  .product-card:hover .card-arrow {
    transform: translateX(-3px);
  }

  .category-strip a:hover > i {
    filter: grayscale(0);
    transform: translateY(-3px);
  }

  .selection-help:hover {
    border-color: #7ea82c;
    background: #fbfff5;
  }
}

@media (max-width: 820px) {
  html {
    scroll-padding-top: 82px;
    scroll-padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .menu-toggle,
  .mobile-header-support {
    min-width: 44px;
    min-height: 44px;
  }

  .main-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .mobile-dock a {
    min-height: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.visible {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
    will-change: auto !important;
  }

  .product-media > img,
  .category-strip a > i,
  .card-arrow,
  .skip-link {
    transition: none !important;
  }
}
