/* =========================================================
   Toyora homepage — Toyino-inspired storefront
   Navy + sunshine yellow + playful multicolor accents
   ========================================================= */

:root {
  --ti-ink: #151b2e;
  --ti-navy: #1c2740;
  --ti-yellow: #ffd400;
  --ti-yellow-deep: #f5c400;
  --ti-pink: #ff4d8d;
  --ti-blue: #3b82f6;
  --ti-purple: #8b5cf6;
  --ti-sky: #d9f0ff;
  --ti-green: #22c55e;
  --ti-red: #ef4444;
  --ti-muted: #6b7280;
  --ti-line: #e8eaef;
  --ti-soft: #f4f5f7;
  --ti-paper: #ffffff;
  --ti-radius: 14px;
  --ti-radius-sm: 10px;
  --ti-shadow: 0 8px 24px rgba(21, 27, 46, 0.08);
  --ti-font: "Vazirmatn", Tahoma, sans-serif;
  --ti-display: "Fredoka", "Vazirmatn", sans-serif;
  --ti-container: 1280px;
  --ti-sidebar: 268px;
}

body.toyora-body {
  background: #f7f8fa !important;
  font-family: var(--ti-font);
  color: var(--ti-ink);
}

.ti-container {
  width: min(100% - 2rem, var(--ti-container));
  margin-inline: auto;
}

/* ----- Topbar ----- */
.ti-topbar {
  background: #0f1320;
  color: #e8eaf0;
  font-size: 0.8rem;
}

.ti-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 36px;
  flex-wrap: wrap;
}

.ti-topbar a {
  color: #e8eaf0;
  opacity: 0.9;
}

.ti-topbar a:hover {
  color: var(--ti-yellow);
  opacity: 1;
}

.ti-topbar__links {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.ti-topbar__promo {
  color: #fff;
  font-weight: 500;
}

/* ----- Header ----- */
.ti-header {
  background: var(--ti-paper);
  border-bottom: 1px solid var(--ti-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.ti-header__main {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 0;
}

.ti-logo {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 0.15rem;
  text-decoration: none;
}

.ti-logo__en {
  font-family: var(--ti-display);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
  display: flex;
  gap: 0.02em;
}

.ti-logo__en span:nth-child(1) { color: #ff4d8d; }
.ti-logo__en span:nth-child(2) { color: #ffd400; }
.ti-logo__en span:nth-child(3) { color: #3b82f6; }
.ti-logo__en span:nth-child(4) { color: #22c55e; }
.ti-logo__en span:nth-child(5) { color: #8b5cf6; }
.ti-logo__en span:nth-child(6) { color: #f97316; }

.ti-logo__fa {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ti-navy);
  letter-spacing: 0.04em;
}

.ti-search {
  display: flex;
  align-items: stretch;
  width: min(100%, 560px);
  margin-inline: auto;
  border: 1.5px solid var(--ti-line);
  border-radius: 999px;
  overflow: hidden;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ti-search:focus-within {
  border-color: #f0c400;
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.2);
  background: #fff;
}

.ti-search input {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.75rem 1.1rem;
  font-size: 0.92rem;
  outline: none;
  min-width: 0;
}

.ti-search button {
  border: 0;
  background: var(--ti-yellow);
  color: var(--ti-ink);
  width: 52px;
  cursor: pointer;
  font-size: 1.15rem;
  display: grid;
  place-items: center;
  transition: background 0.2s;
}

.ti-search button:hover {
  background: var(--ti-yellow-deep);
}

.ti-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ti-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  font-size: 0.72rem;
  color: var(--ti-ink);
  position: relative;
  min-width: 58px;
}

.ti-action:hover {
  background: var(--ti-soft);
}

.ti-action__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
}

.ti-action__badge {
  position: absolute;
  top: 2px;
  left: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ti-yellow);
  color: var(--ti-ink);
  font-size: 0.65rem;
  font-weight: 800;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.ti-nav-toggle {
  display: none;
  border: 1px solid var(--ti-line);
  background: #fff;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
  font-family: inherit;
}

/* ----- Nav ----- */
.ti-nav {
  background: var(--ti-soft);
  border-top: 1px solid var(--ti-line);
}

.ti-nav__inner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 48px;
  flex-wrap: wrap;
}

.ti-cats-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--ti-navy);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
}

.ti-cats-btn:hover {
  background: #10182b;
  color: #fff;
}

.ti-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.25rem;
  align-items: center;
}

.ti-nav__list a {
  display: block;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ti-ink);
}

.ti-nav__list a:hover {
  background: #fff;
  color: var(--ti-blue);
}

/* ----- Home layout: sidebar LEFT, content RIGHT ----- */
.ti-home {
  padding: 1.25rem 0 3rem;
}

.ti-layout {
  display: grid;
  grid-template-columns: var(--ti-sidebar) minmax(0, 1fr);
  gap: 1.25rem;
  direction: ltr;
  align-items: start;
}

.ti-sidebar,
.ti-main {
  direction: rtl;
}

.ti-panel {
  background: var(--ti-paper);
  border: 1px solid var(--ti-line);
  border-radius: var(--ti-radius);
  padding: 0.85rem 0.95rem;
  margin-bottom: 1rem;
}

.ti-panel__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ti-navy);
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--ti-line);
}

