/* Our Portfolio page: arrows next to the brand row titles (same look as the home page).
   Tablets and desktops only; phones swipe, and keep the theme's centred titles. */
@media (min-width: 750px) {
  .brand-slider__header:has(.pf-arrows) { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
  /* keep the arrows the same distance from the edge as the title */
  html:not([lang="ar"]) .brand-slider__header:has(.pf-arrows) { padding-right: 72px; }
  html[lang="ar"] .brand-slider__header:has(.pf-arrows) { padding-left: 72px; }
}
/* Phones: the row titles get the same 16px side margins as the rest of the page
   (the theme leaves the Arabic ones off-centre). */
@media (max-width: 749px) {
  html[lang] body .brand-slider__header { padding-left: 16px; padding-right: 16px; text-align: center; }
}
.pf-arrows { display: flex; gap: 8px; flex: none; }
.pf-arrows button {
  width: 44px; height: 44px; padding: 0; border-radius: 50%;
  border: 1px solid #d9d9d9; background: #fff; color: #000; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color .15s, opacity .15s;
}
.pf-arrows button:hover { border-color: #000; }
.pf-arrows button:disabled { opacity: .35; cursor: default; border-color: #d9d9d9; }
.pf-arrows svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
html[lang="ar"] .pf-arrows svg { transform: scaleX(-1); }
/* Phones swipe instead, as on the home page. */
@media (max-width: 749px) { .pf-arrows { display: none; } }

/* Our Distribution Brands: each card opens the brand on jashanmal.com in a new
   tab. On hover (or keyboard focus) a ↗ badge appears in the image's bottom
   corner to say so; on touch screens, which have no hover, it is always shown. */
.brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap { position: relative; }
.brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap::after {
  content: ""; position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / 16px no-repeat;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  opacity: 0; transform: translateY(4px);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"]:is(:hover, :focus-visible) .brand-slider__image-wrap::after { opacity: 1; transform: none; }
@media (hover: none) {
  .brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap::after { opacity: 1; transform: none; }
}
/* Arabic: bottom-left corner, arrow pointing up and to the left (as in the header) */
html[lang="ar"] .brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap::after { right: auto; left: 12px; transform: translateY(4px) scaleX(-1); }
html[lang="ar"] .brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"]:is(:hover, :focus-visible) .brand-slider__image-wrap::after { transform: scaleX(-1); }
@media (hover: none) {
  html[lang="ar"] .brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap::after { transform: scaleX(-1); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-slider__carousel:not(.brand-slider--3up__carousel) a[target="_blank"] .brand-slider__image-wrap::after { transition: none; }
}
