/* ==========================================================================
   CARSCAM 行車王 — 商城樣式（取代 WooCommerce 預設 CSS）
   ========================================================================== */

/* ---------- 共用：價格、星等、通知、按鈕 ---------- */
.price, .amount { font-family: var(--font-display); font-variant-numeric: tabular-nums; }
.price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 800; color: var(--ink); }
.price del { order: 2; color: var(--muted); font-weight: 500; font-size: .82em; opacity: .9; }
.price ins { text-decoration: none; color: var(--red); }
.woocommerce-Price-currencySymbol { font-size: .8em; margin-right: 1px; }

.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1em; font-size: 14px; line-height: 1; overflow: hidden; }
.star-rating::before { content: "★★★★★"; position: absolute; inset: 0; color: var(--line-2); letter-spacing: .08em; }
.star-rating span { position: absolute; inset: 0 auto 0 0; overflow: hidden; text-indent: -999em; }
.star-rating span::before { content: "★★★★★"; position: absolute; inset: 0; color: #f5a524; letter-spacing: .08em; text-indent: 0; }

.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, .wc-block-components-notice-banner {
	position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin: 0 0 24px;
	padding: 18px 22px 18px 52px; border-radius: var(--radius-s); background: var(--card); box-shadow: 0 0 0 1px var(--line);
	list-style: none; font-size: 15px; line-height: 1.6;
}
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before {
	content: ""; position: absolute; left: 20px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: #1f9d55;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat, linear-gradient(#000, #000);
	mask-composite: exclude; -webkit-mask-composite: xor;
}
.woocommerce-info::before { background: var(--ink); }
.woocommerce-error::before { background: var(--red); }
.woocommerce-error { display: block; }
.woocommerce-error li + li { margin-top: 6px; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; margin-left: auto; }
.woocommerce-info a:not(.button), .woocommerce-message a:not(.button) { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce .button,
a.button, button.button, .wc-forward {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
	border: 1.5px solid var(--ink); border-radius: 999px; background: var(--ink); color: #fff;
	font-size: 15px; font-weight: 700; letter-spacing: .04em; line-height: 1; cursor: pointer; text-decoration: none;
	transition: background .25s, border-color .25s, color .25s, transform .2s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, a.button:hover, button.button:hover { background: var(--red); border-color: var(--red); color: #fff; }
.woocommerce .button.alt, .woocommerce button.button.alt, .single_add_to_cart_button, #place_order, .checkout-button {
	background: var(--red) !important; border-color: var(--red) !important; color: #fff !important;
}
.woocommerce .button.alt:hover, .single_add_to_cart_button:hover, #place_order:hover, .checkout-button:hover { background: var(--red-d) !important; border-color: var(--red-d) !important; }
.button:disabled, .button.disabled, .button[disabled] { opacity: .45; cursor: not-allowed; }
.button.loading { position: relative; color: transparent !important; pointer-events: none; }
.button.loading::after { content: ""; position: absolute; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: cc-spin .7s linear infinite; }
@keyframes cc-spin { to { transform: rotate(360deg); } }

/* ---------- 表單 ---------- */
.woocommerce form .form-row { display: flex; flex-direction: column; gap: 8px; margin: 0 0 18px; padding: 0; }
.woocommerce form .form-row label { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.4; }
.woocommerce form .form-row .required { color: var(--red); text-decoration: none; border: 0; }
.woocommerce form .form-row .optional { color: var(--muted); font-weight: 400; }
.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: calc(50% - 8px); }
.woocommerce form .form-row-first { float: left; } .woocommerce form .form-row-last { float: right; }
.woocommerce form .form-row-wide, .woocommerce form .form-row.notes { clear: both; width: 100%; }
.woocommerce-billing-fields__field-wrapper::after, .woocommerce-shipping-fields__field-wrapper::after, .woocommerce-address-fields__field-wrapper::after { content: ""; display: table; clear: both; }
input.input-text, .woocommerce form input[type=text], .woocommerce form input[type=email], .woocommerce form input[type=tel], .woocommerce form input[type=password],
.woocommerce form input[type=number], .woocommerce form select, .woocommerce form textarea, select.orderby, .woocommerce-input-wrapper input, .woocommerce-input-wrapper select, .woocommerce-input-wrapper textarea, .tm-extra-product-options select, .tm-extra-product-options input[type=text] {
	width: 100%; min-height: 50px; padding: 12px 16px; border: 1.5px solid var(--line-2); border-radius: 12px; background: var(--card);
	font-size: 16px; line-height: 1.4; transition: border-color .2s, box-shadow .2s; appearance: none; -webkit-appearance: none;
}
.woocommerce form textarea { min-height: 120px; resize: vertical; }
.woocommerce form select, select.orderby {
	padding-right: 44px; cursor: pointer;
	background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%230e0f10' stroke-width='1.6'/%3E%3C/svg%3E") right 18px center no-repeat;
}
input.input-text:focus, .woocommerce form input:focus, .woocommerce form select:focus, .woocommerce form textarea:focus, select.orderby:focus {
	outline: none; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(14,15,16,.08);
}
.woocommerce form .form-row.woocommerce-invalid input, .woocommerce form .form-row.woocommerce-invalid select { border-color: var(--red); }
.woocommerce form .form-row.woocommerce-validated input { border-color: #1f9d55; }
.woocommerce form .form-row input[type=checkbox], .woocommerce form .form-row input[type=radio], .wc_payment_method input[type=radio], #ship-to-different-address input { width: 18px; height: 18px; accent-color: var(--red); margin: 0 8px 0 0; vertical-align: -3px; }
.woocommerce form .woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; font-weight: 600; cursor: pointer; }
.select2-container .select2-selection--single { height: 50px !important; border: 1.5px solid var(--line-2) !important; border-radius: 12px !important; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 47px !important; padding-left: 16px !important; }
.select2-container .select2-selection--single .select2-selection__arrow { height: 48px !important; right: 10px !important; }
.select2-dropdown { border: 1.5px solid var(--ink) !important; border-radius: 12px !important; overflow: hidden; }
.select2-results__option--highlighted { background: var(--ink) !important; }

.quantity { display: inline-flex; align-items: center; height: 56px; border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--card); overflow: hidden; }
.quantity .qty { width: 64px; height: 100%; border: 0; background: none; text-align: center; font: 700 17px/1 var(--font-display); -moz-appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cc-qty-btn { width: 44px; height: 100%; border: 0; background: none; font: 400 22px/1 var(--font-display); color: var(--ink); transition: background .2s; }
.cc-qty-btn:hover { background: var(--paper); }

/* ---------- 商品卡 ---------- */
ul.products { list-style: none; margin: 0; padding: 0; }
.cc-grid { display: grid; gap: clamp(16px, 1.8vw, 24px); }
.cc-grid--4, .cc-shop ul.products, .related ul.products, .upsells ul.products, .cross-sells ul.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 1.8vw, 24px); }
.cc-shop ul.products { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1100px) { .cc-grid--4, .related ul.products, .upsells ul.products, .cross-sells ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) { .cc-grid--4, .cc-shop ul.products, .related ul.products, .upsells ul.products, .cross-sells ul.products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 380px) { .cc-grid--4, .cc-shop ul.products { grid-template-columns: 1fr; } }

