/* ==========================================================================
   DESIWED v2.8 — desktop width fix + mobile redesign
   1. Kill Listeo's .container max-width constraint on archive/shop/listing pages
   2. Working mobile hamburger menu (full-screen overlay)
   3. Mobile CTA priority — hide "List Your Business" button, prioritise vendors menu
   4. Mobile-optimised listings + shop pages
   ========================================================================== */

/* ==========================================================================
   1. WIDTH FIX — kill Bootstrap container constraints on full-bleed pages
   ========================================================================== */

/* Listeo wraps content in .container.row.col-md-9 — these limit width to ~1170px.
   On archive/shop/single-listing pages we want full bleed. */
body.desiwed-rebrand.post-type-archive-listing .container,
body.desiwed-rebrand.tax-listing_category .container,
body.desiwed-rebrand.single-listing .container,
body.desiwed-rebrand.single-product .container,
body.desiwed-rebrand.woocommerce-shop .container,
body.desiwed-rebrand.tax-product_cat .container,
body.desiwed-rebrand.post-type-archive-product .container,
body.desiwed-rebrand.home .container {
	max-width: 100% !important;
	width: 100% !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

body.desiwed-rebrand.post-type-archive-listing .row,
body.desiwed-rebrand.tax-listing_category .row,
body.desiwed-rebrand.single-listing .row,
body.desiwed-rebrand.single-product .row,
body.desiwed-rebrand.woocommerce-shop .row,
body.desiwed-rebrand.tax-product_cat .row,
body.desiwed-rebrand.post-type-archive-product .row {
	margin-left: 0 !important;
	margin-right: 0 !important;
	width: 100% !important;
	max-width: 100% !important;
}

body.desiwed-rebrand.post-type-archive-listing .col-md-9,
body.desiwed-rebrand.post-type-archive-listing .col-md-12,
body.desiwed-rebrand.tax-listing_category .col-md-9,
body.desiwed-rebrand.tax-listing_category .col-md-12,
body.desiwed-rebrand.single-listing .col-md-9,
body.desiwed-rebrand.single-listing .col-md-12,
body.desiwed-rebrand.single-product .col-md-9,
body.desiwed-rebrand.single-product .col-md-12 {
	width: 100% !important;
	max-width: 100% !important;
	flex: 0 0 100% !important;
	padding: 0 !important;
}

/* The archive body should now span full width */
body.desiwed-rebrand .dw-archive,
body.desiwed-rebrand .dw-shop,
body.desiwed-rebrand .dw-vendor,
body.desiwed-rebrand .dw-pdp {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* The archive title + pills should span full width edge-to-edge */
body.desiwed-rebrand .dw-archive__title,
body.desiwed-rebrand .dw-archive__controls,
body.desiwed-rebrand .dw-archive__cta {
	width: 100% !important;
	max-width: 100% !important;
}

/* The archive body row (sidebar+grid) gets a 1400px max so it doesn't go too wide */
body.desiwed-rebrand .dw-archive__body {
	max-width: 1500px !important;
	margin: 0 auto !important;
	padding: 0 60px 80px !important;
	display: grid !important;
	grid-template-columns: 240px 1fr !important;
	gap: 48px !important;
}

body.desiwed-rebrand .dw-archive__results {
	min-width: 0 !important;
}

body.desiwed-rebrand .dw-vendor-grid--3 {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 32px 24px !important;
}

/* ==========================================================================
   2. MOBILE NAV — working hamburger + full-screen overlay
   ========================================================================== */

/* Default state: hide hamburger on desktop */
.desiwed-rebrand .dw-header__hamburger {
	display: none;
	background: transparent;
	border: 0;
	color: #1a1814;
	cursor: pointer;
	padding: 8px;
	margin-left: 4px;
}

@media (max-width: 900px) {
	/* Show hamburger on mobile */
	.desiwed-rebrand .dw-header__hamburger {
		display: inline-flex !important;
		align-items: center;
		justify-content: center;
	}

	/* Hide desktop nav on mobile */
	.desiwed-rebrand .dw-header__nav {
		display: none !important;
	}

	/* Hide "List Your Business" CTA on mobile — couples don't need it */
	.desiwed-rebrand .dw-header__cta {
		display: none !important;
	}

	/* Sign in: shrink to small text link, less prominent */
	.desiwed-rebrand .dw-header__signin {
		font-size: 12px !important;
		padding: 4px 8px !important;
	}

	/* Header layout: logo | utils (sign-in + cart + hamburger) */
	.desiwed-rebrand .dw-header__inner {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		padding: 12px 16px !important;
	}

	.desiwed-rebrand .dw-header__utils {
		display: flex !important;
		align-items: center !important;
		gap: 8px !important;
	}

	/* When mobile menu is open, show overlay nav */
	body.dw-mobile-menu-open .dw-header__nav {
		display: flex !important;
		position: fixed !important;
		top: 0 !important;
		left: 0 !important;
		right: 0 !important;
		bottom: 0 !important;
		background: #faf6ef !important;
		z-index: 9999 !important;
		flex-direction: column !important;
		padding: 80px 32px 40px !important;
		overflow-y: auto !important;
	}

	body.dw-mobile-menu-open .dw-nav {
		display: flex !important;
		flex-direction: column !important;
		gap: 0 !important;
		list-style: none !important;
		padding: 0 !important;
		margin: 0 !important;
	}

	body.dw-mobile-menu-open .dw-nav > li {
		padding: 0 !important;
		margin: 0 !important;
		border-bottom: 1px solid #dcd6cb !important;
	}

	body.dw-mobile-menu-open .dw-nav > li > a {
		display: block !important;
		padding: 20px 0 !important;
		font-family: 'Cardo', Georgia, serif !important;
		font-size: 22px !important;
		color: #1a1814 !important;
		text-decoration: none !important;
		font-weight: 400 !important;
	}

	body.dw-mobile-menu-open .dw-nav .sub-menu {
		display: block !important;
		position: static !important;
		width: 100% !important;
		padding: 0 0 16px 16px !important;
		background: transparent !important;
		box-shadow: none !important;
		border: 0 !important;
	}

	body.dw-mobile-menu-open .dw-nav .sub-menu a {
		font-size: 16px !important;
		font-family: 'Inter', sans-serif !important;
		padding: 10px 0 !important;
		color: #5b5550 !important;
	}

	/* Close button on mobile menu */
	body.dw-mobile-menu-open .dw-header__nav::before {
		content: '✕' !important;
		position: absolute !important;
		top: 16px !important;
		right: 24px !important;
		font-size: 28px !important;
		color: #1a1814 !important;
		cursor: pointer !important;
		font-weight: 300 !important;
		line-height: 1 !important;
		padding: 8px !important;
	}

	/* Lock body scroll when menu is open */
	body.dw-mobile-menu-open {
		overflow: hidden !important;
	}

	/* Add a CTA at the bottom of the mobile menu — vendor finder */
	body.dw-mobile-menu-open .dw-header__nav::after {
		content: '' !important;
		display: block !important;
		margin-top: 32px !important;
	}
}

@media (min-width: 901px) {
	/* Make sure mobile menu state doesn't bleed onto desktop */
	body.dw-mobile-menu-open .dw-header__nav {
		position: static !important;
		background: transparent !important;
		padding: 0 !important;
	}
	body.dw-mobile-menu-open {
		overflow: auto !important;
	}
}

/* ==========================================================================
   3. MOBILE — VENDOR ARCHIVE / LISTINGS PAGE REDESIGN
   ========================================================================== */

@media (max-width: 768px) {
	/* Archive title — tighter on mobile */
	.desiwed-rebrand .dw-archive__title {
		padding: 28px 20px !important;
	}
	.desiwed-rebrand .dw-archive__h1 {
		font-size: 28px !important;
		line-height: 1.15 !important;
	}
	.desiwed-rebrand .dw-archive__lede {
		font-size: 14px !important;
		margin-top: 8px !important;
	}

	/* Pills — horizontal scroll so they all fit */
	.desiwed-rebrand .dw-archive__controls {
		flex-direction: column !important;
		gap: 12px !important;
		padding: 12px 16px !important;
		align-items: stretch !important;
	}
	.desiwed-rebrand .dw-archive__pills {
		display: flex !important;
		gap: 8px !important;
		overflow-x: auto !important;
		flex-wrap: nowrap !important;
		padding-bottom: 8px !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
	}
	.desiwed-rebrand .dw-archive__pills::-webkit-scrollbar {
		display: none !important;
	}
	.desiwed-rebrand .dw-archive__pills .dw-pill {
		flex-shrink: 0 !important;
		font-size: 13px !important;
		padding: 8px 14px !important;
	}
	.desiwed-rebrand .dw-archive__sort {
		display: flex !important;
		justify-content: space-between !important;
		align-items: center !important;
		font-size: 13px !important;
	}

	/* SIDEBAR — collapse into an accordion above grid on mobile */
	.desiwed-rebrand .dw-archive__body {
		display: block !important;
		padding: 0 0 60px !important;
	}
	.desiwed-rebrand .dw-archive__sidebar {
		display: none !important; /* hide entirely on mobile, pills + sort give enough filtering */
	}
	.desiwed-rebrand .dw-archive__results {
		padding: 16px !important;
	}

	/* GRID — single column with bigger images for tap targets */
	.desiwed-rebrand .dw-vendor-grid,
	.desiwed-rebrand .dw-vendor-grid--3 {
		grid-template-columns: 1fr !important;
		gap: 24px !important;
	}

	/* VENDOR CARD — bigger photo, stacked info */
	.desiwed-rebrand .dw-vendor-card {
		width: 100% !important;
		display: block !important;
	}
	.desiwed-rebrand .dw-vendor-card__photo {
		aspect-ratio: 4/3 !important;
		width: 100% !important;
	}
	.desiwed-rebrand .dw-vendor-card__name {
		font-size: 19px !important;
	}
	.desiwed-rebrand .dw-vendor-card__desc {
		font-size: 13px !important;
		line-height: 1.5 !important;
	}

	/* Bottom CTA — full width */
	.desiwed-rebrand .dw-archive__cta {
		padding: 40px 20px !important;
	}
	.desiwed-rebrand .dw-archive__cta h2 {
		font-size: 24px !important;
	}
}

/* ==========================================================================
   4. MOBILE — SHOP PAGE REDESIGN
   ========================================================================== */

@media (max-width: 768px) {
	.desiwed-rebrand .dw-shop__hero {
		padding: 28px 20px !important;
		flex-direction: column !important;
		gap: 12px !important;
	}
	.desiwed-rebrand .dw-shop__h1 {
		font-size: 26px !important;
		line-height: 1.15 !important;
	}
	.desiwed-rebrand .dw-shop__lede {
		font-size: 13px !important;
	}

	/* Filter pills horizontal scroll */
	.desiwed-rebrand .dw-shop__bar {
		flex-direction: column !important;
		align-items: stretch !important;
		padding: 12px 16px !important;
		gap: 12px !important;
	}
	.desiwed-rebrand .dw-shop__filters {
		display: flex !important;
		gap: 8px !important;
		overflow-x: auto !important;
		flex-wrap: nowrap !important;
		padding-bottom: 6px !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
	}
	.desiwed-rebrand .dw-shop__filters::-webkit-scrollbar {
		display: none !important;
	}
	.desiwed-rebrand .dw-shop__filters .dw-pill {
		flex-shrink: 0 !important;
		font-size: 12px !important;
		padding: 8px 14px !important;
	}
	.desiwed-rebrand .dw-shop__sort {
		display: flex !important;
		justify-content: space-between !important;
		font-size: 12px !important;
	}

	/* Product grid — 2 col on mobile */
	body.desiwed-rebrand ul.products,
	body.desiwed-rebrand .woocommerce ul.products {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 16px 12px !important;
		padding: 16px !important;
	}
	body.desiwed-rebrand ul.products li.product img {
		aspect-ratio: 3/4 !important;
		margin-bottom: 8px !important;
	}
	body.desiwed-rebrand ul.products li.product .woocommerce-loop-product__title {
		font-size: 14px !important;
	}
	body.desiwed-rebrand ul.products li.product .price {
		font-size: 13px !important;
	}
}

@media (max-width: 380px) {
	body.desiwed-rebrand ul.products,
	body.desiwed-rebrand .woocommerce ul.products {
		grid-template-columns: 1fr !important;
		padding: 16px !important;
	}
	body.desiwed-rebrand ul.products li.product img {
		aspect-ratio: 4/5 !important;
	}
}

/* ==========================================================================
   5. MOBILE — SINGLE LISTING REDESIGN
   ========================================================================== */

@media (max-width: 768px) {
	.desiwed-rebrand .dw-vendor__gallery {
		grid-template-columns: 1fr !important;
		grid-template-rows: auto !important;
		grid-auto-rows: auto !important;
		gap: 4px !important;
		max-height: none !important;
	}
	.desiwed-rebrand .dw-vendor__gallery-img {
		aspect-ratio: 4/3 !important;
		height: auto !important;
		min-height: 240px !important;
	}
	.desiwed-rebrand .dw-vendor__gallery-img.is-main {
		grid-column: 1 !important;
		grid-row: 1 !important;
	}
	.desiwed-rebrand .dw-vendor__gallery-img:not(.is-main):not(.is-show-more) {
		display: none !important; /* show only main on mobile, rest in portfolio */
	}

	body.desiwed-rebrand .dw-vendor__body {
		grid-template-columns: 1fr !important;
		padding: 24px 16px !important;
		gap: 32px !important;
	}
	.desiwed-rebrand .dw-vendor__title {
		font-size: 32px !important;
		line-height: 1.1 !important;
	}
	.desiwed-rebrand .dw-vendor__tabs {
		overflow-x: auto !important;
		flex-wrap: nowrap !important;
		gap: 20px !important;
		padding-bottom: 4px !important;
		-webkit-overflow-scrolling: touch !important;
		scrollbar-width: none !important;
	}
	.desiwed-rebrand .dw-vendor__tabs::-webkit-scrollbar {
		display: none !important;
	}
	.desiwed-rebrand .dw-vendor__tabs a {
		flex-shrink: 0 !important;
	}
	.desiwed-rebrand .dw-vendor__aside {
		position: static !important;
		min-width: 0 !important;
	}
	.desiwed-rebrand .dw-vendor__aside-card {
		padding: 20px !important;
	}

	/* Sticky bottom enquiry button on mobile — like Airbnb */
	.desiwed-rebrand .dw-vendor__mobile-enquire {
		display: flex !important;
		position: fixed !important;
		bottom: 0 !important;
		left: 0 !important;
		right: 0 !important;
		background: #fff !important;
		padding: 12px 16px !important;
		border-top: 1px solid #dcd6cb !important;
		z-index: 100 !important;
		box-shadow: 0 -4px 20px rgba(26, 24, 20, 0.1) !important;
		gap: 12px !important;
		align-items: center !important;
	}
	.desiwed-rebrand .dw-vendor__mobile-enquire .dw-vendor__price {
		font-size: 16px !important;
		margin: 0 !important;
	}
	.desiwed-rebrand .dw-vendor__mobile-enquire a {
		flex: 1 !important;
		background: #1a1814 !important;
		color: #fff !important;
		text-align: center !important;
		padding: 12px !important;
		font-size: 12px !important;
		text-transform: uppercase !important;
		letter-spacing: 0.14em !important;
		text-decoration: none !important;
	}

	/* Footer padding so bottom button doesn't cover content */
	body.desiwed-rebrand.single-listing {
		padding-bottom: 64px !important;
	}
}

@media (min-width: 769px) {
	.desiwed-rebrand .dw-vendor__mobile-enquire {
		display: none !important;
	}
}

/* ==========================================================================
   6. MOBILE — SINGLE PRODUCT PAGE
   ========================================================================== */

@media (max-width: 768px) {
	.desiwed-rebrand .dw-pdp__layout {
		grid-template-columns: 1fr !important;
		gap: 16px !important;
		padding: 16px !important;
	}
	.desiwed-rebrand .dw-pdp__title {
		font-size: 28px !important;
	}
	.desiwed-rebrand .dw-pdp__gallery {
		grid-template-columns: 1fr !important;
	}
}

/* ==========================================================================
   7. MOBILE — HOMEPAGE TIGHTEN
   ========================================================================== */

@media (max-width: 768px) {
	.desiwed-rebrand .dw-hero {
		min-height: 360px !important;
		padding: 32px 20px !important;
	}
	.desiwed-rebrand .dw-hero__title {
		font-size: 32px !important;
	}
	.desiwed-rebrand .dw-hero__lede {
		font-size: 14px !important;
	}
}

/* End */
