/*!
 * SaigonContainer — WooCommerce styles
 */

/* Product grid */
.woocommerce ul.products, ul.products { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
ul.products::before, ul.products::after { display: none !important; }
ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
.woocommerce-result-count { margin: 0 0 20px; color: var(--sgc-muted); font-size: 14px; float: left; }
.woocommerce-ordering { margin: 0 0 20px; float: right; }
.woocommerce-ordering select { min-height: 40px; padding: 8px 12px; width: auto; }
.woocommerce-products-header { display: none; }
.shop-main ul.products { clear: both; }
.term-description { margin-top: 40px; color: var(--sgc-text); }

/* Product card */
.product-card { border: 1px solid var(--sgc-line); background: var(--sgc-white); display: flex; flex-direction: column; min-width: 0; transition: border-color .15s, box-shadow .15s; }
.product-card:hover { border-color: var(--sgc-sky); box-shadow: 0 10px 24px rgba(11, 37, 64, .08); }
.product-card__media { position: relative; display: block; height: 200px; overflow: hidden; background: var(--sgc-mist); }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; margin: 0 !important; }
.product-card__badge { position: absolute; top: 12px; left: 12px; background: var(--sgc-primary); color: var(--sgc-white); font-size: 12px; font-weight: 600; padding: 4px 10px; }
.product-card__body { padding: 18px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card__cat { font-size: 12px; color: var(--sgc-muted); text-transform: uppercase; letter-spacing: 1px; }
.product-card__title { margin: 0; padding: 0 !important; font-family: var(--sgc-font); font-weight: 700; font-size: 17px !important; line-height: 1.3; }
.product-card__title a { color: var(--sgc-primary); }
.product-card__title a:hover { color: var(--sgc-accent); }
.product-card__sub { font-size: 13px; color: var(--sgc-muted); }
.product-card__price, .product-card .price { margin-top: auto; padding-top: 8px; font-family: var(--sgc-head); font-weight: 600; font-size: 24px !important; color: var(--sgc-accent) !important; line-height: 1.1; }
.product-card .price del { font-size: 15px; color: var(--sgc-muted); opacity: 1; }
.product-card .price ins { text-decoration: none; }
.product-card__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.product-card__actions--single { grid-template-columns: 1fr; }
.product-card__actions .btn, .product-card__actions .button { min-height: 44px; padding: 8px 10px; font-size: 13px; text-transform: none; letter-spacing: 0; margin: 0 !important; }
.product-card__actions .added_to_cart { grid-column: 1 / -1; text-align: center; font-size: 13px; font-weight: 600; }
.product-card__actions .button.loading { opacity: .7; }
.product-card__actions .button.added::after { content: " ✓"; }

/* Single product */
.shop-single { padding-bottom: 0; }
.sp-top { padding-block: 48px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.single-product div.product .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; position: relative; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery__image img { width: 100%; }
.woocommerce-product-gallery .flex-control-thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.woocommerce-product-gallery .flex-control-thumbs img { cursor: pointer; opacity: .65; border: 1px solid var(--sgc-line); }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1; border-color: var(--sgc-primary); }
.woocommerce-product-gallery { position: relative; }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 5; width: 40px; height: 40px; background: var(--sgc-white); display: flex; align-items: center; justify-content: center; font-size: 0; }
.woocommerce-product-gallery__trigger::before { content: "⤢"; font-size: 18px; color: var(--sgc-primary); }
.woocommerce-product-gallery--without-images .woocommerce-product-gallery__image--placeholder img { border: 1px dashed #A9B4C2; }
.single-product div.product .summary { width: 100% !important; float: none !important; margin: 0 !important; display: flex; flex-direction: column; gap: 16px; }
.summary .eyebrow { margin: 0; }
.summary .woocommerce-product-details__short-description { color: var(--sgc-text); }
.summary .woocommerce-product-details__short-description p:last-child { margin: 0; }
.price-box { background: var(--sgc-light); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.price-box__label { font-size: 12px; color: var(--sgc-muted); }
.price-box .price { margin: 0; font-family: var(--sgc-head); font-weight: 600; font-size: 34px; color: var(--sgc-accent); line-height: 1.1; }
.price-box .price del { font-size: 18px; color: var(--sgc-muted); }
.price-box .price ins { text-decoration: none; }
.price-box .price--contact { font-size: 24px; }
.price-box__note { font-size: 12px; color: var(--sgc-muted); }
.summary .stock { margin: 0; font-weight: 700; font-size: 14px; }
.summary .stock.in-stock { color: #157A3B; }
.summary .stock.in-stock::before { content: "● "; }
.summary .stock.out-of-stock { color: var(--sgc-accent); }
.summary form.cart { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.summary form.cart .quantity { display: flex; }
.summary form.cart .qty { width: 72px; min-height: 48px; text-align: center; }
.summary form.cart .single_add_to_cart_button, .summary form.cart .single_buy_now { flex: 1 1 160px; min-height: 48px; }
.summary form.cart .single_add_to_cart_button { background: var(--sgc-white); color: var(--sgc-primary); border-color: var(--sgc-primary); }
.summary form.cart .single_add_to_cart_button:hover { background: var(--sgc-primary); color: var(--sgc-white); }
.summary form.variations_form { flex-direction: column; }
.summary table.variations { margin-bottom: 8px; }
.summary table.variations th, .summary table.variations td { padding: 6px 0; text-align: left; }
.summary .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; }
.policy-links { margin: 0; font-size: 13px; color: var(--sgc-muted); }
.policy-links a { text-decoration: underline; }
.single-contact .btn { min-height: 48px; text-transform: none; font-size: 15px; }
.spec__title { margin: 0; background: var(--sgc-primary); color: var(--sgc-white); font-family: var(--sgc-font); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 12px 14px; }
.spec .woocommerce-product-attributes { border-top: 0; margin: 0; }
.woocommerce-product-rating { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.single-product .onsale { position: absolute; top: 12px; left: 12px; z-index: 6; background: var(--sgc-accent); color: var(--sgc-white); font-size: 12px; font-weight: 700; padding: 4px 10px; min-height: 0; min-width: 0; border-radius: 0; line-height: 1.4; margin: 0; }
.sp-top > .onsale { position: absolute; }
.sp-top { position: relative; }

.sp-details { background: var(--sgc-light); }
.sp-details__in { padding-block: 56px; display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.consult { background: var(--sgc-white); border-top: 6px solid var(--sgc-accent); padding: 24px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: calc(var(--sgc-bar-h) + 24px); }
.consult__title { margin: 0; font-size: 22px; }
.consult p { margin: 0; font-size: 14px; color: var(--sgc-text); }
.sp-related { padding-block: 56px; }
.sp-related > section > h2 { font-size: clamp(24px, 2.6vw, 30px); margin-bottom: 24px; }
@media (max-width: 960px) {
	.sp-top, .sp-details__in { grid-template-columns: minmax(0, 1fr); }
	.consult { position: static; }
}

/* Star rating */
.star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; line-height: 1; font-size: 15px; overflow: hidden; color: #E07B00; }
.star-rating::before { content: "☆☆☆☆☆"; letter-spacing: .1em; position: absolute; top: 0; left: 0; }
.star-rating span { position: absolute; top: 0; left: 0; overflow: hidden; padding-top: 1.5em; }
.star-rating span::before { content: "★★★★★"; letter-spacing: .1em; position: absolute; top: 0; left: 0; }
#reviews .commentlist { list-style: none; padding: 0; }
#reviews .comment_container { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--sgc-line); }
#reviews .avatar { border-radius: 50%; }
p.stars { margin: 4px 0 12px; }
p.stars span { display: inline-flex; gap: 2px; }
p.stars a { position: relative; display: inline-block; width: 28px; height: 28px; font-size: 0; color: #E07B00; text-decoration: none; }
p.stars a::before { content: "☆"; position: absolute; inset: 0; font-size: 26px; line-height: 28px; text-align: center; }
p.stars:hover a::before, p.stars.selected a.active::before, p.stars.selected a:not(.active)::before { content: "★"; }
p.stars a:hover ~ a::before, p.stars.selected a.active ~ a::before { content: "☆"; }
#review_form #respond { display: grid; gap: 12px; }
#review_form .comment-form-rating label { display: block; }
.woocommerce-Reviews-title, #reply-title { font-family: var(--sgc-head); font-size: 22px; color: var(--sgc-primary); display: block; margin-bottom: 8px; }
#reviews { margin-top: 40px; }

/* Notices */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-notice, .wc-block-components-notice-banner { list-style: none; margin: 0 0 24px; padding: 14px 18px; border-left: 4px solid var(--sgc-primary); background: #F0F6FF; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.woocommerce-error { border-color: var(--sgc-accent); background: #FDF0F0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; min-height: 38px; font-size: 13px; }
.woocommerce-notices-wrapper:empty { display: none; }

/* Classic cart */
.woocommerce-cart-form { margin-bottom: 32px; }
table.shop_table { width: 100%; border: 1px solid var(--sgc-line); font-size: 15px; }
table.shop_table th { background: var(--sgc-primary); color: var(--sgc-white); text-align: left; padding: 12px 14px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; }
table.shop_table td { padding: 16px 14px; border-top: 1px solid var(--sgc-line); vertical-align: middle; }
table.shop_table .product-thumbnail img { width: 96px; }
table.shop_table .product-name a { font-weight: 700; }
table.shop_table .product-remove a { font-size: 22px; color: var(--sgc-accent); }
table.shop_table .product-subtotal { font-family: var(--sgc-head); font-weight: 600; color: var(--sgc-accent); font-size: 18px; }
table.shop_table td.actions { background: var(--sgc-light); }
table.shop_table .coupon { display: inline-flex; gap: 8px; flex-wrap: wrap; }
table.shop_table .coupon input { width: 200px; min-height: 44px; }
.cart-collaterals { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 32px; }
.cart_totals { grid-column: 2; background: var(--sgc-light); border-top: 6px solid var(--sgc-accent); padding: 24px; }
.cart_totals h2 { font-size: 24px; }
.cart_totals table.shop_table { border: 0; }
.cart_totals table.shop_table th { background: none; color: var(--sgc-text); text-transform: none; font-size: 15px; letter-spacing: 0; padding: 10px 0; }
.cart_totals table.shop_table td { padding: 10px 0; text-align: right; }
.cart_totals .order-total .amount { font-family: var(--sgc-head); font-size: 24px; color: var(--sgc-accent); }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 52px; background: var(--sgc-accent); }
.wc-proceed-to-checkout .checkout-button:hover { background: var(--sgc-accent-l); }
@media (max-width: 860px) { .cart-collaterals { grid-template-columns: minmax(0, 1fr); } .cart_totals { grid-column: 1; } table.shop_table_responsive thead { display: none; } table.shop_table_responsive tr td { display: block; text-align: right; } table.shop_table_responsive tr td::before { content: attr(data-title) ": "; float: left; font-weight: 600; } }

/* Classic checkout */
form.checkout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: start; }
form.checkout > .woocommerce-NoticeGroup { grid-column: 1 / -1; }
#customer_details { grid-column: 1; }
#customer_details .col-1, #customer_details .col-2 { width: 100%; float: none; }
#order_review_heading { grid-column: 2; grid-row: 1; margin: 0; padding: 24px 24px 0; background: var(--sgc-light); border-top: 6px solid var(--sgc-accent); font-size: 24px; }
#order_review { grid-column: 2; grid-row: 2; margin-top: -40px; padding: 16px 24px 24px; background: var(--sgc-light); }
.woocommerce-billing-fields h3, .woocommerce-additional-fields h3, .woocommerce-shipping-fields h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; }
.form-row { margin: 0 0 14px; }
.form-row label { display: block; margin-bottom: 6px; }
.form-row-first, .form-row-last { width: calc(50% - 7px); float: left; }
.form-row-last { margin-left: 14px; }
.form-row-wide, .woocommerce-billing-fields__field-wrapper::after { clear: both; }
.woocommerce-billing-fields__field-wrapper::after { content: ""; display: table; }
.required { color: var(--sgc-accent); text-decoration: none; }
#order_review table.shop_table { border: 0; background: none; }
#order_review table.shop_table th { background: none; color: var(--sgc-text); padding: 10px 0; text-transform: none; font-size: 14px; letter-spacing: 0; }
#order_review table.shop_table td { padding: 10px 0; }
#order_review .order-total .amount { font-family: var(--sgc-head); font-size: 24px; color: var(--sgc-accent); }
#payment ul.payment_methods { list-style: none; padding: 0; margin: 16px 0; display: flex; flex-direction: column; gap: 10px; }
#payment li.wc_payment_method { border: 2px solid var(--sgc-line-d); background: var(--sgc-white); padding: 14px 16px; }
#payment li.wc_payment_method:has(input:checked) { border-color: var(--sgc-primary); background: #F0F6FF; }
#payment li.wc_payment_method > label { font-weight: 700; color: var(--sgc-primary); cursor: pointer; }
#payment .payment_box { margin-top: 8px; font-size: 14px; color: var(--sgc-text); }
#payment .payment_box p:last-child { margin: 0; }
#place_order { width: 100%; min-height: 52px; background: var(--sgc-accent); font-size: 15px; }
#place_order:hover { background: var(--sgc-accent-l); }
.woocommerce-terms-and-conditions-wrapper { font-size: 14px; margin-bottom: 12px; }
@media (max-width: 960px) {
	form.checkout { grid-template-columns: minmax(0, 1fr); }
	#order_review_heading, #order_review { grid-column: 1; grid-row: auto; margin-top: 0; }
	.form-row-first, .form-row-last { width: 100%; float: none; margin-left: 0; }
}

/* Thank you / order received */
.woocommerce-order { max-width: 860px; }
.woocommerce-thankyou-order-received { font-family: var(--sgc-head); font-size: 26px; color: var(--sgc-primary); border-left: 0; background: none; padding: 0; }
ul.woocommerce-order-overview { list-style: none; padding: 20px; margin: 0 0 32px; background: var(--sgc-light); display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
ul.woocommerce-order-overview li { font-size: 13px; color: var(--sgc-muted); text-transform: uppercase; }
ul.woocommerce-order-overview strong { display: block; font-size: 16px; color: var(--sgc-ink); text-transform: none; margin-top: 4px; }

/* My account */
.woocommerce-account .woocommerce { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--sgc-line); }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; border-bottom: 1px solid var(--sgc-line); font-weight: 600; }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--sgc-primary); color: var(--sgc-white); }
.woocommerce-account:not(.logged-in) .woocommerce { display: block; max-width: 520px; }
@media (max-width: 860px) { .woocommerce-account .woocommerce { grid-template-columns: minmax(0, 1fr); } }

/* WooCommerce Blocks (Cart & Checkout blocks) */
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { border-radius: 0 !important; background: var(--sgc-accent) !important; color: var(--sgc-white) !important; font-weight: 700 !important; min-height: 52px; }
.wc-block-components-text-input input, .wc-block-components-combobox .wc-block-components-combobox-control input, .wc-blocks-components-select__select { border-radius: 0 !important; }
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value, .wc-block-components-product-price__value { color: var(--sgc-accent); font-family: var(--sgc-head); }
.wc-block-components-sidebar-layout .wc-block-components-sidebar { background: var(--sgc-light); border-top: 6px solid var(--sgc-accent); padding: 24px !important; }
.wc-block-components-radio-control-accordion-option, .wc-block-components-radio-control__option { border-radius: 0 !important; }
.wp-block-woocommerce-checkout, .wp-block-woocommerce-cart { max-width: var(--sgc-wrap); }

/* Cart / checkout / account pages use the page template: give them full width. */
.woocommerce-cart .entry--page, .woocommerce-checkout .entry--page, .woocommerce-account .entry--page { max-width: none; }
table.shop_table tfoot th { background: var(--sgc-light); color: var(--sgc-text); text-transform: none; letter-spacing: 0; font-size: 15px; border-top: 1px solid var(--sgc-line); }
.shop-count { margin: 0 0 16px; font-size: 14px; color: var(--sgc-muted); }

/* ==========================================================================
   Cart & Checkout blocks — brand styling
   ========================================================================== */
.wp-block-woocommerce-cart, .wp-block-woocommerce-checkout { margin-inline: auto; }
.wc-block-components-sidebar-layout { gap: 40px; }

/* Headings */
.wc-block-cart__totals-title, .wc-block-components-checkout-step__title, .wc-block-components-order-summary__title, .wc-block-cart-items__header { font-family: var(--sgc-head); color: var(--sgc-primary); letter-spacing: .3px; }
.wc-block-cart-items__header { background: var(--sgc-light); border-bottom: 2px solid var(--sgc-primary); font-size: 12px; text-transform: uppercase; }
.wc-block-cart-items__header th { padding: 14px 12px; }

/* Product rows */
.wc-block-components-product-name { color: var(--sgc-primary); font-weight: 700; text-decoration: none; }
.wc-block-components-product-name:hover { color: var(--sgc-accent); text-decoration: none; }
.wc-block-cart-item__image img { border: 1px solid var(--sgc-line); }
.wc-block-components-product-price__value, .wc-block-components-totals-footer-item .wc-block-components-totals-item__value { color: var(--sgc-accent); font-family: var(--sgc-head); font-weight: 700; }
.wc-block-cart-item__remove-link { color: var(--sgc-muted); }
.wc-block-cart-item__remove-link:hover { color: var(--sgc-accent); }
.wc-block-components-quantity-selector { border-radius: 0; border: 1px solid #8A99AB; }
.wc-block-components-quantity-selector__button { color: var(--sgc-primary); }

/* Sidebar totals */
.wc-block-components-sidebar-layout .wc-block-components-sidebar { background: var(--sgc-light); border: 1px solid var(--sgc-line); border-top: 6px solid var(--sgc-accent); padding: 24px !important; }
.wc-block-components-totals-item__label { color: var(--sgc-text); }
.wc-block-components-totals-footer-item { border-top: 1px solid var(--sgc-line-d); }
.wc-block-components-panel__button { color: var(--sgc-primary); font-weight: 600; }

/* Buttons */
.wc-block-components-button:not(.is-link), .wc-block-cart__submit-button, .wc-block-components-checkout-place-order-button { border-radius: 0 !important; background: var(--sgc-accent) !important; border: 2px solid var(--sgc-accent) !important; color: var(--sgc-white) !important; font-family: var(--sgc-font); font-weight: 700 !important; font-size: 14px; text-transform: uppercase; letter-spacing: .4px; min-height: 52px; }
.wc-block-components-button:not(.is-link):hover, .wc-block-cart__submit-button:hover, .wc-block-components-checkout-place-order-button:hover { background: var(--sgc-accent-l) !important; border-color: var(--sgc-accent-l) !important; }
.wc-block-components-button.outlined, .wc-block-components-totals-coupon__button { background: transparent !important; border: 2px solid var(--sgc-primary) !important; color: var(--sgc-primary) !important; }
.wc-block-components-button.is-link { color: var(--sgc-primary); }

/* Empty cart */
.wc-block-cart__empty-cart__title { font-family: var(--sgc-head); color: var(--sgc-primary); }
.wp-block-woocommerce-empty-cart-block .wp-block-button__link { background: var(--sgc-primary); border-radius: 0; text-transform: uppercase; font-weight: 700; }

/* Checkout form fields */
.wc-block-components-text-input input, .wc-block-components-textarea, .wc-blocks-components-select__select, .wc-block-components-combobox .wc-block-components-combobox-control input { border-radius: 0 !important; border: 1px solid #8A99AB !important; min-height: 48px; }
.wc-block-components-text-input.is-active label, .wc-block-components-text-input input:focus + label { color: var(--sgc-primary); }
.wc-block-components-checkout-step { border-color: var(--sgc-line); }
.wc-block-components-radio-control-accordion-option, .wc-block-components-radio-control__option { border-radius: 0 !important; }
.wc-block-components-radio-control-accordion-option:has(input:checked), .wc-block-components-radio-control__option:has(input:checked) { border-color: var(--sgc-primary); }
.wc-block-components-order-summary-item__quantity { background: var(--sgc-primary); color: var(--sgc-white); border-color: var(--sgc-primary); }

/* Cross-sells / new in store grid under an empty cart */
.wp-block-woocommerce-empty-cart-block .wp-block-post-title a, .wc-block-grid__product-title { color: var(--sgc-primary); font-weight: 700; text-decoration: none; }
