/* ============================================================
   手機 Carousel — 箭頭切換式
   只在手機版生效,桌機不受影響
   套用對象:.stages-grid、.faculty-grid
   ============================================================ */

@media (max-width: 768px) {
  /* 包裝容器 — 給箭頭定位用 */
  .mobile-carousel {
    position: relative;
    margin: 30px -20px 0;
    padding: 0;
  }

  /* 卡片容器:一次一張、占滿可視 */
  body.luxury .stages-grid,
  body.luxury .faculty-grid {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 0;
    padding: 8px 20px;
    margin: 0;
    /* 隱藏滾動條 */
    scrollbar-width: none;
    -ms-overflow-style: none;
  }
  body.luxury .stages-grid::-webkit-scrollbar,
  body.luxury .faculty-grid::-webkit-scrollbar {
    display: none;
  }

  /* 每張卡:完整佔滿視窗(扣掉左右 padding) */
  body.luxury .stages-grid > .stage-card,
  body.luxury .faculty-grid > .faculty-card {
    flex: 0 0 100%;
    max-width: 100%;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    margin: 0 8px;  /* 卡之間留一點氣 */
  }
  body.luxury .stages-grid > .stage-card:first-child,
  body.luxury .faculty-grid > .faculty-card:first-child {
    margin-left: 0;
  }
  body.luxury .stages-grid > .stage-card:last-child,
  body.luxury .faculty-grid > .faculty-card:last-child {
    margin-right: 0;
  }

  /* 箭頭按鈕 */
  .carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(107, 74, 46, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s;
    padding: 0;
    color: var(--tzutzu-brown-title);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    font-family: var(--font-sans);
  }
  .carousel-arrow:active {
    transform: translateY(-50%) scale(0.9);
  }
  .carousel-arrow.disabled {
    opacity: 0.35;
    pointer-events: none;
  }
  .carousel-arrow-prev {
    left: 4px;
  }
  .carousel-arrow-next {
    right: 4px;
  }
  /* SVG 箭頭符號 */
  .carousel-arrow svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--tzutzu-brown-title);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* 頁碼指示器(小圓點) */
  .carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0 20px;
  }
  .carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-strong);
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    padding: 0;
  }
  .carousel-dot.active {
    width: 24px;
    border-radius: 3px;
    background: var(--tzutzu-gold);
  }
}

/* 桌機版:carousel 容器只當包裝、不影響原 grid 排版 */
@media (min-width: 769px) {
  .mobile-carousel {
    position: static;
  }
  .carousel-arrow,
  .carousel-dots {
    display: none !important;
  }
}