.ti-catlist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ti-catlist li + li {
  border-top: 1px solid #f0f1f4;
}

.ti-catlist a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.15rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ti-ink);
}

.ti-catlist a:hover {
  color: var(--ti-blue);
}

.ti-catlist__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.ti-catlist__all {
  display: block;
  margin-top: 0.55rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--ti-line);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ti-blue);
}

.ti-filter-group {
  margin-bottom: 1rem;
}

.ti-filter-group:last-child {
  margin-bottom: 0;
}

.ti-filter-group h4 {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ti-navy);
}

.ti-check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: #374151;
  padding: 0.28rem 0;
  cursor: pointer;
}

.ti-check input {
  accent-color: var(--ti-navy);
  width: 15px;
  height: 15px;
}

.ti-check span {
  color: var(--ti-muted);
  font-size: 0.75rem;
  margin-inline-start: auto;
}

.ti-brand-search {
  width: 100%;
  border: 1px solid var(--ti-line);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  margin-bottom: 0.45rem;
  font-family: inherit;
  font-size: 0.8rem;
  background: #fafafa;
}

.ti-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
}

.ti-price-row input {
  width: 100%;
  border: 1px solid var(--ti-line);
  border-radius: 8px;
  padding: 0.4rem 0.5rem;
  font-family: inherit;
  font-size: 0.78rem;
}

.ti-price-range {
  width: 100%;
  accent-color: var(--ti-yellow);
}

.ti-stars-filter label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  padding: 0.25rem 0;
  cursor: pointer;
  color: #f59e0b;
}

.ti-filter-apply {
  width: 100%;
  margin-top: 0.75rem;
  border: 0;
  border-radius: 10px;
  background: var(--ti-navy);
  color: #fff;
  padding: 0.65rem;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ti-filter-apply:hover {
  background: #10182b;
}

/* ----- Hero ----- */
.ti-hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  min-height: 280px;
  background:
    linear-gradient(105deg, rgba(217, 240, 255, 0.95) 0%, rgba(217, 240, 255, 0.55) 42%, rgba(255, 255, 255, 0.15) 70%),
    #cfe9fb;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  margin-bottom: 1.1rem;
  box-shadow: var(--ti-shadow);
}

.ti-hero__content {
  padding: 2rem 2.2rem;
  position: relative;
  z-index: 2;
}

.ti-hero__title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.55rem, 2.6vw, 2.2rem);
  font-weight: 800;
  color: var(--ti-navy);
  line-height: 1.35;
}

.ti-hero__text {
  margin: 0 0 1.25rem;
  color: #3d4a63;
  font-size: 0.95rem;
  max-width: 14rem;
  line-height: 1.7;
}

.ti-hero__media {
  position: relative;
  min-height: 260px;
  align-self: stretch;
}

.ti-hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.ti-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 0;
  border-radius: 10px;
  padding: 0.7rem 1.25rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
}