.cc-card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--card); overflow: hidden; transition: box-shadow .5s var(--ease), transform .5s var(--ease); }
.cc-card:hover { box-shadow: 0 28px 56px -32px rgba(14,15,16,.4); transform: translateY(-4px); }
.cc-card__media { position: relative; display: block; aspect-ratio: 1 / 1; background: var(--photo); overflow: hidden; }
.cc-card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 8%; mix-blend-mode: multiply; transition: transform .9s var(--ease), opacity .5s; }
.cc-card__img--alt { opacity: 0; }
.cc-card:hover .cc-card__img { transform: scale(1.06); }
.cc-card:hover .cc-card__img--alt { opacity: 1; }
.cc-card:hover .cc-card__img:not(.cc-card__img--alt):has(+ .cc-card__img--alt) { opacity: 0; }
.cc-card__badges { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.cc-card__body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; }
.cc-card__cat { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
.cc-card__title { font-size: 16px; font-weight: 700; line-height: 1.55; letter-spacing: .02em; }
.cc-card__title a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cc-card__specs { font-size: 13px; color: var(--muted); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cc-card__specs span { margin: 0 2px; color: var(--line-2); }
.cc-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 14px; }
.cc-card__price .price { font-size: 18px; }
.cc-card .cc-card__add, .cc-card .button {
	position: relative; z-index: 2; min-height: 40px; padding: 0 14px; font-size: 13px; border-color: var(--line-2); background: transparent; color: var(--ink);
}
.cc-card .cc-card__add:hover, .cc-card .button:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.cc-card .added_to_cart { position: relative; z-index: 2; font-size: 13px; font-weight: 700; color: var(--red); white-space: nowrap; }
.cc-card .button.added { display: none; }
.cc-card.outofstock .cc-card__img { opacity: .55; }
@media (max-width: 640px) {
	.cc-card__body { padding: 14px 14px 16px; }
	.cc-card__title { font-size: 14px; }
	.cc-card__specs { display: none; }
	.cc-card__foot { flex-direction: column; align-items: flex-start; }
	.cc-card__price .price { font-size: 16px; }
	.cc-card .cc-card__add, .cc-card .button { width: 100%; }
}

/* ---------- 商品列表頁 ---------- */
.cc-page-head--shop { padding-bottom: 32px; }
.cc-shop { padding-bottom: clamp(64px, 8vw, 120px); }
.cc-shop__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.cc-shop__bar .woocommerce-notices-wrapper { flex-basis: 100%; }
.woocommerce-result-count { margin: 0; color: var(--muted); font-size: 14px; }
.woocommerce-ordering { margin: 0; }
.woocommerce-ordering select.orderby { min-height: 44px; width: auto; min-width: 200px; border-radius: 999px; font-size: 14px; }
.woocommerce-pagination { margin-top: 56px; }
.woocommerce-pagination ul { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; list-style: none; }
.woocommerce-pagination .page-numbers { display: inline-grid; place-items: center; min-width: 48px; height: 48px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); font: 600 15px/1 var(--font-display); }
.woocommerce-pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.woocommerce-no-products-found .woocommerce-info { margin-top: 24px; }

