/* ==========================================================================
   BookShopee - giao diện kiểu Shopee cho cửa hàng sách
   ========================================================================== */
:root {
	--bs-primary: #ee4d2d;
	--bs-primary-dark: #d73211;
	--bs-bg: #f5f5f5;
	--bs-text: #222;
	--bs-muted: #757575;
	--bs-border: #e8e8e8;
	--bs-teal: #26aa99;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bs-bg);
	color: var(--bs-text);
	font: 14px/1.5 "Be Vietnam Pro", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; }
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.bs-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }

/* ---------- Header ---------- */
.bs-header { background: linear-gradient(-180deg, #f53d2d, #f63); color: #fff; position: sticky; top: 0; z-index: 50; }
.admin-bar .bs-header { top: 32px; }
.bs-topbar { font-size: 13px; height: 34px; line-height: 34px; }
.bs-topbar__in { display: flex; justify-content: space-between; gap: 20px; }
.bs-topbar ul { display: flex; gap: 18px; }
.bs-topbar a:hover { opacity: .8; }
.bs-head { display: grid; grid-template-columns: 200px 1fr 80px; gap: 30px; align-items: center; padding-top: 8px; padding-bottom: 12px; }
.bs-logo { display: flex; align-items: center; gap: 8px; font-size: 24px; font-weight: 800; color: #fff; line-height: 1; }
.bs-logo svg { width: 38px; height: 38px; fill: #fff; flex: none; }
.bs-logo__img { max-height: 40px; width: auto; }
.bs-search { position: relative; }
.bs-search__box { display: flex; background: #fff; border-radius: 2px; padding: 3px; box-shadow: 0 1px 1px rgba(0, 0, 0, .09); margin: 0; }
.bs-search input[type="search"] { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 12px; height: 38px; font: inherit; color: var(--bs-text); background: transparent; -webkit-appearance: none; }
.bs-search button { background: var(--bs-primary); border: 0; color: #fff; width: 60px; border-radius: 2px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bs-search button:hover { background: var(--bs-primary-dark); }
.bs-hot { display: flex; gap: 14px; font-size: 12px; margin-top: 6px; overflow: hidden; white-space: nowrap; height: 18px; }
.bs-hot a:hover { text-decoration: underline; }
.bs-suggest { position: absolute; left: 0; right: 0; top: 44px; background: #fff; color: var(--bs-text); z-index: 60; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); border-radius: 0 0 2px 2px; }
.bs-suggest[hidden] { display: none; }
.bs-suggest a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f3f3f3; }
.bs-suggest a:hover { background: #fafafa; }
.bs-suggest img, .bs-suggest__ph { width: 36px; height: 48px; object-fit: cover; background: #eee; flex: none; }
.bs-suggest__t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-suggest b { color: var(--bs-primary); font-weight: 500; white-space: nowrap; }
.bs-cart { position: relative; display: flex; justify-content: center; }
.bs-cart svg { width: 32px; height: 30px; stroke: #fff; fill: none; stroke-width: 2; }
.bs-cart-count { position: absolute; top: -8px; left: 50%; margin-left: 6px; background: #fff; color: var(--bs-primary); border: 1px solid var(--bs-primary); border-radius: 10px; min-width: 20px; height: 20px; line-height: 18px; text-align: center; font-size: 12px; font-weight: 600; padding: 0 5px; }

.bs-nav { background: #fff; border-bottom: 1px solid var(--bs-border); box-shadow: 0 1px 2px rgba(0, 0, 0, .04); }
.bs-menu { display: flex; gap: 4px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.bs-menu::-webkit-scrollbar { display: none; }
.bs-menu a { display: block; padding: 11px 14px; font-weight: 500; }
.bs-menu a:hover, .bs-menu .current-menu-item > a, .bs-menu .current-menu-ancestor > a { color: var(--bs-primary); }

/* ---------- Hero ---------- */
.bs-hero { display: grid; grid-template-columns: 2fr 1fr; gap: 5px; margin-top: 20px; }
.bs-slider { position: relative; height: 235px; overflow: hidden; border-radius: 2px; background: #eee; }
.bs-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; display: flex; align-items: center; padding: 0 50px; color: #fff; overflow: hidden; pointer-events: none; }
.bs-slide.is-active { opacity: 1; z-index: 1; pointer-events: auto; }
.bs-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bs-slide__txt { position: relative; z-index: 1; max-width: 62%; }
.bs-slide__txt h2 { margin: 0 0 6px; font-size: 34px; line-height: 1.15; font-weight: 800; text-shadow: 0 2px 6px rgba(0, 0, 0, .18); }
.bs-slide__txt p { margin: 0 0 16px; font-size: 16px; }
.bs-btn { display: inline-block; background: #fff; color: var(--bs-primary); padding: 9px 22px; border-radius: 2px; font-weight: 600; }
.bs-slide__emoji { position: absolute; right: 50px; top: 50%; transform: translateY(-50%); font-size: 120px; line-height: 1; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .2)); }
.bs-prev, .bs-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 36px; height: 56px; background: rgba(0, 0, 0, .25); color: #fff; border: 0; cursor: pointer; opacity: 0; transition: opacity .2s; }
.bs-slider:hover .bs-prev, .bs-slider:hover .bs-next { opacity: 1; }
.bs-prev { left: 0; } .bs-next { right: 0; }
.bs-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px; z-index: 3; }
.bs-dots button { width: 14px; height: 4px; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; }
.bs-dots button.is-active { background: #fff; width: 22px; }
.bs-hero__side { display: grid; grid-template-rows: 1fr 1fr; gap: 5px; }
.bs-side { position: relative; display: flex; align-items: center; padding: 0 22px; color: #fff; overflow: hidden; border-radius: 2px; min-height: 115px; }
.bs-side img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bs-side h3 { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.2; }
.bs-side p { margin: 2px 0 0; font-size: 13px; }
.bs-side__emoji { position: absolute; right: 18px; font-size: 54px; line-height: 1; }

/* ---------- Services ---------- */
.bs-services { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; margin-top: 15px; border-radius: 2px; }
.bs-services li { display: flex; align-items: center; gap: 10px; padding: 14px 18px; font-size: 13px; }
.bs-services li > span { font-size: 26px; line-height: 1; }
.bs-services b { display: block; font-weight: 600; }
.bs-services small { color: var(--bs-muted); }

/* ---------- Section ---------- */
.bs-section { background: #fff; margin-top: 15px; border-radius: 2px; }
.bs-section__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1px solid rgba(0, 0, 0, .05); }
.bs-section__head h2 { margin: 0; font-size: 16px; font-weight: 500; text-transform: uppercase; color: var(--bs-muted); }
.bs-section__head a { color: var(--bs-primary); }
.bs-section__body { padding: 15px; }
.bs-empty { color: var(--bs-muted); padding: 20px; text-align: center; }

/* ---------- Categories ---------- */
.bs-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.bs-cat { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 6px; text-align: center; border-right: 1px solid rgba(0, 0, 0, .05); border-bottom: 1px solid rgba(0, 0, 0, .05); }
.bs-cat:hover { box-shadow: 0 0 12px rgba(0, 0, 0, .12); position: relative; z-index: 1; }
.bs-cat__icon { width: 64px; height: 64px; border-radius: 50%; background: #fff3ef; display: flex; align-items: center; justify-content: center; font-size: 30px; overflow: hidden; }
.bs-cat__icon img { width: 100%; height: 100%; object-fit: cover; }
.bs-cat__name { font-size: 13px; line-height: 1.3; }

/* ---------- Feed (Gợi ý hôm nay) ---------- */
.bs-feed { margin-top: 15px; }
.bs-tabs { display: flex; background: #fff; border-bottom: 4px solid var(--bs-border); }
.bs-tabs button { flex: 1; background: #fff; border: 0; padding: 16px 8px; font-size: 16px; text-transform: uppercase; color: var(--bs-text); cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -4px; }
.bs-tabs button.is-active { color: var(--bs-primary); border-bottom-color: var(--bs-primary); }
.bs-feed__body { padding-top: 12px; }
.bs-more { text-align: center; padding: 10px 0 30px; }
.bs-btn-outline { background: #fff; border: 1px solid rgba(0, 0, 0, .15); color: var(--bs-text); padding: 10px 0; width: 400px; max-width: 100%; cursor: pointer; font-size: 14px; }
.bs-btn-outline:hover { background: #f8f8f8; }

/* ---------- Product grid ---------- */
body ul.products, ul.products.bs-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--cols, 6), minmax(0, 1fr));
	gap: 10px;
	margin: 0 0 20px !important;
	padding: 0;
	list-style: none;
}
body ul.products::before, body ul.products::after { display: none !important; }
body ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; padding: 0; }
.bs-shop__main ul.products, .single-product ul.products { --cols: 5; }
.bs-section__body ul.products { margin-bottom: 0 !important; }

.bs-card { background: #fff; position: relative; border: 1px solid transparent; border-radius: 2px; overflow: hidden; box-shadow: 0 1px 1px 0 rgba(0, 0, 0, .05); transition: transform .1s, box-shadow .1s, border-color .1s; }
.bs-card:hover { transform: translateY(-1px); border-color: var(--bs-primary); box-shadow: 0 1px 20px 0 rgba(0, 0, 0, .05); z-index: 2; }
.bs-card__link { display: block; color: inherit; }
.bs-card__thumb { position: relative; aspect-ratio: 3 / 4; background: #f2f2f2; overflow: hidden; }
.bs-card__thumb img { width: 100% !important; height: 100% !important; object-fit: cover; display: block; margin: 0 !important; }
.bs-card__off { position: absolute; top: 0; right: 0; background: rgba(255, 212, 36, .95); color: var(--bs-primary); font-size: 12px; font-weight: 700; padding: 2px 5px 3px; }
.bs-card__tag { position: absolute; top: 6px; left: 0; background: var(--bs-primary); color: #fff; font-size: 11px; font-weight: 500; padding: 1px 6px 2px; border-radius: 0 2px 2px 0; }
.bs-card__soldout { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.bs-card__body { padding: 8px 10px 10px; }
.bs-card__title, .woocommerce ul.products li.product .bs-card__title { font-size: 13px; font-weight: 400; line-height: 1.4; margin: 0 0 4px; padding: 0; min-height: 36px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--bs-text); }
.bs-card__author { font-size: 12px; color: var(--bs-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 4px; }
.bs-card__price { color: var(--bs-primary); font-size: 16px; font-weight: 500; line-height: 1.3; min-height: 21px; }
.bs-card__price del { color: #929292; font-size: 12px; margin-right: 4px; opacity: 1; }
.bs-card__price ins { background: none; text-decoration: none; font-weight: 500; }
.bs-card__price .screen-reader-text { display: none; }
.bs-card__meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--bs-muted); margin-top: 6px; }
.bs-card__rate { color: #f5a623; }
.bs-card__cta { position: absolute; left: 0; right: 0; bottom: 0; transform: translateY(100%); transition: transform .15s; }
.bs-card:hover .bs-card__cta { transform: none; }
.bs-card__cta .button, .woocommerce ul.products li.product .bs-card__cta .button { display: block; width: 100%; margin: 0; border-radius: 0; background: var(--bs-primary); color: #fff; text-align: center; padding: 9px 0; font-size: 13px; font-weight: 500; }
.bs-card__cta .button:hover { background: var(--bs-primary-dark); }
.bs-card__cta .added_to_cart { display: none; }
@media (hover: none) { .bs-card__cta { display: none; } }

/* ---------- Shop layout ---------- */
.bs-shop { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 20px; margin-top: 20px; align-items: start; }
.bs-shop--full { grid-template-columns: minmax(0, 1fr); }
.bs-filter { margin-bottom: 20px; }
.bs-filter__title { margin: 0 0 8px; font-size: 16px; font-weight: 700; text-transform: uppercase; }
.bs-filter li a { display: block; padding: 5px 0; color: var(--bs-text); }
.bs-filter li a:hover, .bs-filter li.is-active a { color: var(--bs-primary); }
.bs-filter li.is-active a { font-weight: 600; }
.bs-filter__clear { display: block; margin-top: 10px; padding: 7px; text-align: center; background: var(--bs-primary); color: #fff; border-radius: 2px; }
.bs-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; background: rgba(0, 0, 0, .03); padding: 12px 20px; margin-bottom: 15px; }
.bs-sortbar__label { color: #555; margin-right: 4px; }
.bs-sort { background: #fff; padding: 7px 15px; border-radius: 2px; box-shadow: 0 1px 1px rgba(0, 0, 0, .05); }
.bs-sort:hover { color: var(--bs-primary); }
.bs-sort.is-active { background: var(--bs-primary); color: #fff; }
.bs-sortbar__count { margin-left: auto; color: var(--bs-muted); }
.bs-sortbar__count .woocommerce-result-count { margin: 0; float: none; }
.bs-breadcrumb { font-size: 13px; color: var(--bs-muted); margin: 0 0 12px; }
.bs-breadcrumb a:hover { color: var(--bs-primary); }
.woocommerce-products-header__title.page-title { font-size: 18px; font-weight: 600; text-transform: uppercase; margin: 0 0 15px; }
.woocommerce-pagination { margin: 20px 0; }
.woocommerce nav.woocommerce-pagination ul { display: flex; justify-content: center; gap: 6px; border: 0; }
.woocommerce nav.woocommerce-pagination ul li { border: 0; float: none; }
.woocommerce nav.woocommerce-pagination ul li a, .woocommerce nav.woocommerce-pagination ul li span { display: block; min-width: 40px; padding: 9px 12px; background: #fff; border-radius: 2px; text-align: center; line-height: 1.2; }
.woocommerce nav.woocommerce-pagination ul li span.current, .woocommerce nav.woocommerce-pagination ul li a:hover { background: var(--bs-primary); color: #fff; }

/* ---------- Single product ---------- */
.single-product .bs-shop__main div.product { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 30px; background: #fff; padding: 15px; border-radius: 2px; position: relative; }
.single-product div.product div.woocommerce-product-gallery { float: none !important; width: 100% !important; margin: 0 !important; }
.single-product div.product div.summary { float: none !important; width: auto !important; margin: 0 !important; }
.single-product div.product .woocommerce-tabs, .single-product div.product .related, .single-product div.product .upsells { grid-column: 1 / -1; width: 100%; clear: both; }
.woocommerce span.onsale { top: 15px; right: 15px; left: auto; min-height: 0; min-width: 0; padding: 3px 9px; line-height: 1.5; border-radius: 2px; background: #ffd839; color: var(--bs-primary); font-weight: 700; }
.single-product .product_title { font-size: 20px; font-weight: 500; line-height: 1.4; margin: 0 0 8px; }
.single-product div.product p.price, .single-product div.product span.price { color: var(--bs-primary); font-size: 30px; font-weight: 500; }
.single-product div.product p.price { background: #fafafa; padding: 14px 20px; margin: 0 0 20px; }
.single-product div.product p.price del { color: #929292; font-size: 16px; opacity: 1; margin-right: 8px; }
.single-product div.product p.price ins { background: none; text-decoration: none; }
.single-product .woocommerce-product-details__short-description { color: #555; margin-bottom: 14px; }
.single-product form.cart { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.single-product form.cart .quantity .qty { width: 72px; height: 42px; text-align: center; border: 1px solid var(--bs-border); border-radius: 2px; }
.single-product .single_add_to_cart_button.button.alt { background: #ffeee8; color: var(--bs-primary); border: 1px solid var(--bs-primary); border-radius: 2px; height: 42px; padding: 0 24px; font-weight: 500; }
.single-product .single_add_to_cart_button.button.alt:hover { background: #ffe5dc; }
.single-product .product_meta { font-size: 13px; color: var(--bs-muted); border-top: 1px solid var(--bs-border); padding-top: 12px; margin-top: 12px; }
.single-product .product_meta > span { display: block; }
.woocommerce div.product .woocommerce-tabs ul.tabs { display: flex; gap: 24px; padding: 0; margin: 0 0 16px; border-bottom: 1px solid var(--bs-border); }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { background: none; border: 0; border-radius: 0; margin: 0; padding: 0; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before, .woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { padding: 10px 0; font-weight: 500; color: var(--bs-text); border-bottom: 2px solid transparent; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--bs-primary); border-bottom-color: var(--bs-primary); }
.woocommerce div.product .woocommerce-tabs .panel { margin: 0 0 10px; }
.related > h2, .upsells > h2 { text-transform: uppercase; font-size: 16px; font-weight: 500; color: var(--bs-muted); }
.woocommerce #reviews #comments ol.commentlist li img.avatar { border-radius: 50%; }

/* ---------- Buttons / notices (Woo chung) ---------- */
body .woocommerce a.button.alt, body .woocommerce button.button.alt, body .woocommerce input.button.alt, body .woocommerce #respond input#submit.alt,
body .woocommerce a.button.checkout, body .woocommerce #place_order { background: var(--bs-primary); color: #fff; border-radius: 2px; font-weight: 500; }
body .woocommerce a.button.alt:hover, body .woocommerce button.button.alt:hover, body .woocommerce #place_order:hover { background: var(--bs-primary-dark); }
.woocommerce-message, .woocommerce-info { border-top-color: var(--bs-primary); background: #fff; }
.woocommerce-message::before, .woocommerce-info::before { color: var(--bs-primary); }

/* ---------- Pages / posts ---------- */
.bs-page { padding-top: 20px; padding-bottom: 20px; }
.bs-article { background: #fff; padding: 24px; border-radius: 2px; }
.bs-article__title { margin: 0 0 16px; font-size: 22px; }
.bs-article__title--plain { background: none; }
.bs-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.bs-post { background: #fff; padding: 14px; border-radius: 2px; }
.bs-post h2 { font-size: 16px; margin: 8px 0; }

/* ---------- Footer ---------- */
.bs-footer { background: #fff; margin-top: 40px; border-top: 4px solid var(--bs-primary); padding-top: 40px; color: var(--bs-muted); font-size: 13px; }
.bs-footer__cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; padding-bottom: 30px; }
.bs-footer h4 { margin: 0 0 12px; font-size: 12px; font-weight: 700; text-transform: uppercase; color: var(--bs-text); }
.bs-footer li { padding: 4px 0; }
.bs-footer a:hover { color: var(--bs-primary); }
.bs-footer .bs-mt { margin-top: 20px; }
.bs-footer p { margin: 0; }
.bs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-chips span { border: 1px solid var(--bs-border); border-radius: 2px; padding: 4px 10px; background: #fafafa; }
.bs-footer__bottom { border-top: 1px solid var(--bs-border); padding: 18px 0; text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
	body ul.products { --cols: 5; }
	.bs-shop__main ul.products, .single-product ul.products { --cols: 4; }
}
@media (max-width: 900px) {
	body ul.products { --cols: 4; }
	.bs-shop__main ul.products, .single-product ul.products { --cols: 3; }
	.bs-hero { grid-template-columns: 1fr; }
	.bs-hero__side { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
	.bs-services { grid-template-columns: repeat(2, 1fr); }
	.bs-shop { grid-template-columns: 1fr; }
	.bs-sidebar { display: none; }
	.bs-footer__cols { grid-template-columns: repeat(2, 1fr); }
	.single-product .bs-shop__main div.product { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.admin-bar .bs-header { top: 46px; }
	.bs-topbar { display: none; }
	.bs-head { grid-template-columns: 1fr 44px; gap: 10px 14px; padding-top: 10px; }
	.bs-logo { font-size: 20px; }
	.bs-search { grid-column: 1 / -1; grid-row: 2; }
	.bs-hot { display: none; }
	.bs-slider { height: 160px; }
	.bs-slide { padding: 0 20px; }
	.bs-slide__txt h2 { font-size: 22px; }
	.bs-slide__txt p { font-size: 13px; margin-bottom: 10px; }
	.bs-slide__emoji { font-size: 70px; right: 20px; }
	.bs-hero__side { display: none; }
	body ul.products, .bs-shop__main ul.products, .single-product ul.products { --cols: 2; gap: 6px; }
	.bs-tabs button { font-size: 12px; padding: 12px 4px; }
	.bs-sortbar { padding: 10px; gap: 6px; }
	.bs-sort { padding: 6px 10px; font-size: 13px; }
	.bs-sortbar__label, .bs-sortbar__count { display: none; }
}
