/* ==========================================================================
   Hồng Ân Ascent — skin cho markup mặc định của WooCommerce
   ========================================================================== */

/* Nút Woo -> pill */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt,
.wc-block-components-button:not(.is-link) {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 28px !important; border-radius: var(--r-pill) !important;
  background: var(--c-ink) !important; color: #fff !important; font-weight: 700 !important; font-size: 14px !important;
  border: 0 !important; line-height: 1 !important; transition: background .25s;
}
.woocommerce a.button:hover, .woocommerce button.button:hover { background: #2b2e36 !important; }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce #place_order, .single_add_to_cart_button,
.wc-block-components-checkout-place-order-button, .wc-block-cart__submit-button { background: var(--c-red) !important; }
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover, .single_add_to_cart_button:hover { background: var(--c-red-dark) !important; }
.woocommerce .button.disabled, .woocommerce .button:disabled { opacity: .45 !important; }
.p-card .added_to_cart { display: none !important; }
.p-card .add_to_cart_button.loading { opacity: .6; }
.p-card .add_to_cart_button.added::after { content: none; }

/* Thông báo */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .wc-block-components-notice-banner {
  border: 0 !important; border-radius: var(--r-l) !important; background: var(--c-soft) !important; color: var(--c-ink) !important;
  padding: 16px 20px 16px 52px !important; font-size: 14px; margin-bottom: 20px !important; list-style: none;
}
.woocommerce-message::before { color: var(--c-success) !important; top: 16px !important; left: 20px !important; }
.woocommerce-info::before { color: var(--c-ink) !important; top: 16px !important; left: 20px !important; }
.woocommerce-error { background: var(--c-red-soft) !important; }
.woocommerce-error::before { color: var(--c-red) !important; top: 16px !important; left: 20px !important; }
.woocommerce-message .button, .woocommerce-info .button { float: right; min-height: 36px !important; padding: 0 16px !important; font-size: 12px !important; }

/* Giá */
.price .woocommerce-Price-amount { font-weight: 700; }
.price del { opacity: 1; color: var(--c-muted); font-weight: 500; font-size: .85em; }
.price ins { text-decoration: none; }
.price--sale ins, .price--sale ins .amount { color: var(--c-red); }
.pdp-price .amount { font-size: 28px; font-weight: 800; color: var(--c-ink); }
.pdp-price.price--sale ins .amount { color: var(--c-red); }
.pdp-price del .amount { font-size: 16px; color: var(--c-muted); font-weight: 500; }

/* Grid sản phẩm (shortcode/blocks dùng ul.products) */
.woocommerce ul.products { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; margin: 0; }
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none !important; }
.woocommerce ul.products li.product { width: auto !important; margin: 0 !important; float: none !important; }
@media (max-width: 1100px) { .woocommerce ul.products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) { .woocommerce ul.products { grid-template-columns: repeat(2, 1fr); gap: 22px 12px; } }
.p-grid.columns-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .p-grid.columns-3 { grid-template-columns: repeat(2, 1fr); } }
.p-card__media img { height: 100% !important; }

/* Toolbar */
.toolbar .woocommerce-result-count { margin: 0; float: none; font-size: 14px; color: var(--c-muted); }
.toolbar .woocommerce-ordering { margin: 0; float: none; }
.toolbar .woocommerce-ordering select { height: 42px; border: 1px solid var(--c-line); border-radius: var(--r-pill); padding: 0 40px 0 18px; font-size: 14px; font-weight: 600; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; appearance: none; cursor: pointer; }
.woo-main { padding-bottom: 24px; }

