/* 2026 版型更新：只放新版型需要的覆寫，主題色沿用 --bs-primary */
:root {
  --pfl-border: #e9e9e9;
  --pfl-muted: #888;
  --pfl-surface: #f7f7f7;
}

/* ---------- 區塊標題 ---------- */
.pfl-section {
  padding: 72px 0;
}

.pfl-section-alt {
  background-color: var(--pfl-surface);
}

.pfl-section-title {
  margin-bottom: 40px;
  text-align: center;
}

.pfl-section-title .title {
  margin: 0;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 2px;
}

.pfl-section-title .subtitle {
  display: block;
  margin-top: 10px;
  color: var(--pfl-muted);
  font-size: 15px;
}

.pfl-section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  margin: 16px auto 0;
  background-color: var(--bs-primary, #ee3231);
}

/* ---------- 查看更多 ---------- */
.pfl-more-wrap {
  margin-top: 44px;
  text-align: center;
}

.pfl-more-btn {
  display: inline-block;
  min-width: 220px;
  padding: 13px 32px;
  border: 1px solid #ddd;
  border-radius: 30px;
  background-color: #fff;
  color: #555;
  font-size: 15px;
  text-align: center;
  transition: all 0.25s ease;
}

.pfl-more-btn:hover {
  border-color: var(--bs-primary, #ee3231);
  background-color: var(--bs-primary, #ee3231);
  color: #fff;
}

/* ---------- 側邊分類欄 ---------- */
.sidebar-area .widgets-area,
.sidebar-area.style-2 .widgets-area {
  padding: 0;
  border: 1px solid var(--pfl-border);
  border-radius: 8px;
  background-color: #fff;
  overflow: hidden;
}

.sidebar-area .widgets-title {
  position: relative;
  margin: 0;
  padding: 14px 18px;
  background-color: var(--bs-primary, #ee3231);
  color: #fff;
  font-size: 17px;
  letter-spacing: 1px;
}

/* 收合鈕跟標題同一條紅底，標題撐滿剩下的寬度 */
.sidebar-area .widgets-title-row {
  display: flex;
  align-items: stretch;
  background-color: var(--bs-primary, #ee3231);
}

.sidebar-area .widgets-title-row .widgets-title {
  flex: 1 1 auto;
  background-color: transparent;
}

.sidebar-area .widgets-collapse-toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 46px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sidebar-area .widgets-collapse-toggle i {
  transition: transform 0.25s ease;
}

.sidebar-area .widgets-collapse-toggle.is-collapsed i {
  transform: rotate(180deg);
}

/* 0fr <-> 1fr 可以在不知道高度的情況下做出展開收合動畫 */
.sidebar-area .widgets-collapse {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.25s ease;
}

.sidebar-area .widgets-collapse.is-collapsed {
  grid-template-rows: 0fr;
}

.sidebar-area .widgets-collapse-inner {
  min-height: 0;
  overflow: hidden;
}

/* 主題原本在標題左邊有一塊色塊，換成整條標題列後就不需要了 */
.sidebar-area .widgets-title::before {
  display: none;
}

/* 主題的樹狀清單箭頭，改用下面自己的 ::after */
.sidebar-area .widgets-category-tree > li > a::before,
.sidebar-area .widgets-category li > a > i {
  display: none;
}

.sidebar-area .widgets-body,
.sidebar-area .widgets-item {
  padding: 0;
}

.sidebar-area .widgets-category {
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-area .widgets-category li {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--pfl-border);
}

.sidebar-area .widgets-category > li:first-child {
  border-top: 0;
}

.sidebar-area .widgets-category a {
  display: block;
  padding: 12px 18px;
  color: #555;
  font-size: 15px;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.sidebar-area .widgets-category a:hover,
.sidebar-area .widgets-category a.active {
  background-color: color-mix(in srgb, var(--bs-primary, #ee3231) 6%, #fff);
  color: var(--bs-primary, #ee3231);
}

.sidebar-area .widgets-category ul {
  margin: 0;
  padding: 0;
  list-style: none;
  background-color: #fbfbfb;
}

.sidebar-area .widgets-category ul a {
  /* --depth 由類別樹元件帶在 li 上，每往下一層多縮 14px */
  padding-left: calc(34px + (var(--depth, 1) - 1) * 14px);
  font-size: 14px;
}

/* 樹狀展開：預設收合，open 才顯示 */
.sidebar-area .widgets-category-tree li > ul {
  display: none;
}

.sidebar-area .widgets-category-tree li.open > ul {
  display: block;
}

/* 箭頭獨立成一顆按鈕，只展開子分類、不換頁 */

.sidebar-area .widgets-category-row {
  display: flex;
  align-items: stretch;
}

.sidebar-area .widgets-category-row > a {
  flex: 1 1 auto;
  min-width: 0;
}

.sidebar-area .widgets-category-row:hover,
.sidebar-area .widgets-category-row:has(> a.active) {
  background-color: color-mix(in srgb, var(--bs-primary, #ee3231) 6%, #fff);
}

.sidebar-area .widgets-category-toggle {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  padding: 0;
  border: 0;
  background: none;
  color: #999;
  cursor: pointer;
}

.sidebar-area .widgets-category-toggle::before {
  content: '';
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1px solid currentColor;
  border-bottom: 1px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.sidebar-area .widgets-category-tree-has-children.open > .widgets-category-row > .widgets-category-toggle::before {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.sidebar-area .widgets-category-toggle:hover {
  color: var(--bs-primary, #ee3231);
}

/* ---------- 商品列表上方工具列 ---------- */
.product-topbar {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--pfl-border);
}

.product-topbar ul {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  list-style: none;
  color: var(--pfl-muted);
  font-size: 14px;
}

/* ---------- 商品內容頁：下方介紹分段 ---------- */
.pfl-detail-section + .pfl-detail-section {
  margin-top: 48px;
}

.pfl-detail-section-title {
  margin: 0 0 20px;
  padding-left: 12px;
  border-left: 4px solid var(--bs-primary, #ee3231);
  font-size: 20px;
  font-weight: 500;
}

.pfl-detail-section-body img {
  max-width: 100%;
  height: auto;
}

/* ---------- 商品內容頁右側資訊 ---------- */
.single-product-content .title {
  font-size: 26px;
  line-height: 1.4;
}

.single-product-content .price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--pfl-border);
}

.single-product-content .price-box .new-price {
  color: var(--bs-primary, #ee3231);
  font-size: 28px;
  font-weight: 500;
}

.single-product-content .price-box .old-price {
  color: #bbb;
  font-size: 15px;
  text-decoration: line-through;
}

.single-product-content .product-category {
  font-size: 15px;
}

.single-product-content .product-category .title {
  display: inline-block;
  min-width: 56px;
  color: #333;
  font-size: 15px;
}

/* ---------- 數量選擇：跟商品卡同一種樣式（蓋掉主題的深色膠囊） ---------- */
.quantity-with-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.quantity-with-btn li.quantity {
  flex: 0 0 124px;
}

:is(li, td).quantity .cart-plus-minus {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  /* 加減按鈕往內縮一點，不要貼著圓角邊 */
  padding: 0 6px;
  border: 1px solid #e0e0e0;
  border-radius: 24px;
  background-color: #fff;
  overflow: hidden;
}

:is(li, td).quantity .cart-plus-minus .cart-plus-minus-box {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: #333;
  font-size: 15px;
  text-align: center;
  -moz-appearance: textfield;
}

:is(li, td).quantity .cart-plus-minus .cart-plus-minus-box::-webkit-outer-spin-button,
:is(li, td).quantity .cart-plus-minus .cart-plus-minus-box::-webkit-inner-spin-button {
  margin: 0;
  -webkit-appearance: none;
}

:is(li, td).quantity .cart-plus-minus .qtybutton {
  position: static;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 100%;
  color: #666;
  font-size: 11px;
  transform: none;
}

:is(li, td).quantity .cart-plus-minus .qtybutton:hover {
  color: var(--bs-primary, #ee3231);
}

:is(li, td).quantity .cart-plus-minus .qtybutton.dec {
  order: -1;
  left: auto;
}

:is(li, td).quantity .cart-plus-minus .qtybutton.inc {
  order: 1;
  right: auto;
}

.quantity-with-btn .add-to-cart .btn {
  border-radius: 24px;
}

/* ---------- Header 固定吸頂 ---------- */
/* 主題原本捲動超過 300px 才加 .sticky（position: fixed），切換那一刻 header 脫離文件流，
   下面的內容會往上跳一格。改成整個 header 一直吸頂，並把 .sticky 的 fixed 還原掉。 */
.main-header-area {
  position: sticky;
  top: 0;
  /* 吸頂會建立堆疊環境，裡面的側邊選單與遮罩要能蓋過 .scroll-to-top（999） */
  z-index: 1000;
  background-color: #fff;
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.08);
}

.header-middle.header-sticky.sticky {
  position: static;
  width: auto;
  animation: none;
  box-shadow: none;
}

/* ---------- 商品內容頁：有 Hero 圖時的麵包屑列 ---------- */
.pfl-breadcrumb-bar {
  padding: 22px 0;
}

/* 該分類沒有橫幅圖時麵包屑會直接接在 header 下面，上留白多一點 */
.main-content > .pfl-breadcrumb-bar:first-child {
  padding-top: 40px;
}

.pfl-breadcrumb-bar ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: #777;
}

.pfl-breadcrumb-bar a {
  color: #777;
  text-decoration: none;
}

.pfl-breadcrumb-bar a:hover {
  color: var(--bs-primary, #ee3231);
}

/* 上面已經有麵包屑列了，商品區不用再留 100px */
.pfl-breadcrumb-bar + .single-product-area {
  padding-top: 0;
}

/* 下面接的是詳細介紹或相關產品，商品區本身沒有下留白會直接貼上去，補成和 .pfl-section 一樣 */
.single-product-area {
  padding-bottom: 72px;
}

/* ---------- header 右側 ---------- */
/* 搜尋、會員、購物車原本靠 li 的 padding-right 撐開，彼此貼在一起，改用統一的 gap */
.header-right > ul {
  gap: 26px;
}

.header-right > ul > li {
  padding-right: 0;
}

/* 手機版：會員與購物車視為同一組靠近一點，選單鈕再分開 */
@media (max-width: 991.98px) {
  .header-right > ul {
    gap: 10px;
  }

  .header-right > ul > .mobile-menu_wrap {
    margin-left: 12px;
  }
}

/* ---------- 手機版側邊選單：從右側滑出、白底 ---------- */
.mobile-menu_wrapper .tromic-offcanvas-body {
  left: auto;
  right: -350px;
  background-color: #fff;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.12);
}

.mobile-menu_wrapper.open .tromic-offcanvas-body {
  left: auto;
  right: 0;
}

/* 主題在小螢幕留了 30px 的縫，改成整片展開 */
@media (max-width: 575.98px) {
  .mobile-menu_wrapper .tromic-offcanvas-body {
    width: 100%;
  }
}

/* 主題的深底文字色在白底上看不清楚，選擇器太長就直接覆蓋 */
.mobile-menu_wrapper .button-close,
.mobile-menu_wrapper .mobile-menu li a {
  color: #333 !important;
}

.mobile-menu_wrapper .mobile-menu li a:hover {
  color: var(--bs-primary, #ee3231) !important;
}

/* ---------- 手機版 header 高度減半 ---------- */
/* 原本是 py-6（上下各 30px）＋ 80px 的 logo = 140px，各砍一半變 70px */
@media (max-width: 991.98px) {
  .header-middle {
    padding-top: 15px !important;
    padding-bottom: 15px !important;
  }

  .header-logo img {
    height: 40px;
  }
}

/* ---------- Footer ---------- */
.pfl-footer-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 24px;
  color: #fff;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.pfl-footer-btn:hover {
  border-color: var(--bs-primary, #ee3231);
  background-color: var(--bs-primary, #ee3231);
  color: #fff;
}

.pfl-footer-btn i {
  font-size: 18px;
}

/* 網站連結分區：欄位水平排列、欄內項目垂直排列
   （主題把 .footer-links 設成兩欄 grid，分區後不需要） */
.footer-links.widget-list-item {
  display: block;
}

.footer-links.widget-list-item > li:not(:last-child) {
  padding-bottom: 10px !important;
}

/* 關注我們：icon 群接在標題右側，圖示大小比照標題文字 */
.pfl-follow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.pfl-follow .widget-title {
  padding-bottom: 0;
}

/* li 是 inline-block 靠基線對齊，SVG 沒有基線會被往上推，改用 flex 對齊 */
.pfl-follow .social-link ul {
  display: flex;
  align-items: center;
}

.pfl-follow .social-link ul li:not(:last-child) {
  padding-right: 16px;
}

.pfl-follow .social-link ul li a {
  font-size: 20px;
  line-height: 1;
}

.pfl-follow .social-link ul li a .pfl-social-svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* footer logo 水平置中；垂直置中交給 .pfl-footer-brand 的 align-items */
.pfl-footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 手機版整塊會堆疊成整欄，logo 置中會跟底下的公司資訊對不齊，改成靠左 */
@media (max-width: 991.98px) {
  .pfl-footer-logo {
    justify-content: flex-start;
  }
}

/* footer 上半部改用固定的上下留白（原本是 section-space-y-axis-100） */
.footer-top {
  padding-top: 50px;
  padding-bottom: 50px;
}

/* footer：logo＋公司資訊、線上客服＋客服信箱各自成一組，組內間距比組間小 */
@media (min-width: 576px) {
  .pfl-footer-brand,
  .pfl-footer-support {
    display: flex;
  }

  .pfl-footer-brand {
    align-items: center;
    gap: 12px;
  }

  .pfl-footer-support {
    gap: 20px;
  }
}

/* 手機版兩組會直向堆疊，補上組內間距 */
@media (max-width: 575.98px) {
  .pfl-footer-support > .widget-item + .widget-item {
    margin-top: 24px;
  }
}

/* 手機版側邊選單底部的搜尋欄，對齊選單本身的左右留白。
   主題把最後一個 li 的 padding-bottom 清成 0，所以間距自己補，跟連結之間一樣是 25px */
.mobile-menu_wrapper .offcanvas-search {
  margin-top: 25px;
  padding: 0 25px;
}

/* 手機版頁碼只剩 3 個，靠右會看起來歪一邊，改成置中
   （主題用 Bootstrap 的 .justify-content-end，帶 !important） */
@media (max-width: 575.98px) {
  .pagination-area .pagination {
    justify-content: center !important;
  }
}

/* 候選圖的高度會跟著上傳圖的比例跑（直式圖會把整條撐高，擠掉與下一區的留白），固定成 1:1 */
.single-product-thumbs .swiper-slide img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ---------- 購物車 ---------- */
/* 表格外框改成跟側邊欄同一種圓角卡片，圓角靠 .table-content 裁切 */
.table-content {
  border: 1px solid var(--pfl-border);
  border-radius: 8px;
  overflow: hidden;
}

.table-content table {
  border-width: 0;
}

.table-content table th,
.table-content table td {
  border-color: var(--pfl-border);
}

.table-content table tr > *:last-child {
  border-right: 0;
}

.table-content table tr:last-child > * {
  border-bottom: 0;
}

.table-content table thead th {
  background-color: var(--pfl-surface);
  color: #555;
}

/* 數量欄在表格裡沒有 flex 父層撐寬度，自己給一個 */
.table-content td.quantity .cart-plus-minus {
  width: 124px;
  margin: 0 auto;
}

.cart-page-total > h2 {
  margin-bottom: 20px;
  padding-left: 12px;
  border-left: 4px solid var(--bs-primary, #ee3231);
  font-size: 20px;
  font-weight: 500;
}

.cart-page-total > ul {
  border: 1px solid var(--pfl-border);
  border-radius: 8px;
  overflow: hidden;
}

.cart-page-total > ul li {
  padding: 12px 20px;
  border-bottom-color: var(--pfl-border);
  font-weight: 400;
}

.cart-page-total > ul li:last-child {
  background-color: var(--pfl-surface);
}

.cart-page-total > ul li:last-child span {
  color: var(--bs-primary, #ee3231);
  font-size: 18px;
  font-weight: 500;
}

/* 結帳鈕改成跟「加入購物車」同一種紅色膠囊 */
.cart-page-total a {
  display: block;
  margin-top: 24px;
  padding: 13px 32px;
  border-radius: 24px;
  background-color: var(--bs-primary, #ee3231);
  font-size: 15px;
  text-align: center;
}

.cart-page-total a:hover {
  background-color: #d12a29;
}

/* ---------- 結帳 ---------- */
/* 區塊標題比照商品內頁分段標題：左側紅槓，不要底線 */
.checkbox-form h3,
.your-order h3 {
  margin: 12px 0 24px;
  padding: 0 0 0 12px;
  border-bottom: 0;
  border-left: 4px solid var(--bs-primary, #ee3231);
  font-size: 20px;
  font-weight: 500;
  text-transform: none;
}

/* 表單欄位跟登入頁同一種膠囊 */
.checkbox-form .checkout-form-list {
  margin-bottom: 18px;
}

.checkbox-form .checkout-form-list label {
  margin-bottom: 8px;
  color: #555;
  font-size: 15px;
}

.checkbox-form .checkout-form-list input[type=text],
.checkbox-form .checkout-form-list input[type=email],
.checkbox-form .checkout-form-list input[type=password],
.checkbox-form .checkout-form-list input[type=number],
.checkbox-form .checkout-form-list .form-control {
  height: 46px;
  padding: 0 18px;
  border: 1px solid #dee2e6;
  border-radius: 23px;
  font-size: 15px;
  transition: border-color 0.2s;
}

.checkbox-form .checkout-form-list textarea {
  padding: 12px 18px;
  border: 1px solid #dee2e6;
  border-radius: 16px;
  font-size: 15px;
}

.checkbox-form .checkout-form-list input:focus,
.checkbox-form .checkout-form-list textarea:focus {
  outline: none;
  border-color: var(--bs-primary, #ee3231);
  box-shadow: none;
}

/* 發票、運送方式的選項清單改成圓角卡片 */
.checkbox-form .checkout-form-list .list-group {
  border-radius: 8px;
  overflow: hidden;
}

.checkbox-form .checkout-form-list .list-group-item {
  padding: 12px 18px;
  border-color: var(--pfl-border);
}

/* 訂單詳情：灰底方塊改成白底圓角卡片 */
.your-order {
  margin-bottom: 40px;
  padding: 28px;
  border: 1px solid var(--pfl-border);
  border-radius: 8px;
  background: #fff;
}

.your-order .your-order-table table thead {
  background-color: var(--pfl-surface);
}

.your-order .your-order-table table thead tr th {
  text-transform: none;
}

.your-order .your-order-table table thead tr th,
.your-order .your-order-table table thead tr td,
.your-order .your-order-table table tbody td {
  border-color: var(--pfl-border);
}

.your-order .your-order-table table .cart_item:hover {
  background: var(--pfl-surface);
}


/* 送出訂單鈕跟購物車的結帳鈕同一種紅色膠囊 */
button.order-button-payment {
  height: 50px;
  border-radius: 25px;
  background-color: var(--bs-primary, #ee3231);
  font-size: 16px;
  text-transform: none;
}

button.order-button-payment:hover {
  background-color: #d12a29;
}

/* 表頭跟內容對齊：項次置中、產品靠左、金額靠右 */
.your-order .your-order-table table thead th:first-child,
.your-order .your-order-table table tbody td:first-child {
  text-align: center;
}

.your-order .your-order-table table thead th:nth-child(2),
.your-order .your-order-table table td.cart-product-name {
  text-align: left;
}

.your-order .your-order-table table thead th:last-child,
.your-order .your-order-table table td.cart-product-total {
  text-align: right;
}



/* 套件把每個表頭都設成 250px，產品名稱那欄會被擠到一直斷行 */
.your-order .your-order-table table th,
.your-order .your-order-table table td {
  width: auto;
  padding: 14px 8px;
}

.your-order .your-order-table table thead th:first-child,
.your-order .your-order-table table tbody td:first-child {
  width: 56px;
}


.your-order .your-order-table table thead th:last-child {
  width: 96px;
}

/* 最後一列的底線跟金額列的上框線會疊成兩條，留金額列那條就好 */
.your-order .your-order-table table tbody tr:last-child td {
  border-bottom: 0;
}

/* 小計到總金額排成同一列，靠右對齊 */
.order-total-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 10px 36px;
  margin: 0;
  padding: 18px 8px 0;
  border-top: 1px solid var(--pfl-border);
  list-style: none;
}

.order-total-row li {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.order-total-row span {
  color: var(--pfl-muted);
  font-size: 15px;
}

.order-total-row strong {
  font-size: 17px;
  font-weight: 500;
}

.order-total-row .is-total span,
.order-total-row .is-total strong {
  color: var(--bs-primary, #ee3231);
}

.order-total-row .is-total strong {
  font-size: 22px;
}

/* 手機版排不下，退回一列一個 */
@media (max-width: 575.98px) {
  .order-total-row li {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}

/* 紅利點數從表格拉出來，欄位樣式跟結帳表單一致 */
.your-order .bonus-points-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--pfl-border);
}

.your-order .bonus-points-section label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-size: 15px;
}

.your-order .bonus-points-section input {
  width: 220px;
  max-width: 100%;
  height: 46px;
  padding: 0 18px;
  border: 1px solid #dee2e6;
  border-radius: 23px;
  font-size: 15px;
}

.your-order .bonus-points-section input:focus {
  outline: none;
  border-color: var(--bs-primary, #ee3231);
}

/* 送出訂單靠右，跟上面的訂單總金額對齊 */
.checkout-submit {
  max-width: 360px;
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .checkout-submit {
    max-width: none;
  }
}

/* 手機版購物車：主題把每個 td 攤成整寬一條，一個商品會變成六條長得一樣的列，
   分不出哪幾條是同一個商品，改成一張卡片 */
@media (max-width: 767.98px) {
  .table-content {
    border: 0;
    border-radius: 0;
    overflow: visible;
  }

  .table-content table,
  .table-content table tbody {
    display: block;
  }

  .table-content table tr {
    position: relative;
    display: grid;
    grid-template-columns: 100px 1fr;
    grid-template-areas:
      "img name"
      "qty subtotal";
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
    /* 右邊留給移除鈕 */
    padding: 16px 42px 16px 16px;
    border: 1px solid var(--pfl-border);
    border-radius: 8px;
  }

  /* 載入中與購物車空了那列只有一個 colspan 儲存格，不要套卡片格線 */
  .table-content table tr:has(td[colspan]) {
    display: block;
    padding: 16px;
  }

  /* 主題用 .cart-area ... td:nth-child(3) 給商品名稱塞了 45px 的上下留白撐版面，
     權重比 .table-content table td 高，要照抄選擇器才蓋得掉 */
  .table-content table td,
  .cart-area .table-content table td:nth-child(3) {
    width: auto;
    padding: 0;
    border: 0;
    text-align: left;
  }

  .table-content table td.product-thumbnail {
    grid-area: img;
    align-self: start;
  }

  .table-content table td.product-name {
    grid-area: name;
    align-self: start;
    font-size: 15px;
  }

  /* 卡片寬度有限，單價可以從商品頁看，留小計就好 */
  .table-content table td.product-price {
    display: none;
  }

  .table-content table td.quantity {
    grid-area: qty;
  }

  .table-content table td.product-subtotal {
    grid-area: subtotal;
    text-align: right;
  }

  /* 移除鈕抽離格線放到右上角，名稱才不會被它擠成一行三個字 */
  .table-content table td.product_remove {
    position: absolute;
    top: 10px;
    right: 12px;
  }

  .table-content table td.product-thumbnail img {
    width: 100px;
    height: 100px;
    border-radius: 6px;
    object-fit: cover;
  }

  /* 沒有表頭，數字要自己標才知道是什麼 */
  .table-content table td.product-subtotal::before {
    content: '小計 ';
    color: var(--pfl-muted);
    font-size: 13px;
    font-weight: 400;
  }

  /* 主題的 margin: 0 auto 會把它推到中間，選擇器要帶 table 才蓋得掉 */
  .table-content table td.quantity .cart-plus-minus {
    width: 100%;
    margin: 0;
  }
}

/* 側邊欄搜尋欄自己一塊，放在分類欄上方；分類欄下方的留白由它自己的 mb-6 負責 */
.sidebar-area .sidebar-search {
  margin-bottom: 20px;
}

/* ---------- 版面 ---------- */
/* 內容少的頁面 footer 會停在畫面中間，改成不足一個畫面高時把 footer 推到底 */
.main-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-wrapper .footer-area {
  margin-top: auto;
}

/* 手機側邊選單的 Logo：主題把這條排成靠右，選擇器要一樣深才蓋得掉 */
.mobile-menu_wrapper .tromic-offcanvas-body .inner-body .tromic-offcanvas-top {
  justify-content: space-between;
  align-items: center;
}

.mobile-menu_wrapper .offcanvas-logo img {
  height: 32px;
  width: auto;
}
