/* =====================================================================
   9Reading — Custom WooCommerce single product layout
   Scope: .nr-product   (áp dụng cho mọi trang sản phẩm)
   ===================================================================== */

.nr-product{
	--nr-bg:#FBFAF6; --nr-bg2:#F4EFE2; --nr-ink:#1A1816; --nr-ink2:#2D2A26; --nr-mute:#6B6258;
	--nr-accent:#C8442C; --nr-accent-d:#A23420; --nr-hi:#FFE34A; --nr-green:#2F5D3A;
	--nr-rule:rgba(26,24,22,0.10); --nr-rule2:rgba(26,24,22,0.16);
	font-family:'Plus Jakarta Sans',-apple-system,BlinkMacSystemFont,sans-serif;
	color:var(--nr-ink); line-height:1.5; max-width:1140px; margin:0 auto; padding:12px 20px 24px;
	box-sizing:border-box;
}
.nr-product-outer{ max-width:100%; }
/* không cho gallery tràn khung */
.nr-product .woocommerce-product-gallery,
.nr-product .woocommerce-product-gallery__wrapper,
.nr-product .woocommerce-product-gallery__image{ max-width:100% !important; }
.nr-product *{ box-sizing:border-box; }
/* chống tràn ngang do từ/heading dài */
.nr-product .nr-main, .nr-product .nr-desc, .nr-product .nr-short,
.nr-product .nr-title, .nr-product .nr-desc *{ max-width:100%; overflow-wrap:break-word; word-wrap:break-word; }

/* layout */
.nr-product .nr-grid{ display:grid; grid-template-columns:1fr 364px; gap:48px; align-items:start; }

/* ===== LEFT: description ===== */
.nr-product .nr-kicker{
	font-family:'JetBrains Mono',monospace; font-size:12px; font-weight:600; letter-spacing:.13em;
	text-transform:uppercase; color:var(--nr-accent); display:inline-flex; align-items:center; gap:8px; margin-bottom:14px;
}
.nr-product .nr-kicker::before{ content:""; width:13px; height:13px; background:var(--nr-accent); }
.nr-product .nr-title{
	font-weight:800; font-size:clamp(28px,3.6vw,38px); letter-spacing:-.03em; line-height:1.1; margin:0 0 20px; color:var(--nr-ink);
}

