/* ==========================================================================
   Maple Aura — responsive.css (desktop-first overrides, loaded last)
   Breakpoints: 1180 · 1000 · 780 · 560
   ========================================================================== */

/* Touch devices have no hover: always show wishlist hearts */
@media (hover: none) {
	.ma-card__media .ma-wish { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
	.ma-menu { gap: 18px; }
	.ma-mega__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.ma-carousel .products.ma-carousel__track { grid-auto-columns: calc((100% - 2 * 22px) / 3); gap: 22px; }
	.ma-bestsellers ul.products, .ma-wishlist ul.products, .related ul.products, .upsells ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.ma-why__grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}

/* ---------- Tablet / mobile navigation ---------- */
@media (max-width: 1000px) {
	:root { --ma-header-h: 66px; }
	.ma-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
	.ma-nav { display: none; }
	.ma-header__burger { display: inline-grid; justify-self: start; }
	.ma-header__logo { justify-self: center; }
	.ma-header__actions { justify-self: end; margin-left: 0; }
	.ma-logo img { height: 46px; }
	.ma-header.is-scrolled .ma-logo img { height: 40px; }
	.ma-header.is-scrolled .ma-header__inner { height: 58px; }

	.ma-hero__grid { grid-template-columns: 1fr; min-height: 0; gap: 32px; padding-block: 36px 70px; text-align: center; }
	.ma-hero__text { margin-inline: auto; }
	.ma-hero__actions { justify-content: center; }
	.ma-hero__title::after { margin-inline: auto; }
	.ma-hero__frame { max-width: 440px; max-height: none; }
	.ma-hero__slide.is-active .ma-hero__eyebrow, .ma-hero__eyebrow { text-align: center; }

	.ma-collgrid { grid-template-columns: 1fr; }
	.ma-collcard, .ma-collcard--0, .ma-collcard--1, .ma-collcard--2, .ma-collcard--3 { grid-column: auto; min-height: clamp(300px, 62vw, 440px); }

	.ma-newsletter__inner { grid-template-columns: 1fr; text-align: center; }
	.ma-lifestyle__inner { justify-content: center; }
	.ma-footer__grid { grid-template-columns: 1fr 1fr; }
	.ma-footer__brand { grid-column: 1 / -1; }

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

	/* Shop: filters become a slide-in drawer */
	.ma-shop { grid-template-columns: 1fr; }
	.ma-filter-toggle { display: inline-flex; }
	.ma-filters {
		position: fixed; z-index: 125; top: 0; bottom: 0; left: 0; width: min(380px, 90vw); max-height: none; padding: 0; background: var(--ma-ivory); box-shadow: var(--ma-shadow-lg);
		transform: translateX(-104%); transition: transform .55s var(--ma-ease-out); display: flex; flex-direction: column; overflow: hidden;
	}
	.ma-filters.is-open { transform: none; }
	.ma-filters__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 24px; border-bottom: 1px solid var(--ma-line-soft); }
	.ma-filters__head h2 { margin: 0; font-size: 1.6rem; }
	.ma-filters__body { flex: 1; overflow-y: auto; padding: 24px; overscroll-behavior: contain; }
	.ma-filters__overlay { position: fixed; inset: 0; z-index: 120; background: rgba(37, 29, 34, .5); opacity: 0; transition: opacity .4s; }
	.ma-filters__overlay.is-open { opacity: 1; }
	.ma-shop ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }

	/* Single product */
	div.product { grid-template-columns: 1fr; gap: 28px; }
	.summary.entry-summary { position: static; }
	#reviews { grid-template-columns: 1fr; }
	.ma-sizeguide-wrap { text-align: left; }
}

@media (min-width: 1001px) {
	.ma-sticky-atc { display: none !important; }
}