/* ---------- 單一商品 ---------- */
.cc-product-wrap { padding-top: clamp(24px, 3vw, 40px); }
.cc-product-wrap > .cc-crumbs { margin-bottom: 24px; }
.cc-product__top { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.cc-product__gallery { position: sticky; top: calc(var(--header-h) + 24px); }
.cc-product__gallery .onsale, .cc-product__gallery > .cc-badge { position: absolute; top: 20px; left: 20px; z-index: 5; }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery .flex-viewport, .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:only-child { border-radius: var(--radius); background: var(--photo); overflow: hidden; }
.woocommerce-product-gallery__image { background: var(--photo); }
.woocommerce-product-gallery__image a { display: block; }
.woocommerce-product-gallery__image img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; }
.woocommerce-product-gallery__trigger {
	position: absolute; top: 18px; right: 18px; z-index: 9; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
	background: var(--card); text-indent: -999em; overflow: hidden; box-shadow: var(--shadow);
}
.woocommerce-product-gallery__trigger::before { content: ""; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 50%; transform: translate(-1px, -1px); }
.woocommerce-product-gallery__trigger::after { content: ""; position: absolute; width: 7px; height: 2px; background: var(--ink); transform: translate(6px, 7px) rotate(45deg); left: 50%; top: 50%; }
.flex-control-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px !important; list-style: none; }
.flex-control-thumbs li { border-radius: 12px; overflow: hidden; background: var(--photo); }
.flex-control-thumbs img { aspect-ratio: 1 / 1; object-fit: contain; mix-blend-mode: multiply; opacity: .55; cursor: pointer; transition: opacity .25s; }
.flex-control-thumbs img.flex-active, .flex-control-thumbs img:hover { opacity: 1; }
.flex-control-thumbs li:has(.flex-active) { box-shadow: inset 0 0 0 2px var(--ink); }

.cc-product__summary { padding-top: 8px; }
.cc-product__summary .product_title { font-size: clamp(26px, 2.8vw, 40px); font-weight: 900; line-height: 1.3; }
.cc-product__summary .woocommerce-product-rating { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; color: var(--muted); }
.cc-product__summary > .price { margin: 20px 0 0; font-size: clamp(26px, 2.4vw, 34px); }
.cc-product__summary .woocommerce-product-details__short-description { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 15px; color: var(--ink-2); line-height: 1.85; }
.cc-specs { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.cc-specs li { position: relative; padding-left: 20px; }
.cc-specs li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 2px; background: var(--red); transform: rotate(45deg); }
.cc-note { margin-top: 18px; padding: 14px 16px; border-radius: 12px; background: #fff7d6; color: #5c4a00; font-size: 13px; line-height: 1.7; }
.cc-note--ok { background: #e9f7ee; color: #0d5a2c; }
.cc-product__summary form.cart { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 28px; }
.cc-product__summary form.cart .tm-extra-product-options, .cc-product__summary form.cart > div:not(.quantity) { flex-basis: 100%; }
.cc-product__summary .single_add_to_cart_button { flex: 1; min-height: 56px; font-size: 16px; }
.cc-product__summary .stock { margin-top: 16px; font-size: 14px; font-weight: 700; }
.cc-product__summary .stock.out-of-stock { display: inline-block; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; }
.cc-product__summary .stock.in-stock { color: #1f9d55; }
.variations { width: 100%; margin-bottom: 8px; border-collapse: collapse; }
.variations th, .variations td { display: block; padding: 0 0 8px; text-align: left; }
.variations label { font-weight: 700; font-size: 14px; }
.reset_variations { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--muted); }
.cc-trust { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin-top: 32px; list-style: none; border-radius: var(--radius-s); overflow: hidden; background: var(--line); }
.cc-trust li { display: flex; gap: 12px; padding: 16px; background: var(--paper); font-size: 13px; line-height: 1.6; color: var(--muted); }
.cc-trust .cc-icon { color: var(--red); flex: none; margin-top: 2px; }
.cc-trust strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 2px; }
.cc-product-meta { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 20px; font-size: 13px; color: var(--muted); }
.cc-product-meta a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 960px) {
	.cc-product__top { grid-template-columns: 1fr; }
	.cc-product__gallery { position: relative; top: auto; }
}
@media (max-width: 480px) { .cc-specs, .cc-trust { grid-template-columns: 1fr; } }

