/*頁首*/
#masthead {
  position: sticky;
  top: 0;
  z-index: 9999;
  background-color: rgba(250, 240, 214, 0.85); /* 半透明 */
 backdrop-filter: blur(12px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.3s ease;
}

/*商品圖片*/

/* 列表頁 / 縮略圖 */
.woocommerce ul.products li.product img,
.woocommerce .related.products img,
.woocommerce .upsells.products img,
.wc-block-grid__product-image img,
.astra-shop-thumbnail-wrap img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background-color: #fff;
}

/* 單頁主圖 */
.woocommerce-product-gallery__image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    background-color: #fff;
}

/* 移除 aspect-ratio，讓容器自動適應 */


/*彈跳視窗*/
#my-popup-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 9998;
}
#my-popup {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  padding: 20px 30px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  border-radius: 8px;
  display: none;
  z-index: 9999;
  max-width: 400px;
  font-size: 16px;
}
#my-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  cursor: pointer;
  font-weight: bold;
  font-size: 18px;
}

/*輪播圖*/
/* 桌機高度固定 500px */
@media (min-width: 1025px) {
  .elementor-background-slideshow {
    height: 500px !important;
  }
}

/* 手機高度固定 300px */
@media (max-width: 1024px) {
  .elementor-background-slideshow {
    height: 300px !important;
  }
}
/*隱藏控制台歡迎語*/

.woocommerce-MyAccount-content > p:nth-of-type(1),
.woocommerce-MyAccount-content > p:nth-of-type(2) {
    display: none;
}


/*會員功能列icon*/
/* 我的帳戶功能列 */
.woocommerce-MyAccount-navigation li a::before {
    display: inline-block;
    width: 20px;  /* icon 寬度 */
    margin-right: 8px;
    text-align: center;
}

/* 對應每個選單 */
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--dashboard a::before {
    content: "⚙️";  /* 齒輪 emoji */
}
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--orders a::before {
    content: "🛒";  /* 訂單 icon */
}
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-address a::before {
    content: "🏠";  /* 地址 icon，可改 emoji */
}
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--edit-account a::before {
    content: "👤";  /* 帳戶詳細資料 icon */
}
.woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout a::before {
    content: "🚪";  /* 登出 icon */
}

/* 會員 */
.custom-dashboard .dashboard-cards {
    display: flex;              /* 讓子元素水平排列 */
    gap: 20px;                  /* 卡片之間間距 */
    flex-wrap: wrap;            /* 螢幕太小時自動換行 */
}

/* 卡片樣式 */
.custom-dashboard .card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    flex: 1;                    /* 平分可用空間 */
    min-width: 200px;           /* 最小寬度，避免卡片太小 */
    text-align: center;
}

@media (max-width: 768px) {
    .custom-dashboard .dashboard-cards {
        flex-direction: column;
        gap: 15px;
    }
}

/*會員-訂單*/
.recent-orders-header {
    display: flex;
    justify-content: space-between; /* 左右對齊 */
    align-items: center;
    margin-bottom: 15px;
}

.recent-orders-header h3 {
    margin: 0;
}

.recent-orders-header .view-all-orders {
    text-decoration: none;
    color: #007cba;
    font-weight: bold;
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.recent-orders-header .view-all-orders:hover {
    background: #007cba;
    color: #fff;
}

.recent-orders-table {
    width: 100%;
    border-collapse: collapse;
}

.recent-orders-table th,
.recent-orders-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}

.recent-orders-table th {
    background-color: #f2f2f2;
}

.recent-orders-table a {
    color: #007cba;
    text-decoration: none;
}


/* 預設隱藏 */
.add_to_quote {
  display: none !important;
}

/* 只在 slug 為 custom-product 的分類顯示 */
.product_cat-custom-product .add_to_quote {
  display: inline-block !important;
}

/* 隱藏 WooCommerce My Account 上傳 Avatar 按鈕 */
.woocommerce-account .woocommerce-account-gravatar__edit-wrapper {
    display: none !important;
}

/* 結帳頁「運送方式」欄位縮小 */
.woocommerce-checkout-review-order-table th {
  width: 20px;  /* 自行調整數值 */
}




/* 移除 ul 預設縮排 */
.woocommerce-shipping-methods {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* 每個 li 一行靠左排列 */
.woocommerce-shipping-methods li {
  margin: 4px 0;
  text-align: left;        /* 確保靠左 */
  display: block !important;
}

/* radio 與文字對齊 */
.woocommerce-shipping-methods input[type="radio"] {
  vertical-align: middle;  /* 垂直置中 */
  margin-right: 6px;       /* 與文字間隔 */
  position: relative;      /* 保持預設樣式 */
}

/* label 文字靠左且不被擠壓 */
.woocommerce-shipping-methods label {
  display: inline-block;
  vertical-align: middle;
  margin: 0;
	white-space: nowrap;
}

.woocommerce-shipping-totals td {
  width: auto;
}

