/* Product search result thumbs + brand gallery */
.product-result {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 16px;
  align-items: start;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  scroll-margin-top: 160px;
  color: #102036;
}
.product-result[hidden] {
  display: none !important;
}
.product-result h3 {
  color: #0a2540 !important;
  margin: 0 0 4px;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}
.product-result .result-meta {
  color: #0369a1;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 8px;
}
.product-result-body p {
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 8px;
}
.product-result.no-image {
  grid-template-columns: 1fr;
}
.product-result-media {
  margin: 0;
}
.product-result-media button {
  display: block;
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  width: 200px;
}
.product-result-media img {
  display: block;
  width: 200px;
  height: 200px;
  object-fit: contain;
  background: #fff;
}
.product-result-body {
  min-width: 0;
}
@media (max-width: 560px) {
  .product-result {
    grid-template-columns: 1fr;
  }
  .product-result-media button,
  .product-result-media img {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 1;
  }
}

.product-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin: 18px 0 28px;
}
.product-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  cursor: zoom-in;
  text-align: center;
  font: inherit;
  color: inherit;
}
.product-gallery-item img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  box-sizing: border-box;
}
.product-gallery-item span {
  font-size: 0.86rem;
  font-weight: 600;
  color: #0a2540;
}

.akyol-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 20, 40, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.akyol-lightbox[hidden] {
  display: none !important;
}
.akyol-lightbox img {
  max-width: min(920px, 100%);
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  background: #fff;
}
.akyol-lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
}

/* mobile-search-fix */
@media (max-width: 900px) {
  .product-result {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }
  .product-result-media button,
  .product-result-media img {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 1;
  }
  .akyol-lightbox {
    padding: 12px;
  }
  .akyol-lightbox img {
    max-height: 80vh;
  }
}

.brand-product-list {
  margin: 24px 0 36px;
}
.brand-product-toolbar {
  position: sticky;
  top: 72px;
  z-index: 4;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 10px 0 12px;
  background: linear-gradient(180deg, #fff 70%, rgba(255,255,255,0));
}
.brand-product-filter-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 0;
}
.brand-product-filter {
  min-width: min(100%, 280px);
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font: inherit;
  color: #0a2540;
  background: #fff;
}
.brand-product-filter-btn {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  background: #0a2540;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.brand-product-filter-btn:hover {
  background: #163a5c;
}
.brand-product-count {
  font-size: 0.9rem;
  color: #475569;
  font-weight: 600;
}
.brand-product-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.product-result.is-target {
  outline: 2px solid #0ea5e9;
  outline-offset: 4px;
  border-radius: 12px;
  background: #f0f9ff;
}
.brand-product-empty {
  margin: 8px 0 16px;
  color: #64748b;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
html[dir="rtl"] .brand-product-toolbar,
html[dir="rtl"] .brand-product-filter-form {
  flex-direction: row-reverse;
}