/* 分頁標籤與商品介紹 */
.cc-product__more { padding-top: clamp(56px, 7vw, 104px); }
.woocommerce-tabs { margin-bottom: clamp(56px, 7vw, 104px); }
.woocommerce-tabs ul.tabs { display: flex; justify-content: center; gap: 4px; margin: 0 auto 48px; padding: 5px; width: fit-content; list-style: none; border-radius: 999px; background: var(--paper-2); }
.woocommerce-tabs ul.tabs li a { display: block; padding: 12px 24px; border-radius: 999px; font-weight: 700; color: var(--muted); transition: background .3s, color .3s; }
.woocommerce-tabs ul.tabs li.active a { background: var(--ink); color: #fff; }
.woocommerce-tabs .panel { width: min(880px, 100%); margin-inline: auto; }
.woocommerce-Tabs-panel--description { font-size: 17px; line-height: 1.95; color: var(--ink-2); }
.woocommerce-Tabs-panel--description > * + * { margin-top: 1.2em; }
.woocommerce-Tabs-panel--description img { border-radius: var(--radius-s); margin-inline: auto; }
.woocommerce-Tabs-panel--description figure { margin: 0; }
.woocommerce-Tabs-panel--description h2, .woocommerce-Tabs-panel--description h3 { color: var(--ink); margin-top: 2em; font-size: clamp(22px, 2.2vw, 28px); }
.woocommerce-Tabs-panel--description .cc-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.woocommerce-Tabs-panel--description .cc-cols > * { margin: 0; }
.woocommerce-Tabs-panel--description iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-s); }
.shop_attributes { width: 100%; border-collapse: collapse; }
.shop_attributes th, .shop_attributes td { padding: 14px 0; border-bottom: 1px solid var(--line); text-align: left; }
.shop_attributes th { width: 30%; color: var(--muted); font-weight: 600; }
.shop_attributes p { margin: 0; }
#reviews .commentlist { list-style: none; display: grid; gap: 16px; }
#reviews .comment_container { padding: 20px; border-radius: var(--radius-s); background: var(--card); }
#reviews .avatar { display: none; }
.related > h2, .upsells > h2, .cross-sells > h2 { margin-bottom: 32px; font-size: clamp(26px, 3vw, 40px); font-weight: 900; }
.related { padding-bottom: clamp(64px, 8vw, 112px); }

