/* CSS Document */


/* =========================
   基本版面
========================= */
.productWrap {
    max-width: 1200px;
    margin: 0 auto;
    font-family: Arial, "Microsoft JhengHei", sans-serif;
}
/* =========================
   大項 Tabs
========================= */
.categoryTabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}
.categoryTabs button {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    padding: 9px 18px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 15px;
}
.categoryTabs button.active {
    background: #e95378;
    color: #fff;
    border-color: #e95378;
}
/* =========================
   篩選區
========================= */
.filterBox {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    background: #f8f8f8;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 15px;
}
.checkList {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-top: 10px;
}
.checkList label {
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    
      display: inline-flex;
  align-items: center;
  gap: 4px;   /* ← 控制勾選框跟文字距離 */
}
.resultInfo {
    text-align:left;
    margin-bottom: 8px;
    color: #555;
}
/* =========================
   電腦版表格
========================= */
.tableScroll {
    width: 100%;
    overflow-x: auto;
}
.productTable {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.productTable th, .productTable td {
    border: 1px solid #ddd;
    padding: 10px;
    font-size: 15px;
    line-height: 1.5;
    vertical-align: middle;
}
.productTable th {
    background: #EFEFEF;
    font-weight: bold;
    text-align: center;
}
.productTable td.price {
    text-align: right;
    white-space: nowrap;
}
.productTable .productName {
       font-size: 15px;
    line-height: 1.3;
    font-weight: 700;
  
}
.introBtn {
    border: 0;
    background: #e95378;
    color: #fff;
    padding: 7px 14px;
    border-radius: 999px;
    cursor: pointer;
}
.introBtn:hover {
    background: #57c1d1;
}
/* =========================
   Popup
========================= */
.popupMask {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0,0,0,.55);
    padding: 20px;
}
.popupMask.show {
    display: flex;
    align-items: center;
    justify-content: center;
}
.popupBox {
    width: 100%;
    max-width: 680px;
    max-height: 80vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    position: relative;
}
.popupBox h3 {
    margin: 0 35px 18px 0;
    font-size: 22px;
    color: #e95378;
}
.popupIntro {
    font-size: 16px;
    line-height: 1.8;
    white-space: pre-line;
}
.popupClose {
    position: absolute;
    right: 18px;
    top: 14px;
    border: 0;
    background: none;
    font-size: 34px;
    cursor: pointer;
}
.loadMoreBox {
  display: none;
  text-align: center;
  margin: 20px 0;
}

#loadMoreBtn {
  border: 0;
  background: #18a58c;
  color: #fff;
  padding: 12px 35px;
  border-radius: 999px;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}





/* 筆數 + 搜尋列 */
.resultSearchBar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin: 15px 0 10px;
}

.keywordSearch {
  display: flex;
  gap: 8px;
  max-width: 420px;
  width: 100%;
}

.keywordSearch input {
  flex: 1;
  height: 40px;
  border: 1px solid #ddd;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 15px;
}

.keywordSearch button {
  border: 0;
  background: #18a58c;
  color: #fff;
  border-radius: 999px;
  padding: 0 16px;
  cursor: pointer;
}

@media (max-width: 768px) {

    
    
    /* 筆數 + 搜尋列同列 */
  .resultSearchBar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0 10px;
  }

  .resultInfo {
    flex: 0 0 auto;
    margin: 0;
    font-size: 14px;
    white-space: nowrap;
  }

  .keywordSearch {
    flex: 1;
    display: flex;
    gap: 8px;
    margin-top: 0;
    max-width: none;
  }

  .keywordSearch input {
    flex: 1;
    min-width: 0;
    height: 42px;
    font-size: 16px;
  }

  /* 清除按鈕字大一點 */
  .keywordSearch button {
    flex: 0 0 auto;
    height: 42px;
    padding: 0 16px;
    font-size: 16px;
    font-weight: bold;
  }
    
    
}


