.fza-ideas,
.fza-ideas * {
  box-sizing: border-box;
}

.fza-ideas {
  --fza-ideas-red: #e9192d;
  --fza-ideas-ink: #151515;
  --fza-ideas-muted: #6c6c72;
  --fza-ideas-soft: #f4f4f5;
  width: min(1540px, 100%);
  min-height: 75vh;
  margin: 0 auto;
  padding: 18px clamp(10px, 2vw, 30px) 48px;
  color: var(--fza-ideas-ink);
  font-family: inherit;
  direction: rtl;
}

.fza-ideas-page .page-wrapper,
.fza-ideas-page .page-inner,
.fza-ideas-page .container,
.fza-ideas-page .row,
.fza-ideas-page .col,
.fza-ideas-page .entry-content {
  max-width: none;
}

.fza-ideas-page .entry-content {
  padding: 0;
}

.fza-ideas-in-app #header,
.fza-ideas-in-app #footer,
.fza-ideas-in-app .header-wrapper,
.fza-ideas-in-app .footer-wrapper,
.fza-ideas-in-app .page-title,
.fza-ideas-in-app .breadcrumbs {
  display: none !important;
}

.fza-ideas-header {
  position: sticky;
  z-index: 80;
  top: 0;
  margin: -18px calc(clamp(10px, 2vw, 30px) * -1) 18px;
  padding: 16px clamp(10px, 2vw, 30px) 12px;
  border-bottom: 1px solid #ececef;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.035);
  backdrop-filter: blur(14px);
}

.fza-ideas-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  max-width: 1040px;
  margin: 0 auto 12px;
}

.fza-ideas-title-row h1 {
  margin: 0 0 3px;
  color: #111;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 900;
  line-height: 1.3;
}

.fza-ideas-title-row p {
  margin: 0;
  color: var(--fza-ideas-muted);
  font-size: 13px;
  line-height: 1.65;
}

.fza-ideas-saved-shortcut {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border: 1px solid #e0e0e3;
  border-radius: 999px;
  background: #fff;
  color: #222;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.fza-ideas-saved-shortcut:hover {
  border-color: var(--fza-ideas-red);
  color: var(--fza-ideas-red);
}

.fza-ideas-saved-shortcut svg,
.fza-ideas-search > svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fza-ideas-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(760px, 100%);
  margin: 0 auto;
  border-radius: 999px;
  background: #f1f1f2;
}

.fza-ideas-search > svg {
  position: absolute;
  right: 16px;
  color: #55565b;
  pointer-events: none;
}

.fza-ideas-search input[type="search"] {
  width: 100%;
  height: 50px;
  margin: 0;
  padding: 7px 50px 7px 42px;
  border: 2px solid transparent;
  border-radius: inherit;
  outline: 0;
  background: transparent;
  color: #1f2024;
  font: inherit;
  font-size: 15px;
  box-shadow: none;
  appearance: none;
}

.fza-ideas-search input[type="search"]:focus {
  border-color: #646cff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(100, 108, 255, 0.13);
}

.fza-ideas-search-clear {
  position: absolute;
  left: 9px;
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #555;
  font: inherit;
  font-size: 26px;
  cursor: pointer;
}

.fza-ideas-search-clear:hover {
  background: #e2e2e4;
}

.fza-ideas-categories {
  display: flex;
  gap: 7px;
  max-width: 100%;
  margin: 11px auto 0;
  padding: 1px 0 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.fza-ideas-categories button,
.fza-pin-category-list button {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 13px;
  border: 1px solid #dedee1;
  border-radius: 999px;
  background: #fff;
  color: #343439;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.fza-ideas-categories button:hover,
.fza-ideas-categories button.is-active,
.fza-pin-category-list button:hover {
  border-color: var(--fza-ideas-red);
  background: #fff1f3;
  color: #bd1324;
}

.fza-ideas-grid {
  column-count: 5;
  column-gap: 12px;
}

.fza-idea-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 12px;
  overflow: hidden;
  break-inside: avoid;
  border: 1px solid #eeeeef;
  border-radius: 18px;
  background: #fff;
  vertical-align: top;
  box-shadow: 0 3px 13px rgba(0, 0, 0, 0.045);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.fza-idea-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 24px rgba(0, 0, 0, 0.11);
}

.fza-idea-open,
.fza-idea-copy h2 button {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: inherit;
  cursor: pointer;
  box-shadow: none;
}

.fza-idea-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: var(--fza-idea-ratio, 1);
  overflow: hidden;
  background: #ebebed;
}

.fza-idea-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.2));
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}

.fza-idea-card:hover .fza-idea-image::after {
  opacity: 1;
}

.fza-idea-image img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  object-fit: cover;
  transition: transform 0.28s ease;
}

.fza-idea-card:hover .fza-idea-image img {
  transform: scale(1.018);
}

.fza-idea-badges {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  left: 8px;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.fza-idea-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}

.fza-idea-badge.is-ar {
  background: rgba(13, 126, 62, 0.9);
}