@media (max-width: 780px) {
	body.has-sticky-atc { padding-bottom: 76px; }
	.ma-section { padding-block: 56px; }

	/* Categories become a swipeable row */
	.ma-catgrid { grid-auto-flow: column; grid-template-columns: none !important; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; margin-inline: calc(var(--ma-gutter) * -1); padding-inline: var(--ma-gutter); scrollbar-width: none; }
	.ma-catgrid::-webkit-scrollbar { display: none; }
	.ma-catcard { scroll-snap-align: center; }
	.ma-catgrid--1, .ma-catgrid--2 { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr !important; overflow: visible; margin-inline: 0; padding-inline: 0; }

	.ma-carousel .products.ma-carousel__track { grid-auto-columns: 62%; gap: 14px; margin-inline: calc(var(--ma-gutter) * -1); padding-inline: var(--ma-gutter); }
	.ma-carousel__ctrl .ma-iconbtn { display: none; }
	.ma-section-head--split { align-items: flex-start; }

	ul.products, .ma-shop ul.products, .ma-bestsellers ul.products, .ma-wishlist ul.products, .related ul.products, .upsells ul.products, .cross-sells ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
	li.product .woocommerce-loop-product__title { font-size: 1.12rem; margin-top: 12px; }
	li.product .button { padding-inline: .8rem; font-size: .66rem; letter-spacing: .1em; min-height: 42px; }
	.ma-toolbar { flex-wrap: wrap; gap: 10px; }
	.woocommerce-result-count { order: 3; width: 100%; }

	.ma-why__grid { grid-template-columns: 1fr; }
	.ma-reviews__grid { grid-template-columns: 1fr; }
	.ma-postgrid { grid-template-columns: 1fr; }
	.ma-footer__grid { grid-template-columns: 1fr; }
	.ma-footer__bar-inner { flex-direction: column; align-items: flex-start; }
	.ma-newsletter-form { flex-direction: column; }
	.ma-collection-block { grid-template-columns: 1fr; }
	.ma-collection-block__media { max-width: 300px; }
	.ma-form__row { grid-template-columns: 1fr; }
	.ma-lifestyle__card { padding: 28px 24px; }

	/* Cart table → stacked cards */
	.woocommerce table.shop_table_responsive thead { display: none; }
	.woocommerce table.shop_table_responsive tr { display: block; position: relative; padding: 16px 0; border-bottom: 1px solid var(--ma-line-soft); }
	.woocommerce table.shop_table_responsive td { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 8px 0; border: 0; text-align: right; }
	.woocommerce table.shop_table_responsive td::before { content: attr(data-title); font-size: .72rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ma-muted); text-align: left; }
	.woocommerce table.shop_table_responsive td.product-remove { position: absolute; top: 12px; right: 0; padding: 0; }
	.woocommerce table.shop_table_responsive td.product-remove::before, .woocommerce table.shop_table_responsive td.product-thumbnail::before, .woocommerce table.shop_table_responsive td.actions::before { display: none; }
	.woocommerce table.shop_table_responsive td.product-thumbnail { justify-content: flex-start; }
	.woocommerce table.shop_table_responsive td.actions { display: block; text-align: left; }
	.woocommerce .coupon { display: flex; width: 100%; margin-bottom: 12px; }
	.woocommerce .coupon input.input-text { flex: 1; width: auto; }
	.woocommerce .coupon .button, td.actions > .button { width: 100%; }
	.cart-collaterals { justify-content: stretch; }
	.cart_totals { width: 100%; }

	form.woocommerce-checkout { grid-template-columns: 1fr; }
	form.woocommerce-checkout #order_review_heading, form.woocommerce-checkout #order_review, form.woocommerce-checkout #customer_details { grid-column: 1; grid-row: auto; }
	.woocommerce form .form-row-first, .woocommerce form .form-row-last { width: 100%; float: none; margin-right: 0; }

	.woocommerce-account .woocommerce { grid-template-columns: 1fr; }
	.woocommerce-MyAccount-navigation ul { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
	.woocommerce-MyAccount-navigation li a { white-space: nowrap; }
	#customer_login, .woocommerce-Addresses { grid-template-columns: 1fr; }

	.woocommerce-tabs ul.tabs { flex-wrap: nowrap; gap: 26px; }
	.woocommerce-product-gallery .flex-control-thumbs { grid-template-columns: repeat(4, 1fr); }
	.ma-search { padding-top: 90px; }
	.ma-search__close { top: -56px; }
}

