/**
 * DAF Marketplace — Global Responsive Guard
 *
 * Location: /wp-content/plugins/daf-marketplace/assets/css/frontend-responsive.css
 *
 * Purpose:
 * - Keep DAF Marketplace layouts responsive across desktop, tablet, mobile,
 *   browser resize, DevTools device switching, and orientation changes.
 * - Prevent horizontal overflow inside plugin-owned frontend areas.
 * - Protect plugin UI from theme/container conflicts without damaging theme layout.
 * - Keep this file lightweight and global.
 */

:root {
	--daf-mp-safe-screen: 100%;
	--daf-mp-safe-vw: 100vw;
	--daf-mp-responsive-gap: clamp(14px, 4vw, 32px);
	--daf-mp-responsive-container: 1200px;
}

/* ==========================================================================
   Core Plugin Canvas Guard
   ========================================================================== */

.daf-mp-header,
.daf-mp-homepage-main,
.daf-mp-hero-section,
.daf-mp-footer,
.daf-marketplace-container,
.daf-mp-marketplace,
.daf-mp-archive,
.daf-mp-product,
.daf-mp-product-single,
.daf-mp-cart,
.daf-mp-checkout,
.daf-mp-thank-you,
.daf-mp-dashboard,
.daf-dashboard-wrapper,
.daf-mp-auth,
.daf-mp-support,
.daf-mp-wishlist,
.daf-mp-compare,
.daf-mp-page,
.daf-mp-wrapper {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.daf-mp-header *,
.daf-mp-homepage-main *,
.daf-mp-hero-section *,
.daf-mp-footer *,
.daf-marketplace-container *,
.daf-mp-marketplace *,
.daf-mp-archive *,
.daf-mp-product *,
.daf-mp-product-single *,
.daf-mp-cart *,
.daf-mp-checkout *,
.daf-mp-thank-you *,
.daf-mp-dashboard *,
.daf-dashboard-wrapper *,
.daf-mp-auth *,
.daf-mp-support *,
.daf-mp-wishlist *,
.daf-mp-compare *,
.daf-mp-page *,
.daf-mp-wrapper *,
.daf-mp-header *::before,
.daf-mp-homepage-main *::before,
.daf-mp-hero-section *::before,
.daf-mp-footer *::before,
.daf-marketplace-container *::before,
.daf-mp-marketplace *::before,
.daf-mp-archive *::before,
.daf-mp-product *::before,
.daf-mp-product-single *::before,
.daf-mp-cart *::before,
.daf-mp-checkout *::before,
.daf-mp-thank-you *::before,
.daf-mp-dashboard *::before,
.daf-dashboard-wrapper *::before,
.daf-mp-auth *::before,
.daf-mp-support *::before,
.daf-mp-wishlist *::before,
.daf-mp-compare *::before,
.daf-mp-page *::before,
.daf-mp-wrapper *::before,
.daf-mp-header *::after,
.daf-mp-homepage-main *::after,
.daf-mp-hero-section *::after,
.daf-mp-footer *::after,
.daf-marketplace-container *::after,
.daf-mp-marketplace *::after,
.daf-mp-archive *::after,
.daf-mp-product *::after,
.daf-mp-product-single *::after,
.daf-mp-cart *::after,
.daf-mp-checkout *::after,
.daf-mp-thank-you *::after,
.daf-mp-dashboard *::after,
.daf-dashboard-wrapper *::after,
.daf-mp-auth *::after,
.daf-mp-support *::after,
.daf-mp-wishlist *::after,
.daf-mp-compare *::after,
.daf-mp-page *::after,
.daf-mp-wrapper *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Overflow Protection
   ========================================================================== */

.daf-mp-header,
.daf-mp-homepage-main,
.daf-mp-hero-section,
.daf-mp-footer,
.daf-marketplace-container,
.daf-mp-marketplace,
.daf-mp-archive,
.daf-mp-cart,
.daf-mp-checkout,
.daf-mp-thank-you,
.daf-mp-dashboard,
.daf-dashboard-wrapper,
.daf-mp-auth,
.daf-mp-support,
.daf-mp-wishlist,
.daf-mp-compare,
.daf-mp-page,
.daf-mp-wrapper {
	overflow-x: clip;
}

@supports not (overflow: clip) {
	.daf-mp-header,
	.daf-mp-homepage-main,
	.daf-mp-hero-section,
	.daf-mp-footer,
	.daf-marketplace-container,
	.daf-mp-marketplace,
	.daf-mp-archive,
	.daf-mp-cart,
	.daf-mp-checkout,
	.daf-mp-thank-you,
	.daf-mp-dashboard,
	.daf-dashboard-wrapper,
	.daf-mp-auth,
	.daf-mp-support,
	.daf-mp-wishlist,
	.daf-mp-compare,
	.daf-mp-page,
	.daf-mp-wrapper {
		overflow-x: hidden;
	}
}

/* ==========================================================================
   Media Safety
   ========================================================================== */

.daf-mp-header img,
.daf-mp-homepage-main img,
.daf-mp-hero-section img,
.daf-mp-footer img,
.daf-marketplace-container img,
.daf-mp-marketplace img,
.daf-mp-archive img,
.daf-mp-product img,
.daf-mp-product-single img,
.daf-mp-cart img,
.daf-mp-checkout img,
.daf-mp-thank-you img,
.daf-mp-dashboard img,
.daf-dashboard-wrapper img,
.daf-mp-auth img,
.daf-mp-support img,
.daf-mp-wishlist img,
.daf-mp-compare img,
.daf-mp-page img,
.daf-mp-wrapper img,
.daf-mp-header svg,
.daf-mp-homepage-main svg,
.daf-mp-hero-section svg,
.daf-mp-footer svg,
.daf-marketplace-container svg,
.daf-mp-marketplace svg,
.daf-mp-archive svg,
.daf-mp-product svg,
.daf-mp-product-single svg,
.daf-mp-cart svg,
.daf-mp-checkout svg,
.daf-mp-thank-you svg,
.daf-mp-dashboard svg,
.daf-dashboard-wrapper svg,
.daf-mp-auth svg,
.daf-mp-support svg,
.daf-mp-wishlist svg,
.daf-mp-compare svg,
.daf-mp-page svg,
.daf-mp-wrapper svg,
.daf-mp-header video,
.daf-mp-homepage-main video,
.daf-mp-hero-section video,
.daf-mp-footer video,
.daf-marketplace-container video,
.daf-mp-marketplace video,
.daf-mp-archive video,
.daf-mp-product video,
.daf-mp-product-single video,
.daf-mp-cart video,
.daf-mp-checkout video,
.daf-mp-thank-you video,
.daf-mp-dashboard video,
.daf-dashboard-wrapper video,
.daf-mp-auth video,
.daf-mp-support video,
.daf-mp-wishlist video,
.daf-mp-compare video,
.daf-mp-page video,
.daf-mp-wrapper video {
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Grid/Flex Resize Guard
   ========================================================================== */

.daf-mp-header [class*="__"],
.daf-mp-homepage-main [class*="__"],
.daf-mp-hero-section [class*="__"],
.daf-mp-footer [class*="__"],
.daf-marketplace-container [class*="__"],
.daf-mp-marketplace [class*="__"],
.daf-mp-archive [class*="__"],
.daf-mp-cart [class*="__"],
.daf-mp-checkout [class*="__"],
.daf-mp-thank-you [class*="__"],
.daf-mp-dashboard [class*="__"],
.daf-dashboard-wrapper [class*="__"],
.daf-mp-auth [class*="__"],
.daf-mp-support [class*="__"],
.daf-mp-wishlist [class*="__"],
.daf-mp-compare [class*="__"],
.daf-mp-page [class*="__"],
.daf-mp-wrapper [class*="__"] {
	min-width: 0;
	max-width: 100%;
}

/* Common plugin containers should never exceed viewport on resize. */
.daf-mp-container,
.daf-mp-section,
.daf-mp-section-inner,
.daf-mp-content,
.daf-mp-content-inner,
.daf-mp-grid,
.daf-mp-row,
.daf-mp-card,
.daf-mp-panel,
.daf-mp-box,
.daf-mp-list,
.daf-mp-table-wrap,
.daf-mp-form,
.daf-mp-widget,
.daf-menu-hook-wrapper,
.daf-cart-widget,
.daf-wishlist-widget,
.daf-compare-widget,
.daf-notification-widget,
.daf-account-widget {
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

/* ==========================================================================
   Text Overflow Guard
   ========================================================================== */

.daf-mp-homepage-main h1,
.daf-mp-homepage-main h2,
.daf-mp-homepage-main h3,
.daf-mp-homepage-main h4,
.daf-mp-hero-section h1,
.daf-mp-hero-section h2,
.daf-mp-hero-section h3,
.daf-mp-hero-section h4,
.daf-marketplace-container h1,
.daf-marketplace-container h2,
.daf-marketplace-container h3,
.daf-marketplace-container h4,
.daf-mp-dashboard h1,
.daf-mp-dashboard h2,
.daf-mp-dashboard h3,
.daf-mp-dashboard h4,
.daf-dashboard-wrapper h1,
.daf-dashboard-wrapper h2,
.daf-dashboard-wrapper h3,
.daf-dashboard-wrapper h4,
.daf-mp-cart h1,
.daf-mp-cart h2,
.daf-mp-cart h3,
.daf-mp-checkout h1,
.daf-mp-checkout h2,
.daf-mp-checkout h3,
.daf-mp-page h1,
.daf-mp-page h2,
.daf-mp-page h3 {
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: normal;
}

.daf-mp-homepage-main p,
.daf-mp-hero-section p,
.daf-marketplace-container p,
.daf-mp-dashboard p,
.daf-dashboard-wrapper p,
.daf-mp-cart p,
.daf-mp-checkout p,
.daf-mp-page p,
.daf-mp-homepage-main a,
.daf-mp-hero-section a,
.daf-marketplace-container a,
.daf-mp-dashboard a,
.daf-dashboard-wrapper a,
.daf-mp-cart a,
.daf-mp-checkout a,
.daf-mp-page a {
	max-width: 100%;
	overflow-wrap: break-word;
}

/* ==========================================================================
   Forms / Buttons Resize Guard
   ========================================================================== */

.daf-mp-homepage-main input,
.daf-mp-homepage-main select,
.daf-mp-homepage-main textarea,
.daf-mp-homepage-main button,
.daf-mp-hero-section input,
.daf-mp-hero-section select,
.daf-mp-hero-section textarea,
.daf-mp-hero-section button,
.daf-marketplace-container input,
.daf-marketplace-container select,
.daf-marketplace-container textarea,
.daf-marketplace-container button,
.daf-mp-cart input,
.daf-mp-cart select,
.daf-mp-cart textarea,
.daf-mp-cart button,
.daf-mp-checkout input,
.daf-mp-checkout select,
.daf-mp-checkout textarea,
.daf-mp-checkout button,
.daf-mp-dashboard input,
.daf-mp-dashboard select,
.daf-mp-dashboard textarea,
.daf-mp-dashboard button,
.daf-dashboard-wrapper input,
.daf-dashboard-wrapper select,
.daf-dashboard-wrapper textarea,
.daf-dashboard-wrapper button,
.daf-mp-page input,
.daf-mp-page select,
.daf-mp-page textarea,
.daf-mp-page button {
	max-width: 100%;
	box-sizing: border-box;
}

/* ==========================================================================
   Tables / Wide Content
   ========================================================================== */

.daf-mp-table-wrap,
.daf-mp-responsive-table,
.daf-mp-cart-table-wrap,
.daf-mp-orders-table-wrap,
.daf-mp-compare-table-wrap {
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.daf-mp-table-wrap table,
.daf-mp-responsive-table table,
.daf-mp-cart-table-wrap table,
.daf-mp-orders-table-wrap table,
.daf-mp-compare-table-wrap table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
}

/* ==========================================================================
   WordPress Admin Bar Viewport Safety
   ========================================================================== */

@media (max-width: 782px) {
	.admin-bar .daf-mp-header,
	.admin-bar .daf-mp-offcanvas {
		max-width: 100%;
	}
}

/* ==========================================================================
   Tablet Guard
   ========================================================================== */

@media (max-width: 1199px) {
	.daf-mp-container,
	.daf-mp-section-inner,
	.daf-mp-content-inner {
		width: 100%;
		max-width: 100%;
	}

	.daf-mp-grid {
		min-width: 0;
	}
}

/* ==========================================================================
   Mobile Guard
   ========================================================================== */

@media (max-width: 767px) {
	.daf-mp-header,
	.daf-mp-homepage-main,
	.daf-mp-hero-section,
	.daf-mp-footer,
	.daf-marketplace-container,
	.daf-mp-marketplace,
	.daf-mp-archive,
	.daf-mp-cart,
	.daf-mp-checkout,
	.daf-mp-thank-you,
	.daf-mp-dashboard,
	.daf-dashboard-wrapper,
	.daf-mp-auth,
	.daf-mp-support,
	.daf-mp-wishlist,
	.daf-mp-compare,
	.daf-mp-page,
	.daf-mp-wrapper {
		width: 100%;
		max-width: 100%;
	}

	.daf-mp-homepage-main,
	.daf-mp-hero-section,
	.daf-marketplace-container,
	.daf-mp-cart,
	.daf-mp-checkout,
	.daf-mp-dashboard,
	.daf-dashboard-wrapper,
	.daf-mp-page {
		overscroll-behavior-x: none;
	}
}

/* ==========================================================================
   Small Mobile Guard
   ========================================================================== */

@media (max-width: 389px) {
	.daf-mp-container,
	.daf-mp-section-inner,
	.daf-mp-content-inner {
		padding-left: 0;
		padding-right: 0;
	}

	.daf-mp-card,
	.daf-mp-panel,
	.daf-mp-box {
		max-width: 100%;
	}
}

/* ==========================================================================
   Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.daf-mp-homepage-main *,
	.daf-mp-hero-section *,
	.daf-marketplace-container *,
	.daf-mp-cart *,
	.daf-mp-checkout *,
	.daf-mp-dashboard *,
	.daf-dashboard-wrapper *,
	.daf-mp-page * {
		scroll-behavior: auto !important;
	}
}