/* =========================
   手機版
========================= */
@media (max-width: 768px) {

    .loadMoreBox {
    display: block;
  }
    
    /* 上方區塊固定 */
.productSticky {
    position: sticky;
     top: 44px; /* ← 上方固定選單高度 */
    z-index: 50;
    background: #fff;
    padding: 10px 0;
    box-shadow: 0 6px 8px -6px rgba(0,0,0,.15);/*X位移  Y位移 模糊 擴散 顏色*/
}
/* 大項 Tabs：全部顯示，兩欄排列 */
.categoryTabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /*  grid-template-columns: 1fr 1fr 1fr;  3個一列 */
    /*  grid-template-columns: 1fr;;  1個一列 */
    gap: 8px;
    overflow: visible;
    margin-bottom: 10px;
}
/*大項按鈕大小*/
.categoryTabs button {
    width: 100%;
    padding: 9px 8px;
    font-size: 15px;
    line-height: 1.35;
}
/* 篩選區手機改單欄 */
.filterBox {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    margin-bottom: 8px;
}
/* 小項 / 適用寵物外框 */
.filterBox > div {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
}
/* 小項 / 適用寵物標題 */
.filterBox strong {
    display: block;
    padding: 11px 14px;
    background: #EFEFEF;
    color: #e95378;
    font-size: 15px;
    cursor: pointer;
}
.filterBox strong::after {
    content: "＋";
    float: right;
}
.filterBox > div.open strong::after {
    content: "－";
}
/* 小項 / 適用寵物 收合區 收合內容預設隱藏 */
.filterBox .checkList {
    display: none;
    padding: 12px;
    margin-top: 0;
    max-height: 230px;
    overflow-y: auto;
    background: #fff;
    flex-wrap: wrap;
    gap: 8px;
}
/* 展開後顯示 */
.filterBox > div.open .checkList {
    display: flex;
}
/* 小項 checkbox：一列一個，避免文字太長 */
#subFilters label {
    /*width: 100%;*/
    width: calc(50% - 4px);
}
/* 適用寵物：兩個一列 */
#petFilters label {
    width: calc(50% - 4px);
}
.checkList label {
    margin: 0;
    font-size: 15px;
    line-height: 1.2;
    white-space: normal;
    display: flex;
    align-items: center;
    gap: 3px;
    box-sizing: border-box;
}
.resultInfo {
    padding-right: 5px;
    margin-bottom: 0;
    font-size: 14px;
}
/* 表格改成 Card */
.tableScroll {
    overflow-x: visible;
}
.productTable thead {
    display: none;
}
.productTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.productTable tbody {
    display: block;
    width: 100%;
}
/*商品卡片外框*/
.productTable tr {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #ddd;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 15px;
    background: #fff;
}
/* Card 內容：左欄名、右內容 */
.productTable td {
    display: flex;
    align-items: flex-start;
    width: 100%;
    box-sizing: border-box;
    border: 0;
    padding: 2px 0;
    text-align: left;
    font-size: 15px;
line-height:;
    white-space: normal;
    word-break: break-word;
}
.productTable td::before {
    content: attr(data-title);
    flex: 0 0 95px;
    margin-right: 10px;
    color: #e95378;
    font-size: 15px;
    font-weight: bold;
}
/* 商品名稱最上方 */
.productTable .productNameCell {
    display: block;
    padding-bottom: 12px;
}
.productTable .productNameCell::before {
    display: none !important;
}
.productTable .productName {
    display: block;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.45;
    color: #222;
}
.productTable td.price {
    text-align: left;
    white-space: normal;
}
/* 介紹按鈕 */
.productTable .introCell {
    display: block;
    padding-top: 12px;
}
.productTable .introCell::before {
    display: none !important;
}


.introBtn {
    width: 100%;
    padding: 11px 10px;
    font-size: 17px;
    font-weight: bold;
    margin: 0 auto;
    min-width:70px;
}
}

/* =========================
   小手機微調
========================= */
@media (max-width: 480px) {
.productTable tr {
    padding: 14px;
}
.productTable td {
    font-size: 17px;
    line-height: 1.7;
}
.productTable td::before {
    flex: 0 0 90px;
    font-size: 17px;
}
.productTable .productName {
    font-size: 21px;
}
.introBtn {
    font-size: 15px;
}
}
