/**
 * Design tokens and base typography.
 *
 * These lived in inline <style> blocks in the original palmconcept.vn <head>
 * (generated by the Sapo theme settings). Kept as a real stylesheet so the
 * values are editable in one place.
 */

:root {
	--color_bg: #000;
	--color_bg_item: #f9f9f9;
	--color_main: #000000;
	--color_main2: #6d6d6d;
	--color_main3: #fce3ea;
	--color1: #333;
	--color2: #fff;
	--border_radius: 5px;
	/* The full 800x800 logo, which is what the original points at here, is
	   drawn into a 20x17.5px box by .section-title-all>span:before. `cover`
	   then centre-crops it to a band of the trunk and the top of the wordmark
	   — unreadable mush. This is the palm mark alone, cropped to the same 8:7
	   the box uses so nothing is cut, and sized for it. */
	--image_title: url("../images/image_title_mark.png");
}

body,
html {
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	background-color: var(--color_bg);
	color: #fff;
}

/*
 * Only the underline is reset here. The colour deliberately stays with
 * `a { color: var(--color1) }` from the ported stylesheet — overriding it with
 * `inherit` made every link take the white body colour, which turned the white
 * drop-down panels into blank boxes.
 */
a {
	text-decoration: none;
}

/*
 * Bare-heading sizes used to be patched here, but only h2 was covered and it
 * sat too late in the cascade. The full set now lives in palm-base.css, which
 * loads before palm-main.css the way plugin.css does upstream.
 */

a:hover,
a:focus {
	text-decoration: none;
}

img {
	max-width: 100%;
	height: auto;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.w-100 {
	width: 100% !important;
}

/* Inline SVG icons standing in for the original Font Awesome glyphs. */
.mida-icon {
	display: inline-block;
	vertical-align: middle;
	color: inherit;
}

/*
 * The ported stylesheet forces `fill:#fff` on every SVG path inside the
 * header buttons — that was written for solid Sapo icons. These icons are
 * stroked outlines, so the fill has to be pushed back off.
 */
.mida-icon path,
.mida-icon circle {
	fill: none !important;
	stroke: currentColor;
}

.headers3 .headers3-bot-menu-mob-head button {
	color: #fff;
}

.topbar .topbar-action .action-hotline .mida-icon {
	width: 16px;
	height: 16px;
	margin-right: 5px;
	vertical-align: -3px;
}

.headers3 .headers3-wrap .headers3-left > button,
.headers3 .headers3-wrap .headers3-right .shop-tool {
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.headers3 .headers3-wrap .headers3-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 15px;
}

.headers3 .headers3-wrap .headers3-right .shop-tool.has-count {
	position: relative;
}

.header-menu-arrow button .mida-icon {
	width: 14px;
	height: 14px;
}

/* Footer breathing room for the fixed floating buttons on small screens. */
@media (max-width: 1024px) {
	footer.footer {
		padding-bottom: 50px;
	}
}

@media (max-width: 360px) {
	footer.footer {
		padding-bottom: 75px;
	}
}

/* Article cards -----------------------------------------------------------
 *
 * Lives in the always-loaded sheet, not a page-specific one: `.article-item`
 * is shared by the home page, search results and archives.
 */

/* Logo stand-in for posts with no featured image. */
.article-item .article-item-image img.article-item-placeholder {
	object-fit: contain;
	padding: 12%;
	background: #111;
	opacity: 0.45;
}

/* Archive grid ------------------------------------------------------------
 *
 * Same `.article-item` card as the home page and search results; only the
 * column widths differ per screen.
 */

.mida-archive-head {
	/* The breadcrumb strip ends flush against the content, so the heading
	   brings its own breathing room. */
	margin-top: 1.25rem;
	margin-bottom: 1.75rem;
}

.mida-archive-desc {
	width: 100%;
	margin-top: 8px;
	color: #999;
}

.mida-archive-grid {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -8px;
}

/*
 * Three across, matching the listing on palmconcept.vn/online-store. Upstream
 * gets that from a slick slider set to three slides; a real paginated listing
 * wants a wrapping grid instead, so the column count is reproduced rather than
 * the slider. At the 1140px container this lands each card on ~364px against
 * the original's 386px — the same card, one gutter apart.
 *
 * Below 992px there is nothing upstream to copy: plugin.css pins the original
 * to `body { min-width: 992px !important }`, so it never reflows, it just
 * shrinks. These two steps are this theme's own.
 */
.mida-archive-grid .article-item {
	width: 33.3333%;
	margin-bottom: 24px;
}

@media (max-width: 991px) {
	.mida-archive-grid .article-item {
		width: 50%;
	}
}

@media (max-width: 575px) {
	.mida-archive-grid .article-item {
		width: 100%;
	}
}

/*
 * Reserve the three lines the card's clamp allows, so a post whose excerpt runs
 * short does not pull its “Xem thêm” button up out of line with its neighbours.
 * Upstream never needed this — there the cards are slides in a one-row slider,
 * not a wrapping grid where a ragged row is obvious.
 */
.mida-archive-grid .article-item-detail-content {
	min-height: 4.5em;
}

.main-page .shop-pagination {
	width: 100%;
	margin-top: 10px;
	text-align: center;
}

.main-page .shop-pagination > span {
	overflow: hidden;
	border: 1px solid #3f3f3f;
}

.main-page .shop-pagination > span a,
.main-page .shop-pagination > span .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	color: inherit;
}