/* ---------- Trang sản phẩm ---------- */
.pdp-gallery { position: relative; min-width: 0; }
.pdp-gallery .gallery__badges { z-index: 9; }
.woocommerce div.product div.images, .woocommerce-product-gallery { width: 100% !important; float: none !important; margin: 0 !important; position: relative; }
.woocommerce-product-gallery .flex-viewport, .woocommerce-product-gallery__wrapper > .woocommerce-product-gallery__image:only-child {
  border-radius: var(--r-l); background: var(--c-soft); overflow: hidden;
}
.woocommerce-product-gallery__image img { mix-blend-mode: multiply; aspect-ratio: 1; object-fit: contain; padding: 6%; }
.woocommerce-product-gallery .flex-control-thumbs { display: grid !important; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px !important; padding: 0; }
.woocommerce-product-gallery .flex-control-thumbs li { width: auto !important; margin: 0 !important; float: none !important; list-style: none; }
.woocommerce-product-gallery .flex-control-thumbs img { border-radius: var(--r-m); background: var(--c-soft); padding: 6px; aspect-ratio: 1; object-fit: contain; opacity: .7 !important; border: 1.5px solid transparent; mix-blend-mode: multiply; }
.woocommerce-product-gallery .flex-control-thumbs img.flex-active, .woocommerce-product-gallery .flex-control-thumbs img:hover { opacity: 1 !important; border-color: var(--c-ink); }
.woocommerce-product-gallery__trigger { top: 16px !important; right: 16px !important; background: #fff !important; border-radius: 50% !important; box-shadow: var(--shadow); }
@media (min-width: 901px) { .pdp-gallery { position: sticky; top: calc(var(--header-h) + 20px); } }

.woocommerce div.product .summary { width: 100% !important; float: none !important; margin: 0 !important; }
.pdp-info .product_title { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 10px 0; letter-spacing: -.02em; }
.pdp-info .pdp-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.pdp-info .stock.in-stock, .pdp-info .stock.out-of-stock { font-weight: 700; }
.pdp-info form.cart { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin: 0 0 12px !important; }
.pdp-info form.cart::before, .pdp-info form.cart::after { content: none !important; }
.pdp-info form.variations_form { display: block; }
.pdp-info .woocommerce-variation-add-to-cart { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.pdp-info .single_add_to_cart_button { height: 56px; font-size: 15px !important; width: 100%; }
.quantity { display: inline-flex !important; align-items: center; border: 1px solid var(--c-line); border-radius: var(--r-pill); height: 56px; padding: 0 4px; }
.quantity .qty { width: 46px !important; border: 0 !important; text-align: center; font-weight: 700; font-size: 15px; background: transparent; -moz-appearance: textfield; }
.quantity .qty::-webkit-outer-spin-button, .quantity .qty::-webkit-inner-spin-button { -webkit-appearance: none; }
.qty-btn { width: 38px; height: 100%; display: grid; place-items: center; font-size: 20px; color: var(--c-ink); }

/* Biến thể */
.pdp-info table.variations { border: 0; margin-bottom: 14px !important; width: 100%; }
.pdp-info table.variations th, .pdp-info table.variations td { display: block; padding: 0 !important; text-align: left; border: 0; background: none; }
.pdp-info table.variations th label { font-size: 14px; font-weight: 600; color: var(--c-ink); margin-bottom: 8px; display: block; }
.pdp-info table.variations td { margin-bottom: 16px; }
.pdp-info table.variations select { min-width: 220px; height: 48px; border: 1.5px solid var(--c-line); border-radius: var(--r-m); padding: 0 40px 0 14px; font-weight: 600; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111214' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; }
.pdp-info .reset_variations { font-size: 13px; color: var(--c-muted); margin-left: 10px; }
.pdp-info .woocommerce-variation-price { margin-bottom: 10px; }
/* Swatch plugin (Variation Swatches) */
.pdp-info .variable-items-wrapper .variable-item { border-radius: var(--r-m) !important; box-shadow: 0 0 0 1.5px var(--c-line) !important; }
.pdp-info .variable-items-wrapper .variable-item.selected { box-shadow: 0 0 0 2px var(--c-ink) !important; }
.pdp-info .product_meta { font-size: 13px; color: var(--c-muted); margin-top: 16px; display: grid; gap: 4px; }

/* Tabs */
.pdp-after { margin-top: 64px; }
.woocommerce div.product .woocommerce-tabs ul.tabs { display: flex; gap: 32px; padding: 0 !important; margin: 0 0 8px !important; border-bottom: 1px solid var(--c-line); overflow-x: auto; scrollbar-width: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: none !important; border: 0 !important; margin: 0 !important; padding: 0 !important; border-radius: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { display: block; padding: 16px 0 !important; font-weight: 700 !important; font-size: 16px; color: var(--c-muted) !important; border-bottom: 2px solid transparent; white-space: nowrap; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--c-ink) !important; border-color: var(--c-red); }
.woocommerce div.product .woocommerce-tabs .panel { padding: 28px 0; margin: 0; font-size: 16px; color: var(--c-text); max-width: 900px; }
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { display: none; }
.woocommerce table.shop_attributes { border: 0 !important; max-width: 820px; }
.woocommerce table.shop_attributes th, .woocommerce table.shop_attributes td { border: 0 !important; border-bottom: 1px solid var(--c-line) !important; padding: 14px 16px !important; font-style: normal !important; }
.woocommerce table.shop_attributes th { width: 42%; font-weight: 600; color: var(--c-muted); background: none !important; }
.woocommerce table.shop_attributes td { font-weight: 700; color: var(--c-ink); background: none !important; }
.woocommerce table.shop_attributes tr:nth-child(odd) th, .woocommerce table.shop_attributes tr:nth-child(odd) td { background: var(--c-soft) !important; }
.woocommerce table.shop_attributes td p { margin: 0; padding: 0 !important; }

/* Related / upsells */
.related.products, .upsells.products, .cross-sells { margin-top: 56px; }
.related.products > h2, .upsells.products > h2, .cross-sells > h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 28px; }

/* Đánh giá */
.woocommerce #reviews #comments ol.commentlist li .comment-text { border-radius: var(--r-l) !important; border-color: var(--c-line) !important; }
.woocommerce .star-rating span::before, .woocommerce p.stars a { color: var(--c-warning) !important; }
#review_form input[type=text], #review_form input[type=email], #review_form textarea { width: 100%; border: 1px solid var(--c-line); border-radius: var(--r-m); padding: 12px; }

/* ---------- Giỏ hàng (shortcode) ---------- */
.wc-page .woocommerce { display: block; }
.woocommerce-cart-form { margin-bottom: 32px; }
.woocommerce table.shop_table { border: 0 !important; border-radius: 0 !important; border-collapse: collapse !important; }
.woocommerce table.shop_table th { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--c-muted); border-bottom: 1px solid var(--c-ink) !important; padding: 12px !important; }
.woocommerce table.shop_table td { border-top: 0 !important; border-bottom: 1px solid var(--c-line) !important; padding: 18px 12px !important; }
.woocommerce table.cart img { width: 96px !important; border-radius: var(--r-m); background: var(--c-soft); padding: 6px; mix-blend-mode: multiply; }
.woocommerce table.cart td.product-name a { font-weight: 700; color: var(--c-ink); }
.woocommerce a.remove { color: var(--c-muted) !important; border: 1px solid var(--c-line); width: 28px !important; height: 28px !important; line-height: 26px !important; }
.woocommerce a.remove:hover { background: var(--c-red) !important; color: #fff !important; border-color: var(--c-red); }
.woocommerce table.cart td.actions .coupon { display: flex; gap: 8px; }
.woocommerce table.cart td.actions .input-text, .woocommerce-checkout .input-text, .woocommerce form .form-row .input-text, .woocommerce form .form-row select {
  height: 50px; border: 1px solid var(--c-line) !important; border-radius: var(--r-m) !important; padding: 0 14px !important; font-size: 15px; background: #fff;
}
.woocommerce form .form-row textarea.input-text { height: 100px; padding-top: 12px !important; }
.woocommerce form .form-row label { font-size: 13px; font-weight: 600; color: var(--c-ink); }
.woocommerce form .form-row { margin-bottom: 14px; }
.woocommerce .cart-collaterals .cart_totals, .woocommerce-page .cart-collaterals .cart_totals { background: var(--c-soft); border-radius: var(--r-l); padding: 28px; }
.woocommerce .cart-collaterals .cart_totals h2 { font-size: 20px; }
.woocommerce .cart_totals table.shop_table th, .woocommerce .cart_totals table.shop_table td { border-bottom: 1px solid var(--c-line) !important; text-transform: none; letter-spacing: 0; font-size: 14px; }
.woocommerce .cart_totals .order-total .amount { font-size: 20px; color: var(--c-ink); }
.wc-proceed-to-checkout .checkout-button { width: 100%; height: 56px; font-size: 15px !important; }
.select2-container .select2-selection--single { height: 50px !important; border: 1px solid var(--c-line) !important; border-radius: var(--r-m) !important; }
.select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 50px !important; padding-left: 14px !important; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 48px !important; }

/* ---------- Thanh toán (shortcode) ---------- */
@media (min-width: 1000px) {
  .woocommerce-checkout form.checkout { display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: start; }
  .woocommerce-checkout form.checkout > .col2-set { grid-column: 1; width: 100%; }
  .woocommerce-checkout form.checkout > #order_review_heading, .woocommerce-checkout form.checkout > #order_review { grid-column: 2; }
  .woocommerce-checkout form.checkout > #order_review_heading { grid-row: 1; }
  .woocommerce-checkout form.checkout > #order_review { grid-row: 2 / span 3; position: sticky; top: calc(var(--header-h) + 20px); }
  .woocommerce-checkout .col2-set .col-1, .woocommerce-checkout .col2-set .col-2 { width: 100% !important; float: none !important; }
}
.woocommerce-checkout h3, #order_review_heading { font-size: 20px; margin: 0 0 16px; }
#order_review { background: var(--c-soft); border-radius: var(--r-l); padding: 24px; }
#order_review .shop_table th, #order_review .shop_table td { font-size: 14px; text-transform: none; letter-spacing: 0; }
.woocommerce-checkout #payment { background: transparent !important; border-radius: 0 !important; }
.woocommerce-checkout #payment ul.payment_methods { border: 0 !important; padding: 0 !important; }
.woocommerce-checkout #payment ul.payment_methods li { background: #fff; border: 1.5px solid var(--c-line); border-radius: var(--r-m); padding: 14px !important; margin-bottom: 10px !important; list-style: none; }
.woocommerce-checkout #payment div.payment_box { background: var(--c-soft) !important; border-radius: var(--r-m) !important; }
.woocommerce-checkout #payment div.payment_box::before { display: none; }
#place_order { width: 100%; height: 56px; font-size: 15px !important; }

/* ---------- Giỏ hàng & thanh toán dạng Block ---------- */
.wc-block-cart, .wc-block-checkout { --wp--preset--color--contrast: var(--c-ink); }
.wc-block-components-sidebar { background: var(--c-soft); border-radius: var(--r-l); padding: 24px !important; }
.wc-block-components-text-input input, .wc-block-components-combobox input, .wc-blocks-components-select__select { border-radius: var(--r-m) !important; border-color: var(--c-line) !important; }
.wc-block-components-radio-control-accordion-option, .wc-block-components-radio-control__option { border-radius: var(--r-m); }
.wc-block-components-product-name { font-weight: 700; color: var(--c-ink) !important; }

/* ---------- Tài khoản ---------- */
@media (min-width: 900px) {
  .woocommerce-account .woocommerce { display: grid; grid-template-columns: 260px 1fr; gap: 40px; }
  .woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { width: 100% !important; float: none !important; }
}
.woocommerce-MyAccount-navigation ul { list-style: none; padding: 8px; margin: 0; background: var(--c-soft); border-radius: var(--r-l); }
.woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; border-radius: var(--r-m); font-weight: 600; color: var(--c-ink); }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--c-ink); color: #fff; }
.woocommerce form.login, .woocommerce form.register { border: 1px solid var(--c-line) !important; border-radius: var(--r-l) !important; padding: 28px !important; }
