/* rk-shop-offcanvas.css v2.4.12 (desktop fix) */

/* 桌機端完全隱藏浮動按鈕與把手 */
@media (min-width: 993px) {
  #rk-mobile-filter-btn,
  #rk-edge-tab,
  #rk-offcanvas-backdrop {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
  }
}

/* 背景滾動鎖定（抽屜開啟） */
html.rk-offcanvas-lock,
body.rk-offcanvas-lock {
  overflow: hidden !important;
  touch-action: none;
}

/* 手機端樣式 */
@media (max-width: 992px) {

  /* 右側抽屜＝原生 #secondary，不搬動 DOM */
  #secondary {
    position: fixed !important;
    top: 0;
    right: 0;
    width: min(90vw, 380px);
    height: 100vh;
    background: #fff;
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .25s ease;
    border-top-left-radius: 15px;
    /*border-radius: 12px; */
    z-index: 100004;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: block !important;
    padding: 20px 50px 150px 20px;
  }
  body.rk-offcanvas-open #secondary { transform: translateX(0%); }

  /* 背景遮罩 */
  .rk-offcanvas-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    z-index: 100003;
    display: block;
  }
  body.rk-offcanvas-open .rk-offcanvas-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  /* 浮動按鈕（右下角） */
  .rk-mobile-filter-btn {
    position: fixed;
    right: 20px;
    top: 23%;
    z-index: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 999px;
    background: #6A9739;
    color: #fff;
    border: none;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    transition: transform .24s ease, opacity .24s ease;
    will-change: transform, opacity;
  }

  /* 抽屜開啟：按鈕往下淡出 */
  body.rk-offcanvas-open .rk-mobile-filter-btn {
    transform: translateY(120%);
    opacity: 0;
    pointer-events: none;
  }

  /* 捲動隱藏：按鈕往右淡出（露出把手） */
  body.rk-btn-hidden .rk-mobile-filter-btn {
    transform: translateX(140%);
    opacity: 0;
    pointer-events: none;
  }

  /* 右側把手 */
  .rk-edge-tab {
    position: fixed;
    top: 25%;
    right: 0;
    transform: translateY(-50%);
    width: 15px;
    height: 40px;
    border-radius: 8px 0 0 8px;
    background: #6A9739;
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    box-shadow: 0 6px 18px rgba(0,0,0,.18);
    z-index: 100005;
    transition: opacity .25s ease, transform .25s ease;
    opacity: .45;
  }
  body.rk-btn-hidden .rk-edge-tab { display: flex; opacity: .45; }
  body.rk-offcanvas-open .rk-edge-tab { display: none; }
  .rk-edge-tab:hover,
  .rk-edge-tab:active,
  .rk-edge-tab:focus,
  .rk-edge-tab:focus-visible {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(36,144,119,.28), 0 6px 18px rgba(0,0,0,.18);
    outline: none;
  }

  /* 統一遮罩圖示樣式 */
  .rk-icon {
    display: inline-block;
    background-color: currentColor;
    width: 18px;
    height: 18px;
    vertical-align: -2px;
    flex-shrink: 0;
  }


/* filter-solid.svg -> data URI */
.rk-icon--filter{
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='m14.909 19c0 1.1046-.8954 2-2 2h-1.8182c-.5304 0-1.0391-.2107-1.41417-.5858s-.58578-.8838-.58578-1.4142v-7.1627l-5.49445-5.41249c-.57824-.5696-.75488-1.43218-.44709-2.18322.30779-.75105 1.03897-1.24159 1.85063-1.24159h13.99996c.8117 0 1.5429.49054 1.8507 1.24158.3077.75105.1311 1.61363-.4471 2.18323l-5.4945 5.41249zm-3.9567-8.0892c.0899.1525.1385.3277.1385.5078v7.5814h1.8182v-7.5814c0-.1801.0487-.3553.1386-.5078.0437-.0742.0972-.1431.1597-.2046l5.7926-5.7062h-13.99996l5.79266 5.7062c.0625.0615.116.1304.1597.2046z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='currentColor' fill-rule='evenodd' clip-rule='evenodd' d='m14.909 19c0 1.1046-.8954 2-2 2h-1.8182c-.5304 0-1.0391-.2107-1.41417-.5858s-.58578-.8838-.58578-1.4142v-7.1627l-5.49445-5.41249c-.57824-.5696-.75488-1.43218-.44709-2.18322.30779-.75105 1.03897-1.24159 1.85063-1.24159h13.99996c.8117 0 1.5429.49054 1.8507 1.24158.3077.75105.1311 1.61363-.4471 2.18323l-5.4945 5.41249zm-3.9567-8.0892c.0899.1525.1385.3277.1385.5078v7.5814h1.8182v-7.5814c0-.1801.0487-.3553.1386-.5078.0437-.0742.0972-.1431.1597-.2046l5.7926-5.7062h-13.99996l5.79266 5.7062c.0625.0615.116.1304.1597.2046z'/></svg>") no-repeat center / contain;
  background-color: currentColor;
  width: 18px;
  height: 18px;
  margin-right: 6px;
  vertical-align: -2px;
}

/* chevron-left.svg -> data URI */

.rk-icon--chevron{
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='currentColor' d='M46.63 64c-1.07 0-2.13-.39-2.97-1.18L14.4 35.14a4.42 4.42 0 0 1 0-6.28L43.66 1.18c1.73-1.64 4.47-1.56 6.11.17 1.64 1.74 1.57 4.47-.17 6.11L23.66 32l25.94 24.53c1.73 1.64 1.81 4.38.17 6.11-.85.91-2 1.36-3.14 1.36z'/></svg>") no-repeat center / contain;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'><path fill='currentColor' d='M46.63 64c-1.07 0-2.13-.39-2.97-1.18L14.4 35.14a4.42 4.42 0 0 1 0-6.28L43.66 1.18c1.73-1.64 4.47-1.56 6.11.17 1.64 1.74 1.57 4.47-.17 6.11L23.66 32l25.94 24.53c1.73 1.64 1.81 4.38.17 6.11-.85.91-2 1.36-3.14 1.36z'/></svg>") no-repeat center / contain;
  background-color: currentColor;
  width: 14px;
  height: 14px;
  opacity: 0.6;
  transition: opacity .3s ease;
}
.rk-icon--chevron:hover { opacity: 1; }


  /* Facet 與 Widget 間距 */
  #secondary .widget,
  #secondary .facetwp-facet { margin-bottom: 18px; }
  #secondary .facetwp-facet .facetwp-checkboxes {
    max-height: 60vh;
    overflow: auto;
  }

  /* 動畫減少偏好 */
  @media (prefers-reduced-motion: reduce) {
    .rk-mobile-filter-btn,
    .rk-edge-tab,
    #secondary,
    .rk-offcanvas-backdrop { transition: none !important; }
  }
}