/* ==========================================================================
   GOALDEALLIVE · WooCommerce 页面样式
   目标：让商品列表 / 商品详情 / 购物车 / 结算 / 我的账户
   全部沿用模板的视觉语言（圆角卡片 + 原版配色），并把 Woo 默认的
   浮动栅格改成 CSS Grid。
   品牌色：原模板主粉 #A07A28 / 橙 #B99248
   ========================================================================== */

/* ---------------------------------------------------------------- 通用按钮 */

.gdl-woo-wrap .button,
.gdl-woo-wrap button.button,
.gdl-woo-wrap input[type="submit"].button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border: 0;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.gdl-woo-wrap .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  background: #A07A28;
  color: #ffffff;
}

.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background: #A07A28;
  color: #ffffff;
}

.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  background: #000000;
}

.woocommerce a.button.disabled,
.woocommerce button.button:disabled,
.woocommerce button.button[disabled] {
  background: #c9c9c9;
  color: #ffffff;
}

/* ---------------------------------------------------------------- 商品网格 */

.gdl-woo-wrap ul.products,
.gdl-products ul.products,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gdl-woo-wrap ul.products::before,
.gdl-woo-wrap ul.products::after,
.gdl-products ul.products::before,
.gdl-products ul.products::after,
.woocommerce ul.products::before,
.woocommerce ul.products::after {
  content: none;
  display: none;
}

.gdl-woo-wrap ul.products li.product,
.gdl-products ul.products li.product,
.woocommerce ul.products li.product {
  width: 100% !important;
  float: none !important;
  margin: 0 !important;
  clear: none !important;
  text-align: left;
}

/* 商品卡缩略图 */
.product-block .image-box .gdl-product-thumb {
  display: block;
  overflow: hidden;
  border-radius: 16px;
  background: #F7F7F7;
}

.product-block .image-box .gdl-product-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-block:hover .image-box .gdl-product-thumb img {
  transform: scale(1.05);
}

/* 不可 AJAX 加购时（可变商品）的「选择规格」按钮 */
/* ---------------------------------------------------------------- 商品卡片 */

/* 悬停加购按钮容器：app.css 用 left:16px + width:92% 导致左右内边距不等、按钮偏右；改为左右等距 */
.product-block .image-box .shopping-btns {
  left: 16px;
  right: 16px;
  width: auto;
}

.product-block .image-box .shopping-btns .cart-button-goto {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  background: #000000;
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.product-block .image-box .shopping-btns .cart-button-goto:hover {
  background: #A07A28;
  color: #ffffff;
}

/* 商品卡价格 */
.product-block .content-box .gdl-price {
  font-family: "Maven Pro", sans-serif;
  font-size: 18px;
  font-weight: 600;
}

.product-block .content-box .gdl-price del {
  margin-right: 8px;
  color: #9a9a9a;
  font-weight: 400;
  text-decoration: line-through;
}

.product-block .content-box .gdl-price ins {
  color: #000000;
  font-weight: 700;
  text-decoration: none;
}

/* 加购中的加载态 */
.product-block .image-box .shopping-btns .cart-button.loading {
  opacity: 0.6;
  pointer-events: none;
}

.product-block .image-box .shopping-btns .cart-button.added::after {
  content: "✓";
  margin-left: 8px;
}

/* ---------------------------------------------------------------- 列表页工具条 */

.gdl-woo-wrap .woocommerce-result-count {
  margin: 0 0 24px;
  color: #808080;
  font-size: 14px;
}

.gdl-woo-wrap .woocommerce-ordering {
  margin: 0 0 24px;
}

.gdl-woo-wrap .woocommerce-ordering select {
  height: 48px;
  padding: 0 40px 0 18px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background-color: #ffffff;
  color: #000000;
}

.gdl-woo-wrap .woocommerce-notices-wrapper {
  width: 100%;
}

/* Woo 的翻页 */
.woocommerce nav.woocommerce-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 48px 0 0;
  padding: 0;
  border: 0;
}

.woocommerce nav.woocommerce-pagination ul li {
  border: 0;
  margin: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  color: #000000;
  font-weight: 500;
  text-decoration: none;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
  border-color: #000000;
  background: #000000;
  color: #ffffff;
}

