/*
 * Swesite Core responsive foundation.
 * Global mobile-first layout tools and safety rules for public Swesite views.
 */

:root {
	--swesite-container-max: 1240px;
	--swesite-container-space: clamp(16px, 4vw, 32px);
	--swesite-section-space: clamp(44px, 8vw, 96px);
	--swesite-gap: clamp(16px, 2vw, 28px);
	--swesite-radius-card: clamp(18px, 2vw, 28px);
	--swesite-radius-control: clamp(12px, 1.4vw, 18px);
	--swesite-color-dark: #07111f;
	--swesite-color-muted: #5b6472;
	--swesite-color-blue: #006bff;
	--swesite-color-blue-strong: #007bff;
	--swesite-color-soft: #f8fbff;
	--swesite-border-blue: rgba(0, 107, 255, 0.16);
	--swesite-shadow-soft: 0 18px 48px rgba(7, 17, 31, 0.1);
	--swesite-shadow-lift: 0 22px 60px rgba(0, 107, 255, 0.16);
}

html,
body {
	max-width: 100%;
	overflow-x: hidden;
}

body {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

body [class*="swesite-"],
body [class*="swesite-"]::before,
body [class*="swesite-"]::after {
	box-sizing: border-box;
}

body [class*="swesite-"] {
	min-width: 0;
}

.swesite-theme,
.swesite-theme-body,
.swesite-home,
.swesite-about-page,
.swesite-product-page,
.swesite-package-price-page,
.swesite-cart-page,
.swesite-checkout-page,
.swesite-account-page {
	width: 100%;
	max-width: 100%;
	overflow-x: clip;
}

/* Full-width outer surfaces. Keep backgrounds edge-to-edge; constrain only inner containers. */
.swesite-section,
.swesite-hero,
.swesite-theme-main,
.swesite-theme-header,
.swesite-header,
.swesite-theme-footer,
.swesite-footer,
.swesite-home > section,
.swesite-about-page > section,
.swesite-product-page,
.swesite-package-price-page,
.swesite-cart-page,
.swesite-checkout-page,
.swesite-account-page,
.woocommerce,
.site-content,
.content-area {
	width: 100%;
	max-width: none;
}

.swesite-theme-main {
	padding-inline: 0;
}

.swesite-home,
.swesite-home > section,
.swesite-menu-hero-section {
	margin-inline: 0;
	width: 100%;
	max-width: none;
}

/* Containers */
.swesite-container {
	width: min(100% - 32px, var(--swesite-container-max));
	margin-inline: auto;
}

.swesite-container.is-wide {
	--swesite-container-max: 1320px;
}

.swesite-container.is-narrow {
	--swesite-container-max: 980px;
}

.swesite-stack {
	display: grid;
	gap: var(--swesite-gap);
}

.swesite-section {
	padding-block: var(--swesite-section-space);
}

@media (max-width: 480px) {
	.swesite-container {
		width: min(100% - 24px, var(--swesite-container-max));
	}
}

@media (max-width: 360px) {
	.swesite-container {
		width: min(100% - 20px, var(--swesite-container-max));
	}
}

/* Fluid typography */
.swesite-title-xl {
	font-size: clamp(32px, 5vw, 72px);
	line-height: 0.98;
	letter-spacing: 0;
}

.swesite-title-lg {
	font-size: clamp(28px, 4vw, 56px);
	line-height: 1.05;
	letter-spacing: 0;
}

.swesite-title-md {
	font-size: clamp(22px, 3vw, 36px);
	line-height: 1.14;
	letter-spacing: 0;
}

.swesite-title-sm {
	font-size: clamp(18px, 2.2vw, 26px);
	line-height: 1.2;
	letter-spacing: 0;
}

.swesite-text {
	font-size: clamp(15px, 1.4vw, 18px);
	line-height: 1.7;
}

.swesite-text-sm {
	font-size: clamp(13px, 1.1vw, 15px);
	line-height: 1.65;
}

.swesite-theme h1,
.swesite-theme h2,
.swesite-theme h3,
.swesite-theme-body h1,
.swesite-theme-body h2,
.swesite-theme-body h3,
.swesite-home h1,
.swesite-home h2,
.swesite-home h3,
.swesite-about-page h1,
.swesite-about-page h2,
.swesite-about-page h3,
.swesite-product-page h1,
.swesite-product-page h2,
.swesite-product-page h3,
.swesite-package-price-page h1,
.swesite-package-price-page h2,
.swesite-package-price-page h3,
.swesite-cart-page h1,
.swesite-cart-page h2,
.swesite-cart-page h3,
.swesite-checkout-page h1,
.swesite-checkout-page h2,
.swesite-checkout-page h3,
.swesite-account-page h1,
.swesite-account-page h2,
.swesite-account-page h3 {
	overflow-wrap: anywhere;
	text-wrap: balance;
}

.swesite-theme p,
.swesite-theme-body p,
.swesite-home p,
.swesite-about-page p,
.swesite-product-page p,
.swesite-package-price-page p,
.swesite-cart-page p,
.swesite-checkout-page p,
.swesite-account-page p {
	overflow-wrap: anywhere;
}

/* Responsive grids */
.swesite-grid,
.swesite-grid-2,
.swesite-grid-3,
.swesite-grid-4,
.swesite-auto-grid {
	display: grid;
	gap: var(--swesite-gap);
	grid-template-columns: 1fr;
}

.swesite-auto-grid {
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

@media (min-width: 768px) {
	.swesite-grid-2,
	.swesite-grid-3,
	.swesite-grid-4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.swesite-grid {
		grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
	}

	.swesite-grid-3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.swesite-grid-4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Media */
body [class*="swesite-"] img,
body [class*="swesite-"] video,
body [class*="swesite-"] iframe,
body [class*="swesite-"] canvas,
body [class*="swesite-"] svg {
	max-width: 100%;
}

body [class*="swesite-"] img,
body [class*="swesite-"] video {
	height: auto;
}

body [class*="swesite-"] iframe {
	border: 0;
}

.swesite-media-cover,
.swesite-media-contain {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
}

.swesite-media-cover {
	object-fit: cover;
}

.swesite-media-contain {
	object-fit: contain;
}

/* Buttons */
.swesite-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 46px;
	max-width: 100%;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: var(--swesite-radius-control);
	font-size: clamp(14px, 1.1vw, 16px);
	font-weight: 800;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.swesite-btn:hover {
	transform: translateY(-1px);
	text-decoration: none;
}

.swesite-btn-primary {
	color: #fff;
	background: linear-gradient(135deg, var(--swesite-color-blue), var(--swesite-color-blue-strong));
	box-shadow: 0 16px 34px rgba(0, 107, 255, 0.28);
}

.swesite-btn-primary:hover {
	box-shadow: 0 20px 44px rgba(0, 107, 255, 0.34);
}

.swesite-btn-secondary {
	color: var(--swesite-color-dark);
	background: #fff;
	border-color: rgba(7, 17, 31, 0.1);
	box-shadow: 0 12px 26px rgba(7, 17, 31, 0.08);
}

.swesite-btn-outline {
	color: var(--swesite-color-dark);
	background: rgba(255, 255, 255, 0.78);
	border-color: var(--swesite-border-blue);
}

.swesite-btn-outline:hover,
.swesite-btn-secondary:hover {
	border-color: rgba(0, 107, 255, 0.34);
	box-shadow: 0 18px 38px rgba(7, 17, 31, 0.12);
}

.swesite-btn-full {
	width: 100%;
}

@media (max-width: 480px) {
	.swesite-btn {
		width: 100%;
		min-height: 44px;
		padding-inline: 14px;
	}
}

/* Cards */
.swesite-card {
	width: 100%;
	max-width: 100%;
	padding: clamp(18px, 2.5vw, 32px);
	border: 1px solid rgba(0, 107, 255, 0.12);
	border-radius: var(--swesite-radius-card);
	background: #fff;
	box-shadow: var(--swesite-shadow-soft);
	overflow: hidden;
}

.swesite-card.is-interactive {
	transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.swesite-card.is-interactive:hover {
	transform: translateY(-3px);
	border-color: rgba(0, 107, 255, 0.26);
	box-shadow: var(--swesite-shadow-lift);
}

/* Forms, tables and long content */
body [class*="swesite-"] input,
body [class*="swesite-"] select,
body [class*="swesite-"] textarea,
body [class*="swesite-"] button {
	max-width: 100%;
	font: inherit;
}

body [class*="swesite-"] table {
	width: 100%;
	max-width: 100%;
	border-collapse: collapse;
}

.swesite-table-scroll,
.swesite-account-table-wrap,
.swesite-cart-table-wrap,
.swesite-checkout-table-wrap,
.swesite-order-review,
.swesite-invoice-table-wrap {
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Header responsiveness */
.swesite-header,
.swesite-theme-header,
.header-transparent .swesite-header,
.header-solid .swesite-header {
	width: calc(100% - 40px);
	max-width: none;
}

.swesite-header-shell {
	width: 100%;
	max-width: none;
	margin-inline: auto;
}

.swesite-header-brand,
.swesite-header-actions,
.swesite-header-action-button {
	min-width: 0;
}

.swesite-header-actions {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	max-width: 100%;
}

.swesite-header-action-button {
	white-space: nowrap;
}

.swesite-header-button-label {
	overflow: hidden;
	text-overflow: ellipsis;
}

.swesite-header-notification-panel {
	max-width: min(360px, calc(100vw - 24px));
}

@media (max-width: 900px) {
	.swesite-header,
	.swesite-theme-header,
	.header-transparent .swesite-header,
	.header-solid .swesite-header {
		width: calc(100% - 20px);
	}

	.swesite-header-shell {
		width: min(100% - 20px, 1240px);
	}

	.swesite-header-button-label {
		display: none;
	}
}

@media (max-width: 520px) {
	.swesite-header,
	.swesite-theme-header,
	.header-transparent .swesite-header,
	.header-solid .swesite-header {
		width: calc(100% - 14px);
	}

	.swesite-header-shell {
		width: min(100% - 14px, 1240px);
		padding-inline: 10px;
	}

	.swesite-header-actions {
		gap: 6px;
	}

	.swesite-header-action-button {
		width: 38px;
		min-width: 38px;
		height: 38px;
		padding: 0;
		border-radius: 999px;
	}

	.swesite-header-button-icon {
		width: 18px;
		height: 18px;
	}

	.swesite-header-brand {
		gap: 8px;
	}
}

@media (max-width: 360px) {
	.swesite-header-shell {
		width: min(100% - 10px, 1240px);
		padding-inline: 8px;
	}

	.swesite-header-actions {
		gap: 4px;
	}

	.swesite-header-action-button {
		width: 34px;
		min-width: 34px;
		height: 34px;
	}
}

/* Product and package pages */
.swesite-product-page,
.swesite-package-price-page,
.swesite-cart-page,
.swesite-checkout-page,
.swesite-account-page {
	width: 100%;
	max-width: none;
}

.swesite-product-shell,
.swesite-package-price-shell,
.swesite-cart-shell,
.swesite-checkout-shell {
	width: min(100% - 32px, var(--swesite-container-max));
	max-width: var(--swesite-container-max);
	margin-inline: auto;
}

.swesite-product-hero,
.swesite-package-price-hero,
.swesite-cart-layout,
.swesite-checkout-layout,
.swesite-account-dashboard-grid,
.swesite-account-settings-grid,
.swesite-account-address-grid,
.swesite-account-chat-layout {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--swesite-gap);
}

.swesite-product-gallery,
.swesite-product-summary,
.swesite-package-price-visual,
.swesite-package-price-summary,
.swesite-cart-main,
.swesite-cart-side,
.swesite-checkout-main,
.swesite-checkout-sidebar,
.swesite-account-main,
.swesite-account-sidebar {
	width: 100%;
	max-width: 100%;
	min-width: 0;
}

.swesite-product-summary,
.swesite-package-price-summary,
.swesite-cart-side,
.swesite-checkout-sidebar,
.swesite-account-sidebar {
	top: auto;
}

.swesite-product-choice-grid,
.swesite-product-quantity-grid,
.swesite-package-variant-grid,
.swesite-package-items-grid,
.swesite-package-mini-grid,
.swesite-package-step-grid,
.swesite-package-faq-grid,
.swesite-package-trust-grid,
.swesite-cart-benefits,
.swesite-checkout-grid-2,
.swesite-account-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
	gap: clamp(12px, 2vw, 22px);
}

.swesite-product-actions,
.swesite-package-price-actions,
.swesite-package-cta-actions,
.swesite-cart-actions,
.swesite-checkout-actions,
.swesite-account-topbar,
.swesite-account-section-head,
.swesite-account-top-actions,
.swesite-account-design-actions {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(10px, 1.6vw, 16px);
	min-width: 0;
}

.swesite-product-primary,
.swesite-product-secondary,
.swesite-package-price-add,
.swesite-package-price-contact,
.swesite-package-cta-primary,
.swesite-package-cta-secondary,
.swesite-cart-button,
.swesite-checkout-button,
.swesite-account-primary-button,
.swesite-account-outline-button,
.swesite-account-small-button {
	max-width: 100%;
}

@media (min-width: 768px) {
	.swesite-product-shell,
	.swesite-package-price-shell,
	.swesite-cart-shell,
	.swesite-checkout-shell {
		width: min(100% - 48px, var(--swesite-container-max));
	}

	.swesite-checkout-grid-2,
	.swesite-account-settings-grid,
	.swesite-account-address-grid,
	.swesite-account-chat-layout {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.swesite-account-dashboard-grid {
		grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
	}
}

@media (min-width: 1024px) {
	.swesite-product-hero,
	.swesite-package-price-hero {
		grid-template-columns: minmax(0, 1.03fr) minmax(360px, 0.97fr);
	}

	.swesite-cart-layout,
	.swesite-checkout-layout {
		grid-template-columns: minmax(0, 1fr) minmax(320px, 0.42fr);
		align-items: start;
	}
}

@media (min-width: 1200px) {
	.swesite-product-hero,
	.swesite-package-price-hero {
		gap: clamp(30px, 4vw, 64px);
	}
}

@media (max-width: 768px) {
	.swesite-product-shell,
	.swesite-package-price-shell,
	.swesite-cart-shell,
	.swesite-checkout-shell {
		width: min(100% - 24px, var(--swesite-container-max));
	}

	.swesite-product-primary,
	.swesite-product-secondary,
	.swesite-package-price-add,
	.swesite-package-price-contact,
	.swesite-package-cta-primary,
	.swesite-package-cta-secondary,
	.swesite-cart-button,
	.swesite-checkout-button,
	.swesite-account-primary-button,
	.swesite-account-outline-button {
		width: 100%;
		justify-content: center;
	}

	.swesite-account-sidebar {
		position: relative;
	}

	.swesite-account-nav {
		display: flex;
		gap: 8px;
		overflow-x: auto;
		padding-bottom: 8px;
		scroll-snap-type: inline mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.swesite-account-nav a {
		flex: 0 0 auto;
		scroll-snap-align: start;
	}

	.swesite-account-table-wrap table {
		min-width: 620px;
	}
}

@media (max-width: 480px) {
	.swesite-product-shell,
	.swesite-package-price-shell,
	.swesite-cart-shell,
	.swesite-checkout-shell {
		width: min(100% - 20px, var(--swesite-container-max));
	}

	.swesite-product-choice-grid,
	.swesite-product-quantity-grid,
	.swesite-package-variant-grid,
	.swesite-package-items-grid,
	.swesite-cart-benefits,
	.swesite-checkout-grid-2,
	.swesite-account-stats {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 360px) {
	.swesite-product-shell,
	.swesite-package-price-shell,
	.swesite-cart-shell,
	.swesite-checkout-shell {
		width: min(100% - 16px, var(--swesite-container-max));
	}
}
