/* ------------------------------------------------------------------
 * 元辰 · WordPress / WooCommerce 适配层
 * 在原设计系统（main.css）基础上，把 Woo 的购物车 / 结账 / 账户页
 * 调成与原站一致的质感。
 * ------------------------------------------------------------------ */

/* ---------- 基础 ---------- */
.yuanchen .woo-page { padding: 60px 0 90px; min-height: 55vh; }
.yuanchen .woo-container { width: min(1180px, calc(100% - 36px)); margin: auto; }
.yuanchen .page-title { font-family: Georgia, "Noto Serif TC", serif; font-size: 34px; margin: 0 0 26px; }
.yuanchen .woo-page-content { line-height: 1.9; opacity: .85; }
.yuanchen .woo-page-content a { border-bottom: 1px solid rgba(29,42,37,.4); }

/* 屏蔽默认主题残留 */
.yuanchen .screen-reader-text { position: absolute !important; }

/* ---------- 按钮 ---------- */
.yuanchen .woocommerce a.button,
.yuanchen .woocommerce button.button,
.yuanchen .woocommerce input.button,
.yuanchen .woocommerce #respond input#submit,
.yuanchen .woocommerce a.button.alt,
.yuanchen .woocommerce button.button.alt,
.yuanchen .woocommerce input.button.alt {
  border: 1px solid #29483c;
  background: #29483c;
  color: #fff;
  padding: 13px 22px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  border-radius: 0;
  font-family: inherit;
}
.yuanchen .woocommerce a.button:hover,
.yuanchen .woocommerce button.button:hover,
.yuanchen .woocommerce input.button:hover,
.yuanchen .woocommerce a.button.alt:hover,
.yuanchen .woocommerce button.button.alt:hover {
  background: #1f372e; color: #fff;
}
.yuanchen .woocommerce a.button:disabled,
.yuanchen .woocommerce button.button:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.yuanchen .woocommerce form .form-row input.input-text,
.yuanchen .woocommerce form .form-row textarea,
.yuanchen .woocommerce form .form-row select,
.yuanchen .woocommerce .select2-container--default .select2-selection--single {
  border: 1px solid rgba(29,42,37,.22);
  background: #fff;
  padding: 12px 13px;
  font-size: 14px;
  border-radius: 0;
  height: auto;
  line-height: 1.4;
  min-height: 44px;
  color: #1d2a25;
}
.yuanchen .woocommerce form .form-row label { font-size: 13px; margin-bottom: 6px; display: block; }
.yuanchen .woocommerce form .form-row .required { color: #a05a4d; text-decoration: none; }
.yuanchen .woocommerce form .form-row-first,
.yuanchen .woocommerce form .form-row-last,
.yuanchen .woocommerce-page form .form-row-first,
.yuanchen .woocommerce-page form .form-row-last { width: 100%; float: none; }

/* ---------- 通知 ---------- */
.yuanchen .woocommerce-message,
.yuanchen .woocommerce-info,
.yuanchen .woocommerce-error {
  border: 1px solid rgba(29,42,37,.16);
  background: #fbf8f2;
  color: #1d2a25;
  padding: 14px 46px 14px 18px;
  margin: 0 0 24px;
  list-style: none;
  font-size: 14px;
  position: relative;
}
.yuanchen .woocommerce-error { border-color: #c98273; background: #faf0ee; }
.yuanchen .woocommerce-message::before,
.yuanchen .woocommerce-info::before { display: none; }
.yuanchen .woocommerce-message .button,
.yuanchen .woocommerce-info .button { float: right; margin-top: -4px; }

/* ---------- 购物车表格 ---------- */
.yuanchen .woocommerce table.shop_table {
  border: 1px solid rgba(29,42,37,.12);
  border-collapse: collapse;
  width: 100%;
  background: #fff;
  font-size: 14px;
}
.yuanchen .woocommerce table.shop_table th {
  text-align: left;
  padding: 14px;
  background: #efe8da;
  font-size: 12px;
  letter-spacing: .08em;
}
.yuanchen .woocommerce table.shop_table td { border-top: 1px solid rgba(29,42,37,.08); padding: 14px; vertical-align: middle; }
.yuanchen .woocommerce table.shop_table img { width: 64px !important; margin: 0; background: #f7f3ec; }
.yuanchen .woocommerce table.shop_table .product-remove a { color: #a05a4d; text-decoration: none; font-size: 18px; }
.yuanchen .woocommerce .quantity .qty {
  border: 1px solid rgba(29,42,37,.22);
  padding: 8px 10px;
  width: 74px;
  font-size: 14px;
}
.yuanchen .woocommerce .cart-collaterals .cart_totals { width: 46%; }
.yuanchen .woocommerce .cart-collaterals h2 { font-family: Georgia, serif; font-size: 24px; }
.yuanchen .woocommerce ul.products::before,
.yuanchen .woocommerce ul.products::after { display: none; }

/* ---------- 结账 ---------- */
.yuanchen .woocommerce-checkout #payment {
  background: #fbf8f2;
  border: 1px solid rgba(29,42,37,.14);
  border-radius: 0;
}
.yuanchen .woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid rgba(29,42,37,.12); padding: 18px; }
.yuanchen .woocommerce-checkout #payment ul.payment_methods li { margin: 0 0 10px; list-style: none; }
.yuanchen .woocommerce-checkout #payment div.payment_box { background: #efe8da; border-radius: 0; font-size: 13px; }
.yuanchen .woocommerce-checkout #payment div.payment_box::before { display: none; }
.yuanchen .woocommerce-checkout .place-order { padding: 18px; }
.yuanchen #add_payment_method #payment,
.yuanchen .woocommerce-cart #payment,
.yuanchen .woocommerce-checkout #payment { border-radius: 0; }

.yuanchen .checkout-page .woocommerce { display: block; }
.yuanchen .checkout h1 { font-family: Georgia, serif; }

/* 两栏结账布局（桌面） */
@media (min-width: 900px) {
  .yuanchen.woocommerce-checkout form.checkout { display: grid; grid-template-columns: 1.25fr .9fr; gap: 44px; align-items: start; }
  .yuanchen.woocommerce-checkout form.checkout #customer_details { grid-column: 1; }
  .yuanchen.woocommerce-checkout form.checkout #customer_details .col-1,
  .yuanchen.woocommerce-checkout form.checkout #customer_details .col-2 { width: 100%; float: none; }
  .yuanchen.woocommerce-checkout form.checkout #order_review_heading,
  .yuanchen.woocommerce-checkout form.checkout #order_review { grid-column: 2; position: sticky; top: 100px; }
  .yuanchen.woocommerce-checkout form.checkout #order_review { background: #fff; border: 1px solid rgba(29,42,37,.12); padding: 22px; box-shadow: 0 14px 40px rgba(39,31,20,.05); }
  .yuanchen.woocommerce-checkout #order_review_heading { margin-top: 0; font-family: Georgia, serif; }
}

/* ---------- 订单详情 / 感谢页 ---------- */
.yuanchen .woocommerce-order-overview,
.yuanchen .woocommerce ul.order_details { background: #fbf8f2; border: 1px solid rgba(29,42,37,.14); padding: 18px; font-size: 14px; }
.yuanchen .woocommerce ul.order_details li { border-right: 1px dashed rgba(29,42,37,.2); padding: 0 14px; list-style: none; }
.yuanchen .woocommerce-order-received h1 { font-family: Georgia, serif; }
.yuanchen .woocommerce-order-received .btn,
.yuanchen .woocommerce-account .woocommerce-MyAccount-navigation-link a {
  display: inline-block;
}
.yuanchen .woocommerce-account .woocommerce-MyAccount-navigation { width: 200px; float: left; margin-right: 34px; }
.yuanchen .woocommerce-account .woocommerce-MyAccount-content { float: left; width: calc(100% - 234px); }
.yuanchen .woocommerce-account .woocommerce::after { content: ""; display: table; clear: both; }
.yuanchen .woocommerce-account .woocommerce-MyAccount-navigation li { list-style: none; margin: 0 0 4px; }
.yuanchen .woocommerce-account .woocommerce-MyAccount-navigation li a {
  display: block; padding: 10px 14px; border: 1px solid rgba(29,42,37,.14); background: #fff; font-size: 14px;
}
.yuanchen .woocommerce-account .woocommerce-MyAccount-navigation li.is-active a { background: #29483c; color: #fff; border-color: #29483c; }

/* ---------- 商城页 ---------- */
.yuanchen .woo-shop-page { padding-top: 88px; }
.yuanchen .woo-shop-page .product-grid { margin-top: 8px; }

/* ---------- 商品详情图片 ---------- */
.yuanchen .detail-thumbs button.active { border-color: #29483c; }
.yuanchen #mainProductImage img,
.yuanchen .detail-main-image img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- 移动端 ---------- */
@media (max-width: 700px) {
  .yuanchen .woocommerce-account .woocommerce-MyAccount-navigation,
  .yuanchen .woocommerce-account .woocommerce-MyAccount-content { float: none; width: 100%; margin: 0 0 24px; }
  .yuanchen .woocommerce .cart-collaterals .cart_totals { width: 100%; }
  .yuanchen .woocommerce table.shop_table_responsive tr td { text-align: right !important; }
  .yuanchen .woocommerce table.shop_table_responsive tr td::before { font-size: 12px; opacity: .6; }
}

/* ---------- 杂项 ---------- */
.yuanchen .woocommerce-result-count { font-size: 13px; opacity: .6; }
.yuanchen .woocommerce-tabs ul.tabs li { list-style: none; }
.yuanchen .woocommerce-Reviews .comment-form-rating .stars { display: inline-block; }
.yuanchen select { max-width: 100%; }
.yuanchen img { max-width: 100%; height: auto; }
