/* ===========================================================
   Tự ôn thi — v5.4 — Reskin trang WooCommerce theo shell My Corner
   Chỉ chỉnh MÀU SẮC / FONT / KHOẢNG CÁCH trên các class chuẩn, ổn định của
   WooCommerce (không đổi cấu trúc/markup nội bộ) — không ảnh hưởng logic
   giỏ hàng, thanh toán, hook của plugin/gateway.
   =========================================================== */

.tt-shop-shell{max-width:1200px}
.tt-shop-shell .woocommerce{font-family:"Inter",system-ui,sans-serif;color:var(--ink);font-size:15px;line-height:1.6}
.tt-shop-shell .woocommerce *{box-sizing:border-box}
.tt-shop-shell a{color:var(--green)}

/* breadcrumb WooCommerce mặc định */
.tt-shop-shell .woocommerce-breadcrumb{font-size:.8rem;color:var(--muted);margin:0 0 28px}
.tt-shop-shell .woocommerce-breadcrumb a{color:var(--muted);text-decoration:none}
.tt-shop-shell .woocommerce-breadcrumb a:hover{color:var(--green)}

/* ============ SHOP / DANH MỤC SẢN PHẨM (grid) ============ */
.tt-shop-shell ul.products{display:grid !important;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:28px;
  list-style:none;margin:0 0 40px;padding:0}
.tt-shop-shell ul.products li.product{background:var(--thumb);border-radius:4px;padding:20px;margin:0 !important;
  transition:background .15s;position:relative}
.tt-shop-shell ul.products li.product:hover{background:var(--hover)}
.tt-shop-shell ul.products li.product a{text-decoration:none;color:inherit}
.tt-shop-shell ul.products li.product img{border-radius:4px;margin-bottom:14px;height:auto;width:100%}
.tt-shop-shell ul.products li.product .woocommerce-loop-product__title{font-size:1rem;font-weight:600;
  line-height:1.35;letter-spacing:-.01em;color:var(--ink);margin:0 0 8px}
.tt-shop-shell ul.products li.product .price{color:var(--green);font-weight:600;font-size:.92rem}
.tt-shop-shell ul.products li.product .price del{color:var(--muted);opacity:.7;font-weight:400}
.tt-shop-shell ul.products li.product .price ins{text-decoration:none}
.tt-shop-shell ul.products li.product .button{display:inline-block;margin-top:14px;font-size:.78rem;font-weight:600;
  color:var(--green);background:var(--green-bg);border:0;border-radius:100px;padding:7px 16px;text-decoration:none;
  cursor:pointer;transition:.15s}