@media (max-width: 560px) {
	.ma-announce p { font-size: .72rem; letter-spacing: .06em; }
	.ma-header__account { display: none; }
	.ma-hero__title { font-size: clamp(2.5rem, 11vw, 3.4rem); }
	.ma-hero__actions .ma-btn { flex: 1 1 100%; }
	.ma-btn { padding-inline: 1.5rem; }
	.ma-catgrid { grid-auto-columns: 82%; }
	.ma-pagehero__inner { padding-block: 28px 26px; }
	.ma-mobile-menu a { font-size: 1.35rem; }
}

/* ---------- Header fit: never overflow between 1001px and 1400px ---------- */
html, body { overflow-x: clip; }
.ma-nav { min-width: 0; }
.ma-header__inner { gap: 20px; }
@media (max-width: 1400px) and (min-width: 1001px) {
	.ma-menu { gap: clamp(10px, 1.2vw, 20px); }
	.ma-menu > li > a { font-size: .74rem; letter-spacing: .05em; gap: 4px; }
	.ma-logo img { height: 50px; }
	.ma-header__actions .ma-iconbtn { width: 40px; height: 40px; }
}
@media (max-width: 1150px) and (min-width: 1001px) {
	.ma-header__account { display: none; }
	.ma-menu > li > a .ma-icon { display: none; }
}

/* ---------- Header fit (all desktop widths) ---------- */
.ma-header__inner { max-width: 1520px; gap: 24px; }
.ma-logo img { height: 52px; }
.ma-nav { flex: 1 1 auto; min-width: 0; justify-content: center; }
.ma-menu { gap: clamp(12px, 1.5vw, 26px); }
.ma-menu > li > a { font-size: .74rem; letter-spacing: .07em; gap: 4px; }
.ma-menu > li > a .ma-icon { width: 10px; height: 10px; }
.ma-header__actions { flex: none; }
.ma-header__actions .ma-iconbtn { width: 40px; height: 40px; }
@media (max-width: 1280px) and (min-width: 1101px) {
	.ma-menu > li > a { letter-spacing: .03em; }
	.ma-menu > li > a .ma-icon { display: none; }
	.ma-header__account { display: none; }
}
/* Switch to the hamburger layout earlier so the menu never collides with the logo */
@media (max-width: 1100px) {
	:root { --ma-header-h: 66px; }
	.ma-header__inner { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; }
	.ma-nav { display: none; }
	.ma-header__burger { display: inline-grid; justify-self: start; }
	.ma-header__logo { justify-self: center; }
	.ma-header__actions { justify-self: end; margin-left: 0; }
	.ma-logo img { height: 46px; }
}

/* Hero v2 (must come after the legacy hero rules above) */
@media (max-width: 1000px) {
	.ma-hero__frame { position: absolute; inset: 0; max-width: none; max-height: none; width: 100%; height: 100%; aspect-ratio: auto; margin: 0; }
	.ma-hero__grid { padding-block: 0; gap: 0; text-align: center; }
}
@media (max-width: 780px) { .ma-section { padding-block: 36px; } }

/* Hero: no decorative dashes */
.ma-hero__eyebrow::before, .ma-hero__title::after { content: none !important; display: none !important; }
.ma-hero__eyebrow { gap: 0; }
.ma-hero__actions .ma-btn--ghost { border: 0; background: transparent; box-shadow: none; overflow: visible; }
.ma-hero__actions .ma-btn--ghost::before { display: none; }
.ma-hero__actions .ma-btn--ghost:hover { color: var(--ma-berry); }
.ma-hero__actions .ma-btn--ghost .ma-icon { transition: transform .45s var(--ma-ease-out); }
.ma-hero__actions .ma-btn--ghost:hover .ma-icon { transform: translateX(5px); }

/* Carousel: horizontal scroll only, so the mouse wheel always scrolls the page */
.ma-carousel .products.ma-carousel__track, .ma-carousel ul.products.ma-carousel__track { overflow-y: hidden; overscroll-behavior-y: auto; padding-top: 2px; }
.js .ma-carousel .products > li { transform: translateY(14px); }
.js .ma-carousel .products > li.is-in { transform: none; }
