/* Shared Maybom presentation. Layout and editor controls stay in each component. */

/* Typography and breadcrumb hierarchy. */
.mb-theme :is(.mb-page__title, .mb-archive-head__title, .mb-single__title, .mb-checkout__title) {
	font-size: var(--mb-font-page);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	color: var(--mb-blue-deep);
	margin-bottom: var(--mb-space-5);
}

.mb-theme :is(.mb-section-title, .mb-related-cats__title, .mb-single-featured__title, .mb-checkout__customer-title, .mb-product__similar h2) {
	font-size: var(--mb-font-section);
	font-weight: 700;
	line-height: 1.35;
	letter-spacing: 0;
	color: var(--mb-blue-deep);
	margin-bottom: var(--mb-space-4);
}

.mb-theme .mb-product__title {
	font-size: var(--mb-font-section);
	font-weight: 700;
	line-height: 1.4;
	color: var(--mb-heading);
}

.mb-theme :is(.mb-box h2, .mb-page__body h2, .mb-single__body h2) {
	font-size: 20px;
	line-height: 1.4;
	color: var(--mb-blue-deep);
}

.mb-theme .mb-crumb,
.mb-theme .mb-crumb :is(.woocommerce-breadcrumb, .rank-math-breadcrumb) {
	font-size: var(--mb-font-small);
	line-height: 1.6;
	color: var(--mb-muted);
	margin: 0;
}

.mb-theme .mb-crumb { padding: var(--mb-space-4) 0; }
.mb-theme .mb-crumb a { color: var(--mb-blue); }
.mb-theme .mb-crumb .last { color: var(--mb-muted); }
.mb-theme .mb-crumb a:hover { text-decoration: underline; }

.mb-theme :is(.mb-blog, .mb-product, .mb-checkout, .mb-page) .mb-crumb {
	font-size: var(--mb-font-small);
	padding: var(--mb-space-4) 0;
}
.mb-theme :is(.mb-blog, .mb-product, .mb-checkout, .mb-page) .mb-crumb a { color: var(--mb-blue); }
.mb-theme :is(.mb-blog, .mb-product, .mb-checkout, .mb-page) .mb-crumb .last { color: var(--mb-muted); }

.mb-theme :is(.mb-single__byline, .mb-single__dates, .mb-product__sku) {
	font-size: var(--mb-font-small);
	color: var(--mb-muted);
	line-height: 1.6;
}

/* Cards and content panels share one border, radius and shadow. */
.mb-theme :is(.mb-blog-card, .mb-review, .mb-box, .mb-review-form, .mb-single__body, .mb-author-box, .mb-checkout__customer) {
	border: 1px solid var(--mb-border);
	border-radius: var(--mb-card-radius);
	background: var(--mb-surface);
	box-shadow: var(--mb-card-shadow);
}

.mb-theme :is(.mb-products, .mb-brands, .mb-reviews) .mb-container {
	border-color: var(--mb-border);
	border-radius: var(--mb-card-radius);
	padding: var(--mb-space-5);
}