.tt-shop-shell ul.products li.product .button:hover{background:var(--green);color:#fff}
.tt-shop-shell ul.products li.product .onsale{position:absolute;top:14px;left:14px;background:var(--green);color:#fff;
  font-size:.68rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;border-radius:100px;padding:3px 10px;
  min-width:0;height:auto;line-height:1.6}
.tt-shop-shell ul.products li.product .star-rating{font-size:.85rem;margin:0 0 6px}

.tt-shop-shell .woocommerce-result-count{color:var(--muted);font-size:.85rem}
.tt-shop-shell .woocommerce-ordering select{appearance:none;font:inherit;font-size:.8rem;cursor:pointer;background:#fff;
  border:1px solid var(--thumbline);border-radius:8px;padding:6px 27px 6px 11px;color:var(--ink)}
.tt-shop-shell .woocommerce-pagination ul.page-numbers{display:flex;gap:6px;list-style:none;padding:0;margin:24px 0 0}
.tt-shop-shell .woocommerce-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;height:34px;border-radius:8px;background:var(--thumb);color:var(--ink);text-decoration:none;font-size:.85rem}
.tt-shop-shell .woocommerce-pagination .page-numbers.current,.tt-shop-shell .woocommerce-pagination a.page-numbers:hover{
  background:var(--green);color:#fff}

/* ============ TRANG CHI TIẾT SẢN PHẨM ============
   Bố cục 1 CỘT (giống reader.php của My Corner: ảnh trên, nội dung dưới) —
   KHÔNG dùng grid 2 cột với gallery slider của WooCommerce, vì JS flexslider
   tự tính width lúc tải trang và tính sai trong khung layout mới → ảnh bị co
   nhỏ/lệch (đã tắt hẳn slider/zoom JS ở functions.php, phần CSS dưới chỉ còn
   xử lý ảnh <img> đơn giản). */
/* G8 (hotfix): WooCommerce mặc định tự đặt .images/.summary float:left/right;
   width:48% (CSS lõi của WC + Astra) — CSS trước chưa ghi đè nên 2 khối này vẫn
   co hẹp lại 48% MỖI bên dù .product đã rộng, để lại khoảng trắng lớn 2 bên.
   Ghi đè hẳn bằng flexbox + !important (chỉ đổi trình bày, không đụng logic). */
.tt-shop-shell div.product{max-width:none;display:flex;flex-wrap:wrap;gap:48px;align-items:flex-start;margin:0 0 60px}
.tt-shop-shell div.product .images,
.tt-shop-shell div.product .woocommerce-product-gallery{float:none !important;width:300px !important;max-width:300px;
  flex:0 0 300px;margin:0}
.tt-shop-shell div.product .images img,
.tt-shop-shell div.product .woocommerce-product-gallery img{display:block;border-radius:8px;width:100%;height:auto;max-width:100%}
.tt-shop-shell div.product .woocommerce-product-gallery__image{margin:0}

.tt-shop-shell div.product .summary{float:none !important;width:auto !important;max-width:none;clear:none;
  flex:1 1 380px;min-width:280px}

@media(max-width:700px){
  .tt-shop-shell div.product{flex-direction:column;gap:28px}
  .tt-shop-shell div.product .images,
  .tt-shop-shell div.product .woocommerce-product-gallery{width:100% !important;max-width:380px;flex-basis:auto}
}
.tt-shop-shell div.product .product_title{font-size:clamp(1.5rem,1.15rem + 1.4vw,1.95rem);line-height:1.2;
  letter-spacing:-.02em;font-weight:700;margin:0 0 14px}
.tt-shop-shell div.product p.price,.tt-shop-shell div.product span.price{color:var(--green);font-weight:700;
  font-size:1.25rem;display:block;margin:0 0 20px}
.tt-shop-shell div.product p.price del{color:var(--muted);font-weight:400;opacity:.7;font-size:1rem}
.tt-shop-shell div.product .woocommerce-product-details__short-description{color:var(--soft);font-size:.95rem;
  line-height:1.65;margin:0 0 24px}
.tt-shop-shell div.product .woocommerce-product-details__short-description p{margin:0 0 10px}

.tt-shop-shell div.product form.cart{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 24px}
.tt-shop-shell div.product .quantity{display:inline-block}
.tt-shop-shell div.product .quantity .qty{width:64px;font:inherit;font-size:.9rem;border:1px solid var(--thumbline);
  border-radius:8px;padding:9px 10px;color:var(--ink);background:#fff}
.tt-shop-shell div.product .quantity .qty:focus{outline:none;border-color:var(--green);box-shadow:0 0 0 3px var(--green-bg)}
.tt-shop-shell div.product .single_add_to_cart_button,
.tt-shop-shell div.product button.button,
.tt-shop-shell div.product a.button{font:inherit;font-size:.88rem;font-weight:600;color:#fff;background:var(--green);
  border:0;border-radius:100px;padding:12px 28px;cursor:pointer;text-decoration:none;display:inline-block;transition:.15s}
.tt-shop-shell div.product .single_add_to_cart_button:hover,
.tt-shop-shell div.product button.button:hover,
.tt-shop-shell div.product a.button:hover{background:var(--green2)}
.tt-shop-shell div.product .single_add_to_cart_button.disabled{opacity:.5;cursor:not-allowed}
.tt-shop-shell div.product .product_meta{font-size:.82rem;color:var(--muted);margin-top:10px}
.tt-shop-shell div.product .product_meta a{color:var(--muted);text-decoration:underline}

/* Tabs: Description / Reviews */
.tt-shop-shell .woocommerce-tabs{margin-top:60px;max-width:760px}
.tt-shop-shell .woocommerce-tabs ul.tabs{display:flex;gap:24px;list-style:none;padding:0;margin:0 0 28px;
  border-bottom:1px solid var(--line)}
.tt-shop-shell .woocommerce-tabs ul.tabs li{margin:0}
.tt-shop-shell .woocommerce-tabs ul.tabs li a{display:inline-block;padding:0 0 12px;font-size:.85rem;font-weight:600;
  color:var(--muted);text-decoration:none;border-bottom:2px solid transparent;margin-bottom:-1px}
.tt-shop-shell .woocommerce-tabs ul.tabs li.active a{color:var(--green);border-bottom-color:var(--green)}
.tt-shop-shell .woocommerce-tabs .panel{color:var(--soft);font-size:.95rem;line-height:1.7}
.tt-shop-shell .woocommerce-tabs .panel h2{font-size:1.1rem;font-weight:600;margin:0 0 16px}
.tt-shop-shell .woocommerce-tabs .panel ul{padding-left:20px}
.tt-shop-shell .woocommerce-tabs .panel li{margin:6px 0}

/* Related products — tái dùng bố cục card giống grid shop ở trên */
.tt-shop-shell .related.products{margin-top:70px}
.tt-shop-shell .related.products>h2{font-size:.72rem;letter-spacing:.16em;text-transform:uppercase;color:var(--green);
  font-weight:600;margin:0 0 24px}

/* Reviews */
.tt-shop-shell #reviews .comment-form-rating select,
.tt-shop-shell #reviews input[type=text],
.tt-shop-shell #reviews input[type=email],
.tt-shop-shell #reviews textarea{font:inherit;font-size:.9rem;border:1px solid var(--thumbline);border-radius:8px;
  padding:10px 12px;color:var(--ink);background:#fff;width:100%;max-width:420px}
.tt-shop-shell #reviews textarea{max-width:100%}
.tt-shop-shell #reviews .form-submit input[type=submit]{font:inherit;font-size:.88rem;font-weight:600;color:#fff;
  background:var(--green);border:0;border-radius:100px;padding:11px 24px;cursor:pointer}

/* ============ GIỎ HÀNG ============ */
.tt-shop-shell table.cart,.tt-shop-shell .shop_table{width:100%;border-collapse:collapse;font-size:.9rem;margin:0 0 32px}
.tt-shop-shell table.cart th,.tt-shop-shell .shop_table th{text-align:left;font-size:.72rem;letter-spacing:.08em;
  text-transform:uppercase;color:var(--muted);font-weight:600;padding:0 12px 14px 0;border-bottom:1px solid var(--line)}
.tt-shop-shell table.cart td,.tt-shop-shell .shop_table td{padding:16px 12px 16px 0;border-bottom:1px solid var(--thumbline);
  vertical-align:middle}
.tt-shop-shell table.cart img{border-radius:6px;max-width:64px}
.tt-shop-shell table.cart .product-remove a{color:var(--muted);text-decoration:none;font-size:1.1rem}
.tt-shop-shell table.cart .product-remove a:hover{color:var(--red)}
.tt-shop-shell table.cart .quantity .qty{width:60px;font:inherit;border:1px solid var(--thumbline);border-radius:8px;
  padding:8px 10px}
.tt-shop-shell .coupon{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.tt-shop-shell .coupon input#coupon_code{font:inherit;font-size:.88rem;border:1px solid var(--thumbline);border-radius:8px;
  padding:10px 12px}
.tt-shop-shell button[name=apply_coupon],
.tt-shop-shell button[name=update_cart],
.tt-shop-shell .checkout-button,
.tt-shop-shell #place_order{font:inherit;font-size:.88rem;font-weight:600;color:#fff;background:var(--green);border:0;
  border-radius:100px;padding:12px 26px;cursor:pointer;text-decoration:none;display:inline-block;transition:.15s}