/* ---------- 步驟條 ---------- */
.cc-steps { display: flex; gap: 8px; margin: 0 0 40px; list-style: none; counter-reset: s; }
.cc-steps li { flex: 1; display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 2px solid var(--line); font-size: 14px; font-weight: 700; color: var(--muted); }
.cc-steps span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line-2); font: 700 13px/1 var(--font-display); }
.cc-steps .is-current { color: var(--ink); border-color: var(--ink); }
.cc-steps .is-current span { background: var(--ink); border-color: var(--ink); color: #fff; }
.cc-steps .is-done { color: var(--ink); border-color: var(--red); }
.cc-steps .is-done span { background: var(--red); border-color: var(--red); color: #fff; }
@media (max-width: 560px) { .cc-steps li { font-size: 12px; flex-direction: column; align-items: flex-start; gap: 6px; } }

/* ---------- 購物車 ---------- */
.cc-flow .cc-page-head { padding-bottom: 32px; }
.cc-flow .cc-page__body { padding-bottom: clamp(64px, 8vw, 120px); }
.woocommerce-cart .woocommerce { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px clamp(32px, 4vw, 64px); align-items: start; }
.woocommerce-cart .woocommerce > .cc-steps, .woocommerce-cart .woocommerce > .woocommerce-notices-wrapper, .woocommerce-cart .woocommerce > .cart-empty, .woocommerce-cart .woocommerce > .return-to-shop, .woocommerce-cart .woocommerce > .woocommerce-message, .woocommerce-cart .woocommerce > .woocommerce-info { grid-column: 1 / -1; }
.woocommerce-cart .cart-collaterals { position: sticky; top: calc(var(--header-h) + 24px); }
.cc-freeship { margin-bottom: 20px; padding: 18px 20px; border-radius: var(--radius-s); background: var(--card); }
.cc-freeship p { font-size: 14px; margin-bottom: 10px; }
.cc-freeship p strong { color: var(--red); }
.cc-freeship__bar { height: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; }
.cc-freeship__bar span { display: block; height: 100%; background: var(--red); border-radius: 6px; transition: width .8s var(--ease); }
table.shop_table { width: 100%; border-collapse: collapse; border-radius: var(--radius); background: var(--card); overflow: hidden; }
table.shop_table th { padding: 16px 20px; font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line); }
table.shop_table td { padding: 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.shop_table tr:last-child td { border-bottom: 0; }
.woocommerce-cart-form .product-thumbnail { width: 112px; }
.woocommerce-cart-form .product-thumbnail img { width: 88px; aspect-ratio: 1; object-fit: contain; border-radius: 12px; background: var(--photo); mix-blend-mode: multiply; }
.woocommerce-cart-form .product-name a { font-weight: 700; line-height: 1.5; }
.woocommerce-cart-form .product-name dl.variation { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.woocommerce-cart-form .product-price, .woocommerce-cart-form .product-subtotal { font-family: var(--font-display); font-weight: 700; white-space: nowrap; }
.woocommerce-cart-form .product-remove { width: 48px; }
.woocommerce-cart-form a.remove { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 20px; color: var(--muted) !important; transition: background .2s, color .2s; }
.woocommerce-cart-form a.remove:hover { background: var(--red); color: #fff !important; }
.woocommerce-cart-form .quantity { height: 46px; }
.woocommerce-cart-form td.actions { padding: 20px; background: var(--paper); }
.woocommerce-cart-form td.actions .coupon { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.woocommerce-cart-form td.actions .coupon .input-text { width: 200px; min-height: 48px; border-radius: 999px; }
.woocommerce-cart-form td.actions > .button { float: right; background: transparent; color: var(--ink); border-color: var(--line-2); }
.woocommerce-cart-form td.actions > .button:hover:not(:disabled) { background: var(--ink); color: #fff; }
.cart_totals { padding: 28px; border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.cart_totals h2 { font-size: 22px; margin-bottom: 16px; }
.cart_totals table.shop_table { box-shadow: none; border-radius: 0; }
.cart_totals table th, .cart_totals table td { padding: 14px 0; }
.cart_totals .order-total td { font-size: 22px; font-weight: 800; }
.cart_totals .woocommerce-shipping-methods { list-style: none; display: grid; gap: 8px; }
.wc-proceed-to-checkout { margin-top: 20px; }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 56px; font-size: 16px; }
.cross-sells { grid-column: 1 / -1; margin-top: 32px; }
.cart-empty.woocommerce-info { padding: 40px 40px 40px 64px; font-size: 18px; }
.return-to-shop .button { min-height: 52px; }
@media (max-width: 960px) {
	.woocommerce-cart .woocommerce { grid-template-columns: 1fr; }
	.woocommerce-cart .cart-collaterals { position: static; }
}
@media (max-width: 720px) {
	.woocommerce-cart-form table.shop_table thead { display: none; }
	.woocommerce-cart-form table.shop_table tr.cart_item { display: grid; grid-template-columns: 88px 1fr auto; gap: 4px 16px; padding: 16px; border-bottom: 1px solid var(--line); }
	.woocommerce-cart-form table.shop_table td { padding: 0; border: 0; }
	.woocommerce-cart-form .product-thumbnail { grid-row: 1 / span 4; width: auto; }
	.woocommerce-cart-form .product-remove { grid-column: 3; grid-row: 1; }
	.woocommerce-cart-form .product-name { grid-column: 2; grid-row: 1; }
	.woocommerce-cart-form .product-price { display: none; }
	.woocommerce-cart-form .product-quantity, .woocommerce-cart-form .product-subtotal { grid-column: 2 / -1; }
	.woocommerce-cart-form td.actions { display: grid; gap: 12px; }
	.woocommerce-cart-form td.actions > .button { float: none; width: 100%; }
	.woocommerce-cart-form td.actions .coupon .input-text { flex: 1; width: auto; }
}

/* ---------- 結帳 ---------- */
.woocommerce-checkout .woocommerce > .woocommerce-form-coupon-toggle, .woocommerce-checkout .woocommerce > .woocommerce-form-login-toggle { margin-bottom: 0; }
form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 0 clamp(32px, 4vw, 72px); align-items: start; margin-top: 24px; }
form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
form.checkout #customer_details { grid-column: 1; grid-row: 1 / span 3; }
form.checkout #order_review_heading { grid-column: 2; grid-row: 1; margin: 0; padding: 28px 28px 0; border-radius: var(--radius) var(--radius) 0 0; background: var(--card); font-size: 22px; }
form.checkout #order_review { grid-column: 2; grid-row: 2; position: sticky; top: calc(var(--header-h) + 24px); padding: 16px 28px 28px; border-radius: 0 0 var(--radius) var(--radius); background: var(--card); box-shadow: var(--shadow); }
#customer_details .col-1, #customer_details .col-2 { width: 100%; float: none; }
#customer_details .col-2 { margin-top: 24px; }
#customer_details h3, .woocommerce-billing-fields > h3, .woocommerce-additional-fields > h3 { margin-bottom: 20px; font-size: 22px; }
.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-additional-fields { padding: 28px; border-radius: var(--radius); background: var(--card); }
.woocommerce-shipping-fields:empty { display: none; }
#ship-to-different-address { font-size: 16px; }
#order_review table.shop_table { border-radius: 0; }
#order_review table.shop_table th, #order_review table.shop_table td { padding: 14px 0; }
#order_review .product-name { font-size: 14px; line-height: 1.5; }
#order_review .product-total { text-align: right; font-family: var(--font-display); font-weight: 700; }
#order_review tfoot th { color: var(--ink); }
#order_review tfoot td { text-align: right; }
#order_review .order-total td { font-size: 22px; font-weight: 800; }
#order_review .woocommerce-shipping-methods { list-style: none; display: grid; gap: 8px; text-align: left; }
#payment { margin-top: 20px; }
#payment ul.payment_methods { list-style: none; display: grid; gap: 8px; padding: 0; border: 0; }
#payment .wc_payment_method { padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line-2); transition: border-color .2s; }
#payment .wc_payment_method:has(input:checked) { border-color: var(--ink); background: var(--paper); }
#payment .wc_payment_method > label { font-weight: 700; cursor: pointer; }
#payment .wc_payment_method img { display: inline-block; max-height: 22px; margin-left: 6px; vertical-align: middle; }
#payment .payment_box { margin-top: 10px; font-size: 13px; color: var(--muted); line-height: 1.7; }
#payment .place-order { margin-top: 20px; padding: 0; }
#payment #place_order { width: 100%; min-height: 58px; font-size: 17px; }
.woocommerce-terms-and-conditions-wrapper { font-size: 13px; color: var(--muted); margin-bottom: 16px; }
.woocommerce-privacy-policy-text a, .woocommerce-terms-and-conditions-link { text-decoration: underline; }
.checkout_coupon, .woocommerce-form-login { margin-bottom: 24px; padding: 24px; border-radius: var(--radius); background: var(--card); }
@media (max-width: 1000px) {
	form.checkout { grid-template-columns: 1fr; }
	form.checkout #customer_details, form.checkout #order_review_heading, form.checkout #order_review { grid-column: 1; grid-row: auto; }
	form.checkout #order_review_heading { margin-top: 24px; }
	form.checkout #order_review { position: static; }
}
@media (max-width: 560px) {
	.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; }
	.woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-additional-fields, form.checkout #order_review_heading, form.checkout #order_review { padding-inline: 20px; }
}

/* 訂單完成 */
.woocommerce-order { max-width: 880px; }
.woocommerce-thankyou-order-received { font-size: clamp(22px, 2.6vw, 32px); font-weight: 900; margin-bottom: 24px; }
ul.woocommerce-order-overview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1px; margin-bottom: 40px; list-style: none; border-radius: var(--radius); overflow: hidden; background: var(--line); }
ul.woocommerce-order-overview li { padding: 20px; background: var(--card); font-size: 13px; color: var(--muted); }
ul.woocommerce-order-overview strong { display: block; margin-top: 6px; font-size: 16px; color: var(--ink); }
.woocommerce-order-details, .woocommerce-customer-details { margin-top: 40px; }
.woocommerce-order-details__title, .woocommerce-column__title { font-size: 22px; margin-bottom: 16px; }
.woocommerce-customer-details address { padding: 24px; border-radius: var(--radius); background: var(--card); font-style: normal; line-height: 1.9; }

/* ---------- 會員中心 ---------- */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
.woocommerce-MyAccount-navigation ul { list-style: none; display: grid; gap: 4px; padding: 10px; border-radius: var(--radius); background: var(--card); }
.woocommerce-MyAccount-navigation a { display: block; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.woocommerce-MyAccount-navigation a:hover { background: var(--paper); color: var(--ink); }
.woocommerce-MyAccount-navigation .is-active a { background: var(--ink); color: #fff; }
.woocommerce-MyAccount-content { padding: clamp(24px, 3vw, 40px); border-radius: var(--radius); background: var(--card); min-width: 0; }
.woocommerce-MyAccount-content > p:first-child { font-size: 17px; }
.woocommerce-MyAccount-content a:not(.button) { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-MyAccount-content table.shop_table { box-shadow: 0 0 0 1px var(--line); }
.woocommerce-Addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 24px; }
.woocommerce-Address { padding: 20px; border-radius: var(--radius-s); background: var(--paper); }
.woocommerce-Address-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.woocommerce-Address-title h2 { font-size: 18px; }
.woocommerce-Address address { font-style: normal; line-height: 1.9; }
/* 登入／註冊 */
.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
#customer_login { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 40px); max-width: 1040px; }
#customer_login .u-column1, #customer_login .u-column2 { width: auto; float: none; padding: clamp(24px, 3vw, 44px); border-radius: var(--radius); background: var(--card); }
#customer_login .u-column2 { background: var(--ink); color: #fff; }
#customer_login .u-column2 label { color: #fff !important; }
#customer_login .u-column2 input.input-text { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.22); color: #fff; }
#customer_login .u-column2 .button { background: var(--red) !important; border-color: var(--red) !important; }
#customer_login h2 { font-size: 26px; margin-bottom: 24px; }
#customer_login .u-column2 h2::after { content: "註冊送 100 點"; display: inline-block; margin-left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--red); font-size: 13px; vertical-align: middle; }
.woocommerce-form-login .button, .woocommerce-form-register .button { width: 100%; min-height: 54px; margin-top: 8px; }
.woocommerce-LostPassword { margin-top: 16px; font-size: 14px; }
.woocommerce-LostPassword a { text-decoration: underline; text-underline-offset: 3px; }
.woocommerce-privacy-policy-text { font-size: 13px; opacity: .7; }
.woocommerce form .show-password-input { display: none; }
@media (max-width: 860px) {
	.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; }
	.woocommerce-MyAccount-navigation a { white-space: nowrap; }
	#customer_login, .woocommerce-Addresses { grid-template-columns: 1fr; }
}

/* 加入購物車後的「已加入」提示 */
.cc-toast {
	position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 100; display: flex; align-items: center; gap: 16px;
	padding: 12px 12px 12px 20px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 20px 50px -10px rgba(0,0,0,.4);
	transform: translate(-50%, 140%); transition: transform .6s var(--ease); font-size: 14px; font-weight: 600; max-width: calc(100% - 32px);
}
.cc-toast.is-show { transform: translate(-50%, 0); }
.cc-toast .cc-icon { color: #4ade80; }
.cc-toast a { padding: 10px 18px; border-radius: 999px; background: var(--red); white-space: nowrap; }
.cc-toast a:hover { color: #fff; background: var(--red-d); }

/* ===== 第 1 輪修正：商品卡按鈕改為圓形圖示（文字保留給螢幕閱讀器） ===== */
.cc-card__foot { align-items: flex-end; }
.cc-card .cc-card__foot .cc-card__add, .cc-card .cc-card__foot .button {
	flex: none; width: 46px; height: 46px; min-height: 0; padding: 0; border-radius: 50%; font-size: 0; color: transparent; gap: 0;
	border: 0; background: var(--ink); overflow: hidden;
}
.cc-card .cc-card__foot .cc-card__add::before, .cc-card .cc-card__foot .button::before {
	content: ""; width: 20px; height: 20px; background: #fff;
	-webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8h14l-1.2 12.2a1 1 0 0 1-1 .8H7.2a1 1 0 0 1-1-.8z'/%3E%3Cpath d='M9 8V6a3 3 0 0 1 6 0v2M12 12v5M9.5 14.5h5'/%3E%3C/svg%3E");
}
.cc-card .cc-card__foot .button:not(.add_to_cart_button)::before { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E"); }
.cc-card .cc-card__foot .cc-card__add:hover, .cc-card .cc-card__foot .button:hover { background: var(--red); }
.cc-card .cc-card__foot .button.loading::before { display: none; }
.cc-card .cc-card__foot .button.loading::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
.cc-card .added_to_cart { position: absolute; right: 20px; bottom: 72px; z-index: 3; padding: 6px 12px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 12px; }
.cc-card .added_to_cart:hover { background: var(--red); color: #fff; }
@media (max-width: 640px) {
	.cc-card__foot { flex-direction: row; align-items: flex-end; }
	.cc-card .cc-card__foot .cc-card__add, .cc-card .cc-card__foot .button { width: 40px; height: 40px; }
}

/* ===== 第 2 輪修正：商品頁 ===== */
/* 商品名稱只在空白處斷行（Baicycle K20 MAX／6段變速…），太長時仍可換行 */
.cc-product__summary .product_title { word-break: keep-all; overflow-wrap: anywhere; }
/* 數量欄：清掉通用表單樣式造成的內框 */
.cc-qty input.qty, .quantity input.qty { border: 0 !important; box-shadow: none !important; border-radius: 0; padding: 0; min-height: 0; height: 100%; background: none; outline-offset: -4px; }
/* 動態定價（RightPress）的「優惠後單價」：獨立一列 */
.cc-product__summary form.cart > dl.rightpress_product_price_live_update { flex-basis: 100%; display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 4px; padding: 14px 18px; border-radius: var(--radius-s); background: var(--card); font-size: 14px; }
.rightpress_product_price_live_update dt { color: var(--muted); font-weight: 700; }
.rightpress_product_price_live_update dd { margin: 0; font: 800 20px/1 var(--font-display); color: var(--red); }
.rightpress_clear_both { display: none; }
/* 信任區塊：單數項目時最後一格撐滿 */
.cc-trust li:last-child:nth-child(odd) { grid-column: 1 / -1; }
/* 商品介紹內的條列 */
.woocommerce-Tabs-panel--description .cc-desc-label { margin-top: 2.4em; font: 800 13px/1 var(--font-display); letter-spacing: .2em; color: var(--red); }
.woocommerce-Tabs-panel--description .cc-desc-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; margin-top: 14px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.cc-desc-list li { position: relative; padding: 14px 0 14px 28px; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.6; }
.cc-desc-list li::before { content: ""; position: absolute; left: 2px; top: 1.32em; width: 14px; height: 2px; background: var(--red); }

/* ===== 第 2 輪修正：購物車 ===== */
/* 折價券列留在卡片內（不再像被切掉的下緣） */
.woocommerce-cart-form td.actions { background: var(--card); border-top: 1px solid var(--line); }
.woocommerce-cart-form td.actions > .button { background: transparent; }
/* 總計表：標籤不換行、金額靠右 */
.cart_totals table th { width: 1%; padding-right: 20px; white-space: nowrap; vertical-align: top; }
.cart_totals table td { text-align: right; }
.cart_totals .woocommerce-shipping-methods { justify-items: end; }
.cart_totals .woocommerce-shipping-methods li { display: flex; gap: 8px; align-items: center; justify-content: flex-end; }
/* 購物車階段還沒填地址，WooCommerce 會印出空白的「運送至 地址：…」，先隱藏，結帳頁再顯示 */
.cart_totals .woocommerce-shipping-destination { display: none; }
@media (max-width: 767px) {
	.woocommerce-cart-form td.actions { padding: 16px; }
	.cart_totals { padding: 22px; }
}
table.shop_table tr:last-child th { border-bottom: 0; }
.cart_totals table th { vertical-align: baseline; }
.cart_totals table td { vertical-align: baseline; }
.cart_totals tr:empty, .cart_totals tr:has(> th:only-child:empty) { display: none; }

/* ===== 第 2 輪修正：結帳 ===== */
/* 訂單摘要的陰影會壓到上方標題，改成標題與內容共用外框 */
form.checkout #order_review { box-shadow: none; }
form.checkout #order_review_heading, form.checkout #order_review { box-shadow: 0 0 0 1px var(--line); }
form.checkout #order_review_heading { clip-path: inset(-1px -1px 0 -1px); }
form.checkout #order_review { clip-path: inset(0 -1px -1px -1px); }
/* 運送地址與訂單備註分成兩張卡，中間留白 */
.woocommerce-shipping-fields:has(#ship-to-different-address) { padding-block: 22px; }
.woocommerce-additional-fields { margin-top: 16px; }
.woocommerce-privacy-policy-text { margin-bottom: 14px; }
.woocommerce-terms-and-conditions-wrapper .form-row { margin-top: 0; }
#order_review .woocommerce-shipping-methods { justify-items: end; text-align: right; }
/* 會員登入：表單已在卡片內，不再套第二層卡片 */
#customer_login .woocommerce-form-login, #customer_login .woocommerce-form-register { margin: 0; padding: 0; background: none; border: 0; box-shadow: none; }
.woocommerce-order-overview li, .woocommerce-order-overview strong { min-width: 0; overflow-wrap: anywhere; }
