/* ==========================================================================
   Rèm Hoàng Cung V2 — Responsive overrides
   Loaded after main.css. Uses --rhc-* tokens from main.css.
   Breakpoints: 1920 · 1440 · 1280 · 1024 · 768 · 430 · 390
   ========================================================================== */

/* --------------------------------------------------------------------------
   Global — prevent horizontal scroll
   -------------------------------------------------------------------------- */
html,
body {
	overflow-x: clip;
	max-width: 100%;
}

.site-header,
.rhc-main-header,
.rhc-hero,
.rhc-home,
.site-footer,
.rhc-footer-widgets,
.rhc-container {
	max-width: 100%;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

img,
video,
iframe,
table,
pre,
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image,
.rhc-ba,
.rhc-partners__viewport,
.rhc-footer-map {
	max-width: 100%;
}

/* --------------------------------------------------------------------------
   Desktop wide — min-width 1200px
   -------------------------------------------------------------------------- */
@media (min-width: 1200px) {
	.rhc-container {
		width: min(1380px, calc(100% - 48px));
		max-width: 1380px;
	}

	.rhc-products-grid,
	.rhc-products-grid--home {
		grid-template-columns: repeat(4, minmax(250px, 1fr));
	}

	.rhc-products-grid--few {
		grid-template-columns: repeat(var(--rhc-product-count, 2), minmax(260px, 320px));
		justify-content: center;
	}

	/* Only force 5-col when full set */
	.rhc-categories__grid:not(.rhc-categories__grid--few):not(.rhc-categories__grid--mid):not(.rhc-categories__grid--center) {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.rhc-categories__grid--5 {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.rhc-categories__grid--few,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(var(--rhc-cat-count, 2), minmax(0, 1fr));
		max-width: 920px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-categories__grid--mid {
		grid-template-columns: repeat(var(--rhc-cat-count, 4), minmax(0, 1fr));
		max-width: 1100px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-posts-grid:not(.rhc-posts-grid--few):not([class*="rhc-posts-grid--count-"]) {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rhc-posts-grid--count-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rhc-posts-grid--count-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-posts-grid--count-2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 920px;
		margin-inline: auto;
	}

	.rhc-posts-grid--few {
		grid-template-columns: repeat(var(--rhc-post-count, 2), minmax(0, 1fr));
		max-width: 1000px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-benefits__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.rhc-projects__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rhc-process__timeline {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.rhc-testimonials__grid:not(.rhc-testimonials__grid--1):not(.rhc-testimonials__grid--2) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-testimonials__grid--1 {
		grid-template-columns: minmax(0, 900px);
		justify-content: center;
	}

	.rhc-testimonials__grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 1000px;
		margin-inline: auto;
	}

	.rhc-testimonial-feature {
		max-width: 900px;
		width: 100%;
	}

	.rhc-footer-grid {
		grid-template-columns: 1.2fr 1fr 1fr 1fr 1.1fr;
	}

	.rhc-why-choose__grid {
		grid-template-columns: 1.05fr 1.15fr 0.9fr;
	}
}

/* --------------------------------------------------------------------------
   Laptop — 1024px to 1199px
   -------------------------------------------------------------------------- */
@media (min-width: 1024px) and (max-width: 1199px) {
	.rhc-container {
		width: min(1200px, calc(100% - 32px));
		max-width: 1200px;
	}

	.rhc-products-grid,
	.rhc-products-grid--home {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-products-grid--few {
		grid-template-columns: repeat(var(--rhc-product-count, 2), minmax(0, 1fr));
		max-width: 720px;
		margin-inline: auto;
	}

	.rhc-categories__grid:not(.rhc-categories__grid--few):not(.rhc-categories__grid--mid):not(.rhc-categories__grid--center),
	.rhc-categories__grid--5 {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		justify-content: center;
	}

	.rhc-categories__grid--5 .rhc-category-card {
		grid-column: span 2;
	}

	.rhc-categories__grid--5 .rhc-category-card:nth-child(4) {
		grid-column: 2 / 4;
	}

	.rhc-categories__grid--5 .rhc-category-card:nth-child(5) {
		grid-column: 4 / 6;
	}

	.rhc-categories__grid--few,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(var(--rhc-cat-count, 2), minmax(0, 1fr));
		max-width: 720px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-categories__grid--mid {
		grid-template-columns: repeat(var(--rhc-cat-count, 4), minmax(0, 1fr));
		max-width: 960px;
		margin-inline: auto;
	}

	.rhc-why-choose__grid {
		grid-template-columns: 1fr 1fr;
	}

	.rhc-why-choose__media,
	.rhc-why-choose__content,
	.rhc-why-choose__form {
		min-height: 0;
	}

	.rhc-why-choose__media {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
		max-height: 420px;
	}

	.rhc-why-choose__media img {
		min-height: 0;
	}

	.rhc-why-choose__form {
		grid-column: 1 / -1;
		position: static;
	}

	.rhc-posts-grid:not(.rhc-posts-grid--few) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-posts-grid--few {
		grid-template-columns: repeat(var(--rhc-post-count, 2), minmax(0, 1fr));
		max-width: 860px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-projects__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-video-intro__panel,
	.rhc-project-feature {
		grid-template-columns: 1fr;
	}

	.rhc-benefits__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-footer-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-why-choose__grid {
		grid-template-columns: 1fr 1fr;
	}

	.rhc-why-choose__media {
		grid-column: 1 / -1;
		aspect-ratio: 16 / 9;
		max-height: 420px;
	}

	.rhc-why-choose__form {
		grid-column: 1 / -1;
		position: static;
	}

	.rhc-process__timeline {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 28px;
	}

	.rhc-process__step:nth-child(3)::after {
		display: none;
	}

	.rhc-process__step:not(:last-child)::after {
		top: 42px;
	}

	.rhc-ba {
		aspect-ratio: 4 / 3;
		max-height: none;
	}

	.rhc-ba__label {
		font-size: 0.6875rem;
		padding: 5px 10px;
	}

	.rhc-project-gallery__grid {
		grid-template-columns: 1fr;
	}

	.rhc-posts-grid--few {
		grid-template-columns: repeat(var(--rhc-post-count, 2), minmax(0, 1fr));
		max-width: 860px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-stats__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* --------------------------------------------------------------------------
   Tablet — max-width 1023px (products 3-col)
   -------------------------------------------------------------------------- */
@media (max-width: 1023px) {
	.rhc-container {
		width: min(100%, calc(100% - 32px));
		max-width: none;
	}

	.rhc-products-grid,
	.rhc-products-grid--home {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-products-grid--few {
		grid-template-columns: repeat(var(--rhc-product-count, 2), minmax(0, 1fr));
		max-width: 640px;
		margin-inline: auto;
	}

	.rhc-categories__grid:not(.rhc-categories__grid--few):not(.rhc-categories__grid--mid):not(.rhc-categories__grid--center) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-categories__grid--few,
	.rhc-categories__grid--center,
	.rhc-categories__grid--mid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: 720px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-posts-grid:not(.rhc-posts-grid--few) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-posts-grid--few {
		grid-template-columns: repeat(var(--rhc-post-count, 2), minmax(0, 1fr));
		max-width: 760px;
		width: 100%;
		margin-inline: auto;
	}

	.rhc-projects__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-benefits__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-footer-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rhc-why-choose__grid {
		grid-template-columns: 1fr 1fr;
	}

	.rhc-why-choose__form {
		grid-column: 1 / -1;
		position: static;
	}

	.rhc-process__timeline {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		row-gap: 28px;
	}

	.rhc-process__step:not(:last-child)::after {
		display: none;
	}

	.rhc-stats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-stats__item:nth-child(2) {
		border-right: 0;
	}

	.rhc-stats__item:nth-child(1),
	.rhc-stats__item:nth-child(2) {
		border-bottom: 1px solid var(--rhc-border);
	}

	.rhc-testimonials__grid {
		grid-template-columns: 1fr;
		max-width: 560px;
		margin-inline: auto;
	}

	.rhc-contact-cta__grid {
		grid-template-columns: 1fr;
		max-height: none;
		min-height: 0;
	}

	.rhc-contact-cta__visual {
		display: none;
	}

	.rhc-contact-cta__panel {
		min-height: 0;
	}

	.rhc-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-footer-col--about {
		grid-column: 1 / -1;
	}

	.rhc-footer-map {
		aspect-ratio: 16 / 9;
	}

	.rhc-hero,
	.rhc-hero--image-only {
		min-height: 0;
		background-image: none;
	}

	.rhc-partners__track {
		animation-duration: 28s;
	}
}

/* --------------------------------------------------------------------------
   Tablet nav — 992px to 1023px (keep desktop nav visible)
   Overrides main.css nav collapse at 1023px.
   -------------------------------------------------------------------------- */
@media (min-width: 992px) and (max-width: 1023px) {
	.rhc-menu-toggle,
	.rhc-header-search-toggle {
		display: none;
	}

	.rhc-nav-bar {
		display: block;
	}

	.rhc-main-header__search,
	.rhc-hotline {
		display: block;
	}

	.rhc-hotline {
		display: inline-flex;
	}

	.rhc-main-header__inner {
		grid-template-columns: minmax(180px, 220px) minmax(280px, 1fr) auto;
	}

	.rhc-floating-contact {
		display: flex;
	}

	.rhc-mobile-bar {
		display: none;
	}

	body {
		padding-bottom: 0;
	}
}

/* --------------------------------------------------------------------------
   Nav collapse — max-width 991px
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
	.rhc-topbar__benefit--desktop {
		display: none;
	}

	.rhc-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 46px;
		min-height: 46px;
	}

	.rhc-main-header__inner {
		grid-template-columns: auto 1fr auto;
		gap: 12px;
	}

	.rhc-main-header__search,
	.rhc-main-header__quote,
	.rhc-hotline,
	.rhc-nav-bar {
		display: none;
	}

	.rhc-header-search-toggle {
		display: inline-flex;
	}

	.rhc-main-header__actions {
		gap: 10px;
	}

	/* Hero — image only, keep full banner */
	.rhc-hero,
	.rhc-hero--image-only,
	.rhc-hero__grid {
		min-height: 0;
		background-image: none;
	}

	/* Floating contact hidden; bottom bar shown */
	.rhc-floating-contact {
		display: none;
	}

	.rhc-floating-contact__item--desktop {
		display: none;
	}

	.rhc-mobile-bar {
		display: grid;
	}

	body {
		padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
	}

	body.woocommerce-cart,
	body.woocommerce-checkout {
		padding-bottom: 0;
	}

	body.woocommerce-cart .rhc-mobile-bar,
	body.woocommerce-checkout .rhc-mobile-bar {
		display: none;
	}

	/* Do not force single-column blog here — 2-col until 820px (see main/content.css) */
}

/* --------------------------------------------------------------------------
   Mobile — max-width 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {
	:root {
		--rhc-gutter: 24px;
		--rhc-gutter-sm: 20px;
	}

	body {
		font-size: 15px;
	}

	.rhc-container {
		width: min(100%, calc(100% - var(--rhc-gutter)));
	}

	.rhc-section {
		padding-block: var(--rhc-section-y-sm);
	}

	.rhc-home > .rhc-section:not(.rhc-hero) {
		padding-inline: calc(var(--rhc-gutter) / 2);
	}

	/* Header */
	.rhc-main-header {
		padding-block: 12px;
	}

	.rhc-main-header__logo .custom-logo,
	.rhc-logo-text img {
		max-height: 44px;
	}

	.rhc-header-cart {
		width: 44px;
		height: 44px;
		min-width: 44px;
		min-height: 44px;
	}

	/* Hero — image only, full banner visible */
	.rhc-hero,
	.rhc-hero--image-only {
		min-height: 0;
		aspect-ratio: auto;
		background-image: none;
	}

	.rhc-hero--image-only img,
	.rhc-hero--image-only .rhc-hero__img {
		width: 100%;
		height: auto;
		object-fit: contain;
	}

	.rhc-stats {
		margin-top: 14px;
	}

	.rhc-why-choose__grid {
		grid-template-columns: 1fr;
	}

	.rhc-why-choose__media,
	.rhc-why-choose__content,
	.rhc-why-choose__form {
		min-height: 0;
		height: auto;
	}

	.rhc-why-choose__media img {
		min-height: 240px;
	}

	.rhc-why-choose__form {
		padding: 18px;
	}

	.rhc-main-header__inner {
		grid-template-columns: auto 1fr auto;
		gap: 12px;
		min-height: 64px;
	}

	.rhc-site-branding__logo--custom .custom-logo,
	.rhc-main-header__logo .custom-logo {
		max-height: 40px;
	}

	.rhc-site-branding__title {
		font-size: 15px;
	}

	.rhc-categories__grid--5 .rhc-category-card {
		grid-column: auto;
	}

	.rhc-categories__grid--5 .rhc-category-card:nth-child(4),
	.rhc-categories__grid--5 .rhc-category-card:nth-child(5) {
		grid-column: auto;
	}

	.rhc-categories__grid--5 .rhc-category-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		max-width: 50%;
		width: 100%;
		justify-self: center;
	}

	.rhc-floating-contact {
		right: 12px;
		bottom: 80px;
		gap: 10px;
	}

	/* Stats — 1 or 2 columns */
	.rhc-stats {
		margin-top: 14px;
	}

	.rhc-stats__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-stats__item {
		border-right: 0;
		border-bottom: 1px solid var(--rhc-border);
		padding: 20px 16px;
	}

	.rhc-stats__item:nth-child(odd) {
		border-right: 1px solid var(--rhc-border);
	}

	.rhc-stats__item:nth-last-child(-n + 2) {
		border-bottom: 0;
	}

	.rhc-stats__item:last-child:nth-child(odd) {
		border-right: 0;
		grid-column: 1 / -1;
	}

	/* Products & categories — 2 columns (incl. few modifiers) */
	.rhc-products-grid,
	.rhc-products-grid--home,
	.rhc-products-grid--few,
	.rhc-categories__grid,
	.rhc-categories__grid--few,
	.rhc-categories__grid--mid,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		max-width: none;
		margin-inline: 0;
		gap: 14px;
	}

	.rhc-category-card {
		min-height: 280px;
	}

	.rhc-category-card__media {
		min-height: 150px;
		flex-basis: 60%;
	}

	.rhc-product-card__media {
		min-height: 0;
	}

	.rhc-product-card__hover {
		opacity: 1;
		transform: none;
	}

	.rhc-projects__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.rhc-video-intro__panel,
	.rhc-project-feature {
		grid-template-columns: 1fr;
		padding: 16px;
	}

	.rhc-video-intro__play {
		width: 64px;
		height: 64px;
	}

	.rhc-benefits__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* Process — 1 or 2 columns */
	.rhc-process__timeline {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
	}

	.rhc-process__step {
		padding: 16px 10px;
	}

	.rhc-process__step:not(:last-child)::after {
		display: none;
	}

	/* Testimonials — snap only for multi-card; featured stays full width */
	.rhc-testimonials__grid,
	.rhc-testimonials__grid--2,
	.rhc-testimonials__grid--3 {
		display: flex;
		grid-template-columns: none;
		max-width: none;
		margin-inline: 0;
		gap: 14px;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
	}

	.rhc-testimonials__grid--1 {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		overflow: visible;
	}

	.rhc-testimonials--featured .rhc-testimonial-feature {
		max-width: none;
		width: 100%;
		padding: 24px 18px;
	}

	.rhc-testimonial-card {
		flex: 0 0 min(320px, 85vw);
		scroll-snap-align: start;
		min-height: 240px;
		padding: 20px;
	}

	/* Why choose & posts */
	.rhc-why-choose__grid {
		grid-template-columns: 1fr;
	}

	.rhc-why-choose__media {
		aspect-ratio: 16 / 10;
		max-height: 320px;
	}

	.rhc-posts-grid,
	.rhc-posts-grid--few {
		grid-template-columns: 1fr;
	}

	.rhc-ba {
		aspect-ratio: 3 / 4;
		max-height: 480px;
	}

	.rhc-form {
		grid-template-columns: 1fr;
	}

	/* Contact CTA — stack & compact */
	.rhc-contact-cta__grid {
		grid-template-columns: 1fr;
	}

	.rhc-contact-cta__visual {
		display: none;
	}

	.rhc-contact-cta__content {
		padding: 24px 20px 8px;
	}

	.rhc-contact-cta__lead {
		font-size: 0.975rem;
	}

	.rhc-contact-cta__title {
		font-size: clamp(1.5rem, 6vw, 1.875rem);
		margin-bottom: 12px;
	}

	.rhc-contact-cta__form {
		padding: 12px 16px 20px;
	}

	.rhc-contact-cta .rhc-consult-form__intro {
		display: none;
	}

	.rhc-contact-cta .rhc-consult-form {
		padding: 18px;
	}

	.rhc-contact-cta .rhc-form {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	/* Footer */
	.rhc-footer-grid {
		grid-template-columns: 1fr;
		gap: 28px;
	}

	.rhc-footer-map {
		aspect-ratio: 4 / 3;
		min-height: 200px;
	}

	.rhc-footer-bottom__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	/* Floating contact hidden on mobile */
	.rhc-floating-contact {
		display: none !important;
	}

	.rhc-mobile-bar {
		display: grid;
	}

	.rhc-mobile-bar a {
		min-height: 44px;
	}

	/* Misc */
	.rhc-section-head__title {
		font-size: clamp(1.625rem, 6vw, 2rem);
	}

	.admin-bar .site-header.is-sticky {
		top: 46px;
	}
}

/* --------------------------------------------------------------------------
   Small mobile — max-width 420px
   -------------------------------------------------------------------------- */
@media (max-width: 420px) {
	body {
		font-size: 14px;
	}

	.rhc-btn,
	.rhc-menu-toggle,
	.rhc-header-cart,
	.rhc-mobile-bar a,
	.rhc-search-form__btn,
	.rhc-floating-contact__item {
		min-height: 46px;
	}

	.rhc-btn--icon {
		min-width: 46px;
		width: 46px;
		height: 46px;
	}

	/* Keep 2 columns at 390px — do not collapse products to 1 */
	.rhc-products-grid,
	.rhc-products-grid--home,
	.rhc-products-grid--few,
	.rhc-categories__grid,
	.rhc-categories__grid--few,
	.rhc-categories__grid--mid,
	.rhc-categories__grid--center,
	.rhc-categories__grid--5 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.rhc-categories__grid--5 .rhc-category-card:last-child:nth-child(odd) {
		grid-column: 1 / -1;
		max-width: 50%;
		width: 100%;
		justify-self: center;
	}

	.rhc-stats__grid {
		grid-template-columns: 1fr;
	}

	.rhc-stats__item,
	.rhc-stats__item:nth-child(odd) {
		border-right: 0;
		border-bottom: 1px solid var(--rhc-border);
	}

	.rhc-stats__item:last-child {
		border-bottom: 0;
	}

	.rhc-process__timeline,
	.rhc-benefits__grid,
	.rhc-projects__grid {
		grid-template-columns: 1fr;
	}

	.rhc-posts-grid,
	.rhc-posts-grid--few {
		grid-template-columns: 1fr;
		max-width: none;
	}

	.rhc-product-card__actions {
		flex-wrap: wrap;
		gap: 8px;
	}

	.rhc-product-card__actions .rhc-btn--outline {
		flex: 1 1 auto;
		min-width: 0;
		min-height: 42px;
		font-size: 0.8125rem;
		padding-inline: 8px;
	}

	.rhc-product-card__actions .add_to_cart_button,
	.rhc-product-card__actions .rhc-btn--cart {
		flex: 0 0 42px;
		min-height: 42px;
	}

	.site-footer,
	.rhc-footer-widgets,
	.rhc-footer-grid,
	.rhc-footer-col,
	.rhc-footer-list,
	.rhc-footer-contact {
		max-width: 100%;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.rhc-footer-map iframe {
		max-width: 100%;
	}

	.rhc-mobile-bar {
		max-width: 100vw;
	}
}

@media (max-width: 480px) {
	.rhc-site-branding__tagline {
		display: none;
	}

	.rhc-site-branding__title {
		font-size: 14px;
		max-width: 140px;
	}

	.rhc-site-branding__logo--custom .custom-logo,
	.rhc-main-header__logo .custom-logo {
		max-height: 36px;
	}
}

@media (min-width: 783px) {
	.admin-bar .site-header.is-sticky {
		top: 32px;
	}
}

/* ==========================================================================
   Mobile / tablet polish — desktop (≥992px) unchanged
   ========================================================================== */

/* Tablet — compact process + categories 2 per row */
@media (max-width: 991px) {
	.rhc-process__timeline {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		row-gap: 20px;
	}

	.rhc-process__step {
		padding: 16px 12px;
	}

	.rhc-process__step:not(:last-child)::after {
		display: none;
	}

	.rhc-process__desc {
		font-size: 0.875rem;
		line-height: 1.45;
	}

	.rhc-categories__grid,
	.rhc-categories__grid--5,
	.rhc-categories__grid--few,
	.rhc-categories__grid--mid,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		max-width: none;
		width: 100%;
		margin-inline: 0;
	}

	.rhc-categories__grid--5 .rhc-category-card {
		grid-column: auto;
	}

	.rhc-categories__grid--5 .rhc-category-card:nth-child(4),
	.rhc-categories__grid--5 .rhc-category-card:nth-child(5) {
		grid-column: auto;
	}

	.rhc-categories__grid--5 .rhc-category-card:last-child:nth-child(odd) {
		grid-column: auto;
		max-width: none;
		justify-self: stretch;
	}
}

/* Mobile — hide process, tighten sections, category cards readable */
@media (max-width: 767px) {
	.rhc-process,
	.rhc-process.rhc-section {
		display: none !important;
		margin: 0 !important;
		padding: 0 !important;
		height: 0 !important;
		min-height: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
	}

	.rhc-home {
		gap: 0;
	}

	.rhc-section:not(.rhc-hero):not(.rhc-process),
	.rhc-home > .rhc-section:not(.rhc-hero):not(.rhc-process) {
		padding-top: 40px;
		padding-bottom: 40px;
	}

	.rhc-stats.rhc-section,
	.rhc-stats {
		padding-top: 0;
		padding-bottom: 40px;
	}

	.rhc-categories__grid,
	.rhc-categories__grid--5,
	.rhc-categories__grid--few,
	.rhc-categories__grid--mid,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px;
		max-width: none;
		width: 100%;
		margin-inline: 0;
	}

	.rhc-category-card {
		min-height: 210px;
		height: auto;
		max-height: none;
		overflow: hidden;
	}

	.rhc-category-card:hover {
		transform: none;
	}

	.rhc-category-card__media {
		aspect-ratio: 1 / 1;
		flex: 0 0 auto;
		flex-basis: auto;
		min-height: 0;
		width: 100%;
	}

	.rhc-category-card__media img {
		width: 100%;
		height: 100%;
		object-fit: cover;
		transform: none;
	}

	.rhc-category-card:hover .rhc-category-card__media img {
		transform: none;
	}

	.rhc-category-card__body {
		gap: 4px;
		padding: 10px 12px 12px;
		min-height: 0;
	}

	.rhc-category-card__title {
		font-size: 0.9375rem;
		line-height: 1.25;
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}

	.rhc-category-card__count {
		margin: 0;
		font-size: 0.75rem;
		line-height: 1.3;
	}

	.rhc-category-card__cta {
		margin-top: auto;
		align-self: flex-start;
		min-height: 34px;
		padding: 6px 12px;
		font-size: 0.75rem;
	}

	.rhc-categories__grid--5 .rhc-category-card:last-child:nth-child(odd) {
		grid-column: auto;
		max-width: none;
		width: 100%;
		justify-self: stretch;
	}
}

/* Keep 2-col categories at 390–430px; avoid full-width collapse */
@media (max-width: 430px) {
	.rhc-categories__grid,
	.rhc-categories__grid--5,
	.rhc-categories__grid--few,
	.rhc-categories__grid--mid,
	.rhc-categories__grid--center {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 12px;
	}

	.rhc-category-card__title {
		font-size: 0.875rem;
	}

	.rhc-category-card__body {
		padding: 8px 10px 10px;
	}

	.rhc-section:not(.rhc-hero):not(.rhc-process) {
		padding-top: 40px;
		padding-bottom: 40px;
	}
}

/* ==========================================================================
   Mobile / tablet header redesign — desktop (≥992px) unchanged
   ========================================================================== */

/* Hidden on desktop */
.rhc-mobile-header,
.rhc-mobile-search-panel {
	display: none;
}

@media (max-width: 991px) {
	/* Hide multi-tier desktop chrome */
	.rhc-desktop-header,
	.site-header__shell.rhc-desktop-header,
	.rhc-topbar,
	.rhc-main-header,
	.rhc-nav-bar,
	.rhc-navigation-bar {
		display: none !important;
		height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		overflow: hidden !important;
		border: 0 !important;
	}

	.site-header,
	.site-header.is-sticky {
		position: sticky;
		top: 0;
		z-index: 2000;
		background: #ffffff;
		border-bottom: 0;
		box-shadow: none;
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
	}

	.admin-bar .site-header,
	.admin-bar .site-header.is-sticky {
		top: 46px;
	}

	.rhc-mobile-header {
		position: relative;
		z-index: 2000;
		display: grid;
		grid-template-columns: 44px minmax(0, 1fr) auto;
		align-items: center;
		gap: 10px;
		width: 100%;
		min-height: 62px;
		padding: 8px 12px;
		background: #ffffff;
		border-bottom: 1px solid #dce8f6;
		box-shadow: 0 4px 14px rgba(4, 48, 105, 0.08);
	}

	.admin-bar .rhc-mobile-header {
		top: auto;
	}

	.site-header.is-sticky .rhc-mobile-header {
		box-shadow: 0 4px 14px rgba(4, 48, 105, 0.1);
	}

	.rhc-mobile-logo {
		display: flex;
		align-items: center;
		justify-content: center;
		min-width: 0;
		max-width: 100%;
		text-decoration: none;
	}

	.rhc-mobile-logo img,
	.rhc-mobile-logo .custom-logo {
		display: block;
		width: auto;
		max-width: 150px;
		max-height: 42px;
		height: auto;
		object-fit: contain;
	}

	.rhc-mobile-logo__text {
		display: block;
		max-width: 150px;
		overflow: hidden;
		color: #073e82;
		font-family: "Cormorant Garamond", Georgia, serif;
		font-size: 1.25rem;
		font-weight: 700;
		line-height: 1.1;
		text-align: center;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.rhc-mobile-actions {
		display: flex;
		align-items: center;
		justify-content: flex-end;
		gap: 6px;
	}

	.rhc-mobile-menu-toggle,
	.rhc-mobile-search-toggle,
	.rhc-mobile-cart {
		position: relative;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 10px;
		background: #f3f7fc;
		color: #073e82;
		text-decoration: none;
		cursor: pointer;
		flex: 0 0 40px;
	}

	.rhc-mobile-menu-toggle .rhc-icon,
	.rhc-mobile-search-toggle .rhc-icon,
	.rhc-mobile-cart .rhc-icon,
	.rhc-mobile-menu-toggle svg,
	.rhc-mobile-search-toggle svg,
	.rhc-mobile-cart svg {
		width: 21px !important;
		height: 21px !important;
	}

	.rhc-cart-count,
	.rhc-mobile-cart .rhc-header-cart__count {
		position: absolute;
		top: 2px;
		right: 2px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-width: 16px;
		height: 16px;
		padding: 0 4px;
		border-radius: 999px;
		background: #e8ae2f;
		color: #fff;
		font-size: 10px;
		font-weight: 700;
		line-height: 16px;
		text-align: center;
	}

	/* Search panel under header */
	.rhc-mobile-search-panel {
		display: none;
		position: fixed;
		top: 62px;
		left: 0;
		right: 0;
		z-index: 1999;
		padding: 12px;
		background: #fff;
		border-bottom: 1px solid #dce8f6;
		box-shadow: 0 8px 20px rgba(4, 48, 105, 0.1);
	}

	.rhc-mobile-search-panel:not([hidden]) {
		display: block;
	}

	.admin-bar .rhc-mobile-search-panel {
		top: 108px;
	}

	.rhc-mobile-search-panel .rhc-search-form,
	.rhc-mobile-search-panel form {
		display: flex;
		align-items: stretch;
		gap: 8px;
		margin: 0;
		width: 100%;
	}

	.rhc-mobile-search-panel input[type="search"],
	.rhc-mobile-search-panel input[name="s"],
	.rhc-mobile-search-panel .rhc-search-form__input {
		flex: 1;
		min-width: 0;
		height: 44px;
		padding: 0 14px;
		border: 1px solid #dce8f6;
		border-radius: 10px;
		background: #f7fafc;
		color: #073e82;
		font-size: 15px;
	}

	.rhc-mobile-search-panel .rhc-search-form__btn,
	.rhc-mobile-search-panel button[type="submit"] {
		flex: 0 0 auto;
		min-width: 44px;
		height: 44px;
		border: 0;
		border-radius: 10px;
		background: #073e82;
		color: #fff;
	}

	/* Off-canvas menu cleanup */
	.rhc-mobile-menu__panel {
		width: min(320px, 86vw);
	}

	.rhc-mobile-menu__search,
	.rhc-mobile-menu__cta,
	.rhc-mobile-menu__tagline {
		display: none !important;
	}

	.rhc-mobile-menu__nav .rhc-submenu,
	.rhc-mobile-menu__nav .sub-menu {
		position: static !important;
		display: none;
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
		box-shadow: none !important;
	}

	.rhc-mobile-menu__nav .has-children.is-open > .rhc-submenu,
	.rhc-mobile-menu__nav .has-children.is-open > .sub-menu,
	.rhc-mobile-menu__nav .menu-item-has-children.is-open > .rhc-submenu,
	.rhc-mobile-menu__nav .menu-item-has-children.is-open > .sub-menu {
		display: block !important;
	}

	/* Bottom CTA — 3 buttons only */
	.rhc-floating-contact {
		display: none !important;
	}

	.rhc-mobile-bar,
	.rhc-mobile-cta {
		display: grid !important;
		grid-template-columns: repeat(3, 1fr);
		min-height: 58px;
		padding: 0 0 env(safe-area-inset-bottom, 0px);
		background: #fff;
		border-top: 1px solid #dce8f6;
		box-shadow: 0 -4px 18px rgba(5, 54, 115, 0.12);
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		z-index: 1900;
	}

	.rhc-mobile-bar a,
	.rhc-mobile-cta a {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-height: 58px;
		padding: 8px 4px;
		border-radius: 0;
		color: #073e82;
		font-size: 11px;
		font-weight: 700;
		text-decoration: none;
	}

	.rhc-mobile-bar a:last-child,
	.rhc-mobile-cta a:last-child,
	.rhc-mobile-bar__item--accent {
		background: #d6a532 !important;
		color: #fff !important;
	}

	body {
		padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
	}

	body.woocommerce-cart,
	body.woocommerce-checkout {
		padding-bottom: 0;
	}

	body.woocommerce-cart .rhc-mobile-bar,
	body.woocommerce-checkout .rhc-mobile-bar,
	body.woocommerce-cart .rhc-mobile-cta,
	body.woocommerce-checkout .rhc-mobile-cta {
		display: none !important;
	}
}

@media (max-width: 767px) {
	.rhc-mobile-header {
		min-height: 62px;
		padding: 8px 12px;
	}

	.rhc-mobile-logo img,
	.rhc-mobile-logo .custom-logo {
		max-width: 140px;
		max-height: 40px;
	}
}

@media (min-width: 783px) and (max-width: 991px) {
	.admin-bar .site-header,
	.admin-bar .site-header.is-sticky {
		top: 32px;
	}

	.admin-bar .rhc-mobile-search-panel {
		top: 94px;
	}
}

@media (min-width: 992px) {
	.rhc-mobile-header,
	.rhc-mobile-search-panel {
		display: none !important;
	}
}