.tt-shop-shell button[name=apply_coupon]:hover,
.tt-shop-shell button[name=update_cart]:hover,
.tt-shop-shell .checkout-button:hover,
.tt-shop-shell #place_order:hover{background:var(--green2)}
.tt-shop-shell .cart_totals{max-width:420px;margin-left:auto;background:var(--thumb);border-radius:8px;padding:24px}
.tt-shop-shell .cart_totals h2{font-size:1rem;font-weight:600;margin:0 0 16px}
.tt-shop-shell .cart_totals table{width:100%;font-size:.9rem}
.tt-shop-shell .cart_totals table th{text-align:left;color:var(--muted);font-weight:500;padding:10px 0;border-top:1px solid var(--thumbline)}
.tt-shop-shell .cart_totals table td{text-align:right;padding:10px 0;border-top:1px solid var(--thumbline)}
.tt-shop-shell .cart_totals .order-total td,.tt-shop-shell .cart_totals .order-total th{font-weight:700;color:var(--ink)}
.tt-shop-shell .wc-proceed-to-checkout{margin-top:20px}
.tt-shop-shell .wc-proceed-to-checkout .checkout-button{width:100%;text-align:center}

/* ============ THANH TOÁN ============
   G9 (hotfix): form.checkout của WooCommerce thực ra có 3 phần tử con trực tiếp
   — #customer_details, <h3 id="order_review_heading">, #order_review — KHÔNG
   phải 2. Bản trước chỉ khai grid-template-columns:1fr 420px rồi để trình
   duyệt TỰ xếp (auto-placement): #customer_details vào ô 1, tiêu đề "Your
   order" bị đẩy sang ô 2 MỘT MÌNH, còn bảng đơn hàng #order_review lại rớt
   xuống ô 1 hàng dưới — đúng bố cục lệch trong ảnh chụp. Sửa: chỉ định rõ
   grid-column/grid-row cho từng phần tử thay vì để tự xếp. */