.mb-theme :is(.mb-types__item, .mb-subcats__item, .mb-related-cats__item) {
	border-color: var(--mb-border);
	border-radius: var(--mb-card-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.mb-theme :is(.mb-types__item, .mb-subcats__item, .mb-related-cats__item, .mb-product-card, .mb-blog-card:not(.mb-blog-card--small)):hover {
	border-color: #b8d4e8;
	box-shadow: var(--mb-card-shadow-hover);
}

.mb-theme .mb-blog-card--small {
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.mb-theme .mb-blog-card:not(.mb-blog-card--small) .mb-blog-card__link { padding: var(--mb-space-3); }
.mb-theme .mb-blog-card__thumb { border-radius: var(--mb-radius-control); }
.mb-theme .mb-blog-card__title { color: var(--mb-heading); }
.mb-theme .mb-blog-card__excerpt { font-size: var(--mb-font-small); line-height: 1.6; color: var(--mb-muted); }
.mb-theme .mb-blog-card__link:hover .mb-blog-card__title { color: var(--mb-blue); }

/* Keep featured articles and their related rows aligned across columns. */
.mb-theme .mb-posts .mb-blog-card--large .mb-blog-card__link {
	display: grid;
	grid-template-rows: auto 44px 62.4px;
	gap: 12px;
	padding: 16px;
}

.mb-theme .mb-posts .mb-blog-card--large .mb-blog-card__thumb {
	height: auto;
	aspect-ratio: 16 / 9;
	background: var(--mb-surface-soft);
}

.mb-theme .mb-posts .mb-blog-card--large .mb-blog-card__thumb img {
	height: 100%;
	max-height: none;
	object-fit: cover;
}

.mb-theme .mb-posts .mb-blog-card--large .mb-blog-card__title {
	font-size: 16px;
	line-height: 22px;
	min-height: 0;
	margin: 0;
}

.mb-theme .mb-posts .mb-blog-card--large .mb-blog-card__excerpt {
	font-size: 13px;
	line-height: 20.8px;
	margin: 0;
}

.mb-theme .mb-posts .mb-blog-card--small {
	border-bottom: 1px solid var(--mb-border);
}

.mb-theme .mb-posts .mb-blog-card--small:last-child {
	border-bottom: 0;
}

.mb-theme .mb-posts .mb-blog-card--small .mb-blog-card__link {
	min-height: 76px;
	gap: 12px;
	padding: 8px 0;
}

.mb-theme .mb-posts .mb-blog-card__thumb--sm {
	width: 96px;
	height: 60px;
	flex-basis: 96px;
	background: var(--mb-surface-soft);
}

.mb-theme .mb-posts .mb-blog-card__thumb--sm img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.mb-theme .mb-posts .mb-blog-card--small .mb-blog-card__title {
	min-width: 0;
	font-size: 13px;
	line-height: 19px;
	-webkit-line-clamp: 3;
}

.mb-theme .mb-product-card { border-width: 1px; padding: var(--mb-space-3); }
.mb-theme .mb-product-card__body { padding-top: var(--mb-space-3); }
.mb-theme .mb-product-card__title { font-size: 14px; line-height: 1.5; min-height: 42px; color: var(--mb-heading); }
.mb-theme .mb-product-card__brand { font-size: var(--mb-font-caption); line-height: 1.5; }
.mb-theme .mb-product-card__price-row { padding-top: var(--mb-space-3); }
.mb-theme .mb-product-card__prices { font-size: 16px; line-height: 1.4; font-weight: 700; }
.mb-theme .mb-product-card__prices del { font-size: var(--mb-font-caption); line-height: 1.5; }
.mb-theme .mb-product-card__badge { margin-right: -12px; font-size: var(--mb-font-caption); box-shadow: none; }
.mb-theme .mb-product-card__chip { border-radius: var(--mb-radius-sm); }

/* Actions use blue; purchase actions use the same red as prices. */
.mb-theme :is(.mb-btn, .mb-collapse-btn, .mb-types__more),
.mb-theme .mb-product-form.cart .mb-btn,
.mb-theme .mb-checkout .mb-checkout__reset,
.mb-theme .mb-checkout #place_order,
.mb-theme .mb-page .wpcf7 :is(input[type="submit"], input[type="button"]) {
	min-height: var(--mb-control-height);
	height: auto;
	border-radius: var(--mb-radius-control);
	font-family: var(--mb-font);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
	margin-bottom: 0;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.mb-theme :is(.mb-btn--cart, .mb-btn--review, .mb-search__submit),
.mb-theme .mb-checkout .mb-checkout__reset,
.mb-theme .mb-page .wpcf7 input[type="submit"] {
	background: var(--mb-blue);
	color: var(--mb-white);
	border-color: var(--mb-blue);
}

.mb-theme :is(.mb-btn--cart, .mb-btn--review, .mb-search__submit):hover,
.mb-theme .mb-checkout .mb-checkout__reset:hover,
.mb-theme .mb-page .wpcf7 input[type="submit"]:hover {
	background: var(--mb-blue-hover);
	color: var(--mb-white);
	filter: none;
}

.mb-theme .mb-product-form.cart .mb-btn--zalo {
	background: var(--mb-surface-soft);
	border: 1px solid var(--mb-blue);
	color: var(--mb-blue);
}

.mb-theme .mb-btn--buy,
.mb-theme .mb-checkout #place_order {
	background: var(--mb-sale);
	color: var(--mb-white);
}

.mb-theme .mb-btn--buy:hover,
.mb-theme .mb-checkout #place_order:hover { background: var(--mb-sale-hover); filter: none; color: var(--mb-white); }

.mb-theme :is(.mb-collapse-btn, .mb-types__more) {
	border: 1px solid var(--mb-border);
	background: var(--mb-surface);
	color: var(--mb-blue);
}

.mb-theme :is(.mb-collapse-btn, .mb-types__more):hover,
.mb-theme .mb-btn--zalo:hover { background: var(--mb-surface-soft); border-color: var(--mb-blue); }

.mb-theme .mb-products__pills :is(a, button) {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	margin: 0;
	padding: 6px 14px;
	font-size: var(--mb-font-small);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0;
	border-color: var(--mb-border);
}
.mb-theme .mb-products__pills button.is-active { background: var(--mb-surface-soft); border-color: var(--mb-blue); }

/* All customer-facing inputs use the same dimensions and focus state. */
.mb-theme .mb-checkout__fields :is(input.input-text, textarea),
.mb-theme .mb-review-form__fields :is(input[type="text"], textarea),
.mb-theme .mb-page .wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], textarea, select),
.mb-theme.woocommerce-account .woocommerce :is(input.input-text, textarea, select) {
	min-height: var(--mb-control-height);
	height: auto;
	padding: 10px 12px;
	border: 1px solid var(--mb-border);
	border-radius: var(--mb-radius-control);
	background-color: var(--mb-surface);
	box-shadow: none;
	font-family: var(--mb-font);
	font-size: 16px;
	line-height: 1.4;
	color: var(--mb-text);
}

.mb-theme :is(.mb-checkout__fields, .mb-review-form__fields) textarea { min-height: 104px; }
.mb-theme :is(.mb-checkout__fields, .mb-review-form__fields, .mb-page .wpcf7) :is(input, textarea, select):focus,
.mb-theme.woocommerce-account .woocommerce :is(input.input-text, textarea, select):focus {
	border-color: var(--mb-blue);
	box-shadow: var(--mb-focus-ring);
	outline: none;
}
.mb-theme .mb-checkout__fields .woocommerce-invalid input { border-color: var(--mb-sale); }
.mb-theme .mb-checkout__fields label { color: var(--mb-heading); font-size: 14px; font-weight: 500; }
.mb-theme .mb-checkout__hint { color: var(--mb-muted); font-size: 14px; }
.mb-theme .mb-checkout__customer { padding: var(--mb-space-5); }
.mb-theme .mb-checkout__fields .woocommerce-input-wrapper { width: 400px; max-width: 100%; }
.mb-theme .mb-checkout__actions { margin-top: var(--mb-space-5); }
.mb-theme .mb-checkout__review { line-height: 1.6; }

/* Quantity controls match between product and checkout. */
.mb-theme .mb-product-form.cart .mb-qty__row {
	grid-template-columns: 32px minmax(0, 1fr) 32px;
	height: 40px;
	border-color: var(--mb-border);
	border-radius: var(--mb-radius-control);
}
.mb-theme .mb-product-form.cart .mb-qty__row > .mb-qty__btn { background: var(--mb-surface); color: var(--mb-heading); }
.mb-theme .mb-product-form.cart .mb-qty__row > .mb-qty__btn:hover { background: var(--mb-surface-soft); }
.mb-theme .mb-product-form.cart .mb-qty__row > .mb-qty__input { border: 0; font-weight: 600; color: var(--mb-heading); }
.mb-theme .mb-qty label { font-size: 14px; color: var(--mb-heading); }

/* Shared header, footer and tables. */
.mb-theme .mb-nav .mb-nav__list > li > a { color: var(--mb-white); }
.mb-theme .mb-nav .mb-nav__list > :is(.current-menu-item, .current-menu-ancestor) > a {
	background: transparent;
	color: #ffe08a;
	text-decoration: none;
	opacity: 1;
}
.mb-theme .mb-nav .mb-nav__list > :is(.current-menu-item, .current-menu-ancestor) > a::after {
	content: none;
}
.mb-theme :is(.mb-nav, .mb-drawer) .nav-dropdown .ux-menu-link--active > .ux-menu-link__link {
	background: var(--mb-surface-soft);
	color: var(--mb-blue);
	font-weight: 600;
	border-radius: 6px;
	border: 0;
	box-shadow: none;
	text-decoration: none;
}
.mb-theme .mb-drawer .mb-nav__list > .current-menu-ancestor > a {
	color: var(--mb-blue);
	font-weight: 600;
}
.mb-theme .mb-usp__title { margin: 0; }
.mb-theme .mb-usp__sub { margin: 6px 0 0; }
.mb-theme :is(.mb-filters__panel, .mb-filters__pop, .mb-filters__overlay, .mb-collapse-btn)[hidden] { display: none; }
.mb-theme :is(.category-page-row, .blog-wrapper > .row) { max-width: calc(var(--mb-container) + 30px); }
.mb-theme:is(.tax-product_cat, .tax-product_brand) .category-page-row { padding-top: 0; }
.mb-theme .mb-search__bar { border-color: var(--mb-border); border-radius: var(--mb-radius-control); background: var(--mb-surface); }
.mb-theme .mb-search__form .search-field { background: var(--mb-surface-subtle); }
.mb-theme .mb-search__form:focus-within .mb-search__bar { border-color: var(--mb-blue); box-shadow: var(--mb-focus-ring); }
.mb-theme .mb-search__submit { font-size: 14px; letter-spacing: 0; }
.mb-theme .mb-nav .nav-dropdown { border-color: var(--mb-border); box-shadow: var(--mb-card-shadow-hover); }
.mb-theme .mb-footer { border-top: 1px solid var(--mb-border); }
.mb-theme .mb-footer__map iframe { border-radius: var(--mb-card-radius); }
.mb-theme .mb-tech { overflow: hidden; border-radius: var(--mb-radius-control); }
.mb-theme .mb-tech tr:nth-child(odd) { background: var(--mb-surface-soft); }
.mb-theme .mb-tech :is(th, td) { border-bottom: 1px solid var(--mb-divider); color: var(--mb-text); }
.mb-theme .mb-tech td { font-weight: 400; }
.mb-theme .mb-rel-card.is-active { background: var(--mb-surface-soft); }
.mb-theme .mb-product__gallery .product-gallery-slider .flickity-viewport { background: var(--mb-surface); border: 1px solid var(--mb-border); }

/* Pagination and account screens retain native WooCommerce markup. */
.mb-theme :is(.mb-blog, .shop-container) .nav-pagination > li > :is(a, span) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	border: 1px solid var(--mb-border);
	border-radius: var(--mb-radius-control);
	background: var(--mb-surface);
	color: var(--mb-blue);
	font-size: 14px;
}
.mb-theme :is(.mb-blog, .shop-container) .nav-pagination > li > :is(.current, a:hover) {
	background: var(--mb-blue);
	border-color: var(--mb-blue);
	color: var(--mb-white);
}
.mb-theme.woocommerce-account .my-account > .container { max-width: calc(var(--mb-container) + 30px); }
.mb-theme.woocommerce-account .page-title h1 {
	font-size: var(--mb-font-page);
	color: var(--mb-blue-deep);
	letter-spacing: 0;
}
.mb-theme.woocommerce-account :is(.account-login-inner, .account-register-inner, .woocommerce-ResetPassword) {
	padding: var(--mb-space-5);
	border: 1px solid var(--mb-border);
	border-radius: var(--mb-card-radius);
	background: var(--mb-surface);
	box-shadow: var(--mb-card-shadow);
}
.mb-theme.woocommerce-account .account-container:not(:has(#customer_login)),
.mb-theme.woocommerce-account .woocommerce-ResetPassword { max-width: 600px; margin-inline: auto; }
.mb-theme.woocommerce-account :is(.account-login-inner, .account-register-inner) h2 {
	color: var(--mb-blue-deep);
	font-size: var(--mb-font-section);
}
.mb-theme.woocommerce-account .woocommerce .button {
	min-height: var(--mb-control-height);
	padding: 10px 20px;
	border: 1px solid var(--mb-blue);
	border-radius: var(--mb-radius-control);
	background: var(--mb-blue);
	color: var(--mb-white);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: 0;
}
.mb-theme.woocommerce-account .woocommerce .button:hover { background: var(--mb-blue-hover); }
.mb-theme.woocommerce-account .woocommerce form { margin-bottom: 0; }
.mb-theme.woocommerce-account .woocommerce .lost_password a { color: var(--mb-blue); }
.mb-theme.woocommerce-account .woocommerce input[type="password"] { padding-right: 44px; }
.mb-theme.woocommerce-account .woocommerce label { color: var(--mb-heading); font-size: 14px; }

.mb-theme .mb-page .wpcf7 {
	padding: var(--mb-space-5);
	border: 1px solid var(--mb-border);
	border-radius: var(--mb-card-radius);
	background: var(--mb-surface);
	box-shadow: var(--mb-card-shadow);
}

.mb-theme :is(.mb-btn, .mb-collapse-btn, .mb-filters__btn, .mb-filters__apply, .mb-filters__cancel, .mb-filters__sort-pill, .mb-filters__chip, .mb-product-card, .mb-types__item, .mb-subcats__item, .mb-related-cats__item, .mb-blog-card__link, .mb-search__submit, .mb-checkout__reset, .mb-checkout__submit):focus-visible {
	outline: 2px solid var(--mb-blue);
	outline-offset: 3px;
}

@media (max-width: 849px) {
	.mb-theme .mb-checkout__fields .woocommerce-input-wrapper { width: 100%; }
}

@media (max-width: 549px) {
	.mb-theme :is(.mb-products, .mb-brands, .mb-reviews) .mb-container { padding: var(--mb-space-4); }
	.mb-theme .mb-product-card { padding: var(--mb-space-2); }
	.mb-theme .mb-product-card__title { font-size: var(--mb-font-small); min-height: 39px; }
	.mb-theme .mb-product-card__prices { font-size: 14px; }
	.mb-theme .mb-product-card__badge { margin-right: -8px; padding: 0 6px; }
	.mb-theme .mb-checkout__customer { padding: var(--mb-space-4); }
	.mb-theme .mb-page .wpcf7,
	.mb-theme.woocommerce-account :is(.account-login-inner, .account-register-inner, .woocommerce-ResetPassword) { padding: var(--mb-space-4); }
	.mb-theme :is(.mb-box h2, .mb-page__body h2, .mb-single__body h2) { font-size: 18px; }
	.mb-theme .mb-qty { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
	.mb-theme :is(.mb-product-card, .mb-types__item, .mb-subcats__item, .mb-btn, .mb-filters__btn) { transition: none; }
}
