/* Phase 1 mobile / tablet adjustments */
@media (max-width: 1024px) {
	.ddd-header__row--main {
		grid-template-columns: auto 1fr auto;
	}

	.ddd-header__cat-btn {
		display: none;
	}

	.ddd-header__action--phone .ddd-header__action-label,
	.ddd-header__action:not(.ddd-header__action--phone):not(.ddd-header__action--zalo) {
		display: none;
	}

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

@media (max-width: 767px) {
	.ddd-announce__inner {
		padding: 6px 12px;
		gap: 6px;
	}

	.ddd-announce__text {
		font-size: 12px;
		flex-basis: 100%;
		white-space: normal;
		overflow-wrap: anywhere;
		line-height: 1.4;
	}

	.ddd-announce__meta {
		width: 100%;
	}

	.ddd-header__menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		border: 1px solid var(--ddd-border);
		border-radius: 8px;
		background: #fff;
		cursor: pointer;
	}

	.ddd-header__burger,
	.ddd-header__burger::before,
	.ddd-header__burger::after {
		display: block;
		width: 18px;
		height: 2px;
		background: var(--ddd-text);
		position: relative;
	}

	.ddd-header__burger::before,
	.ddd-header__burger::after {
		content: "";
		position: absolute;
		left: 0;
	}

	.ddd-header__burger::before {
		top: -6px;
	}

	.ddd-header__burger::after {
		top: 6px;
	}

	.ddd-header__row--main {
		grid-template-columns: auto 1fr auto;
		gap: 8px;
	}

	.ddd-header__row--main .ddd-search {
		display: none;
	}

	.ddd-header__row--mobile-search {
		display: block;
		position: relative;
		z-index: calc(var(--ddd-header-z) + 5);
	}

	.ddd-header__row--mobile-search .ddd-search {
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.ddd-header__row--mobile-search .ddd-search__suggest {
		left: 0;
		right: 0;
		width: auto;
		max-width: 100vw;
		max-height: min(45vh, 360px);
		z-index: calc(var(--ddd-header-z) + 30);
	}

	.ddd-header__logo {
		justify-self: center;
		max-width: 140px;
	}

	.ddd-header__logo-img {
		height: 40px;
	}

	.ddd-header__actions {
		gap: 4px;
	}

	.ddd-header__action--phone,
	.ddd-header__action--zalo,
	.ddd-header__action[href*="account"],
	.ddd-header__action[href*="quote"],
	.ddd-header__action[href="#ddd-home-quote"] {
		display: none;
	}

	.ddd-header__cart {
		height: 40px;
		padding: 0 10px;
	}

	.ddd-mega {
		left: 8px;
		right: 8px;
	}

	.ddd-footer__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
		padding: 28px 12px 20px;
	}

	.ddd-footer__map-inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
		padding-top: 22px;
		padding-bottom: 22px;
	}

	.ddd-footer__map-frame,
	.ddd-footer__map-frame iframe {
		min-height: 220px;
	}

	.ddd-footer__bottom-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
		padding: 14px 12px;
	}

	.ddd-footer__legal-list {
		gap: 4px 16px;
	}

	.ddd-home-ui--mobile-cta .ddd-mobile-cta {
		display: grid;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 10060;
		background: #0f2f4d;
		border-top: 1px solid rgba(255, 255, 255, 0.12);
		box-shadow: 0 -6px 20px rgba(15, 47, 77, 0.18);
		/* Reserve space to avoid content CLS under the bar */
		min-height: 58px;
		padding-bottom: env(safe-area-inset-bottom, 0);
	}

	.ddd-home-ui--mobile-cta {
		padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px));
	}

	.ddd-mobile-cta__btn {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		min-height: 58px;
		padding: 8px 6px;
		text-decoration: none;
		color: #fff;
		font-family: var(--ddd-font);
		font-size: 12px;
		font-weight: 700;
		line-height: 1.2;
		text-align: center;
		border-right: 1px solid rgba(255, 255, 255, 0.12);
	}

	.ddd-mobile-cta__btn:last-child {
		border-right: 0;
	}

	.ddd-mobile-cta__btn--call {
		background: #155a96;
		color: #fff !important;
	}

	.ddd-mobile-cta__btn--call .ddd-mobile-cta__label,
	.ddd-mobile-cta__btn--call .ddd-mobile-cta__value {
		color: #fff !important;
	}

	.ddd-mobile-cta__btn--zalo {
		background: #0068ff;
		color: #fff !important;
	}

	.ddd-mobile-cta__btn--zalo .ddd-mobile-cta__label,
	.ddd-mobile-cta__btn--zalo .ddd-mobile-cta__value {
		color: #fff !important;
	}

	.ddd-mobile-cta__btn--quote {
		background: var(--ddd-cta);
	}

	.ddd-mobile-cta__value {
		font-size: 11px;
		font-weight: 600;
		opacity: 0.92;
	}

	.ddd-mobile-cta__btn:focus-visible {
		outline: 3px solid #7ec8ff;
		outline-offset: -3px;
	}

	/* When only 2 buttons, span evenly */
	.ddd-mobile-cta:has(> :nth-child(2):last-child) {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