.tt-shop-shell form.checkout{display:grid;grid-template-columns:1fr 420px;column-gap:48px;row-gap:0;align-items:start}
.tt-shop-shell #customer_details{grid-column:1;grid-row:1/3;min-width:0}
/* G10 (hotfix): Astra tự thêm border/padding cho #order_review_heading (khung
   viền nhỏ "Your order" trong ảnh) + có thể có margin âm trên #order_review để
   2 khối "dính" nhau trong bố cục float cũ của Astra — trong grid mới, margin
   âm đó khiến #order_review đè LÊN khung viền của heading. Reset sạch bằng
   !important (chỉ ghi đè trình bày, không đụng nội dung/logic). */
.tt-shop-shell #order_review_heading{grid-column:2;grid-row:1;border:0 !important;background:none !important;
  box-shadow:none !important;padding:0 !important;margin:0 0 16px !important}
.tt-shop-shell #order_review{grid-column:2;grid-row:2;margin-top:0 !important}
.tt-shop-shell .woocommerce-additional-fields{grid-column:1;grid-row:3}
/* G12 (hotfix 2026-07-09): G9/G10 đã gán grid-column/grid-row cho 3 phần tử con
   của form.checkout, NHƯNG WooCommerce core vẫn để float + width co lại trên
   #customer_details và #order_review. Trong grid, hai khối này không giãn đầy
   track nên hộp "Your order" bị bóp còn ~168px, tên sản phẩm xuống dòng từng
   chữ (đúng bug trong ảnh). Fix: bỏ float, trả width:auto để grid tự kéo giãn
   đầy cột; ép bảng review = 100% bề rộng hộp. Tương thích cả mobile (≤960px). */
