/* =====================================================================
   KAIDEV — giao dien cho markup GOC cua WooCommerce (CSS mac dinh cua Woo da tat).
   Dung token trong kaidev.css. Template goc giu nguyen de plugin khuyen mai gan noi dung.
   ===================================================================== */

/* ---------- Tien ich chung cua theme ---------- */
.k-skip { position: absolute; left: 8px; top: -48px; z-index: 100; padding: 10px 14px; border-radius: var(--k-radius-sm); background: var(--k-fg); color: #fff; }
.k-skip:focus { top: 8px; }
.k-main { min-height: 50vh; }
.k-lock { overflow: hidden; }
.k-page-title { margin: 24px 0 16px; }
.k-woo { padding-bottom: 48px; }
.k-secure { display: inline-flex; align-items: center; gap: 6px; color: var(--k-muted); font-size: 14px; }
.k-search-mobile { padding: 0 0 12px; }
.k-search-mobile .k-input { height: 44px; border-radius: 999px; background: var(--k-bg-soft); border-color: transparent; }
@media (min-width: 1280px) { .k-search-mobile { display: none !important; } }
.k-only-mobile-flex { display: inline-flex; }
@media (min-width: 1024px) { .k-only-mobile-flex { display: none !important; } }
.k-section--flush-top { padding-top: 0; }
.k-home { padding-top: 16px; }
.k-usp--strip { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); padding: 20px; border-radius: var(--k-radius-lg); background: var(--k-bg-soft); }
.k-usp--strip div { color: var(--k-fg); font-size: 14px; }
.k-cat__img--icon { display: grid; place-items: center; color: var(--k-muted); }
.k-hero__text .k-badge + .k-h1 { margin-top: 10px; }
.k-flash__title .k-h2 { display: inline-flex; align-items: center; gap: 8px; }
.k-flash__label { font-size: 14px; }
.k-footer ul a:hover { color: var(--k-fg); }

/* Menu dien thoai */
.k-menu-drawer { position: fixed; inset: 0; z-index: 70; }
.k-menu-drawer__panel { position: absolute; inset: 0 auto 0 0; display: flex; flex-direction: column; width: min(320px, 86vw); background: var(--k-bg); transform: translateX(-100%); transition: transform .25s; }
.k-menu-drawer__scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .35); opacity: 0; transition: opacity .25s; }
.k-menu-drawer.is-open .k-menu-drawer__panel { transform: none; }
.k-menu-drawer.is-open .k-menu-drawer__scrim { opacity: 1; }
.k-menu-drawer__panel { z-index: 1; }
.k-menu-drawer__nav { display: flex; flex-direction: column; padding: 8px 12px; }
.k-menu-drawer__nav a { padding: 12px; border-radius: var(--k-radius-sm); font-size: 16px; font-weight: 500; }
.k-menu-drawer__nav a:hover, .k-menu-drawer__nav a[aria-current] { background: var(--k-hover); }

/* Panel gio hang: mo bang .active (theme va bundle-promotion) */
.k-drawer.active, body.show-cart .k-drawer { transform: none; }
.k-drawer-scrim.active, body.show-cart .k-drawer-scrim { opacity: 1; pointer-events: auto; }
.k-drawer:focus { outline: none; }

/* ---------- Thong bao ---------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews, p.no-comments {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  margin: 0 0 16px; padding: 12px 16px; border-radius: var(--k-radius); background: var(--k-bg-soft); color: var(--k-fg); font-size: 14px; list-style: none;
}
.woocommerce-message { background: var(--k-ok-bg); }
.woocommerce-error { flex-direction: column; align-items: flex-start; background: #fef2f2; color: #b91c1c; }
.woocommerce-error li { margin: 0; }
.woocommerce-message .button, .woocommerce-info .button { order: 2; min-height: 36px; padding: 6px 14px; font-size: 14px; }
.woocommerce-info a:not(.button), .woocommerce-message a:not(.button) { font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Nut goc cua Woo ---------- */
.woocommerce .button, .woocommerce button.button, .woocommerce a.button, .woocommerce input.button, .k-body .button,
.woocommerce-mini-cart__buttons .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); color: var(--k-fg);
  font: 500 15px/1.2 var(--k-font); text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s;
}
.k-body .button:hover { background: var(--k-hover); }
.k-body .button.alt, .k-body .single_add_to_cart_button, .k-body .checkout-button, .k-body #place_order, .woocommerce-mini-cart__buttons .button.checkout {
  border-color: transparent; background: var(--k-primary); color: var(--k-primary-fg);
}
.k-body .button.alt:hover, .k-body .single_add_to_cart_button:hover, .k-body .checkout-button:hover, .k-body #place_order:hover, .woocommerce-mini-cart__buttons .button.checkout:hover { background: var(--k-primary-hover); }
.k-body .button:disabled, .k-body .button.disabled { opacity: .5; cursor: not-allowed; }
.k-body .button.loading { opacity: .7; cursor: progress; }
.k-body a.added_to_cart { display: none; } /* panel gio tu mo, khong can link "Xem gio hang" */

