/*
 * MediRoyal Responsive Overrides
 * Consolidated responsive rules across all homepage sections.
 * Uses the reference breakpoint at 760px.
 *
 * Depends on: design-tokens.css, mr-global.css
 */

/* ════════════════════════════════════════════════════════════════
   LARGE TABLET / DESKTOP (1025px+)
   ════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════
   TABLET (769px – 1024px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {

	/* ── Stats Bar ────────────────── */
	.stats-bar {
		padding: 20px 24px;
	}

	/* ── Products Carousel ────────── */
	.gutter-wide .wrap {
		padding-left: 24px;
		padding-right: 24px;
	}

	.gutter-wide .marquee-wrap {
		margin-left: 0;
		margin-right: 0;
	}

	/* ── Hero ──────────────────────── */
	.hero {
		margin: 18px 24px 0;
	}

	/* ── Categories ────────────────── */
	.log-categories-marquee .wrap {
		padding: 0 24px;
	}

	/* ── mr- CTA + Contact cards ──── */
	.log-cta-cards {
		grid-template-columns: repeat(2, 1fr);
	}

	.log-contact-cards {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ════════════════════════════════════════════════════════════════
   MOBILE (<= 768px)  — matches reference breakpoint
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {

	/* ── Reduce overall section padding ── */
	.section {
		padding: 44px 18px;
	}

	/* ── Content wraps ─────────────────── */
	.marquee-wrap,
	.tag-marquee-wrap {
		padding: 0 18px;
	}

	/* ── Font sizing ───────────────────── */
	body {
		font-size: 15px;
	}

	h2.headline {
		font-size: clamp(22px, 5vw, 28px);
	}

	/* ── Hero ───────────────────────────── */
	.hero {
		margin: 12px 12px 0;
		border-radius: 20px;
		padding: 32px 18px;
		max-width: calc(100vw - 24px);
	}

	.hero-grid {
		grid-template-columns: 1fr;
	}

	.hero-visual {
		display: none;
	}

	.hero h1 {
		font-size: clamp(26px, 7vw, 32px);
	}

	.lede {
		font-size: 14px;
	}

	.hero-btn-row {
		flex-direction: column;
		align-items: stretch;
	}

	.btn-gold,
	.btn-ghost-white {
		justify-content: center;
	}

	.rating-row {
		gap: 14px;
	}

	.cert-row {
		width: 100%;
	}

	/* ── Stats Bar ──────────────────────── */
	.stats-bar {
		padding: 0;
	}

	.stats-grid {
		grid-template-columns: repeat(2, 1fr);
		border-radius: 0;
	}

	.stat-item {
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, .1);
		padding: 22px 18px;
	}

	.stat-item:nth-child(3),
	.stat-item:nth-child(4) {
		border-bottom: none;
	}

	.stat-item strong {
		font-size: 13px;
	}

	.stat-item span {
		font-size: 11.5px;
	}

	/* ── Categories Marquee ─────────────── */
	.marquee-track.dir-left,
	.marquee-track.dir-right {
		animation-duration: calc(var(--speed, 38s) * .65);
	}

	.marquee-wrap {
		padding: 0 18px;
	}

	.cat-card {
		padding: 20px;
	}

	/* ── Products Carousel ──────────────── */
	.gutter-wide .wrap {
		padding-left: 18px;
		padding-right: 18px;
	}

	.gutter-wide .marquee-wrap {
		margin-left: 0;
		margin-right: 0;
	}

	/* .prod-card width intentionally not set here — log-trending.css /
	   log-arrivals.css size it via CSS grid / flex track, not a fixed px
	   width. A leftover 200px override here previously fought that and
	   broke the mobile layout. */

	.prod-body {
		padding: 14px 16px 18px;
	}

	.prod-body .p-name {
		font-size: 13px;
		min-height: auto;
	}

	.p-price {
		font-size: 17px;
	}

	.select-btn {
		font-size: 11.5px;
		padding: 10px;
	}

	/* ── About Preview ──────────────────── */
	.about-split {
		grid-template-columns: 1fr;
		gap: 32px;
	}

	.about-stats {
		flex-direction: column;
		gap: 14px;
	}

	.about-card {
		flex: 1 1 100%;
	}

	/* ── Icon Features ──────────────────── */
	.icon4-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 16px;
	}

	.icon4-card {
		padding: 24px 18px;
	}

	/* ── Shipping Info ──────────────────── */
	.ship-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.ship-card {
		padding: 28px 22px;
	}

	/* ── Testimonials ───────────────────── */
	.log-testimonials-carousel {
		padding: 50px 0;
	}

	.head-row {
		flex-direction: column;
		align-items: flex-start !important;
		margin-bottom: 24px !important;
	}

	.scroll-row {
		padding: 8px 0 16px;
	}

	.scroll-row .test-card {
		flex: 0 0 280px;
	}

	.test-card {
		width: 280px;
		padding: 22px;
	}

	.test-card p.quote {
		min-height: auto;
	}

	/* ── FAQ Accordion ──────────────────── */
	.log-faq-accordion .faq-q {
		font-size: 14px;
		padding: 18px 4px;
	}

	.log-faq-accordion .faq-a p {
		font-size: 13px;
	}

	/* ── Tag Cloud ──────────────────────── */
	.tag-marquee-track {
		animation-duration: calc(var(--speed, 30s) * .65);
	}

	.tag-marquee-wrap {
		padding: 0 18px;
	}

	.run-tag {
		padding: 10px 16px;
		font-size: 12px;
	}

	.gutter-wide .tag-marquee-wrap {
		margin-left: 0;
		margin-right: 0;
	}

	/* ── mr- Stats strip + CTA + contact ── */
	.log-stats-strip {
		grid-template-columns: repeat(2, 1fr);
	}

	.log-stat-item:nth-child(2) {
		border-right: none;
	}

	.log-cta {
		padding: 48px 24px;
	}

	.log-cta-cards {
		grid-template-columns: 1fr;
	}

	.log-contact-cards {
		grid-template-columns: 1fr;
	}

	.log-hero-chips {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ════════════════════════════════════════════════════════════════
   SMALL MOBILE (<= 480px)
   ════════════════════════════════════════════════════════════════ */
@media (max-width: 480px) {

	.section {
		padding: 36px 14px;
	}

	/* ── Hero ──────────────────────────────── */
	.hero {
		margin: 20px 8px 0;
		border-radius: 16px;
		padding: 24px 14px;
		max-width: calc(100vw - 16px);
	}

	/* ── Stats Bar ─────────────────────────── */
	.stats-grid {
		grid-template-columns: 1fr;
	}

	.stat-item {
		padding: 18px 16px;
	}

	.stat-item:nth-child(2) {
		border-bottom: 1px solid rgba(255, 255, 255, .1);
	}

	/* ── Icon Features ─────────────────────── */
	.icon4-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	/* ── Categories ────────────────────────── */
	.cat-card {
		padding: 16px;
	}

	.cat-icon {
		width: 38px;
		height: 38px;
	}

	.cat-icon img {
		width: 34px;
		height: 34px;
	}

	.cat-card h4 {
		font-size: 14px;
	}

	/* ── Products ──────────────────────────── */
	/* .prod-card width intentionally not set — see 768px breakpoint note
	   above; grid/flex track controls width, not a fixed px value. */

	.prod-visual {
		height: 140px;
	}

	/* ── Tag Cloud ─────────────────────────── */
	.run-tag {
		padding: 8px 14px;
		font-size: 11px;
	}

	/* ── mr- narrow overrides ──────────────── */
	.log-stats-strip {
		grid-template-columns: 1fr;
	}

	.log-stat-item {
		border-right: none;
		border-bottom: 1px solid rgba(255, 255, 255, .12);
	}

	.log-stat-item:last-child {
		border-bottom: none;
	}

	.log-section {
		padding: 40px 0;
	}

	.log-tab-bar {
		gap: 6px;
	}

	.log-tab-btn {
		padding: 10px 14px;
		font-size: 11px;
	}
}

/* ════════════════════════════════════════════════════════════════
   ACCESSIBILITY — prefers-reduced-motion
   ════════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {

	.marquee-track.dir-left,
	.marquee-track.dir-right,
	.tag-marquee-track.dir-left,
	.tag-marquee-track.dir-right {
		animation: none;
	}

	.blink-cursor {
		animation: none;
		opacity: 1;
	}

	.fp-card {
		animation: none;
	}

	.fp-glow,
	.fp-ring {
		animation: none;
	}

	.fp-floatpill {
		animation: none;
	}

	.mouse-ic span {
		animation: none;
	}
}