.fza-idea-badge.is-prime {
  background: rgba(227, 27, 47, 0.92);
}

.fza-idea-badge svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fza-ideas-actions {
  z-index: 3;
  min-height: 44px;
  margin: 0;
  padding: 3px 6px;
  border-bottom: 1px solid #f1f1f2;
}

.fza-ideas-actions .fza-reaction-button,
.fza-ideas-actions .fza-action-button,
.fza-ideas-comment-button {
  min-width: 32px;
  min-height: 34px;
  padding: 3px;
}

.fza-ideas-actions .fza-reaction-icon {
  width: 24px;
  height: 24px;
}

.fza-ideas-actions .fza-reaction-icon > svg,
.fza-ideas-comment-button .fza-reaction-icon > svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fza-ideas-comment-button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: #101114;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.fza-idea-copy {
  padding: 9px 10px 12px;
}

.fza-idea-copy h2 {
  margin: 0;
  color: #232327;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1.55;
}

.fza-idea-price {
  margin: 6px 0 0;
  color: #505055;
  font-size: 11px;
  line-height: 1.5;
}

.fza-ideas-notice {
  margin: 20px auto;
  padding: 14px;
  border-radius: 12px;
  background: #f4f4f5;
  color: #505055;
  text-align: center;
}

.fza-ideas-notice[hidden] {
  display: none;
}

.fza-ideas-notice.is-error {
  background: #fff0f1;
  color: #9e1423;
}

.fza-ideas-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin: 20px 0 8px;
  color: #666;
  font-size: 12px;
}

.fza-ideas-loader[hidden] {
  display: none;
}

.fza-ideas-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--fza-ideas-red);
  animation: fzaIdeasBounce 0.9s infinite alternate;
}

.fza-ideas-loader span:nth-child(2) {
  animation-delay: 0.16s;
}

.fza-ideas-loader span:nth-child(3) {
  animation-delay: 0.32s;
}

.fza-ideas-loader em {
  margin-right: 5px;
  font-style: normal;
}

.fza-ideas-more {
  display: block;
  min-width: 170px;
  margin: 18px auto 0;
  padding: 11px 18px;
  border: 0;
  border-radius: 999px;
  background: #19191b;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.fza-ideas-more[hidden] {
  display: none;
}

.fza-pin-viewer {
  position: fixed;
  z-index: 100120;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.fza-pin-viewer[hidden] {
  display: none;
}

.fza-pin-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(8, 8, 10, 0.82);
  backdrop-filter: blur(10px);
}

.fza-pin-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 24px;
  background: #fff;
  color: #17171a;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.45);
}

.fza-pin-close {
  position: sticky;
  z-index: 30;
  top: 10px;
  float: left;
  width: 40px;
  height: 40px;
  margin: 10px 0 -50px 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #222;
  font: inherit;
  font-size: 29px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
}

.fza-pin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.75fr);
  min-height: 520px;
  direction: ltr;
}

.fza-pin-visual,
.fza-pin-content {
  direction: rtl;
}

.fza-pin-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  background: #0b0b0d;
}

.fza-pin-image-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  touch-action: none;
}

.fza-pin-image-stage > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 78vh;
  margin: 0 auto;
  object-fit: contain;
  background: #0b0b0d;
}

.fza-visual-search-open {
  position: absolute;
  z-index: 8;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: rgba(10, 10, 12, 0.88);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.fza-visual-search-open svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fza-visual-selection {
  position: absolute;
  z-index: 12;
  inset: 0;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.34);
  cursor: crosshair;
  touch-action: none;
}

.fza-visual-selection[hidden] {
  display: none;
}

.fza-visual-selection-box {
  position: absolute;
  min-width: 28px;
  min-height: 28px;
  border: 3px solid #fff;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.28), 0 2px 16px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}

.fza-visual-selection-box::before,
.fza-visual-selection-box::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
}

.fza-visual-selection-box::before {
  top: -8px;
  right: -8px;
}

.fza-visual-selection-box::after {
  bottom: -8px;
  left: -8px;
}

.fza-visual-selection-actions {
  position: absolute;
  z-index: 20;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.fza-visual-selection-actions button {
  min-height: 42px;
  margin: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #242428;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.fza-visual-selection-actions button.is-primary {
  background: var(--fza-ideas-red);
  color: #fff;
}

.fza-pin-content {
  padding: 54px 24px 26px;
}

.fza-pin-content .fza-pin-actions {
  margin-bottom: 18px;
}

.fza-ideas-actions--pin {
  padding: 4px 0 11px;
  border-bottom: 1px solid #ececef;
}

.fza-ideas-actions--pin .fza-reaction-icon {
  width: 29px;
  height: 29px;
}

.fza-pin-content h2 {
  margin: 0 0 8px;
  color: #18181b;
  font-size: clamp(21px, 2.5vw, 30px);
  font-weight: 900;
  line-height: 1.55;
}

.fza-pin-price {
  color: #2e2e32;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.7;
}

.fza-pin-description {
  margin: 14px 0;
  color: #5b5b61;
  font-size: 13px;
  line-height: 1.85;
}

.fza-pin-category-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.fza-pin-shop {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin: 18px 0 10px;
  padding: 10px 17px;
  border-radius: 999px;
  background: var(--fza-ideas-red);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}

.fza-pin-shop:hover {
  background: #c51124;
  color: #fff;
}

.fza-pin-comments {
  display: block;
  padding: 10px 4px;
  color: #4c4c52;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.fza-pin-comments:hover {
  color: var(--fza-ideas-red);
}

.fza-pin-related {
  clear: both;
  padding: 23px;
  border-top: 1px solid #ececef;
  background: #f7f7f8;
  scroll-margin-top: 12px;
}

.fza-pin-related-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.fza-pin-related-heading h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 900;
}