.ti-btn:hover {
  transform: translateY(-1px);
}

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

.ti-btn--navy:hover {
  background: #0f1628;
  color: #fff;
}

.ti-btn--yellow {
  background: var(--ti-yellow);
  color: var(--ti-ink);
  width: 100%;
}

.ti-btn--yellow:hover {
  background: var(--ti-yellow-deep);
  color: var(--ti-ink);
  box-shadow: 0 6px 16px rgba(255, 212, 0, 0.35);
}

.ti-btn--sm {
  padding: 0.55rem 0.9rem;
  font-size: 0.84rem;
}

/* ----- Trust ----- */
.ti-trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.ti-trust__item {
  background: #fff;
  border: 1px solid var(--ti-line);
  border-radius: 12px;
  padding: 0.75rem 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ti-trust__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--ti-soft);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.ti-trust__item h4 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 800;
}

.ti-trust__item p {
  margin: 0.1rem 0 0;
  font-size: 0.7rem;
  color: var(--ti-muted);
}

/* ----- Section head ----- */
.ti-section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.ti-section-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ti-navy);
}

.ti-section-head a {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ti-blue);
}

/* ----- Product grid ----- */
.ti-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.ti-card {
  background: #fff;
  border: 1px solid var(--ti-line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
  animation: ti-fade-up 0.55s ease both;
}

.ti-card:hover {
  box-shadow: var(--ti-shadow);
  transform: translateY(-3px);
}

.ti-card__media {
  position: relative;
  aspect-ratio: 1;
  background: #fafafa;
  overflow: hidden;
}

.ti-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.75rem;
  transition: transform 0.35s ease;
}

.ti-card:hover .ti-card__media img {
  transform: scale(1.04);
}

.ti-card__badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.22rem 0.5rem;
  border-radius: 7px;
  color: #fff;
}

.ti-card__badge--sale {
  background: var(--ti-red);
}

.ti-card__badge--new {
  background: var(--ti-blue);
}

.ti-card__wish {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--ti-line);
  background: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #9ca3af;
  transition: color 0.2s, background 0.2s;
}

.ti-card__wish.is-on,
.ti-card__wish:hover {
  color: var(--ti-pink);
  background: #fff5f8;
}

.ti-card__body {
  padding: 0.75rem 0.85rem 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.ti-card__title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.55;
  min-height: 2.6em;
}

.ti-card__title a:hover {
  color: var(--ti-blue);
}

.ti-card__stars {
  color: #fbbf24;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.ti-card__stars small {
  color: var(--ti-muted);
  font-size: 0.72rem;
  margin-inline-start: 0.25rem;
}

.ti-card__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin: 0.15rem 0 0.35rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--ti-ink);
}

.ti-card__price del {
  color: #9ca3af;
  font-weight: 500;
  font-size: 0.78rem;
}

.ti-card__price .woocommerce-Price-amount {
  font-weight: inherit;
}

.ti-card .ti-btn {
  margin-top: auto;
}

/* ----- Brands ----- */
.ti-brands {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding: 0.85rem;
  margin-bottom: 1.5rem;
  background: #fff;
  border: 1px solid var(--ti-line);
  border-radius: 14px;
  scrollbar-width: thin;
}

.ti-brands__item {
  flex: 0 0 auto;
  width: 110px;
  height: 56px;
  display: grid;
  place-items: center;
  opacity: 0.75;
  filter: grayscale(0.2);
  transition: opacity 0.2s, filter 0.2s;
}

.ti-brands__item:hover {
  opacity: 1;
  filter: none;
}

.ti-brands__item img {
  max-height: 36px;
  width: auto;
}

.ti-brands__label {
  font-family: var(--ti-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ti-navy);
}

/* ----- Promo trio ----- */
.ti-promos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.ti-promo {
  position: relative;
  border-radius: 16px;
  min-height: 150px;
  padding: 1.25rem 1.15rem;
  overflow: hidden;
  color: var(--ti-navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
}

.ti-promo h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  position: relative;
  z-index: 1;
}

