/*
Theme Name: AJ
Description: Vỏ website Aaa Jeans tự viết thay Sober – bản 1 bê nguyên giao diện cũ (logo, bố cục, màu), chữ rõ hơn, code gọn. Xem docs/WEB_THEME_AJ.md.
Author: Aaa Jeans
Version: 1.0.0
Requires PHP: 8.1
Text Domain: aj
*/

/* ===== chữ: tự chứa trong theme (fonts/, giấy phép OFL) – không gọi Google Fonts (bớt 2 tên miền ngoài + 1 CSS chặn hiển thị).
   Font biến thiên (1 file cho mọi độ đậm), chỉ tải phần chữ trang cần (latin / tiếng Việt). Tên họ giữ "Noto Sans" / "Playfair Display"
   vì CSS trong mu-plugin cũng gọi tên này. ===== */
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/noto-sans-vietnamese-wght-normal.woff2) format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Noto Sans"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/noto-sans-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Noto Sans"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/noto-sans-vietnamese-wght-italic.woff2) format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Noto Sans"; font-style: italic; font-weight: 100 900; font-display: swap; src: url(fonts/noto-sans-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/playfair-display-vietnamese-wght-normal.woff2) format("woff2");
  unicode-range: U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/playfair-display-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

/* ===== nền ===== */
:root {
  --aj-chu: #23232c;      /* chu chinh (Sober) */
  --aj-chu-phu: #4b4b52;  /* chu thuong – dam hon Sober (#7c7c80) cho de doc */
  --aj-nhat: #6b6b72;     /* chu phu nho */
  --aj-vien: #e4e4e4;
  --aj-nen-phu: #f5f5f5;
  --aj-nhan: #ffaa65;     /* nhan Moi / Ban chay (Sober) */
  --aj-do: #d81f26;
  --aj-font: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --aj-font-tieu-de: "Playfair Display", Georgia, serif;
  --aj-rong: 1300px;
  --aj-le: 40px;
}
@media (max-width: 1023px) { :root { --aj-le: 24px; } }
@media (max-width: 767px) { :root { --aj-le: 16px; } }
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--aj-font); font-size: 14px; line-height: 1.7; color: var(--aj-chu-phu); background: #fff; }
a { color: var(--aj-chu); text-decoration: none; }
a:hover { color: #000; }
img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6 { color: var(--aj-chu); font-weight: 500; line-height: 1.25; margin: 0 0 .6em; }
p { margin: 0 0 1em; }
button, input, select, textarea { font: inherit; color: inherit; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; z-index: 100000; top: 8px; left: 8px; background: #fff; padding: 8px 12px; }
.aj-wrap { max-width: var(--aj-rong); margin: 0 auto; padding-left: var(--aj-le); padding-right: var(--aj-le); }
.aj-main { padding-top: 30px; padding-bottom: 60px; }
.aj-trang-chu { padding-top: 0; }
.aj-i { display: block; }
.aj-nut { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; border: 0; background: transparent; color: var(--aj-chu); cursor: pointer; position: relative; }
.aj-nut:hover { color: #000; }
.button, button.button, a.button, input[type=submit], .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 28px; border: 1px solid var(--aj-chu); border-radius: 0;
  background: var(--aj-chu); color: #fff; font-family: var(--aj-font); font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; line-height: 1.2;
}
.button:hover, button.button:hover, a.button:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: #000; border-color: #000; color: #fff; }
.woocommerce a.button.alt, .woocommerce button.button.alt, .woocommerce input.button.alt, .woocommerce #respond input#submit.alt,
.woocommerce button.button.alt.disabled, .woocommerce button.button.alt:disabled, .woocommerce button.button.alt:disabled[disabled], .woocommerce a.button.alt.disabled { background-color: var(--aj-chu); border-color: var(--aj-chu); color: #fff; }
.woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover { background-color: #000; border-color: #000; color: #fff; }
.woocommerce button.button.disabled, .woocommerce button.button:disabled, .woocommerce button.button.alt.disabled { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; min-height: 46px; padding: 8px 12px; border: 1px solid #cfcfd2; border-radius: 0; background: #fff; color: var(--aj-chu); font-size: 15px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--aj-chu); }

/* ===== đầu trang ===== */
.site-header { position: sticky; top: var(--aaa-bn-h, 0px); z-index: 900; background: #fff; border-bottom: 1px solid #f0f0f0; }
html.aaa-banner-off .site-header { top: 0; }
.aj-head { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.aj-logo { flex: 0 0 auto; display: block; }
.aj-logo img { display: block; width: 120px; height: auto; }
.aj-mo-menu { display: none; }
.aj-nav { flex: 1 1 auto; min-width: 0; }
.aj-nav .menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px clamp(16px, 2vw, 30px); }   /* menu giua nhu web that (soat 21/11) */
.aj-nav .menu > li { position: relative; }
.aj-nav .menu > li > a { display: block; padding: 10px 0; font-size: 14px; font-weight: 700; color: var(--aj-chu); white-space: nowrap; }
.aj-nav .menu > li > a:hover { color: #000; }
.aj-nav .sub-menu { position: absolute; top: 100%; left: -16px; min-width: 220px; list-style: none; margin: 0; padding: 10px 0; background: #fff; box-shadow: 0 6px 24px rgba(0,0,0,.08); opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s; z-index: 10; }
.aj-nav li:hover > .sub-menu, .aj-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.aj-nav .sub-menu a { display: block; padding: 7px 16px; font-size: 14px; color: var(--aj-chu-phu); }
.aj-nav .sub-menu a:hover { color: var(--aj-chu); }
.aj-cong-cu { flex: 0 0 auto; display: flex; align-items: center; margin-left: auto; }
.aj-gio-so { position: absolute; top: 5px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--aj-chu); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
@media (max-width: 1023px) {
  .aj-head { min-height: 60px; gap: 0; }
  .aj-mo-menu { display: inline-flex; margin-left: -10px; }
  .aj-nav, .aj-tk, .aj-mo-tim { display: none; }
  .aj-logo { position: absolute; left: 50%; transform: translateX(-50%); }
  .aj-logo img { width: 110px; }
  .aj-head { position: relative; justify-content: space-between; }
  .aj-cong-cu { margin-right: -10px; }
}

/* ô tìm kiếm */
.aj-tim { position: fixed; left: 0; right: 0; top: 0; z-index: 10010; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 24px 0; opacity: 0; transform: translateY(-10px); transition: .2s; }
.aj-tim.mo { opacity: 1; transform: none; }
.aj-tim .aj-wrap { display: flex; gap: 12px; align-items: center; }
.aj-tim form { flex: 1; display: flex; gap: 8px; }
.aj-tim form label { flex: 1; }
.aj-tim .search-field { font-size: 16px; }

/* ngăn kéo: menu điện thoại + giỏ mini */
.aj-man { position: fixed; inset: 0; z-index: 10000; background: rgba(0,0,0,.45); opacity: 0; transition: opacity .25s; }
.aj-man.mo { opacity: 1; }
html.aj-khoa { overflow: hidden; }
.aj-ngan { position: fixed; top: 0; bottom: 0; z-index: 10005; width: min(400px, 88vw); background: #fff; display: flex; flex-direction: column; transition: transform .25s; overflow-y: auto; }
.aj-ngan-trai { left: 0; transform: translateX(-100%); }
.aj-ngan-phai { right: 0; transform: translateX(100%); }
.aj-ngan.mo { transform: none; }
.aj-ngan-dau { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--aj-vien); font-size: 15px; font-weight: 700; color: var(--aj-chu); }
.mobile-nav .menu { list-style: none; margin: 0; padding: 8px 0; }
.mobile-nav li { position: relative; border-bottom: 1px solid #f1f1f1; }
.mobile-nav li a { display: block; padding: 13px 52px 13px 20px; font-size: 15px; font-weight: 600; color: var(--aj-chu); }
.mobile-nav .sub-menu { display: none; list-style: none; margin: 0; padding: 0 0 8px; }
.mobile-nav li.mo > .sub-menu { display: block; }
.mobile-nav .sub-menu a { font-weight: 400; padding: 9px 20px 9px 36px; }
.aj-sub-mo { position: absolute; right: 4px; top: 4px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--aj-chu); display: flex; align-items: center; justify-content: center; }
.mobile-nav li.mo > .aj-sub-mo .aj-i { transform: rotate(180deg); }
.aj-ngan-cuoi { margin-top: auto; padding: 16px 20px; border-top: 1px solid var(--aj-vien); }
.aj-ngan-cuoi a { font-weight: 600; }
#aj-gio .widget_shopping_cart_content { padding: 16px 20px; display: flex; flex-direction: column; flex: 1; }
#aj-gio .woocommerce-mini-cart { list-style: none; margin: 0; padding: 0; }
#aj-gio .woocommerce-mini-cart-item { position: relative; display: block; padding: 12px 28px 12px 76px; min-height: 96px; border-bottom: 1px solid #f1f1f1; font-size: 13px; line-height: 1.45; }
#aj-gio .woocommerce-mini-cart-item img { position: absolute; left: 0; top: 12px; width: 64px; height: 80px; object-fit: cover; margin: 0; }
#aj-gio .woocommerce-mini-cart-item .remove { position: absolute; right: 0; top: 10px; font-size: 20px; color: var(--aj-nhat); }
#aj-gio .woocommerce-mini-cart-item a:not(.remove) { color: var(--aj-chu); font-weight: 500; }
#aj-gio .quantity { display: block; color: var(--aj-nhat); margin-top: 4px; }
#aj-gio .woocommerce-mini-cart__total { display: flex; justify-content: space-between; padding: 14px 0; font-size: 15px; color: var(--aj-chu); }
#aj-gio .woocommerce-mini-cart__buttons { display: grid; gap: 8px; margin: 0; }
#aj-gio .woocommerce-mini-cart__buttons .button { width: 100%; }
#aj-gio .woocommerce-mini-cart__buttons .button:not(.checkout) { background: #fff; color: var(--aj-chu); }
#aj-gio .woocommerce-mini-cart__empty-message { padding: 30px 0; text-align: center; }

/* ===== tiêu đề trang ===== */
.aj-page-head { text-align: center; padding: 10px 0 30px; }
.aj-page-title, .woocommerce-products-header__title.page-title { font-family: var(--aj-font-tieu-de); font-weight: 500; color: var(--aj-chu); }
.aj-page-title, .woocommerce-products-header__title.page-title { font-size: clamp(30px, 5vw, 56px); line-height: 1.1; text-align: center; margin: 10px 0 24px; }
.woocommerce-products-header { text-align: center; }
.woocommerce-breadcrumb { font-size: 12px; color: var(--aj-nhat); margin: 0 0 10px; }
.woocommerce-breadcrumb a { color: var(--aj-nhat); }
@media (max-width: 767px) { .single-product .woocommerce-breadcrumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }   /* 1 dong nhu web that (aaa-ux.php lam cho Sober) – soat 21/11 */
.woocommerce-result-count { font-size: 13px; color: var(--aj-nhat); margin: 0 0 16px; float: left; }
.woocommerce-ordering { float: right; margin: 0 0 16px; }
.woocommerce-ordering select { min-height: 40px; width: auto; font-size: 13px; }
.woocommerce ul.products::before, .woocommerce ul.products::after, ul.products::before, ul.products::after { content: none !important; display: none !important; }

/* ===== lưới sản phẩm (giống Sober: 4 cột, tên chữ có chân, giá đậm, căn giữa) ===== */
ul.products { clear: both; list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 30px; }
@media (max-width: 1023px) { ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 20px; } }
@media (max-width: 767px) { ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 12px; } }
ul.products li.product { position: relative; margin: 0; padding: 0; width: auto; float: none; text-align: center; }
.product-header { position: relative; margin-bottom: 8px; }
.product-header > a { position: relative; display: block; aspect-ratio: 400 / 477; overflow: hidden; background: var(--aj-nen-phu); }
.product-header > a > img { display: block; width: 100%; height: 100%; object-fit: cover; margin: 0; }
.product-header > a > img.aj-hover { position: absolute; inset: 0; opacity: 0; transition: opacity .3s; }
@media (hover: hover) { li.product:hover .product-header > a > img.aj-hover[src] { opacity: 1; } }
.ribbons.woocommerce-badges { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.woocommerce-badge { display: inline-block; padding: 0 6px; background: var(--aj-nhan); color: #fff; font-size: 10px; font-weight: 600; line-height: 22px; text-transform: uppercase; letter-spacing: .02em; }
.woocommerce-badge.onsale { background: var(--aj-chu); }
.woocommerce-loop-product__title { margin: 0; padding: 4px 0; font-family: var(--aj-font-tieu-de); font-size: 15px; font-weight: 400; line-height: 1.4; }
.woocommerce-loop-product__title a { color: var(--aj-chu); }
.woocommerce ul.products li.product .price, ul.products li.product .price { display: block; margin: 2px 0; color: #111114; font-size: 14px; font-weight: 600; line-height: 1.6; }
.woocommerce ul.products li.product .price del, ul.products li.product .price del { color: var(--aj-nhat); font-weight: 400; margin-right: 6px; }
ul.products li.product .price ins { text-decoration: none; }
@media (max-width: 767px) { .woocommerce-loop-product__title { font-size: 14px; } ul.products li.product .price { font-size: 13px; } }
.woocommerce-pagination ul { list-style: none; display: flex; justify-content: center; gap: 6px; padding: 0; margin: 20px 0; border: 0; }
.woocommerce-pagination a, .woocommerce-pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; border: 1px solid var(--aj-vien); color: var(--aj-chu); }
.woocommerce-pagination .current { background: var(--aj-chu); color: #fff; border-color: var(--aj-chu); }
.term-description { clear: both; max-width: 820px; margin: 30px auto 0; color: var(--aj-chu-phu); }

/* ===== trang sản phẩm ===== */
.woocommerce div.product { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0 60px; align-items: start; margin-bottom: 60px; }
.woocommerce div.product > .woocommerce-product-gallery { grid-column: 1; grid-row: 1 / span 2; width: auto; float: none; margin: 0; }
.woocommerce div.product > .summary { grid-column: 2; width: auto; float: none; margin: 0; position: sticky; top: 110px; } /* top that do aj.js tinh: summary dai hon man hinh thi dinh theo day (giong Sober) */
.woocommerce div.product > .woocommerce-tabs, .woocommerce div.product > .related, .woocommerce div.product > .upsells, .woocommerce div.product > section { grid-column: 1 / -1; }
.woocommerce-product-gallery { position: relative; opacity: 1 !important; }
.woocommerce-product-gallery__wrapper { display: grid; gap: 10px; margin: 0; }
.woocommerce-product-gallery__image { width: 100% !important; }
.woocommerce-product-gallery__image img { display: block; width: 100%; height: auto; }
.woocommerce-product-gallery__trigger { display: none; }
@media (max-width: 767px) {
  .woocommerce div.product { display: block; }
  .woocommerce div.product > .summary { position: static; padding-top: 18px; }
  .woocommerce-product-gallery { margin: 0 calc(-1 * var(--aj-le)) !important; }
  .woocommerce-product-gallery__wrapper { display: flex; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .woocommerce-product-gallery__wrapper::-webkit-scrollbar { display: none; }
  .woocommerce-product-gallery__image { flex: 0 0 100%; scroll-snap-align: start; }
}
/* ten SP trang chi tiet: Noto Sans 400 nhu web that Sober (bo Playfair – soat 21/11, ban 1 'be nguyen giao dien') */
.woocommerce div.product .product_title { font-family: var(--aj-font); font-weight: 400; color: var(--aj-chu); font-size: clamp(22px, 2.4vw, 32px); line-height: 1.2; margin: 0 0 10px; }
.woocommerce div.product .summary .price { display: block; color: var(--aj-chu); font-size: 22px; font-weight: 600; margin: 0 0 14px; }
.woocommerce div.product .summary .price del { color: var(--aj-nhat); font-size: 16px; font-weight: 400; }
.woocommerce div.product .summary .price ins { text-decoration: none; }
.woocommerce-product-details__short-description { color: var(--aj-chu-phu); }
.woocommerce div.product form.cart { margin: 16px 0 20px; }
.woocommerce div.product form.cart .variations { display: block; margin: 0 0 14px; }
.woocommerce div.product form.cart .variations .variable { display: block; margin: 0 0 14px; }
.woocommerce div.product form.cart .variations .label label { display: block; font-size: 15px; font-weight: 600; color: var(--aj-chu); margin: 0 0 8px; }
.woocommerce div.product form.cart .variations select { max-width: 320px; }
.variations-reset { min-height: 20px; }
.reset_variations { font-size: 12px; color: var(--aj-nhat); }
.woocommerce-variation-price .price { font-size: 18px !important; }
.woocommerce-variation-availability .stock { font-size: 13px; margin: 6px 0; }
/* hang mua: o so luong + nut "Thêm vào giỏ hàng" lap day hang (nhu Sober), "Mua ngay" ca hang ben duoi */
.woocommerce div.product form.cart .woocommerce-variation-add-to-cart,
.woocommerce div.product form.cart:not(.variations_form) { display: flex; flex-wrap: wrap; align-items: stretch; gap: 10px; }
.woocommerce div.product form.cart:not(.variations_form) > :not(.quantity):not(.single_add_to_cart_button) { flex: 0 0 100%; }
.woocommerce div.product form.cart .quantity { display: flex; flex: 0 0 auto; margin: 0; }
.woocommerce .quantity .qty { width: 80px; min-height: 48px; text-align: center; }
.woocommerce div.product form.cart .quantity .qty { height: 56px; }
.woocommerce div.product form.cart .single_add_to_cart_button { flex: 1 1 0; min-width: 0; height: 56px; }
/* 21/11 anh Cong: "2 nut bi dinh nhau thanh 1 cuc" – Mua ngay la nut vien (phu), tach 10px voi hang Them vao gio (truoc .button cua theme de len nen den, gap doc 0) */
.woocommerce div.product form.cart .aaa-buy-now { flex: 0 0 100%; height: 56px; margin: 0; background: #fff; color: var(--aj-chu); border: 1px solid var(--aj-chu); }
.woocommerce div.product form.cart .aaa-buy-now:hover { background: var(--aj-chu); color: #fff; }
/* "Yên tâm về size" (aaa-size-quiz + aaa-size-call): Sober can giua + keo len -16px; theme AJ can trai theo cot */
.woocommerce div.product form.cart .aaa-fit { text-align: left; margin: 4px 0 16px; }
.woocommerce-tabs { margin-top: 50px; border-top: 1px solid var(--aj-vien); }
.woocommerce-tabs ul.tabs { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 30px; margin: 0; padding: 0; border-bottom: 1px solid var(--aj-vien); }
.woocommerce-tabs ul.tabs li { margin: 0; padding: 0; border: 0; background: none; }
.woocommerce-tabs ul.tabs li a { display: block; padding: 16px 0; font-size: 15px; font-weight: 600; color: var(--aj-nhat); border-bottom: 2px solid transparent; }
.woocommerce-tabs ul.tabs li.active a { color: var(--aj-chu); border-color: var(--aj-chu); }
.woocommerce-tabs .panel { max-width: 860px; margin: 30px auto 0; }
.woocommerce-tabs .panel > h2:first-child { display: none; }
.related > h2, .upsells > h2 { font-family: var(--aj-font-tieu-de); font-size: 28px; text-align: center; margin: 60px 0 30px; }

/* ===== giỏ hàng / thanh toán / tài khoản (dùng mẫu Woo, chỉnh cho gọn) ===== */
.woocommerce-cart .aj-main, .woocommerce-checkout .aj-main, .woocommerce-account .aj-main { max-width: 1100px; }
/* goi y that lung trong gio (aaa-cart): o nho, khong keo ca hang (Sober de 3 anh to ~310px) */
.woocommerce-cart .aaa-ups-l { grid-template-columns: repeat(3, minmax(0, 150px)); gap: 12px; }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; border: 0; margin: 0 0 24px; }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 14px 8px; border-top: 1px solid var(--aj-vien); text-align: left; vertical-align: middle; }
.woocommerce table.shop_table thead th { border-top: 0; font-size: 13px; text-transform: uppercase; color: var(--aj-nhat); font-weight: 600; }
.woocommerce table.cart img { width: 72px; height: auto; }
.woocommerce .cart-collaterals .cart_totals { max-width: 460px; margin-left: auto; }
/* bang Woo tren dien thoai (theme AJ bo woocommerce-smallscreen.css): moi dong 1 the, nhan cot lay tu data-title */
@media (max-width: 767px) {
  .woocommerce table.shop_table_responsive thead { display: none; }
  .woocommerce table.shop_table_responsive tbody tr, .woocommerce table.shop_table_responsive tbody td,
  .woocommerce table.shop_table_responsive tbody th { display: block; }
  .woocommerce table.shop_table_responsive tbody tr { border-top: 1px solid var(--aj-vien); padding: 10px 0; }
  .woocommerce table.shop_table_responsive tbody td { border: 0; padding: 4px 0; text-align: right; }
  .woocommerce table.shop_table_responsive tbody td[data-title]::before { content: attr(data-title); float: left; font-weight: 600; color: var(--aj-chu); }
  .woocommerce table.shop_table_responsive tbody td.actions { text-align: left; }
  /* gio hang: anh trai, ten + gia + so luong ben phai */
  .woocommerce table.cart tr.cart_item { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto 24px; grid-template-areas: "anh ten ten xoa" "anh gia gia gia" "anh sl tong tong"; gap: 6px 12px; align-items: center; padding: 14px 0; }
  .woocommerce table.cart tr.cart_item td { padding: 0; text-align: left; }
  .woocommerce table.cart tr.cart_item td::before { content: none !important; }
  .woocommerce table.cart td.product-thumbnail { grid-area: anh; align-self: start; }
  .woocommerce table.cart td.product-name { grid-area: ten; font-weight: 500; line-height: 1.4; }
  .woocommerce table.cart td.product-remove { grid-area: xoa; align-self: start; text-align: right; }
  .woocommerce table.cart td.product-price { grid-area: gia; color: var(--aj-nhat); font-size: 13px; }
  .woocommerce table.cart td.product-quantity { grid-area: sl; }
  .woocommerce table.cart td.product-subtotal { grid-area: tong; font-weight: 600; text-align: right; }
  .woocommerce table.cart td.product-quantity .qty { width: 64px; min-height: 40px; }
  .woocommerce .cart-collaterals .cart_totals table th { width: 45%; }
  .woocommerce .cart-collaterals .cart_totals tbody tr { display: table-row; padding: 0; }
  .woocommerce .cart-collaterals .cart_totals tbody th, .woocommerce .cart-collaterals .cart_totals tbody td { display: table-cell; padding: 10px 0; border-top: 1px solid var(--aj-vien); }
  .woocommerce .cart-collaterals .cart_totals tbody td::before { content: none; }
}
.woocommerce-checkout .col2-set { display: grid; grid-template-columns: 1fr; gap: 0; }
.woocommerce form .form-row { margin: 0 0 14px; padding: 0; }
.woocommerce form .form-row label { display: block; font-size: 14px; font-weight: 600; color: var(--aj-chu); margin-bottom: 6px; }
.woocommerce form .form-row .required { color: var(--aj-do); text-decoration: none; }
#order_review_heading, .woocommerce-billing-fields h3, .woocommerce-shipping-fields h3 { font-size: 18px; font-weight: 700; margin: 20px 0 14px; }
@media (min-width: 1024px) {
  /* 21/11 (web that): truoc customer_details chiem hang 1 -> bang don (hang 2) tut xuong duoi het cot trai (~1000px). Nay: cot trai trai hang 2–3,
     phai = tieu de (hang 2) + bang don (hang 3, 1fr hut phan cao du) dinh khi cuon; thong bao loi Woo chen dau form -> tu vao hang 1 ca chieu ngang. */
  .woocommerce-checkout form.checkout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 0 50px; align-items: start; }
  .woocommerce-checkout form.checkout > * { grid-column: 1 / -1; }
  .woocommerce-checkout form.checkout > #customer_details { grid-column: 1; grid-row: 2 / span 2; }
  .woocommerce-checkout form.checkout > #order_review_heading { grid-column: 2; grid-row: 2; }
  .woocommerce-checkout form.checkout > #order_review { grid-column: 2; grid-row: 3; position: sticky; top: 120px; }
}
#payment { background: var(--aj-nen-phu) !important; border-radius: 0 !important; }
#payment .place-order .button { width: 100%; min-height: 54px; font-size: 15px; }
.woocommerce-info, .woocommerce-message, .woocommerce-error { border-top-color: var(--aj-chu) !important; background: var(--aj-nen-phu) !important; color: var(--aj-chu) !important; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.woocommerce-MyAccount-navigation a { display: block; padding: 9px 16px; border: 1px solid var(--aj-vien); color: var(--aj-chu); font-size: 14px; font-weight: 600; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--aj-chu); color: #fff; border-color: var(--aj-chu); }
/* 21/11 anh Cong: tieu de tung muc trong Tai khoan dam + to hon (truoc 12–13px, nho hon chu thuong 14px) */
.woocommerce-account table.shop_table thead th { font-size: 13px; font-weight: 700; color: var(--aj-chu); }
.woocommerce-account .akq-tom small { font-size: 14px; font-weight: 700; color: var(--aj-chu); }

/* ===== bài viết ===== */
.aj-bai-luoi { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 30px; }
@media (max-width: 767px) { .aj-bai-luoi { grid-template-columns: 1fr; } }
.aj-bai-anh img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.aj-bai-ten { font-family: var(--aj-font-tieu-de); font-size: 20px; margin: 14px 0 6px; }
.aj-bai { max-width: 820px; }
.aj-bai-ngay { text-align: center; font-size: 13px; color: var(--aj-nhat); margin: -16px 0 24px; }
.aj-bai-anh-lon { display: block; margin: 0 auto 30px; }
.entry-content { color: var(--aj-chu-phu); }
.entry-content h2, .entry-content h3 { margin-top: 1.4em; }
/* khung lien he (trang Lien he, class cu cua Sober) */
.sober-contact-box { margin: 24px 0; border-top: 1px solid var(--aj-vien); }
.sober-contact-box .contact-info { display: grid; grid-template-columns: 22px 130px minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--aj-vien); }
.sober-contact-box .info-icon { width: 20px; height: 20px; color: var(--aj-chu); margin-top: 2px; }
.sober-contact-box .info-name { font-weight: 600; color: var(--aj-chu); }
.sober-contact-box .info-value a { color: var(--aj-chu); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 767px) { .sober-contact-box .contact-info { grid-template-columns: 22px minmax(0, 1fr); } .sober-contact-box .info-value { grid-column: 2; } }

/* lưới aj-row / aj-col trong nội dung trang (8 trang dựng bằng lưới này – trước nằm ở theme con) */
.aj-row { display: flex; flex-wrap: wrap; margin-left: -15px; margin-right: -15px; }
.aj-col { padding-left: 15px; padding-right: 15px; flex: 1 1 0; min-width: 0; }
.aj-col-12 { flex: 0 0 100%; max-width: 100%; }
.aj-col-6 { flex: 0 0 50%; max-width: 50%; }
.aj-col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.aj-col-3 { flex: 0 0 25%; max-width: 25%; }
@media (max-width: 767px) { .aj-col-6, .aj-col-4, .aj-col-3 { flex-basis: 100%; max-width: 100%; } }

/* ===== chân trang ===== */
.site-footer { background: #fafafa; border-top: 1px solid #efefef; color: var(--aj-chu-phu); font-size: 14px; margin-top: 40px; }
.aj-chan-cot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 40px; padding-top: 60px; padding-bottom: 40px; }
@media (max-width: 767px) { .aj-chan-cot { grid-template-columns: 1fr; padding-top: 40px; } }
.site-footer .widget { margin: 0 0 10px; }
.site-footer .widget-title, .site-footer .wp-block-heading { font-size: 14px; font-weight: 700; text-transform: uppercase; color: var(--aj-chu); margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 6px; }
.site-footer a { color: var(--aj-chu-phu); }
.site-footer a:hover { color: var(--aj-chu); }
.site-footer .tagcloud a { display: inline-block; font-size: 12px !important; border: 1px solid var(--aj-vien); padding: 2px 8px; margin: 0 4px 6px 0; }
.aj-chan-duoi { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 18px; padding-bottom: 24px; border-top: 1px solid #ececec; font-size: 13px; }
.aj-chan-duoi .menu { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.aj-chan-duoi li { margin: 0; }
@media (max-width: 767px) { .aj-chan-duoi { flex-direction: column; align-items: flex-start; padding-bottom: 80px; } }

/* lop phu / ngan keo / o tim: tren dai banner BF (aaa-nen .store-wide-banner z-index 9999). Dang mo ngan keo (html.aj-khoa) -> an nut chat noi (#ajw-btn, z 99998) de khong che menu */
html.aj-khoa #ajw-btn { display: none !important; }
/* nut Khach Quen (aaa-khach-quen: chu 16px khong xuong dong) – chu Noto Sans cua AJ rong hon Sober -> dien thoai bi cat chu; cho xuong dong */
body .akq-btn { white-space: normal; text-align: center; line-height: 1.25; height: auto; min-height: 50px; padding-top: 6px; padding-bottom: 6px; }