/* Empty state -------------------------------------------------------------
 *
 * Shared by archives, the blog index and search, so it lives in the sheet that
 * loads everywhere.
 */

.mida-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	max-width: 560px;
	margin: 0 auto;
	padding: 3rem 1rem 4rem;
	text-align: center;
}

.mida-empty-icon {
	display: grid;
	place-items: center;
	width: 64px;
	height: 64px;
	margin-bottom: 1.25rem;
	color: #888;
	border: 1px solid #3f3f3f;
	border-radius: 50%;
}

.mida-empty-icon .mida-icon {
	width: 26px;
	height: 26px;
}

.mida-empty-title {
	margin: 0 0 0.6rem;
	font-size: 1.3rem;
	font-weight: 600;
	color: #fff;
}

.mida-empty-text {
	margin: 0 0 1.75rem;
	font-size: 15px;
	font-weight: 300;
	line-height: 1.7;
	color: #999;
}

.mida-empty-form {
	display: flex;
	width: 100%;
	max-width: 420px;
	margin-bottom: 1.25rem;
}

.mida-empty-form input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 14px;
	color: #fff;
	background: transparent;
	border: 1px solid #3f3f3f;
	border-right: 0;
	border-radius: var(--border_radius) 0 0 var(--border_radius);
	outline: none;
}

.mida-empty-form input::placeholder {
	color: #777;
	opacity: 1;
}

.mida-empty-form input:focus {
	border-color: #fff;
}

.mida-empty-form button {
	flex: 0 0 auto;
	padding: 10px 22px;
	font-size: 14px;
	color: #000;
	background: #fff;
	border: 1px solid #fff;
	border-radius: 0 var(--border_radius) var(--border_radius) 0;
	cursor: pointer;
	transition: all 0.3s ease;
}

.mida-empty-form button:hover {
	color: #fff;
	background: transparent;
}

.mida-empty-home {
	font-size: 14px;
	color: #999;
	border-bottom: 1px solid #3f3f3f;
	padding-bottom: 2px;
	transition: all 0.3s ease;
}

.mida-empty-home:hover {
	color: #fff;
	border-color: #fff;
}

/* Breadcrumb --------------------------------------------------------------
 *
 * Every ported stylesheet scopes the strip to its own wrapper
 * (`.main-page .main-page-breadcrumb`, `.main-search .main-search-breadcrumb`
 * and so on), so any template printing a breadcrumb outside one of those —
 * or on a screen whose stylesheet is not enqueued — loses the band entirely.
 *
 * mida_breadcrumb() therefore always emits this class alongside the ported
 * one. Same values, so the two never fight; this one just always applies.
 */

.mida-breadcrumb {
	padding: 10px 0;
	margin-bottom: 15px;
	background: #222;
}