.tt-shop-shell form.checkout #customer_details,
.tt-shop-shell form.checkout #order_review,
.tt-shop-shell form.checkout #order_review_heading{float:none !important;width:auto !important}
.tt-shop-shell form.checkout #order_review .shop_table,
.tt-shop-shell form.checkout .woocommerce-checkout-review-order-table{width:100%}
.tt-shop-shell .woocommerce-billing-fields h3,
.tt-shop-shell .woocommerce-shipping-fields h3,
.tt-shop-shell #order_review_heading{font-size:1rem;font-weight:600}
.tt-shop-shell .form-row label{display:block;font-size:.8rem;color:var(--muted);margin-bottom:6px}
.tt-shop-shell .form-row .required{color:var(--red);text-decoration:none}
.tt-shop-shell .form-row input[type=text],
.tt-shop-shell .form-row input[type=email],
.tt-shop-shell .form-row input[type=tel],
.tt-shop-shell .form-row input[type=password],
.tt-shop-shell .form-row textarea,
.tt-shop-shell .form-row select,
.tt-shop-shell .select2-selection{font:inherit;font-size:.9rem;border:1px solid var(--thumbline);border-radius:8px;
  padding:10px 12px;color:var(--ink);background:#fff;width:100%}
.tt-shop-shell .form-row input:focus,.tt-shop-shell .form-row textarea:focus,.tt-shop-shell .form-row select:focus{
  outline:none;border-color:var(--green);box-shadow:0 0 0 3px var(--green-bg)}
.tt-shop-shell #order_review{background:var(--thumb);border-radius:8px;padding:24px}
.tt-shop-shell #order_review table.shop_table{background:transparent}
.tt-shop-shell ul.wc_payment_methods{list-style:none;padding:0;margin:20px 0}
.tt-shop-shell ul.wc_payment_methods li.payment_method{padding:14px 0;border-bottom:1px solid var(--thumbline)}
.tt-shop-shell ul.wc_payment_methods .payment_box{background:var(--rule-bg);border-radius:8px;padding:14px 16px;
  margin-top:10px;font-size:.85rem;color:var(--soft)}
.tt-shop-shell #place_order{width:100%;text-align:center;margin-top:16px}

@media(max-width:960px){
  .tt-shop-shell form.checkout{grid-template-columns:1fr}
  .tt-shop-shell #customer_details,
  .tt-shop-shell #order_review_heading,
  .tt-shop-shell #order_review,
  .tt-shop-shell .woocommerce-additional-fields{grid-column:1;grid-row:auto}
}

/* ============ TÀI KHOẢN (My Account) ============ */
.tt-shop-shell .woocommerce-MyAccount-navigation ul{list-style:none;padding:0;margin:0 0 32px;display:flex;
  flex-wrap:wrap;gap:8px}
.tt-shop-shell .woocommerce-MyAccount-navigation li{margin:0}
.tt-shop-shell .woocommerce-MyAccount-navigation a{display:inline-block;font-size:.8rem;font-weight:600;color:var(--green);
  background:var(--green-bg);border-radius:100px;padding:7px 16px;text-decoration:none}
.tt-shop-shell .woocommerce-MyAccount-navigation li.is-active a{background:var(--green);color:#fff}
.tt-shop-shell .woocommerce-MyAccount-content table{width:100%;border-collapse:collapse;font-size:.9rem}
.tt-shop-shell .woocommerce-MyAccount-content table th,
.tt-shop-shell .woocommerce-MyAccount-content table td{padding:12px 10px;border-bottom:1px solid var(--thumbline);text-align:left}

/* Thông báo (giỏ hàng trống, đã thêm vào giỏ, lỗi...) */
.tt-shop-shell .woocommerce-message,.tt-shop-shell .woocommerce-info{background:var(--green-bg);color:var(--green-ink);
  border:0;border-left:3px solid var(--green2);border-radius:0 8px 8px 0;padding:14px 18px;font-size:.88rem;list-style:none}
.tt-shop-shell .woocommerce-error{background:var(--wrong-bg);color:var(--wrong-ink);border:0;border-left:3px solid var(--red);
  border-radius:0 8px 8px 0;padding:14px 18px;font-size:.88rem;list-style:none}
.tt-shop-shell .woocommerce-message a.button,.tt-shop-shell .woocommerce-info a.button{margin-left:12px;font-size:.8rem;
  font-weight:600;color:var(--green);text-decoration:underline;background:none;padding:0}
