/* ------------------------------------------------------------------
   默认值。全部包在 :where() 里 —— 它的优先级是 0，所以你在
   Flatsome > 高级 > 全局自定义 CSS 里写的任何 .arc_gallery {...}
   都一定盖得过这里，跟先后顺序无关。
   ------------------------------------------------------------------ */
:where(.arc_gallery) {
  --arc-radius: 1.9;       /* 弧线半径 = 容器宽度 × 这个数。越大弧越平 */
  --arc-card-w: 200px;     /* 卡片宽度 */
  --arc-ratio: 1;          /* 卡片高 = 宽 × 这个数。1 = 正方形 */
  --arc-gap: 30px;         /* 卡片间距（在卡片底边量，最窄处） */
  --arc-speed: 1.1;        /* 转动速度，度/秒。设 0 就是静止的拱形 */
  --arc-dir: -1;           /* 转动方向：-1 向左，1 向右 */
  --arc-drag: 1;           /* 手划拖动：1 开，0 关 */
  --arc-round: 10px;       /* 圆角 */
  --arc-top: 40px;         /* 拱顶上方留白 */
  --arc-bottom: 30px;      /* 底部留白 */
}

@media (max-width: 849px) {
  :where(.arc_gallery) { --arc-card-w: 150px; --arc-gap: 22px; --arc-top: 26px; --arc-bottom: 20px; }
}

@media (max-width: 549px) {
  :where(.arc_gallery) { --arc-card-w: 116px; --arc-gap: 16px; --arc-top: 18px; --arc-bottom: 14px; }
}

/* ------------------------------------------------------------------
   结构样式，一般不用动
   ------------------------------------------------------------------ */
.row.arc_gallery.arc-ready {
  position: relative;
  overflow: hidden;
  touch-action: pan-y;        /* 横划归我们，竖划留给页面滚动 */
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  contain: layout paint;
}

.row.arc_gallery.arc-ready.is-arc-dragging { cursor: grabbing; }

.row.arc_gallery.arc-ready::before,
.row.arc_gallery.arc-ready::after { display: none; }

.row.arc_gallery.arc-ready > .col {
  transform-origin: 50% 0;
  will-change: transform;
  backface-visibility: hidden;
}

.row.arc_gallery.arc-ready > .col > .col-inner {
  width: 100%;
  height: 100%;
  border-radius: var(--arc-round);
  overflow: hidden;
  box-shadow: 0 14px 30px rgb(0 0 0 / 14%);
  background: rgb(0 0 0 / 4%);
}

.row.arc_gallery.arc-ready > .col .box,
.row.arc_gallery.arc-ready > .col .box-image,
.row.arc_gallery.arc-ready > .col a {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  -webkit-user-drag: none;
}

.row.arc_gallery.arc-ready > .col img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  transition: transform .35s ease-out;
}

.row.arc_gallery.arc-ready > .col:hover img { transform: scale(1.05); }

/* 接管之前先藏起来，避免直线排布闪一下。
   限定 .row：图片本身也带 arc_gallery 这个 class，不能连它们一起藏 */
.row.arc_gallery:not(.arc-ready) { visibility: hidden; }

@media (prefers-reduced-motion: reduce) {
  .row.arc_gallery.arc-ready > .col img { transition: none; }
}