.fza-pin-related-heading small {
  color: #6d6d72;
  font-size: 11px;
}

.fza-related-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 11px;
}

.fza-related-grid .fza-idea-card {
  display: block;
  margin: 0;
  border-radius: 14px;
}

.fza-related-grid .fza-idea-copy {
  padding: 8px;
}

.fza-related-grid .fza-idea-copy h2 {
  font-size: 11px;
}

.fza-related-loading,
.fza-related-empty {
  grid-column: 1 / -1;
  padding: 28px 14px;
  border: 1px dashed #cccdd1;
  border-radius: 13px;
  color: #626269;
  text-align: center;
}

.fza-related-empty.is-error {
  border-color: #e4aeb4;
  background: #fff3f4;
  color: #9a1b2a;
}

@keyframes fzaIdeasBounce {
  to { transform: translateY(-6px); opacity: 0.45; }
}

@media (max-width: 1240px) {
  .fza-ideas-grid { column-count: 4; }
  .fza-related-grid { grid-template-columns: repeat(4, minmax(135px, 1fr)); }
}

@media (max-width: 920px) {
  .fza-ideas-grid { column-count: 3; }
  .fza-pin-layout { grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr); }
  .fza-related-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
}

@media (max-width: 680px) {
  .fza-ideas {
    padding: 10px 7px 28px;
  }

  .fza-ideas-header {
    margin: -10px -7px 10px;
    padding: 10px 9px 9px;
  }

  .fza-ideas-title-row {
    align-items: center;
    margin-bottom: 9px;
  }

  .fza-ideas-title-row h1 {
    font-size: 22px;
  }

  .fza-ideas-title-row p,
  .fza-ideas-saved-shortcut span {
    display: none;
  }

  .fza-ideas-saved-shortcut {
    width: 40px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }

  .fza-ideas-search input[type="search"] {
    height: 47px;
    font-size: 14px;
  }

  .fza-ideas-grid {
    column-count: 2;
    column-gap: 7px;
  }

  .fza-idea-card {
    margin-bottom: 7px;
    border-radius: 13px;
  }

  .fza-ideas-actions {
    gap: 0;
    min-height: 40px;
    padding: 2px 3px;
  }

  .fza-ideas-actions .fza-reaction-button,
  .fza-ideas-actions .fza-action-button {
    min-width: 29px;
    min-height: 31px;
    padding: 2px;
  }

  .fza-ideas-actions .fza-reaction-icon {
    width: 22px;
    height: 22px;
  }

  .fza-ideas-actions .fza-like-count {
    font-size: 10px;
  }

  .fza-idea-copy {
    padding: 7px 8px 9px;
  }

  .fza-idea-copy h2 {
    font-size: 11px;
    line-height: 1.5;
  }

  .fza-idea-price {
    font-size: 10px;
  }

  .fza-pin-viewer {
    align-items: stretch;
    padding: 0;
  }

  .fza-pin-dialog {
    width: 100%;
    max-height: none;
    border-radius: 0;
  }

  .fza-pin-layout {
    display: block;
    min-height: 0;
  }

  .fza-pin-visual {
    min-height: 0;
  }

  .fza-pin-image-stage > img {
    max-height: 69vh;
  }

  .fza-pin-content {
    padding: 18px 15px 20px;
  }

  .fza-pin-close {
    position: fixed;
    top: 8px;
    left: 8px;
    margin: 0;
  }

  .fza-visual-search-open {
    right: 10px;
    bottom: 10px;
    width: 48px;
    height: 48px;
  }

  .fza-pin-related {
    padding: 17px 9px 24px;
  }

  .fza-pin-related-heading {
    display: block;
  }

  .fza-pin-related-heading small {
    display: block;
    margin-top: 4px;
  }

  .fza-related-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }

  .fza-related-grid .fza-idea-card {
    flex: 0 0 47%;
    scroll-snap-align: start;
  }

  .fza-related-loading,
  .fza-related-empty {
    flex: 0 0 100%;
  }
}

@media (max-width: 370px) {
  .fza-ideas-actions .fza-action-button {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fza-idea-card,
  .fza-idea-image img,
  .fza-ideas-loader span {
    transition: none;
    animation: none;
  }
}