/* ---------------------------------------------------------------- 提示条 */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  padding: 18px 24px 18px 52px;
  margin-bottom: 24px;
  border: 0;
  border-left: 4px solid #A07A28;
  border-radius: 12px;
  background: #F7F7F7;
  color: #000000;
  list-style: none;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
  top: 18px;
  left: 18px;
  color: #A07A28;
}

.woocommerce-error {
  border-left-color: #c0392b;
}

.woocommerce-error::before {
  color: #c0392b;
}

.woocommerce-message .button,
.woocommerce-info .button {
  float: right;
  padding: 8px 20px;
  font-size: 13px;
}

/* ---------------------------------------------------------------- 商品详情 */

.gdl-woo-wrap.single-product .product {
  display: block;
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  margin-bottom: 40px;
}

.woocommerce div.product div.images {
  width: 100%;
}

/* 移动端详情页强制单列 + 主图满宽 + 缩略图一行 4 个（防止 Woo smallscreen 与主题样式打架产生半栏布局） */
@media (max-width: 767px) {
  .woocommerce div.product div.images,
  .woocommerce div.product div.summary {
    float: none !important;
    width: 100% !important;
    clear: both !important;
  }

  .woocommerce div.product div.images img {
    width: 100% !important;
  }

  .woocommerce div.product div.images .flex-control-thumbs li {
    width: calc(25% - 9px) !important;
  }
}

/* 桌面端：图库左栏 48%，摘要（标题/价格/加购）右栏；Woo 默认 float 布局 */
@media (min-width: 768px) {
  .woocommerce div.product div.images {
    width: 48%;
    float: left;
  }

  .woocommerce div.product div.summary {
    width: 48%;
    float: right;
  }

  .woocommerce div.product form.cart .variations,
  .woocommerce div.product form.cart .button,
  .woocommerce div.product p.cart {
    clear: both;
  }
}

.woocommerce div.product div.images img {
  border-radius: 20px;
}

.woocommerce div.product div.images .flex-control-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}

.woocommerce div.product div.images .flex-control-thumbs li {
  width: calc(25% - 9px);
  margin: 0;
}