/* description typography (the_content của product) */
.nr-product .nr-desc{ font-family:'Source Serif 4',Georgia,serif; font-size:16.5px; line-height:1.65; color:var(--nr-ink2); }
.nr-product .nr-desc > *:first-child{ margin-top:0; }
.nr-product .nr-desc p{ margin:0 0 18px; }
.nr-product .nr-desc strong{ color:var(--nr-ink); font-weight:600; }
.nr-product .nr-desc h2,.nr-product .nr-desc h3{
	font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; letter-spacing:-.015em; color:var(--nr-ink);
	line-height:1.2; margin:30px 0 14px;
}
.nr-product .nr-desc h2{ font-size:23px; } .nr-product .nr-desc h3{ font-size:19px; }
.nr-product .nr-desc ul,.nr-product .nr-desc ol{ margin:0 0 18px; padding-left:0; list-style:none; }
.nr-product .nr-desc ul li{ position:relative; padding-left:30px; margin-bottom:10px; }
.nr-product .nr-desc ul li::before{ content:"✓"; position:absolute; left:0; top:0; color:var(--nr-green); font-weight:700; }
.nr-product .nr-desc ol{ counter-reset:n; }
.nr-product .nr-desc ol li{ counter-increment:n; position:relative; padding-left:34px; margin-bottom:10px; }
.nr-product .nr-desc ol li::before{ content:counter(n); position:absolute; left:0; top:-1px; width:24px; height:24px; background:var(--nr-bg2); border:1px solid var(--nr-rule2); border-radius:50%; color:var(--nr-accent); font-family:'Plus Jakarta Sans',sans-serif; font-weight:800; font-size:12px; display:flex; align-items:center; justify-content:center; }
.nr-product .nr-desc blockquote{ border-left:4px solid var(--nr-accent); background:#fff; border-radius:0 12px 12px 0; padding:16px 22px; margin:0 0 18px; font-family:'Newsreader',serif; font-style:italic; font-size:19px; color:var(--nr-ink); }
.nr-product .nr-desc img{ max-width:100%; height:auto; border-radius:10px; }
/* optional helper class: <mark> hoặc .nr-hl để highlight từ vựng */
.nr-product .nr-desc mark, .nr-product .nr-desc .nr-hl{ background:var(--nr-hi); color:var(--nr-ink); border-radius:6px; padding:1px 7px; }

/* ===== Tabs (Mô tả | Đánh giá) ===== */
.nr-product .nr-tabnav{ display:flex; gap:8px; border-bottom:1px solid var(--nr-rule); margin-bottom:26px; }
.nr-product .nr-tab{ appearance:none; background:none; border:none; cursor:pointer; font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:15.5px; color:var(--nr-mute); padding:12px 8px; margin-bottom:-1px; border-bottom:2.5px solid transparent; transition:color .15s; }
.nr-product .nr-tab:hover{ color:var(--nr-ink); }
.nr-product .nr-tab.is-active{ color:var(--nr-ink); border-bottom-color:var(--nr-accent); }
.nr-product .nr-tabpanel{ display:none; }
.nr-product .nr-tabpanel.is-active{ display:block; }

/* ===== Woo reviews bên trong tab Đánh giá ===== */
.nr-product #reviews{ font-family:'Source Serif 4',Georgia,serif; }
.nr-product #reviews #comments > h2{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:20px; color:var(--nr-ink); margin:0 0 18px; }
.nr-product #reviews .commentlist{ list-style:none; margin:0 0 26px; padding:0; }
.nr-product #reviews .commentlist li{ padding:0 0 18px; margin:0 0 18px; border-bottom:1px solid var(--nr-rule); }
.nr-product #reviews .comment-text{ background:#fff; border:1px solid var(--nr-rule); border-radius:12px; padding:14px 16px; }
.nr-product #reviews .woocommerce-review__author{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; color:var(--nr-ink); }
.nr-product #reviews .star-rating{ color:var(--nr-accent); }
.nr-product #review_form_wrapper h3{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:700; font-size:18px; color:var(--nr-ink); margin:6px 0 14px; }
.nr-product #review_form .comment-form-rating label,
.nr-product #review_form label{ font-family:'Plus Jakarta Sans',sans-serif; font-weight:600; font-size:14px; color:var(--nr-ink2); display:block; margin-bottom:6px; }
.nr-product #review_form input[type="text"],
.nr-product #review_form input[type="email"],
.nr-product #review_form textarea{ width:100%; border:1.5px solid var(--nr-rule2); border-radius:10px; padding:11px 13px; font-family:'Source Serif 4',Georgia,serif; font-size:15px; color:var(--nr-ink); background:#fff; margin-bottom:14px; }
.nr-product #review_form .stars a{ color:var(--nr-accent); }
.nr-product #review_form input#submit,
.nr-product #review_form button[type="submit"]{
	display:inline-flex; align-items:center; justify-content:center; background:var(--nr-accent) !important; color:var(--nr-bg) !important;
	font-family:'Plus Jakarta Sans',sans-serif !important; font-weight:700 !important; font-size:15.5px !important; text-transform:none !important;
	padding:13px 26px !important; border:none !important; border-radius:100px !important; box-shadow:0 4px 0 var(--nr-accent-d) !important; cursor:pointer;
}
.nr-product #review_form input#submit:hover,
.nr-product #review_form button[type="submit"]:hover{ background:var(--nr-accent-d) !important; }
.nr-product .woocommerce-noreviews{ font-family:'Source Serif 4',Georgia,serif; color:var(--nr-mute); }