/* ---------- O nhap goc ---------- */
.k-body .input-text, .k-body .form-row select, .k-body .woocommerce-ordering select, .k-body .variations select,
.k-body #coupon_code, .k-body .woocommerce-form input[type="text"], .k-body .woocommerce-form input[type="email"], .k-body .woocommerce-form input[type="password"] {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius);
  background: var(--k-surface); color: var(--k-fg); font: 400 16px/1.3 var(--k-font); outline: none; transition: border-color .15s, box-shadow .15s;
}
.k-body textarea.input-text { height: auto; min-height: 88px; padding: 12px 14px; resize: vertical; }
.k-body .input-text:focus, .k-body select:focus, .k-body #coupon_code:focus { border-color: var(--k-primary); box-shadow: 0 0 0 3px var(--k-ring); }
.k-body select { appearance: none; padding-right: 40px; background: var(--k-surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 16px; }
.k-body .form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.k-body .form-row label { font-size: 14px; font-weight: 500; }
.k-body .form-row .required { color: var(--k-error); text-decoration: none; border: 0; }
.k-body .form-row .optional { color: var(--k-muted); font-weight: 400; }
.k-body .woocommerce-invalid .input-text, .k-body .woocommerce-invalid select { border-color: var(--k-error); }
.k-body .woocommerce-input-wrapper { display: block; }
.k-body .form-row-first, .k-body .form-row-last { width: 100%; }
@media (min-width: 640px) {
  .k-body .woocommerce-billing-fields__field-wrapper, .k-body .woocommerce-shipping-fields__field-wrapper, .k-body .woocommerce-address-fields__field-wrapper { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .k-body .woocommerce-billing-fields__field-wrapper .form-row-wide, .k-body .woocommerce-shipping-fields__field-wrapper .form-row-wide, .k-body .woocommerce-address-fields__field-wrapper .form-row-wide { grid-column: 1 / -1; }
}
.k-body input[type="checkbox"], .k-body input[type="radio"] { accent-color: var(--k-primary); width: 18px; height: 18px; margin: 0; vertical-align: middle; }
.k-body .woocommerce-form__label-for-checkbox { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }

/* select2 / selectWoo o trang thanh toan */
.k-body .select2-container .select2-selection--single { height: 46px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); }
.k-body .select2-container .select2-selection--single .select2-selection__rendered { padding: 0 40px 0 14px; color: var(--k-fg); line-height: 44px; font-size: 16px; }
.k-body .select2-container .select2-selection--single .select2-selection__arrow { top: 10px; right: 10px; }
.k-body .select2-container--open .select2-selection--single, .k-body .select2-container--focus .select2-selection--single { border-color: var(--k-primary); box-shadow: 0 0 0 3px var(--k-ring); }
.select2-dropdown { border: 1px solid var(--k-border) !important; border-radius: var(--k-radius) !important; box-shadow: var(--k-shadow-pop); overflow: hidden; font-family: var(--k-font); }
.select2-results__option--highlighted[aria-selected], .select2-results__option--highlighted[data-selected] { background: var(--k-primary) !important; }
.select2-search--dropdown .select2-search__field { height: 40px; padding: 0 12px; border: 1px solid var(--k-border-strong) !important; border-radius: var(--k-radius-sm); }

/* So luong */
/* So luong: JS (kaidev.js) bien o so goc thanh "−  1  +" (.k-stepper). Mot khung vien, khong vach chia;
   vung bam nut cao het khung (44px), nen re la o vuong 32px thut vao. Truoc khi JS chay van la o so binh thuong. */
.k-body .quantity { display: inline-flex; }
.k-body .quantity .qty { width: 72px; height: var(--k-qty-h, 44px); padding: 0 8px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); text-align: center; font: 500 15px var(--k-font); font-variant-numeric: tabular-nums; }
.k-body .quantity .qty:focus { outline: none; border-color: var(--k-primary); box-shadow: 0 0 0 3px var(--k-ring); }
.k-body .quantity.k-stepper { align-items: stretch; height: var(--k-qty-h, 44px); overflow: hidden; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); }
.k-body .quantity.k-stepper:focus-within { border-color: var(--k-primary); box-shadow: 0 0 0 3px var(--k-ring); }
.k-body .quantity.k-stepper .qty { width: 44px; min-width: 0; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; -moz-appearance: textfield; }
.k-body .quantity.k-stepper .qty:focus { box-shadow: none; }
.k-stepper__btn { display: grid; flex-shrink: 0; place-items: center; width: 44px; padding: 0; border: 0; background: transparent; color: var(--k-muted); cursor: pointer; }
.k-stepper__btn span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--k-radius-sm); transition: background-color .15s, color .15s; }
.k-stepper__btn svg { width: 16px; height: 16px; }
.k-stepper__btn:enabled:hover span { background: var(--k-hover); color: var(--k-fg); }
.k-stepper__btn:disabled { cursor: not-allowed; opacity: .4; }
@media (min-width: 768px) { .k-stepper__btn { width: 40px; } }
/* Trang san pham: o so luong cao bang nut Them vao gio */
.summary form.cart { --k-qty-h: 52px; align-items: stretch; }
.summary form.cart .single_add_to_cart_button { min-height: 52px; height: 52px; }
.k-body .screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- Gia ---------- */
.k-body .price { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; color: var(--k-fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.k-body .price del { order: 2; color: var(--k-muted); font-weight: 400; font-size: .88em; }
.k-body .price ins { order: 1; color: var(--k-sale); text-decoration: none; }
.k-body .price del .woocommerce-Price-amount { color: inherit; }
.k-card__price .price { font-size: 15px; }

/* Sao danh gia (ve lai vi da tat font cua Woo) */
.k-body .star-rating { position: relative; display: inline-block; width: 5.4em; height: 1.1em; overflow: hidden; font-size: 14px; line-height: 1; letter-spacing: .08em; }
.k-body .star-rating::before { content: "★★★★★"; position: absolute; inset: 0; color: var(--k-border-strong); }
.k-body .star-rating span { position: absolute; top: 0; left: 0; height: 100%; overflow: hidden; padding-top: 1.5em; }
.k-body .star-rating span::before { content: "★★★★★"; position: absolute; top: 0; left: 0; color: var(--k-accent); }
.k-body .star-rating strong, .k-body .star-rating .rating { font-weight: 400; }

/* ---------- Danh sach ---------- */
.k-shop-head { margin-bottom: 20px; }
.k-shop-head .term-description, .k-shop-head .page-description { max-width: 64ch; margin-top: 6px; color: var(--k-muted); }
.k-shop-head .term-description p { margin: 0; }
.k-shop { margin-top: 8px; }
.k-shop__main { min-width: 0; }
.k-toolbar .woocommerce-notices-wrapper { flex-basis: 100%; }
.k-toolbar .woocommerce-result-count { margin: 0 auto 0 0; color: var(--k-muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.k-toolbar .woocommerce-ordering { margin: 0; }
.k-toolbar .woocommerce-ordering select { width: auto; height: 40px; font-size: 14px; }
ul.products { display: grid; gap: 24px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; }
@media (min-width: 768px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px) { ul.products { gap: 16px 12px; } }
.related ul.products, .upsells ul.products, .cross-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .related ul.products, .upsells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1200px) { .related ul.products, .upsells ul.products { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
ul.products li.product { position: relative; margin: 0; padding: 0; }
.k-card__media img { width: 100%; height: 100%; object-fit: contain; }
.k-card__quick.loading { opacity: .6; pointer-events: none; }
.k-card__quick.added { background: var(--k-primary); color: var(--k-primary-fg); }
.woocommerce-pagination { margin-top: 32px; }
.woocommerce-pagination ul.page-numbers { display: flex; justify-content: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.woocommerce-pagination .page-numbers a, .woocommerce-pagination .page-numbers span { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: var(--k-radius-sm); font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.woocommerce-pagination .page-numbers a:hover { background: var(--k-hover); }
.woocommerce-pagination .page-numbers .current { background: var(--k-fg); color: #fff; }
.woocommerce-no-products-found .woocommerce-info { justify-content: center; padding: 40px 16px; }

/* Bo loc: danh sach lien ket co o tick ve bang CSS */
.k-filter__item { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; color: var(--k-fg); }
.k-filter__item:hover { color: var(--k-primary); }
.k-filter__box { flex-shrink: 0; width: 18px; height: 18px; border: 1.5px solid var(--k-border-strong); border-radius: 5px; background: var(--k-surface) no-repeat center / 12px; }
.k-filter__item[role="radio"] .k-filter__box { border-radius: 999px; }
.k-filter__item[aria-checked="true"] .k-filter__box { border-color: var(--k-primary); background-color: var(--k-primary); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); }
.k-filter__item[role="radio"][aria-checked="true"] .k-filter__box { background-image: none; box-shadow: inset 0 0 0 3px var(--k-surface); }
.k-filter__item[aria-checked="true"] { font-weight: 500; }
.k-filter__count { margin-left: auto; color: var(--k-muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.k-filter__clear { margin-top: 16px; align-self: flex-start; }
.k-filter__mobile-head { display: none; }
@media (max-width: 1023px) {
  .k-filter { position: fixed; inset: 0 auto 0 0; z-index: 72; display: flex; flex-direction: column; width: min(340px, 88vw); padding: 0 20px 24px; overflow-y: auto; background: var(--k-bg); transform: translateX(-105%); transition: transform .25s; }
  .k-filter.is-open { transform: none; }
  .k-filter__mobile-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin: 0 -20px 8px; padding: 14px 20px; border-bottom: 1px solid var(--k-border); background: var(--k-bg); }
  .k-filter-scrim { position: fixed; inset: 0; z-index: 71; background: rgb(0 0 0 / .35); }
}

/* ---------- Chi tiet san pham (template goc) ---------- */
/* Phan dau trang san pham (anh, khoi mua, tab) nam trong .k-pdp-top de cot mua chi dinh trong vung nay;
   khoi danh gia, mua kem, lien quan nam ngoai, full width ben duoi */
.single-product div.product { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.k-pdp-top { display: grid; gap: 24px; }
.k-pdp-top > * { min-width: 0; }
@media (min-width: 1024px) {
  .k-pdp-top { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); column-gap: 48px; align-items: start; }
  /* Anh + tab ben trai; cot mua chiem 2 hang va dinh trong .k-pdp-top */
  .k-pdp-top .woocommerce-product-gallery { grid-column: 1; grid-row: 1; }
  .k-pdp-top .woocommerce-tabs { grid-column: 1; grid-row: 2; }
  .k-pdp-top .summary { grid-column: 2; grid-row: 1 / span 2; align-self: start; position: sticky; top: 96px; }
  .admin-bar .k-pdp-top .summary { top: 128px; }
}
.single-product div.product .onsale { position: absolute; z-index: 2; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--k-sale); color: #fff; font-size: 12px; font-weight: 600; }
.woocommerce-product-gallery { position: relative; margin: 0 !important; }
.woocommerce-product-gallery__wrapper { margin: 0; }
.woocommerce-product-gallery .flex-viewport, .woocommerce-product-gallery__image:only-child { overflow: hidden; border-radius: var(--k-radius-lg); background: var(--k-bg-soft); }
.woocommerce-product-gallery__image a { display: block; }
.woocommerce-product-gallery__image img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; }
.woocommerce-product-gallery__trigger { position: absolute; top: 12px; right: 12px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 999px; background: var(--k-surface); font-size: 0; box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.woocommerce-product-gallery__trigger::before { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23232323' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3M11 8v6M8 11h6'/%3E%3C/svg%3E") no-repeat center / contain; }
.woocommerce-product-gallery__trigger > span, .woocommerce-product-gallery__trigger img { display: none !important; } /* Woo chen span emoji 🔍 lam grid co 2 hang, icon bi day len */
.flex-control-thumbs { display: flex; gap: 8px; margin: 10px 0 0; padding: 0; overflow-x: auto; list-style: none; }
.flex-control-thumbs li { flex: 0 0 72px; }
.flex-control-thumbs img { width: 72px; height: 72px; padding: 4px; border: 1px solid var(--k-border); border-radius: var(--k-radius-sm); background: var(--k-bg-soft); object-fit: contain; cursor: pointer; opacity: .75; }
.flex-control-thumbs img.flex-active, .flex-control-thumbs img:hover { border-color: var(--k-fg); opacity: 1; }
@media (min-width: 1024px) {
  /* Anh nho xep doc ben trai anh lon (phuong an A) */
  .woocommerce-product-gallery:has(.flex-control-thumbs) { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .woocommerce-product-gallery:has(.flex-control-thumbs) .flex-viewport { grid-column: 2; grid-row: 1; }
  .woocommerce-product-gallery:has(.flex-control-thumbs) .flex-control-thumbs { grid-column: 1; grid-row: 1; flex-direction: column; margin: 0; overflow: visible; }
}
.summary { display: flex; flex-direction: column; gap: 14px; }
.summary > * { margin: 0; }
.summary .product_title { font-size: 26px; font-weight: 600; line-height: 1.25; text-wrap: balance; }
@media (min-width: 1024px) { .summary .product_title { font-size: 30px; } }
.summary > .price { font-size: 26px; }
.summary .woocommerce-product-rating { display: flex; align-items: center; gap: 8px; color: var(--k-muted); font-size: 13px; }
.summary .woocommerce-review-link { color: var(--k-muted); }
.summary .woocommerce-product-details__short-description { color: #3a3a3a; }
.summary .woocommerce-product-details__short-description p { margin: 0 0 8px; }
.summary form.cart { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; margin: 0; }
.summary form.cart .single_add_to_cart_button { flex: 1; min-height: 52px; font-size: 16px; }
.summary form.variations_form { flex-direction: column; }
.summary .variations { width: 100%; border-collapse: collapse; }
.summary .variations tr { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.summary .variations th, .summary .variations td { padding: 0; text-align: left; }
.summary .variations label { font-size: 14px; font-weight: 500; }
.summary .variations select { max-width: 320px; }
.summary .reset_variations { display: inline-block; margin-top: 6px; color: var(--k-muted); font-size: 13px; text-decoration: underline; }
.summary .single_variation_wrap { display: flex; flex-direction: column; gap: 10px; }
.summary .woocommerce-variation-add-to-cart { display: flex; flex-wrap: wrap; gap: 10px; }
.summary .woocommerce-variation-add-to-cart .single_add_to_cart_button { flex: 1; min-height: 52px; }
.summary .woocommerce-variation-price .price { font-size: 22px; }
.summary .stock { margin: 0; font-size: 14px; color: var(--k-ok); }
.summary .stock.out-of-stock { color: var(--k-error); }
.summary .product_meta { display: flex; flex-direction: column; gap: 4px; padding-top: 14px; border-top: 1px solid var(--k-border); color: var(--k-muted); font-size: 13px; }
.summary .product_meta a { color: var(--k-fg); }

/* Hop do plugin khuyen mai chen vao summary (qua tang, mua kem, bac so luong, flash sale):
   dong khung phang cho dong bo, khong dung noi dung ben trong */
.summary [class*="ccppp-"][class*="box"], .summary [class*="ccpbp-"][class*="box"], .summary [class*="fsqp-"][class*="info"], .summary [class*="ccpqp"][class*="info"] {
  border-color: var(--k-border) !important; border-radius: var(--k-radius) !important; box-shadow: none !important;
}

/* Tab mo ta / danh gia */
.woocommerce-tabs { margin-top: 24px; }
.woocommerce-tabs ul.tabs { display: flex; gap: 24px; margin: 0; padding: 0; overflow-x: auto; border-bottom: 1px solid var(--k-border); list-style: none; }
.woocommerce-tabs ul.tabs li { flex-shrink: 0; margin: 0; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 14px 0; border-bottom: 2px solid transparent; color: var(--k-muted); font-weight: 500; }
.woocommerce-tabs ul.tabs li.active a { border-color: var(--k-fg); color: var(--k-fg); }
.woocommerce-Tabs-panel { max-width: 76ch; padding-top: 20px; color: #3a3a3a; }
.woocommerce-Tabs-panel table.shop_attributes { width: 100%; border-collapse: collapse; }
.woocommerce-Tabs-panel table.shop_attributes th, .woocommerce-Tabs-panel table.shop_attributes td { padding: 10px 0; border-bottom: 1px solid var(--k-border); text-align: left; font-size: 14px; }
.woocommerce-Tabs-panel table.shop_attributes th { width: 30%; font-weight: 500; }
.woocommerce-Tabs-panel table.shop_attributes p { margin: 0; }
#reviews .commentlist { margin: 0; padding: 0; list-style: none; }
#reviews .comment_container { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--k-border); }
#reviews .avatar { width: 40px; height: 40px; border-radius: 999px; }
#reviews .comment-form-rating .stars a { color: var(--k-accent); }
.related, .upsells { margin-top: 40px; }
.related > h2, .upsells > h2, .cross-sells > h2 { margin: 0 0 16px; font-size: 20px; font-weight: 600; }

/* Thanh mua dinh day: an khi form that dang trong man hinh */
.k-stickybuy.is-hidden { transform: translateY(110%); }
.k-stickybuy { transition: transform .2s; }
.k-stickybuy__price .price { font-size: 16px; }
@media (max-width: 1023px) { .single-product .k-footer { padding-bottom: 96px; } }

/* ---------- Gio hang (template goc) ---------- */
.woocommerce-cart .k-woo-page .woocommerce { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  .woocommerce-cart .k-woo-page .woocommerce { grid-template-columns: minmax(0, 1fr) 380px; column-gap: 40px; align-items: start; }
  /* Gan hang co dinh: o co cot xac dinh duoc xep truoc nen de tu xep se dao thu tu hang */
  .woocommerce-cart .k-woo-page .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; grid-row: 1; }
  .woocommerce-cart .k-woo-page .woocommerce-cart-form { grid-column: 1; grid-row: 2; }
  .woocommerce-cart .k-woo-page .cart-collaterals { grid-column: 2; grid-row: 2 / span 2; align-self: start; position: sticky; top: 96px; }
  .admin-bar.woocommerce-cart .k-woo-page .cart-collaterals { top: 128px; }
  .woocommerce-cart .k-woo-page .woocommerce > .cross-sells { grid-column: 1; grid-row: 3; }
}
table.shop_table { width: 100%; border-collapse: collapse; font-size: 14px; }
table.shop_table th { padding: 10px 8px; border-bottom: 1px solid var(--k-border); color: var(--k-muted); font-size: 13px; font-weight: 500; text-align: left; }
table.shop_table td { padding: 16px 8px; border-bottom: 1px solid var(--k-border); vertical-align: middle; }
table.cart .product-thumbnail { width: 104px; }
table.cart .product-thumbnail img { width: 88px; height: 88px; padding: 6px; border-radius: var(--k-radius); background: var(--k-bg-soft); object-fit: contain; }
table.cart .product-name a { font-weight: 500; }
table.cart .product-price, table.cart .product-subtotal { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.cart .product-subtotal { font-weight: 600; text-align: right; }
table.cart th.product-subtotal { text-align: right; }
table.cart a.remove { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 999px; color: var(--k-muted); font-size: 20px; line-height: 1; }
table.cart a.remove:hover { background: #fef2f2; color: var(--k-error); }
table.cart td.actions { padding-top: 16px; border-bottom: 0; }
table.cart td.actions .coupon { display: flex; gap: 8px; max-width: 420px; }
table.cart td.actions .coupon label { display: none; }
table.cart td.actions > .button { float: right; }
@media (max-width: 767px) {
  /* Bang thanh tung dong (shop_table_responsive cua Woo co data-title) */
  table.cart thead { display: none; }
  table.cart tr { display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; column-gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--k-border); }
  table.cart td { padding: 2px 0; border: 0; }
  table.cart .product-remove { grid-column: 3; grid-row: 1; }
  table.cart .product-thumbnail { grid-column: 1; grid-row: 1 / span 4; width: auto; }
  table.cart .product-name, table.cart .product-price, table.cart .product-quantity, table.cart .product-subtotal { grid-column: 2 / -1; text-align: left; }
  table.cart .product-price::before, table.cart .product-subtotal::before { content: attr(data-title) ": "; color: var(--k-muted); font-weight: 400; }
  table.cart td.actions { grid-column: 1 / -1; }
  table.cart td.actions > .button { float: none; width: 100%; margin-top: 10px; }
  table.cart tr.cart_item:last-child { border-bottom: 0; }
}
.cart-collaterals .cart_totals, .woocommerce-checkout-review-order { padding: 20px; border-radius: var(--k-radius-lg); background: var(--k-bg-soft); }
.cart-collaterals .cart_totals > h2 { margin: 0 0 8px; font-size: 16px; font-weight: 600; }
.cart_totals table.shop_table th, .cart_totals table.shop_table td, table.shop_table.woocommerce-checkout-review-order-table th, table.shop_table.woocommerce-checkout-review-order-table td { padding: 8px 0; border-bottom: 0; color: var(--k-fg); font-size: 14px; font-weight: 400; }
.cart_totals table.shop_table td, .woocommerce-checkout-review-order-table tfoot td { text-align: right; font-variant-numeric: tabular-nums; }
.cart_totals .order-total th, .cart_totals .order-total td, .woocommerce-checkout-review-order-table .order-total th, .woocommerce-checkout-review-order-table .order-total td { padding-top: 14px; border-top: 1px solid var(--k-border-strong); font-weight: 600; font-size: 15px; }
.cart_totals .order-total .amount, .woocommerce-checkout-review-order-table .order-total .amount { font-size: 22px; }
.cart_totals .fee td, .woocommerce-checkout-review-order-table .fee td, .cart_totals .cart-discount td { color: var(--k-sale); }
.cart_totals .woocommerce-shipping-methods { margin: 0; padding: 0; list-style: none; text-align: right; }
.cart_totals .woocommerce-shipping-destination, .cart_totals .shipping-calculator-button { color: var(--k-muted); font-size: 13px; }
.wc-proceed-to-checkout { margin-top: 16px; }
.wc-proceed-to-checkout .checkout-button { width: 100%; min-height: 52px; font-size: 16px; }
.cart-empty.woocommerce-info { justify-content: center; padding: 48px 16px; font-size: 15px; }
.return-to-shop { text-align: center; }
.return-to-shop .button { border-color: transparent; background: var(--k-primary); color: var(--k-primary-fg); }
.cross-sells { margin-top: 24px; }

/* ---------- Thanh toan (template goc) ---------- */
.k-is-checkout .k-header__row { height: 64px; }
.k-steps a { color: var(--k-muted); }
.k-steps a:hover { color: var(--k-fg); }
.woocommerce-form-coupon-toggle, .woocommerce-form-login-toggle { margin-bottom: 0; }
form.woocommerce-form-login { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 0 0 16px; padding: 16px; border: 1px solid var(--k-border); border-radius: var(--k-radius); }
/* Ma uu dai o thanh toan: khoi gan lien duoi thanh "Ban co ma uu dai?"; cau huong dan 1 hang, o nhap + nut cung hang */
.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info { margin-bottom: 0; }
.woocommerce-checkout .woocommerce-form-coupon-toggle:has(+ form.checkout_coupon:not([style*="none"])) .woocommerce-info { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
form.checkout_coupon { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; max-width: none; margin: 0 0 16px; padding: 14px 16px 16px; border: 0; border-radius: 0 0 var(--k-radius) var(--k-radius); background: var(--k-bg-soft); }
form.checkout_coupon > p:first-child:not(.form-row) { grid-column: 1 / -1; margin: 0; color: var(--k-muted); font-size: 14px; }
.k-body form.checkout_coupon .form-row { width: auto; margin: 0; }
form.checkout_coupon .clear { display: none; }
form.checkout_coupon .input-text { background: var(--k-surface); }
form.checkout_coupon .button { height: 46px; min-height: 46px; white-space: nowrap; border-color: transparent; background: var(--k-fg); color: #fff; }
form.checkout_coupon .button:hover { background: #3a3a3a; }
@media (min-width: 768px) { form.checkout_coupon { grid-template-columns: minmax(0, 420px) auto; justify-content: start; } }
.woocommerce-checkout .woocommerce-form-coupon-toggle { margin-bottom: 16px; }
.woocommerce-checkout .woocommerce-form-coupon-toggle:has(+ form.checkout_coupon:not([style*="none"])) { margin-bottom: 0; }
form.woocommerce-checkout { display: grid; gap: 24px; }
@media (min-width: 1024px) {
  form.woocommerce-checkout { grid-template-columns: minmax(0, 1fr) 400px; column-gap: 40px; align-items: start; }
  form.woocommerce-checkout > #customer_details { grid-column: 1; grid-row: 1 / span 3; }
  form.woocommerce-checkout > #order_review_heading { grid-column: 2; grid-row: 1; }
  form.woocommerce-checkout > #order_review { grid-column: 2; grid-row: 2; position: sticky; top: 24px; }
}
#customer_details { display: flex; flex-direction: column; gap: 20px; }
#customer_details .col-1, #customer_details .col-2 { width: 100%; }
#customer_details h3, #order_review_heading { margin: 0 0 14px; font-size: 17px; font-weight: 600; }
#order_review_heading { margin: 0; }
#ship-to-different-address { font-size: 15px; }
.woocommerce-checkout-review-order-table { margin-bottom: 8px; }
.woocommerce-checkout-review-order-table thead { display: none; }
.woocommerce-checkout-review-order-table tbody td { padding: 8px 0; border-bottom: 1px solid var(--k-border); }
.woocommerce-checkout-review-order-table td.product-total { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.woocommerce-checkout-review-order-table .product-quantity { color: var(--k-muted); font-weight: 400; }
#payment { margin-top: 12px; }
#payment ul.payment_methods { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
#payment ul.payment_methods li { padding: 12px 14px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); font-size: 14px; }
#payment ul.payment_methods li:has(input:checked) { border-color: var(--k-primary); box-shadow: inset 0 0 0 1px var(--k-primary); }
#payment ul.payment_methods li label { display: inline; margin-left: 8px; font-weight: 500; cursor: pointer; }
#payment ul.payment_methods li label img { display: inline-block; margin-left: 6px; vertical-align: middle; }
#payment ul.payment_methods li img { max-height: 22px; }
#payment .payment_box { margin-top: 10px; color: var(--k-muted); font-size: 13px; }
#payment .payment_box p { margin: 0; }
#payment .place-order { display: flex; flex-direction: column; gap: 12px; margin: 0; }
#payment #place_order { width: 100%; min-height: 52px; font-size: 16px; }
.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper { color: var(--k-muted); font-size: 12px; }
.woocommerce-privacy-policy-text p { margin: 0; }
.blockUI.blockOverlay { background: rgb(255 255 255 / .6) !important; }

/* Trang dat hang thanh cong */
/* ---------- Trang cam on + chi tiet don (dung chung voi Tai khoan > Xem don) ---------- */
.woocommerce-order { display: flex; flex-direction: column; gap: 20px; max-width: 820px; margin: 8px auto 0; }
.woocommerce-order > * { margin: 0; }
.woocommerce-thankyou-order-received { display: flex; align-items: flex-start; gap: 14px; margin: 0; padding: 20px; border-radius: var(--k-radius-lg); background: var(--k-ok-bg); font-weight: 400; }
.k-thanks__icon { display: grid; flex-shrink: 0; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--k-ok); color: #fff; }
.k-thanks__icon .k-icon { width: 24px; height: 24px; }
.k-thanks__text { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; color: var(--k-fg); font-size: 15px; }
.k-thanks__text strong { font-size: 20px; font-weight: 600; }
ul.woocommerce-order-overview { display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--k-border); border-radius: var(--k-radius); list-style: none; }
ul.woocommerce-order-overview li { flex: 1 1 130px; margin: 0; padding: 12px 16px; border: 0; border-right: 1px solid var(--k-border); color: var(--k-muted); font-size: 12px; text-transform: none; }
ul.woocommerce-order-overview li.email { flex-basis: auto; }
ul.woocommerce-order-overview li:last-child { border-right: 0; }
ul.woocommerce-order-overview li strong { display: block; margin-top: 4px; color: var(--k-fg); font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
@media (max-width: 639px) {
  ul.woocommerce-order-overview li { flex-basis: 100%; border-right: 0; border-bottom: 1px solid var(--k-border); }
  ul.woocommerce-order-overview li:last-child { border-bottom: 0; }
}
.woocommerce-order-details, .woocommerce-customer-details { padding: 20px; border: 1px solid var(--k-border); border-radius: var(--k-radius-lg); background: var(--k-surface); }
.woocommerce-order-details__title, .woocommerce-customer-details .woocommerce-column__title { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
table.woocommerce-table--order-details { margin: 0; }
table.woocommerce-table--order-details thead th { padding: 0 0 10px; }
table.woocommerce-table--order-details td, table.woocommerce-table--order-details th { padding: 12px 0; vertical-align: top; }
table.woocommerce-table--order-details td.product-total, table.woocommerce-table--order-details tfoot td, table.woocommerce-table--order-details th.product-total { text-align: right; font-variant-numeric: tabular-nums; }
table.woocommerce-table--order-details td.product-name { padding-right: 16px; font-weight: 500; }
table.woocommerce-table--order-details td.product-name a { color: var(--k-fg); }
table.woocommerce-table--order-details .product-quantity { color: var(--k-muted); font-weight: 400; }
table.woocommerce-table--order-details tfoot th { color: var(--k-muted); font-weight: 400; }
table.woocommerce-table--order-details tfoot tr:nth-last-child(2) th, table.woocommerce-table--order-details tfoot tr:nth-last-child(2) td { color: var(--k-fg); font-size: 16px; font-weight: 600; }
/* Phan loai / khuyen mai cua dong san pham: "Nhan: gia tri" tren mot dong */
.wc-item-meta { display: flex; flex-direction: column; gap: 2px; margin: 6px 0 0; padding: 0; list-style: none; color: var(--k-muted); font-size: 13px; font-weight: 400; }
.wc-item-meta li { display: flex; flex-wrap: wrap; gap: 0 6px; margin: 0; }
.wc-item-meta .wc-item-meta-label { flex-shrink: 0; font-weight: 400; }
.wc-item-meta p { margin: 0; color: var(--k-fg); }
.woocommerce-customer-details address { margin: 0; padding: 0; border: 0; font-style: normal; line-height: 1.7; }
.woocommerce-customer-details address p { margin: 0; }
.woocommerce-customer-details--phone, .woocommerce-customer-details--email { display: flex; align-items: center; gap: 6px; color: var(--k-muted); }
.woocommerce-customer-details .col2-set { display: grid; gap: 20px; }
@media (min-width: 640px) { .woocommerce-customer-details .col2-set { grid-template-columns: 1fr 1fr; } }
.k-thanks__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }


/* ---------- Tai khoan ---------- */
.woocommerce-account .k-woo-page .woocommerce { display: grid; gap: 24px; }
@media (min-width: 1024px) { .woocommerce-account.logged-in .k-woo-page .woocommerce { grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; } }
.woocommerce-account .k-page-title { margin-bottom: 20px; }
.woocommerce-MyAccount-content { min-width: 0; }
.woocommerce-MyAccount-content > p:first-child { margin-top: 0; }
.woocommerce-account h2 { font-size: 20px; font-weight: 600; }

/* Menu tai khoan */
.k-account-nav { display: flex; flex-direction: column; gap: 4px; padding: 8px; border: 1px solid var(--k-border); border-radius: var(--k-radius-lg); background: var(--k-surface); }
@media (min-width: 1024px) { .k-account-nav { position: sticky; top: 96px; } .admin-bar .k-account-nav { top: 128px; } }
.k-account-nav__user { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; padding: 10px 10px 14px; border-bottom: 1px solid var(--k-border); }
.k-account-nav__avatar { display: grid; flex-shrink: 0; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: var(--k-primary-soft); color: var(--k-primary); font-size: 17px; font-weight: 600; }
.k-account-nav__who { display: flex; flex-direction: column; min-width: 0; }
.k-account-nav__who b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.k-account-nav__who span { overflow: hidden; color: var(--k-muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.k-account-nav ul { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.k-account-nav a { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 12px; border-radius: var(--k-radius-sm); color: color-mix(in srgb, var(--k-fg) 75%, transparent); font-size: 15px; }
.k-account-nav a:hover { background: var(--k-hover); color: var(--k-fg); }
.k-account-nav a[aria-current="page"], .k-account-nav .is-active > a { background: var(--k-primary-soft); color: var(--k-primary); font-weight: 500; }
.k-account-nav__logout { margin-top: 4px; border-top: 1px solid var(--k-border); border-radius: 0 0 var(--k-radius-sm) var(--k-radius-sm) !important; }
.k-account-nav a.k-account-nav__logout:hover { background: #fef2f2; color: var(--k-error); }
@media (max-width: 1023px) {
  /* Dien thoai: menu thanh hang cuon ngang, the nguoi dung an */
  .k-account-nav { flex-direction: row; align-items: center; padding: 6px; overflow-x: auto; scrollbar-width: none; }
  .k-account-nav::-webkit-scrollbar { display: none; }
  .k-account-nav__user { display: none; }
  .k-account-nav ul { flex-direction: row; }
  .k-account-nav a { height: 38px; white-space: nowrap; }
  .k-account-nav__logout { margin: 0; border: 0; border-radius: var(--k-radius-sm) !important; }
}

/* Tong quan */
.k-account-hello { margin: 0 0 16px; font-size: 17px; }
.k-account-cards { display: grid; gap: 16px; }
@media (min-width: 768px) { .k-account-cards { grid-template-columns: 1fr 1fr; } .k-account-card--wide { grid-column: 1 / -1; } }
.k-account-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; border: 1px solid var(--k-border); border-radius: var(--k-radius-lg); background: var(--k-surface); }
.k-account-card__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.k-account-card__head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.k-account-card__head .k-link { font-size: 14px; }
.k-account-card address, .ait-ab-default { margin: 0; font-style: normal; line-height: 1.7; }
.k-account-card p { margin: 0; }
.k-account-orders { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.k-account-orders li + li { border-top: 1px solid var(--k-border); }
.k-account-orders a { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 4px 14px; padding: 12px 4px; border-radius: var(--k-radius-sm); }
.k-account-orders a:hover { background: var(--k-hover); }
.k-account-orders__id { font-weight: 600; font-variant-numeric: tabular-nums; }
.k-account-orders__date { color: var(--k-muted); font-size: 14px; }
.k-account-orders__total { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
@media (max-width: 639px) {
  .k-account-orders a { grid-template-columns: minmax(0, 1fr) auto; }
  .k-account-orders__date { grid-column: 1; grid-row: 2; }
  .k-account-orders__total { grid-column: 2; grid-row: 2; }
}
.k-account-info { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 16px; margin: 0; font-size: 14px; }
.k-account-info dt { color: var(--k-muted); }
.k-account-info dd { margin: 0; overflow-wrap: anywhere; }
.k-account-empty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; color: var(--k-muted); }

/* Nhan trang thai don */
.k-status { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.k-status--ok { background: var(--k-ok-bg); color: var(--k-ok); }
.k-status--info { background: #eff6ff; color: #1d4ed8; }
.k-status--warn { background: var(--k-warn-bg); color: var(--k-warn); }
.k-status--muted { background: var(--k-bg-soft); color: var(--k-muted); }

/* Bang don hang (Tai khoan > Don hang) */
table.woocommerce-orders-table { border: 1px solid var(--k-border); border-collapse: separate; border-spacing: 0; overflow: hidden; border-radius: var(--k-radius-lg); background: var(--k-surface); }
table.woocommerce-orders-table th { padding: 12px 16px; background: var(--k-bg-soft); }
table.woocommerce-orders-table td { padding: 14px 16px; }
table.woocommerce-orders-table tbody tr:last-child td { border-bottom: 0; }
table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number a { font-weight: 600; }
.woocommerce-orders-table__cell-order-status { white-space: nowrap; }
table.woocommerce-orders-table .woocommerce-orders-table__cell-order-total { font-variant-numeric: tabular-nums; }
table.woocommerce-orders-table .button { min-height: 34px; padding: 6px 12px; font-size: 13px; }
table.woocommerce-orders-table .button + .button { margin-left: 6px; }
@media (max-width: 767px) {
  table.woocommerce-orders-table { border: 0; background: none; }
  table.woocommerce-orders-table thead { display: none; }
  table.woocommerce-orders-table tbody { display: flex; flex-direction: column; gap: 12px; }
  table.woocommerce-orders-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 16px; border: 1px solid var(--k-border); border-radius: var(--k-radius); background: var(--k-surface); }
  table.woocommerce-orders-table td, table.woocommerce-orders-table th { display: block; padding: 0; border: 0; background: none; text-align: left; }
  table.woocommerce-orders-table td::before { content: attr(data-title) ": "; color: var(--k-muted); font-size: 13px; }
  table.woocommerce-orders-table .woocommerce-orders-table__cell-order-number::before, table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions::before { content: none; }
  table.woocommerce-orders-table .woocommerce-orders-table__cell-order-actions { grid-column: 1 / -1; padding-top: 8px; border-top: 1px solid var(--k-border); }
}
.woocommerce-pagination--without-numbers { display: flex; justify-content: space-between; margin-top: 16px; }

/* Xem don hang */
.woocommerce-account .woocommerce-MyAccount-content > p:has(mark.order-status) { padding: 14px 16px; border-radius: var(--k-radius); background: var(--k-bg-soft); }
.woocommerce-MyAccount-content mark { padding: 0 2px; background: none; color: var(--k-fg); font-weight: 600; }
.woocommerce-MyAccount-content .woocommerce-order-details, .woocommerce-MyAccount-content .woocommerce-customer-details { margin-top: 16px; }

/* Thong tin tai khoan */
.woocommerce-EditAccountForm { display: grid; gap: 0 16px; max-width: 720px; }
@media (min-width: 640px) {
  .woocommerce-EditAccountForm { grid-template-columns: 1fr 1fr; }
  .woocommerce-EditAccountForm > .form-row-wide, .woocommerce-EditAccountForm > fieldset, .woocommerce-EditAccountForm > p:not(.form-row-first):not(.form-row-last), .woocommerce-EditAccountForm > .clear { grid-column: 1 / -1; }
}
.woocommerce-EditAccountForm .clear { display: none; }
.woocommerce-EditAccountForm fieldset { margin: 8px 0 16px; padding: 16px 18px 2px; border: 1px solid var(--k-border); border-radius: var(--k-radius); }
.woocommerce-EditAccountForm legend { padding: 0 6px; font-weight: 600; }
.woocommerce-EditAccountForm em { display: block; margin-top: 4px; color: var(--k-muted); font-size: 13px; font-style: normal; }
.woocommerce-EditAccountForm .woocommerce-Button { justify-self: start; }
.password-input { position: relative; display: block; }
.show-password-input { position: absolute; top: 50%; right: 12px; width: 24px; height: 24px; padding: 0; border: 0; background: none; transform: translateY(-50%); cursor: pointer; opacity: .6; }

/* Dang nhap / dang ky (chua dang nhap): 1 the, 2 tab */
.woocommerce-account:not(.logged-in) .k-woo-page .woocommerce { max-width: 460px; margin-inline: auto; }
.k-auth { padding: 24px; border: 1px solid var(--k-border); border-radius: var(--k-radius-lg); background: var(--k-surface); }
.k-auth__title { margin: 0 0 16px; }
.k-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 20px; padding: 4px; border-radius: var(--k-radius); background: var(--k-bg-soft); }
.k-auth__tabs button { height: 40px; padding: 0 12px; border: 0; border-radius: var(--k-radius-sm); background: transparent; color: var(--k-muted); font: 500 15px var(--k-font); cursor: pointer; transition: background-color .15s, color .15s; }
.k-auth__tabs button:hover { color: var(--k-fg); }
.k-auth__tabs button[aria-selected="true"] { background: var(--k-surface); color: var(--k-fg); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.k-auth__tabs button:focus-visible, .k-auth__switch button:focus-visible { outline: 2px solid var(--k-primary); outline-offset: 2px; }
.k-auth__panel[hidden] { display: none; }
.woocommerce-account form.woocommerce-form-login, .woocommerce-account form.woocommerce-form-register { display: block; margin: 0; padding: 0; border: 0; }
.k-body .k-auth__row { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 4px 0 20px; text-align: left; }
.k-body .k-auth__row .woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; cursor: pointer; }
.k-auth__row .woocommerce-LostPassword { color: var(--k-primary); font-size: 14px; font-weight: 500; }
.k-auth__row .woocommerce-LostPassword:hover { text-decoration: underline; }
.woocommerce-form-login__submit, .woocommerce-form-register__submit { width: 100%; }
.k-auth__note { color: var(--k-muted); font-size: 14px; }
.k-auth__switch { margin: 16px 0 0; color: var(--k-muted); font-size: 14px; text-align: center; }
.k-auth__switch button { padding: 0; border: 0; background: none; color: var(--k-primary); font: inherit; font-weight: 600; cursor: pointer; }
.k-auth__switch button:hover { text-decoration: underline; }

/* Gia tren card: plugin product-promotion boc gia trong .ccppp-price-wrapper (doi khi long 2 lop) va tu chen nhan %.
   Card da co nhan % o goc anh nen an nhan cua plugin, trai phang lop boc. */
.k-card__price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-weight: 600; font-variant-numeric: tabular-nums; }
.k-card__price .ccppp-price-wrapper { display: contents; }
.k-card__price .ccppp-discount-badge { display: none; }
.k-card__price ins, .summary .price ins, .k-stickybuy__price ins { color: var(--k-sale); text-decoration: none; }
.k-card__price del { order: 2; color: var(--k-muted); font-weight: 400; font-size: .88em; }
.k-card__price del + ins, .k-card__price ins { order: 1; }

/* Banner khi chua chon anh: thap lai, nen xanh nhat, khong de khoang trong lon */
.k-hero__main:not(:has(img)) { min-height: 0; background: var(--k-primary-soft); }
.k-hero__main:not(:has(img)) .k-hero__text { position: static; max-width: 560px; background: transparent; }
.k-hero__main:not(:has(img)) .k-badge { background: var(--k-surface); }
.k-filter__child { padding-left: 28px; }

/* Nhan "Flash Sale" cua core plugin (in sau moi san pham trong vong lap): dat len goc phai anh */
.k-card-item .fs-promotion-badge { position: absolute; top: 10px; right: 10px; z-index: 2; margin: 0; pointer-events: none; }
.k-card-item .fs-promotion-badge .fs-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--k-accent); color: #1f1a00; font-size: 12px; font-weight: 600; line-height: 1; box-shadow: none; animation: none; }
@media (max-width: 767px) {
  .k-toolbar { flex-wrap: nowrap; justify-content: space-between; }
  .k-toolbar .woocommerce-result-count { display: none; }
  .k-toolbar .woocommerce-ordering { margin-left: auto; }
}

/* Chua cho thanh admin khi dang dang nhap (46px duoi 783px, 32px tu 783px) */
.admin-bar .k-filter, .admin-bar .k-menu-drawer, .admin-bar .k-drawer { top: 32px; }
@media (max-width: 782px) { .admin-bar .k-filter, .admin-bar .k-menu-drawer, .admin-bar .k-drawer { top: 46px; } }
@media (min-width: 1024px) { .admin-bar .k-filter { top: 128px; } }

/* Nhan % cua plugin product-promotion o trang chi tiet / gio: dong tong mau giam gia */
.ccppp-discount-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--k-sale-bg) !important; color: var(--k-sale) !important; font-size: 12px !important; font-weight: 600; line-height: 1; vertical-align: middle; }
.summary > .ccppp-price-wrapper { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.summary > .ccppp-price-wrapper del { color: var(--k-muted); font-size: .6em; font-weight: 400; }
.summary > .ccppp-price-wrapper ins { color: var(--k-sale); text-decoration: none; }
.summary > p:empty, .summary > .price:empty { display: none; }

/* Nut chon bien the cua plugin Variation Swatches (thwvsf): dang chip cua theme */
.k-body ul.thwvsf-wrapper-ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.k-body li.thwvsf-wrapper-item-li.thwvsf-label-li { width: auto !important; min-width: 64px; height: 40px !important; margin: 0 !important; padding: 0 14px !important; border: 1px solid var(--k-border-strong) !important; border-radius: var(--k-radius-sm) !important; background: var(--k-surface) !important; box-shadow: none !important; line-height: 38px !important; }
.k-body li.thwvsf-wrapper-item-li .thwvsf-item-span { white-space: nowrap; color: var(--k-fg); font-size: 14px; font-weight: 500; }
.k-body li.thwvsf-wrapper-item-li:hover { border-color: var(--k-fg) !important; }
.k-body li.thwvsf-wrapper-item-li.thwvsf-selected { border-color: var(--k-primary) !important; background: var(--k-primary-soft) !important; box-shadow: inset 0 0 0 1px var(--k-primary) !important; }
.k-body li.thwvsf-wrapper-item-li.thwvsf-selected .thwvsf-item-span { color: var(--k-primary); }
.k-body li.thwvsf-wrapper-item-li.deactive { opacity: .4; }
.summary .reset_variations { padding: 0; border: 0; background: none; }

/* Khoi Flash Sale cua core plugin o trang chi tiet (markup viet cho theme cu, theme tu ve lai) */
.fs-promotion-info { display: flex; flex-direction: column; gap: 10px; }
.fs-promotion-description { margin: 0; color: var(--k-muted); font-size: 14px; }
.fs-promotion-description:empty { display: none; }
.sale-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 16px; border-radius: var(--k-radius); background: var(--k-secondary); color: #fff; }
.sale-banner .title { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.sale-banner .title::before { content: ""; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M13 2 3 14h9l-1 8 10-12h-9l1-8z'/%3E%3C/svg%3E") no-repeat center / contain; }
.sale-banner .timer-wrap { display: flex; align-items: center; gap: 10px; }
.sale-banner .label { font-size: 13px; opacity: .9; }
.sale-banner .timer { display: flex; gap: 4px; }
.sale-banner .timer .box { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 4px; border-radius: 6px; background: #fff; }
.sale-banner .timer .box span { color: var(--k-secondary); font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sale-banner .timer .box + .box::before { content: none; }

/* Gia cua plugin product-promotion o moi noi (mini cart, gio, chi tiet): theo mau giam gia cua theme */
.k-body .ccppp-sale-price, .k-body .ccppp-sale-price .amount { color: var(--k-sale) !important; text-decoration: none; }
.k-body .ccppp-regular-price, .k-body .ccppp-regular-price .amount { color: var(--k-muted) !important; font-weight: 400; }

/* Nhan "Giam gia!" goc cua Woo: gia da kem nhan % nen an */
.single-product div.product > .onsale, .woocommerce-product-gallery .onsale { display: none; }
table.cart td.actions .coupon .button { flex-shrink: 0; white-space: nowrap; }
table.cart td.actions .coupon .input-text { min-width: 0; }
.wrap-ccpov-promotion:empty { display: none; }

/* Thuoc tinh bien the (dl.variation) o moi bang: "Nhan: gia tri" tren cung dong */
.k-body dl.variation { display: grid; grid-template-columns: auto 1fr; gap: 0 6px; margin: 4px 0 0; color: var(--k-muted); font-size: 12px; font-weight: 400; line-height: 1.5; }
.k-body dl.variation dt { margin: 0; font-weight: 400; }
.k-body dl.variation dd { margin: 0; }
.k-body dl.variation dd p { margin: 0; }
.woocommerce-checkout-review-order-table td.product-name { padding-right: 12px; font-weight: 500; }
.woocommerce-checkout-review-order-table tbody td { vertical-align: top; }
.woocommerce-checkout-review-order-table .woocommerce-shipping-methods { margin: 0; padding: 0; list-style: none; }


/* ---------- Mini cart trong panel (theo wireframe): than cuon + chan co dinh ---------- */
.k-drawer .widget_shopping_cart_content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.k-mc { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.k-mc__body { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 20px; overscroll-behavior: contain; }
.k-mc__foot { flex-shrink: 0; background: var(--k-bg); }
.k-drawer__count { color: var(--k-muted); font-weight: 500; }
.k-drawer__count:empty { display: none; }
.k-mc .woocommerce-mini-cart { margin: 0; padding: 0; list-style: none; }
.k-mc .ccpfs-progress + .woocommerce-mini-cart { margin-top: 16px; }
.k-mc .k-mini-line { position: relative; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--k-border); }
.k-mc .k-mini-line:last-child { padding-bottom: 0; border-bottom: 0; }
.k-mc .k-mini-line__img { overflow: hidden; background: var(--k-bg-soft); }
.k-mc .k-mini-line__img a { display: block; height: 100%; }
.k-mc .k-mini-line__img img { width: 100%; height: 100%; padding: 4px; object-fit: contain; }
.k-mini-line__info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.k-mini-line__name { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-weight: 500; line-height: 1.4; }
.k-mini-line__name:hover { color: var(--k-primary); }
.k-mini-line__qty { color: var(--k-muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.k-mini-line__info dl.variation { margin: 0; }
.k-mini-line__end { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.k-mini-line__total { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.k-mini-line__total del { display: block; color: var(--k-muted); font-size: 12px; font-weight: 400; text-align: right; }
.k-mini-line__total ins { color: var(--k-sale); text-decoration: none; }
.k-mc .k-mini-line a.remove { color: var(--k-muted); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }
.k-mc .k-mini-line a.remove:hover { color: var(--k-error); }
.k-mc .woocommerce-mini-cart__total { display: flex; justify-content: space-between; margin: 0; padding: 0; border: 0; font-size: 15px; font-weight: 600; }
.k-mc .woocommerce-mini-cart__total strong { font-weight: 600; }
.k-mc .woocommerce-mini-cart__total .amount { font-variant-numeric: tabular-nums; }
.k-mc .woocommerce-mini-cart__buttons { display: flex; flex-direction: column-reverse; gap: 10px; margin: 0; }
.k-mc .woocommerce-mini-cart__buttons .button { width: 100%; min-height: 48px; }
.k-mc__empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 0; color: var(--k-muted); text-align: center; }
.k-mc__empty .k-icon { width: 40px; height: 40px; }
.k-mc__empty p { margin: 0; }
.k-mc.is-loading, .widget_shopping_cart_content.loading { opacity: .6; }

/* Thanh freeship cua plugin free-shipping: dang k-freeship cua theme */
.k-body .ccpfs-progress { display: flex; flex-direction: column; gap: 8px; margin: 0 0 16px; padding: 14px 16px; border: 0; border-radius: var(--k-radius); background: var(--k-primary-soft); box-shadow: none; color: var(--k-fg); font-size: 14px; }
.k-body .ccpfs-progress__message { margin: 0; }
.k-body .ccpfs-progress__track { position: relative; height: 6px; overflow: visible; border-radius: 999px; background: color-mix(in srgb, var(--k-primary) 18%, #fff); }
.k-body .ccpfs-progress__bar { height: 100%; border-radius: 999px; background: var(--k-primary) !important; }
.k-body .ccpfs-progress.is-achieved .ccpfs-progress__bar { background: var(--k-ok) !important; }

/* Hang ma uu dai + cap nhat gio: cung mot dong, cung chieu cao (td khong doi sang flex de giu colspan) */
table.cart td.actions { padding: 16px 0 0; }
table.cart td.actions::after { content: ""; display: table; clear: both; }
table.cart td.actions .coupon { float: left; width: min(420px, 100%); }
table.cart td.actions .coupon .input-text, table.cart td.actions .coupon .button, table.cart td.actions > .button { height: 46px; min-height: 46px; }
table.cart td.actions > .button { float: right; margin: 0; }
@media (max-width: 767px) {
  table.cart td.actions .coupon { float: none; width: 100%; }
  table.cart td.actions > .button { float: none; width: 100%; margin-top: 10px; }
}
.cross-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .cross-sells ul.products { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
/* Thanh mua dinh day: an nhan % cua plugin, nut khong xuong dong */
.k-stickybuy .ccppp-discount-badge { display: none; }
.k-stickybuy .k-btn, .k-stickybuy button { flex-shrink: 0; white-space: nowrap; }
.k-stickybuy__price { min-width: 0; }
table.woocommerce-orders-table tbody th { background: none; color: var(--k-fg); font-size: 14px; font-weight: 600; }

/* Wishlist (tinh nang Wishlists cua Woo): nut tim tren the va canh nut Them vao gio */
.k-only-desktop { display: none; }
@media (min-width: 1024px) { .k-only-desktop { display: inline-grid; } }
.k-wish { display: grid; place-items: center; padding: 0; border: 0; color: var(--k-fg); cursor: pointer; transition: color .15s, background-color .15s, transform .15s; }
.k-wish svg { transition: fill .15s; }
.k-wish[aria-pressed="true"] { color: var(--k-sale); }
.k-wish[aria-pressed="true"] svg { fill: currentColor; }
.k-wish.is-busy { opacity: .6; pointer-events: none; }
.k-wish:focus-visible { outline: 2px solid var(--k-primary); outline-offset: 2px; }
.k-wish--card { position: absolute; top: 8px; right: 8px; z-index: 2; width: 36px; height: 36px; border-radius: 999px; background: var(--k-surface); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.k-wish--card:hover { color: var(--k-sale); }
.k-card-item:has(.k-wish--card) .fs-promotion-badge { top: 15px; right: 52px; }
.k-wish--single { flex: 0 0 auto; width: 52px; height: 52px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); }
.k-wish--single:hover { border-color: var(--k-sale); color: var(--k-sale); }
.k-wish--single .k-icon-sm { width: 22px; height: 22px; }
.k-wish-row { margin: 0 0 16px; }
.k-wish.is-pop svg { animation: k-wish-pop .3s ease; }
@keyframes k-wish-pop { 50% { transform: scale(1.25); } }
@media (prefers-reduced-motion: reduce) { .k-wish.is-pop svg { animation: none; } }

/* Trang Tai khoan > San pham yeu thich (block woocommerce/wishlist): ve lai cho giong the san pham */
.wc-block-wishlist { font-family: var(--k-font); }
.wc-block-wishlist .wc-block-wishlist__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 24px 16px; margin: 0; padding: 0; list-style: none; }
.wc-block-shopper-list-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; text-align: left; }
.wc-block-shopper-list-item .wc-block-components-product-image { position: relative; overflow: hidden; aspect-ratio: 1; margin: 0 0 6px; border-radius: var(--k-radius); background: var(--k-bg-soft); }
.wc-block-shopper-list-item .wc-block-components-product-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wc-block-shopper-list-item__remove { position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 999px; background: var(--k-surface); color: var(--k-fg); box-shadow: 0 1px 3px rgb(0 0 0 / .12); cursor: pointer; transition: color .15s; }
.wc-block-shopper-list-item__remove:hover { color: var(--k-error); }
.wc-block-shopper-list-item__remove svg { width: 18px; height: 18px; }
.wc-block-shopper-list-item__variation { position: absolute; left: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: var(--k-surface); font-size: 12px; }
.wc-block-shopper-list-item .wp-block-post-title { margin: 0; font-size: 15px !important; font-weight: 500; line-height: 1.4; text-align: left !important; }
.wc-block-shopper-list-item .wp-block-post-title a { color: var(--k-fg); text-decoration: none; }
.wc-block-shopper-list-item .wp-block-post-title a:hover { color: var(--k-primary); }
.wc-block-shopper-list-item .price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: 15px !important; font-weight: 600; text-align: left !important; }
.wc-block-shopper-list-item .price ins { order: 1; color: var(--k-sale); text-decoration: none; }
.wc-block-shopper-list-item .price del { order: 2; color: var(--k-muted); font-size: .88em; font-weight: 400; }
.wc-block-shopper-list-item .price .ccppp-price-wrapper { display: contents; }
.wc-block-shopper-list-item .price .ccppp-discount-badge { display: none; }
.wc-block-shopper-list-item .wp-block-button { margin-top: auto; padding-top: 6px; }
.wc-block-wishlist .wc-block-shopper-list-item .wp-block-button .wc-block-components-product-button__button { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 42px; padding: 0 14px; border: 1px solid var(--k-border-strong); border-radius: var(--k-radius); background: var(--k-surface); color: var(--k-fg); font: 500 14px/1.2 var(--k-font); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.wc-block-wishlist .wc-block-shopper-list-item .wp-block-button .wc-block-components-product-button__button:hover { border-color: transparent; background: var(--k-primary); color: var(--k-primary-fg); }
.wc-block-wishlist .wc-block-shopper-list-item .wp-block-button .wc-block-components-product-button__button:disabled { opacity: .6; cursor: default; }
@media (max-width: 479px) { .wc-block-wishlist .wc-block-wishlist__list { grid-template-columns: 1fr 1fr; gap: 20px 12px; } }
.k-toast { position: fixed; left: 50%; bottom: 24px; z-index: 1000; display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--k-radius); background: var(--k-fg); color: #fff; font-size: 14px; box-shadow: var(--k-shadow-pop); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: opacity .2s, transform .2s; }
.k-toast.is-show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.k-toast a { color: #fff; font-weight: 600; text-decoration: underline; white-space: nowrap; }