.woocommerce div.product div.images .flex-control-thumbs img {
  border: 1px solid #e6e6e6;
  border-radius: 12px;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.woocommerce div.product div.images .flex-control-thumbs img.flex-active,
.woocommerce div.product div.images .flex-control-thumbs img:hover {
  border-color: #A07A28;
  opacity: 1;
}

.woocommerce div.product .product_title {
  margin-bottom: 16px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: clamp(26px, 2vw, 40px);
  font-weight: 700;
  line-height: 1.25;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  margin-bottom: 20px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: 26px;
  font-weight: 700;
}

.woocommerce div.product p.price del,
.woocommerce div.product span.price del {
  color: #9a9a9a;
  font-weight: 400;
}

.woocommerce div.product p.price ins,
.woocommerce div.product span.price ins {
  text-decoration: none;
}

.woocommerce div.product .woocommerce-product-details__short-description {
  margin-bottom: 24px;
  color: #464646;
  line-height: 1.8;
}

.woocommerce div.product .woocommerce-product-rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.woocommerce div.product form.cart {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
}

.woocommerce div.product form.cart div.quantity {
  margin: 0;
}

.woocommerce .quantity input.qty,
.woocommerce div.product form.cart .quantity input.qty {
  width: 88px;
  height: 52px;
  padding: 0 12px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  text-align: center;
}

.woocommerce div.product form.cart .button,
.woocommerce div.product form.cart .single_add_to_cart_button {
  height: 52px;
  padding: 0 44px;
}

.woocommerce div.product .product_meta {
  padding-top: 20px;
  border-top: 1px solid #ececec;
  color: #808080;
  font-size: 14px;
}

.woocommerce div.product .product_meta > span {
  display: block;
  margin-bottom: 8px;
}

.woocommerce div.product .product_meta a {
  color: #000000;
}

.woocommerce div.product .product_meta a:hover {
  color: #A07A28;
}

/* 详情页标签页 */
.woocommerce div.product .woocommerce-tabs {
  clear: both;
  margin-top: 48px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 24px;
  padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs::before {
  display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
  margin: 0;
  padding: 0;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  background: #ffffff;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
  display: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  padding: 12px 28px;
  color: #000000;
  font-weight: 600;
  text-decoration: none;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
  border-color: #000000;
  background: #000000;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: #ffffff;
}

.woocommerce div.product .woocommerce-tabs .panel {
  margin: 0;
  padding: 32px;
  border-radius: 16px;
  background: #F7F7F7;
  color: #464646;
  line-height: 1.85;
}

.woocommerce div.product .woocommerce-tabs .panel h2 {
  margin-bottom: 16px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

/* 相关商品 / 推荐商品 */
.woocommerce .related.products,
.woocommerce .upsells.products,
.woocommerce .cross-sells {
  clear: both;
  margin-top: 64px;
}

.woocommerce .related.products > h2,
.woocommerce .upsells.products > h2,
.woocommerce .cross-sells > h2 {
  margin-bottom: 32px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: clamp(22px, 1.6vw, 32px);
  font-weight: 700;
}

/* 星级评分改成品牌金 */
.woocommerce .star-rating span::before,
.woocommerce p.stars a::before,
.woocommerce p.stars a:hover ~ a::before {
  color: #A07A28;
}

.woocommerce .star-rating::before {
  color: #dedede;
}

/* ---------------------------------------------------------------- 购物车与结算 */

.woocommerce-cart .gdl-woo-wrap .woocommerce,
.woocommerce-checkout .gdl-woo-wrap .woocommerce {
  display: block;
}

.woocommerce table.shop_table {
  border: 1px solid #ececec;
  border-radius: 16px;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.woocommerce table.shop_table th {
  padding: 16px;
  background: #F7F7F7;
  color: #000000;
  font-weight: 600;
}

.woocommerce table.shop_table td {
  padding: 16px;
  border-top: 1px solid #ececec;
  vertical-align: middle;
}

.woocommerce table.cart img {
  width: 80px;
  border-radius: 12px;
}

.woocommerce table.cart td.actions .coupon {
  display: flex;
  gap: 12px;
  float: none;
}

.woocommerce table.cart td.actions .coupon .input-text {
  height: 48px;
  padding: 0 18px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  min-width: 200px;
  background: #ffffff;
}

.woocommerce table.cart td.actions > .button {
  float: none;
}

.woocommerce .cart-collaterals {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin-top: 40px;
}

.woocommerce .cart-collaterals .cart_totals,
.woocommerce .cart-collaterals .cross-sells {
  float: none;
  width: 100%;
  max-width: 520px;
  margin-left: auto;
  flex: 1 1 380px;
}

.woocommerce .cart-collaterals .cart_totals h2 {
  margin-bottom: 16px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.woocommerce .cart-collaterals .cart_totals table {
  width: 100%;
}

.woocommerce-checkout .col2-set {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
  float: none;
  width: 100%;
  flex: 1 1 380px;
}

.woocommerce-checkout h3 {
  margin-bottom: 16px;
  color: #000000;
  font-family: "Maven Pro", sans-serif;
  font-size: 22px;
  font-weight: 700;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce-page form .form-row select {
  height: 52px;
  padding: 0 18px;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  background: #ffffff;
  color: #000000;
}

.woocommerce form .form-row textarea,
.woocommerce-page form .form-row textarea {
  height: auto;
  padding: 14px 18px;
}

.woocommerce form .form-row label {
  margin-bottom: 6px;
  color: #000000;
  font-weight: 500;
}

.woocommerce-checkout #order_review_heading {
  margin-top: 32px;
}

.woocommerce-checkout #order_review {
  padding: 24px;
  border-radius: 16px;
  background: #F7F7F7;
}

.woocommerce-checkout #place_order {
  width: 100%;
  margin-top: 16px;
}

/* ---------------------------------------------------------------- 我的账户 */

.woocommerce-account .woocommerce-MyAccount-navigation {
  float: none;
  width: 100%;
  margin-bottom: 32px;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
  margin: 0;
  padding: 0;
  border: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
  display: inline-block;
  padding: 10px 22px;
  border: 1px solid #e0e0e0;
  border-radius: 999px;
  color: #000000;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
  border-color: #000000;
  background: #000000;
  color: #ffffff;
}

.woocommerce-account .woocommerce-MyAccount-content {
  float: none;
  width: 100%;
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1199px) {
  .gdl-woo-wrap ul.products,
  .gdl-products ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gdl-woo-wrap ul.products,
  .gdl-products ul.products,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 16px;
  }

  .woocommerce .cart-collaterals .cart_totals {
    margin-left: 0;
  }

  .woocommerce table.shop_table_responsive tr td {
    text-align: right;
  }
}

@media (max-width: 575px) {
  .woocommerce div.product form.cart .button,
  .woocommerce div.product form.cart .single_add_to_cart_button {
    width: 100%;
  }

  .woocommerce div.product .woocommerce-tabs .panel {
    padding: 20px;
  }

  .woocommerce nav.woocommerce-pagination ul li a,
  .woocommerce nav.woocommerce-pagination ul li span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
  }
}

/* ---------------------------------------------------------------
   Size Guide 尺寸表弹窗（v1.1.9，inc/size-guide.php）
   --------------------------------------------------------------- */
.gdl-sg-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
  color: #A07A28;
  text-decoration: none;
  border-bottom: 1px dashed #A07A28;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.gdl-sg-trigger:hover {
  color: #000000;
  border-color: #000000;
}