/* ===== RIGHT: purchase card (sticky) ===== */
.nr-product .nr-aside{ position:sticky; top:100px; align-self:start; }
.nr-product .nr-card{ background:#fff; border:1px solid var(--nr-rule); border-radius:20px; padding:18px; box-shadow:0 18px 50px -30px rgba(26,24,22,.5); max-height:calc(100vh - 124px); overflow-y:auto; }
/* Ảnh = product gallery của Woo */
.nr-product .nr-gallery{ position:relative; margin-bottom:14px; }
.nr-product .nr-gallery .woocommerce-product-gallery{ width:100% !important; margin:0 !important; float:none !important; }
.nr-product .nr-gallery .woocommerce-product-gallery__wrapper{ margin:0; }
.nr-product .nr-gallery .woocommerce-product-gallery__image img,
.nr-product .nr-gallery img{ width:100%; height:44vh; max-height:480px; object-fit:contain; display:block; border-radius:12px; }
.nr-product .nr-gallery .woocommerce-product-gallery__trigger{ top:12px; right:12px; }
/* thumbnails */
.nr-product .nr-gallery .flex-control-thumbs{ display:flex; flex-wrap:wrap; gap:8px; margin:10px 0 0; padding:0; list-style:none; }
.nr-product .nr-gallery .flex-control-thumbs li{ width:auto; margin:0; list-style:none; }
.nr-product .nr-gallery .flex-control-thumbs img{ width:auto; max-height:62px; border-radius:7px; opacity:.55; cursor:pointer; transition:opacity .15s; }
.nr-product .nr-gallery .flex-control-thumbs img.flex-active,
.nr-product .nr-gallery .flex-control-thumbs img:hover{ opacity:1; }
/* sale badge */
.nr-product .nr-gallery .onsale{
	position:absolute; top:12px; left:12px; z-index:3; margin:0; min-height:0; line-height:1.2;
	background:var(--nr-accent); color:#fff; font-family:'JetBrains Mono',monospace; font-size:12px;
	font-weight:700; letter-spacing:.02em; padding:5px 11px; border-radius:100px;
}

/* Tab phải = short description (product-summary) */
.nr-product .nr-short{ font-family:'Source Serif 4',Georgia,serif; font-size:15px; line-height:1.55; color:var(--nr-ink2); margin-bottom:14px; }
.nr-product .nr-short > *:first-child{ margin-top:0; }
.nr-product .nr-short p{ margin:0 0 10px; }
.nr-product .nr-short p:last-child{ margin-bottom:0; }
.nr-product .nr-short strong{ color:var(--nr-ink); font-weight:600; }
.nr-product .nr-short ul{ list-style:none; padding:0; margin:0 0 10px; }
.nr-product .nr-short li{ position:relative; padding-left:24px; margin-bottom:7px; }
.nr-product .nr-short li::before{ content:"✓"; position:absolute; left:0; top:0; color:var(--nr-green); font-weight:700; }
.nr-product .nr-short mark, .nr-product .nr-short .nr-hl{ background:var(--nr-hi); color:var(--nr-ink); border-radius:6px; padding:1px 7px; }

.nr-product .nr-pricerow{ display:flex; align-items:baseline; flex-wrap:wrap; gap:6px 12px; margin-bottom:14px; }
.nr-product .nr-price{ font-weight:800; font-size:26px; letter-spacing:-.02em; color:var(--nr-ink); margin-bottom:0; line-height:1.1; }
.nr-product .nr-sold{ font-family:'JetBrains Mono',monospace; font-size:12.5px; font-weight:500; color:var(--nr-green); background:rgba(47,93,58,.08); border-radius:100px; padding:4px 11px; white-space:nowrap; }
.nr-product .nr-price del{ font-size:17px; color:var(--nr-mute); font-weight:600; margin-left:8px; }
.nr-product .nr-price ins{ text-decoration:none; }
.nr-product .nr-pricenote{ font-size:13px; color:var(--nr-mute); margin-bottom:18px; }

.nr-product .nr-buybox{ display:flex; flex-direction:column; gap:10px; margin-bottom:2px; }

/* ẩn ô số lượng trong card (ebook bán 1 bản) */
.nr-product .nr-buybox .quantity{ display:none !important; }

/* Woo add-to-cart form -> coral pill */
.nr-product .nr-buybox form.cart{ display:flex; flex-direction:column; gap:10px; margin:0; }
.nr-product .nr-buybox .quantity{ display:flex; }
.nr-product .nr-buybox .quantity input.qty{
	width:100%; height:46px; border:1.5px solid var(--nr-rule2); border-radius:100px; background:#fff;
	text-align:center; font-family:'Plus Jakarta Sans',sans-serif; font-weight:600; font-size:15px; color:var(--nr-ink);
}
.nr-product .nr-buybox button.single_add_to_cart_button,
.nr-product .nr-buybox .single_add_to_cart_button{
	display:inline-flex !important; align-items:center; justify-content:center; gap:9px; width:100%;
	background:var(--nr-accent) !important; color:var(--nr-bg) !important;
	font-family:'Plus Jakarta Sans',sans-serif !important; font-weight:700 !important; font-size:16.5px !important;
	text-transform:none !important; letter-spacing:normal !important; line-height:1.2 !important;
	padding:15px 24px !important; border:none !important; border-radius:100px !important; min-height:0 !important;
	box-shadow:0 4px 0 var(--nr-accent-d) !important; cursor:pointer; transition:transform .1s,box-shadow .1s,background .15s;
}
.nr-product .nr-buybox button.single_add_to_cart_button:hover,
.nr-product .nr-buybox .single_add_to_cart_button:hover{
	background:var(--nr-accent-d) !important; transform:translateY(2px); box-shadow:0 2px 0 var(--nr-accent-d) !important;
}

/* nút Mua ngay (buy-now link, không phụ thuộc JS) */
.nr-product .nr-buy{
	display:inline-flex; align-items:center; justify-content:center; gap:9px; width:100%;
	background:var(--nr-accent); color:var(--nr-bg); font-weight:700; font-size:16.5px; text-decoration:none;
	padding:15px 24px; border-radius:100px; box-shadow:0 4px 0 var(--nr-accent-d);
	transition:transform .1s,box-shadow .1s,background .15s; cursor:pointer;
}
.nr-product .nr-buy:hover{ background:var(--nr-accent-d); color:var(--nr-bg); transform:translateY(2px); box-shadow:0 2px 0 var(--nr-accent-d); }

/* nút Đọc thử (outline) */
.nr-product .nr-try{
	display:inline-flex; align-items:center; justify-content:center; gap:9px; width:100%;
	background:#fff; color:var(--nr-ink); font-weight:700; font-size:15.5px; text-decoration:none;
	padding:13px 24px; border-radius:100px; border:1.5px solid var(--nr-rule2); transition:background .15s,border-color .15s;
}
.nr-product .nr-try:hover{ background:var(--nr-bg2); border-color:var(--nr-ink); color:var(--nr-ink); }

.nr-product .nr-trust{ list-style:none; display:flex; flex-direction:column; gap:9px; border-top:1px solid var(--nr-rule); padding:16px 0 0; margin:0; }
.nr-product .nr-trust li{ display:flex; gap:9px; font-size:13.5px; color:var(--nr-ink2); }
.nr-product .nr-trust .tk{ color:var(--nr-green); font-weight:700; }

/* tabs/related bên dưới: cho thở */
.nr-product .woocommerce-tabs, .nr-product .related, .nr-product .upsells{ margin-top:54px; }

/* responsive */
@media (max-width:880px){
	.nr-product{ padding:12px 16px 28px; overflow-x:hidden; }
	.nr-product-outer{ overflow-x:hidden; }
	.nr-product .nr-grid{ display:flex !important; flex-direction:column; gap:28px; }
	.nr-product .nr-main{ order:0; min-width:0; width:100% !important; max-width:100% !important; }
	.nr-product .nr-aside{ position:static !important; order:-1; min-width:0; width:100% !important; max-width:100% !important; margin:0; }
	.nr-product .nr-card{ max-width:none !important; margin:0; max-height:none !important; overflow:visible !important; }
	.nr-product .nr-gallery .woocommerce-product-gallery,
	.nr-product .nr-gallery .woocommerce-product-gallery__wrapper{ width:100% !important; transform:none !important; }
	.nr-product .nr-gallery .woocommerce-product-gallery__image{ width:100% !important; }
	.nr-product .nr-gallery .woocommerce-product-gallery__image img,
	.nr-product .nr-gallery img{ width:100% !important; height:auto !important; max-height:none !important; }
	.nr-product .nr-title{ font-size:24px; }
}
