/* RunZone Event Deals — namespace .rzed (theo _runzone-docs/DESIGN-SYSTEM.md) */
.rzed {
	--rz-flame: #fc4315;
	--rz-flame-dark: #d74001;
	--rz-yellow: #f5e01b;
	--rz-ink: #0a0a0a;
	--rz-mist: #f4f4f4;
	--rz-sale: #b20000;
	--rz-line: #e6e6e6;
	--rz-muted: #5c5c5c;
	--rz-radius: 12px;
	font-family: "Be Vietnam Pro", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--rz-ink);
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 16px 96px;
	line-height: 1.55;
}
.rzed *, .rzed *::before, .rzed *::after { box-sizing: border-box; }
.rzed h2, .rzed h3 { font-family: "Bricolage Grotesque", "Be Vietnam Pro", sans-serif; color: var(--rz-ink); letter-spacing: -0.01em; }
.rzed a { color: var(--rz-flame); }
.rzed :focus-visible { outline: 3px solid var(--rz-flame); outline-offset: 2px; }

/* --- Countdown strip --- */
.rzed-strip {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px;
	background: var(--rz-ink); color: #fff; border-radius: 0 0 16px 16px;
	padding: 14px 16px; margin: 0 -16px 20px; text-align: center;
}
.rzed-strip__label { font-weight: 600; }
.rzed-strip__date { font-size: .85rem; color: var(--rz-yellow); font-weight: 600; }
.rzed-count { display: flex; gap: 6px; }
.rzed-count span { background: #fff; color: var(--rz-ink); border-radius: 8px; min-width: 52px; padding: 4px 6px; display: flex; flex-direction: column; line-height: 1.1; }
.rzed-count b { font-size: 1.35rem; font-variant-numeric: tabular-nums; color: var(--rz-sale); }
.rzed-count i { font-style: normal; font-size: .7rem; color: var(--rz-muted); }

/* --- Perks --- */
.rzed-perks { list-style: none; margin: 0 0 18px; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.rzed-perks li { background: var(--rz-mist); border-left: 4px solid var(--rz-flame); border-radius: 10px; padding: 10px 12px; margin: 0; display: flex; flex-direction: column; font-size: .85rem; }
.rzed-perks strong { font-size: .95rem; }
.rzed-perks span { color: var(--rz-muted); }

/* --- Nav chips --- */
.rzed-nav {
	position: sticky; top: 0; z-index: 20; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
	background: #fff; padding: 10px 0; margin-bottom: 8px; border-bottom: 1px solid var(--rz-line);
}
.rzed-nav::-webkit-scrollbar { display: none; }
.rzed-nav a {
	flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--rz-ink);
	color: var(--rz-ink); font-weight: 600; font-size: .88rem; text-decoration: none; white-space: nowrap;
}
.rzed-nav a:hover { background: var(--rz-yellow); }

/* --- Groups --- */
.rzed-group { padding: 26px 0 8px; scroll-margin-top: 64px; }
.rzed-group__head { margin-bottom: 14px; }
.rzed-group__head h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin: 0 0 4px; position: relative; padding-left: 14px; }
.rzed-group__head h2::before { content: ""; position: absolute; left: 0; top: .2em; bottom: .2em; width: 5px; border-radius: 3px; background: var(--rz-flame); }
.rzed-group__head p { margin: 0; color: var(--rz-muted); }

.rzed-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