.ti-promo p {
  margin: 0 0 0.55rem;
  font-size: 0.82rem;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

.ti-promo .ti-btn {
  align-self: flex-start;
  position: relative;
  z-index: 1;
}

.ti-promo__art {
  position: absolute;
  left: 8%;
  bottom: -8%;
  width: 42%;
  max-width: 120px;
  opacity: 0.95;
  pointer-events: none;
}

.ti-promo--green {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
}

.ti-promo--blue {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.ti-promo--purple {
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
}

/* ----- Footer ----- */
.ti-footer {
  background: var(--ti-navy);
  color: #c9d0de;
  padding: 3rem 0 0;
  margin-top: 2rem;
}

.ti-footer a {
  color: #c9d0de;
}

.ti-footer a:hover {
  color: var(--ti-yellow);
}

.ti-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 2rem;
  padding-bottom: 2rem;
}

.ti-footer__brand .ti-logo__en {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.ti-footer__brand .ti-logo__fa {
  color: #fff;
  margin-bottom: 0.75rem;
}

.ti-footer h3 {
  margin: 0 0 0.85rem;
  color: #fff;
  font-size: 0.95rem;
}

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

.ti-footer li {
  margin-bottom: 0.45rem;
  font-size: 0.86rem;
}

.ti-footer p {
  font-size: 0.86rem;
  line-height: 1.75;
  margin: 0;
}

.ti-news {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.ti-news input {
  flex: 1;
  border: 0;
  border-radius: 8px;
  padding: 0.55rem 0.7rem;
  font-family: inherit;
  font-size: 0.82rem;
  min-width: 0;
}

.ti-news button {
  border: 0;
  border-radius: 8px;
  background: var(--ti-yellow);
  color: var(--ti-ink);
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ti-social {
  display: flex;
  gap: 0.45rem;
  margin-top: 1rem;
}

.ti-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
}

.ti-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.95rem 0;
  font-size: 0.78rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: #8b95a8;
}

/* Hide old toyup chrome when present */
body.home .tu-topbar,
body.home .tu-header,
body.home .tu-nav {
  display: none !important;
}

@keyframes ti-fade-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ti-card:nth-child(1) { animation-delay: 0.02s; }
.ti-card:nth-child(2) { animation-delay: 0.06s; }
.ti-card:nth-child(3) { animation-delay: 0.1s; }
.ti-card:nth-child(4) { animation-delay: 0.14s; }
.ti-card:nth-child(5) { animation-delay: 0.18s; }
.ti-card:nth-child(6) { animation-delay: 0.22s; }
.ti-card:nth-child(7) { animation-delay: 0.26s; }
.ti-card:nth-child(8) { animation-delay: 0.3s; }

/* ----- Responsive ----- */
@media (max-width: 1100px) {
  .ti-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .ti-trust {
    grid-template-columns: repeat(2, 1fr);
  }
  .ti-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .ti-layout {
    grid-template-columns: 1fr;
    direction: rtl;
  }

  .ti-sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .ti-sidebar .ti-panel {
    margin-bottom: 0;
  }

  .ti-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .ti-hero__media {
    min-height: 200px;
    order: -1;
  }

  .ti-promos {
    grid-template-columns: 1fr;
  }

  .ti-header__main {
    grid-template-columns: auto auto;
    grid-template-areas:
      "logo actions"
      "search search";
  }

  .ti-logo { grid-area: logo; }
  .ti-actions { grid-area: actions; justify-self: end; }
  .ti-search { grid-area: search; width: 100%; }

  .ti-nav-toggle { display: inline-flex; }

  .ti-nav.is-collapsed .ti-nav__list {
    display: none;
  }
}

@media (max-width: 640px) {
  .ti-sidebar {
    grid-template-columns: 1fr;
  }

  .ti-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .ti-trust {
    grid-template-columns: 1fr 1fr;
  }

  .ti-footer__grid {
    grid-template-columns: 1fr;
  }

  .ti-action span:not(.ti-action__icon):not(.ti-action__badge) {
    display: none;
  }

  .ti-topbar__links--nav {
    display: none;
  }
}