.gdl-sg-trigger .svg-icon {
  font-size: 15px;
}

/* ---------------------------------------------------------------
   Size 胶囊选择器（v1.1.12，inc/size-swatches.php）
   Size 标签与 Size chart 链接同一行，胶囊在下方；选中黑底白字。
   --------------------------------------------------------------- */
.woocommerce div.product form.cart table.variations {
  margin-bottom: 6px;
}

.woocommerce div.product form.cart table.variations th.label {
  vertical-align: top;
  padding-top: 2px;
}

.woocommerce div.product form.cart table.variations td.value {
  vertical-align: top;
  padding-top: 0;
}

.gdl-size-swatches {
  margin: 2px 0 4px;
}

/* 胶囊行接管「Size」标签：隐藏原 th，让 td 占满整行（标签由组件自己输出） */
.woocommerce div.product form.cart table.variations tr:has(.gdl-size-swatches) th.label {
  display: none;
}

.gdl-size-swatches__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 22px;
  margin-top: 2px;
}

.gdl-size-swatches__label {
  font-size: 14px;
  font-weight: 700;
  color: #1f2024;
}

.gdl-size-swatches__head:empty {
  display: none;
}

.gdl-size-swatches .gdl-sg-trigger--row {
  margin-top: 0;
  font-size: 13px;
  gap: 5px;
}

.gdl-size-swatches .gdl-sg-trigger--row i {
  font-size: 13px;
}

.gdl-size-swatches__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.gdl-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 42px;
  padding: 0 20px;
  border: 1px solid #cfcfcf;
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  color: #1f2024;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.gdl-swatch:hover {
  border-color: #1f2024;
}

.gdl-swatch:focus-visible {
  outline: 2px solid #A07A28;
  outline-offset: 2px;
}

.gdl-swatch.is-selected {
  background: #17181c;
  border-color: #17181c;
  color: #fff;
}

.gdl-size-swatches__select {
  display: none;
}

@media (max-width: 575px) {
  .gdl-size-swatches__pills {
    gap: 8px;
  }

  .gdl-swatch {
    min-width: 48px;
    height: 40px;
    padding: 0 16px;
    font-size: 13.5px;
  }
}


body.gdl-sg-lock {
  overflow: hidden;
}

.gdl-sg-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100050;
}

.gdl-sg-modal.is-open {
  display: block;
}

.gdl-sg-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.gdl-sg-dialog {
  position: relative;
  width: min(1040px, 94vw);
  max-height: 90vh;
  margin: 5vh auto;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.35);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.gdl-sg-close {
  position: sticky;
  top: 10px;
  float: right;
  margin: 10px 12px 0 0;
  width: 36px;
  height: 36px;
  line-height: 34px;
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  background: #fff;
  color: #4a5568;
  font-size: 22px;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s ease, color 0.2s ease;
}

.gdl-sg-close:hover {
  background: #000000;
  border-color: #000000;
  color: #fff;
}

.gdl-sg-body {
  padding: 8px 24px 24px;
}

@media (max-width: 575px) {
  .gdl-sg-dialog {
    width: 96vw;
    margin: 3vh auto;
  }

  .gdl-sg-body {
    padding: 4px 14px 18px;
  }
}

/* ---------------------------------------------------------------
   商品系列页横幅改纯黑（v1.1.11：分类/标签/商店页共用横幅图 → 黑色）
   --------------------------------------------------------------- */
.tax-product_cat .title-banner,
.tax-product_tag .title-banner,
.post-type-archive-product .title-banner {
  background: #000;
}