/* --- Card (mobile: ngang) --- */
.rzed-card {
	display: grid; grid-template-columns: 38% 1fr; gap: 12px;
	background: #fff; border: 1px solid var(--rz-line); border-radius: var(--rz-radius); padding: 10px; overflow: hidden;
}
.rzed-card.is-out { opacity: .7; }
.rzed-card__media { position: relative; align-self: start; border-radius: 10px; overflow: hidden; background: var(--rz-mist); aspect-ratio: 1; }
.rzed-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; margin: 0; }
.rzed-badges { position: absolute; top: 6px; left: 6px; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rzed-badge { font-size: .72rem; font-weight: 700; padding: 3px 7px; border-radius: 6px; line-height: 1.2; }
.rzed-badge--sale { background: var(--rz-sale); color: #fff; }
.rzed-badge--promo { background: var(--rz-yellow); color: var(--rz-ink); }
.rzed-badge--gift { background: var(--rz-ink); color: #fff; }

.rzed-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rzed-card__title { font-size: 1rem; line-height: 1.3; margin: 0; }
.rzed-card__desc { margin: 0; font-size: .85rem; color: var(--rz-muted); }
.rzed-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.rzed-price del { color: var(--rz-muted); font-size: .88rem; }
.rzed-price strong { color: var(--rz-flame); font-size: 1.25rem; font-weight: 800; }
.rzed-price .woocommerce-Price-currencySymbol { font-size: .85em; }
.rzed-gift { display: flex; gap: 6px; align-items: flex-start; margin: 0; font-size: .85rem; font-weight: 600; color: var(--rz-ink); background: #fff8c4; border-radius: 8px; padding: 6px 8px; }
.rzed-gift svg { flex: 0 0 auto; color: var(--rz-flame); margin-top: 2px; }
.rzed-out { margin: 4px 0 0; font-size: .85rem; color: var(--rz-muted); }

/* --- Form --- */
.rzed-form { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; }
.rzed-field { display: flex; flex-direction: column; gap: 3px; font-size: .8rem; color: var(--rz-muted); margin: 0; }
.rzed-field select { margin: 0; height: 40px; border-radius: 8px; border: 1px solid #cfcfcf; font-size: .9rem; color: var(--rz-ink); padding: 0 8px; background-color: #fff; box-shadow: none; }
.rzed-qty { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--rz-muted); }
.rzed-stepper { display: inline-flex; border: 1px solid #cfcfcf; border-radius: 8px; overflow: hidden; }
.rzed-stepper button { width: 36px; height: 38px; margin: 0; padding: 0; border: 0; background: var(--rz-mist); color: var(--rz-ink); font-size: 1.1rem; line-height: 1; min-height: 0; }
.rzed-stepper input { width: 46px; height: 38px; margin: 0; border: 0; text-align: center; font-weight: 700; font-size: 1rem; padding: 0; box-shadow: none; -moz-appearance: textfield; }
.rzed-stepper input::-webkit-outer-spin-button, .rzed-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.rzed-subtotal { margin: 0; font-size: .85rem; font-weight: 600; color: var(--rz-ink); }
.rzed-subtotal em { font-style: normal; color: var(--rz-flame); }

.rzed-actions { display: grid; grid-template-columns: 1fr; gap: 6px; }
.rzed .rzed-btn {
	display: inline-flex; align-items: center; justify-content: center; margin: 0; min-height: 42px; padding: 0 14px;
	border-radius: 10px; font-weight: 700; font-size: .92rem; text-transform: none; letter-spacing: 0; line-height: 1.2;
	text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .1s;
}
.rzed .rzed-btn--primary { background: var(--rz-flame); color: #fff; border: 2px solid var(--rz-flame); }
.rzed .rzed-btn--primary:hover { background: var(--rz-flame-dark); border-color: var(--rz-flame-dark); color: #fff; }
.rzed .rzed-btn--ghost { background: #fff; color: var(--rz-ink); border: 2px solid var(--rz-ink); }
.rzed .rzed-btn--ghost:hover { background: var(--rz-ink); color: #fff; }
.rzed .rzed-btn:active { transform: translateY(1px); }
.rzed .rzed-btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* --- FAQ --- */
.rzed-faq { margin-top: 32px; padding: 20px; background: var(--rz-mist); border-radius: 16px; }
.rzed-faq h2 { font-size: 1.35rem; margin: 0 0 10px; }
.rzed-faq details { background: #fff; border-radius: 10px; padding: 0 14px; margin-bottom: 8px; }
.rzed-faq summary { cursor: pointer; font-weight: 700; padding: 12px 0; }
.rzed-faq details p { margin: 0 0 12px; }

/* --- Sticky cart bar --- */
.rzed-bar {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 999;
	display: flex; align-items: center; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
	background: #fff; border-top: 3px solid var(--rz-flame); box-shadow: 0 -6px 20px rgba(0,0,0,.12);
}
.rzed-bar[hidden] { display: none; }
.rzed-bar__info { flex: 1; font-size: .9rem; min-width: 0; }
.rzed-bar__info strong { color: var(--rz-flame); font-size: 1.05rem; }
.rzed-bar .rzed-btn { min-height: 40px; padding: 0 12px; }

.rzed-toast {
	position: fixed; left: 50%; bottom: 84px; transform: translate(-50%, 20px); z-index: 1000;
	background: var(--rz-ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .9rem;
	max-width: calc(100% - 32px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.rzed-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.rzed-toast.is-error { background: var(--rz-sale); }

.rzed-free { color: var(--rz-flame); font-weight: 700; }

/* --- Tablet / desktop --- */
@media (min-width: 600px) {
	.rzed-perks { grid-template-columns: repeat(4, 1fr); }
	.rzed-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
	.rzed-card { grid-template-columns: 1fr; padding: 12px; }
	.rzed-actions { grid-template-columns: 1fr 1fr; }
	.rzed-bar { justify-content: center; }
	.rzed-bar__info { flex: 0 1 auto; margin-right: 12px; }
}
@media (min-width: 960px) {
	.rzed-grid { grid-template-columns: repeat(3, 1fr); }
	.rzed-strip { margin: 0 0 24px; border-radius: 16px; }
	.rzed-card__title { font-size: 1.05rem; }
}
@media (prefers-reduced-motion: reduce) {
	.rzed *, .rzed-toast { transition: none !important; scroll-behavior: auto !important; }
}

/* --- Mua X tặng Y: chọn nhiều phân loại --- */
.rzed-multi { display: flex; flex-direction: column; gap: 4px; }
.rzed-multi__label { font-size: .8rem; color: var(--rz-muted); }
.rzed-multi__label em { font-style: normal; }
.rzed-multi__list { display: flex; flex-direction: column; gap: 4px; max-height: 232px; overflow-y: auto; padding-right: 2px; }
.rzed-mrow { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--rz-line); border-radius: 8px; padding: 3px 3px 3px 10px; }
.rzed-mrow__name { font-size: .85rem; line-height: 1.25; min-width: 0; }
.rzed-stepper--sm button { width: 30px; height: 32px; }
.rzed-stepper--sm input { width: 36px; height: 32px; font-size: .9rem; }
.rzed-subtotal b { color: var(--rz-ink); }
.rzed-subtotal small { display: block; font-weight: 500; color: var(--rz-muted); margin-top: 2px; }

/* Mobile: thẻ có danh sách màu -> ảnh nhỏ, phần chọn màu & nút trải hết bề ngang thẻ */
@media (max-width: 599px) {
	.rzed-card.has-multi { grid-template-columns: 96px 1fr; }
	.rzed-card.has-multi .rzed-form { margin-left: -108px; }
	.rzed-card.has-multi .rzed-mrow__name { font-size: .9rem; }
	.rzed-card.has-multi .rzed-actions { grid-template-columns: 1fr 1fr; }
}

/* --- Giá theo bậc số lượng --- */
.rzed-tiers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rzed-tiers li { margin: 0; font-size: .85rem; color: var(--rz-ink); background: #fff8c4; border-radius: 6px; padding: 3px 8px; }
.rzed-tiers b { color: var(--rz-flame); }
.rzed-tiers span { color: var(--rz-muted); font-size: .8rem; }
