/* eSIM Store layout — all rules scoped under .esim-store */

.esim-store {
	--esim-store-teal: #009688;
	--esim-store-teal-dark: #00796b;
	--esim-store-teal-soft: #e0f2f1;
	--esim-store-text: #111827;
	--esim-store-muted: #6b7280;
	--esim-store-border: #e5e7eb;
	--esim-store-tab-text: #1f2937;
	--esim-store-search-band-bg: #f3f4f6;
	--esim-store-reusable-active: #ff2056;
	--esim-store-calls: #f59e0b;
	--esim-store-calls-bg: #fef3c7;
	--esim-store-reusable: #db2777;
	--esim-store-reusable-bg: #fce7f3;
	--esim-store-radius: 16px;
	--esim-store-premium-columns: 5;
	--esim-store-reusable-columns: 4;
	--esim-store-dest-columns: 3;
	--esim-store-band-max: 1120px;

	box-sizing: border-box;
	width: 100%;
	max-width: 1320px;
	margin: 0 auto;
	padding: 8px 16px 0;
	overflow-x: visible;
	color: var(--esim-store-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.esim-store *,
.esim-store *::before,
.esim-store *::after {
	box-sizing: border-box;
}

/* ── Standalone filters header (Elementor full-width) ── */

.esim-store-filters-header {
	--esim-store-teal: #009688;
	--esim-store-teal-dark: #00796b;
	--esim-store-text: #111827;
	--esim-store-muted: #6b7280;
	--esim-store-border: #e5e7eb;
	--esim-store-tab-text: #1f2937;
	--esim-store-placeholder: #9ca3af;
	--esim-store-search-band-bg: #f3f4f6;
	--esim-store-reusable-active: #ff2056;
	--esim-store-band-max: 1120px;

	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 0;
	background: #fff;
	color: var(--esim-store-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.esim-store-filters-header *,
.esim-store-filters-header *::before,
.esim-store-filters-header *::after {
	box-sizing: border-box;
}

/* ── Top chrome: tabs band (white) + search band (gray) ── */

.esim-store__chrome,
.esim-store-filters-header .esim-store__chrome {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	width: 100%;
	margin-bottom: 36px;
}

.esim-store-filters-header .esim-store__chrome,
.esim-store__chrome--filters-header {
	margin-bottom: 0;
}

.esim-store__tabs-band {
	position: sticky;
	top: var(--esim-store-tabs-sticky-top, 0px);
	z-index: 100;
	width: 100%;
	background: #fff;
	border-bottom: 2px solid #e5e7eb;
	border-top: 1px solid #f3f4f6;
	box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.esim-store__tabs-band.is-stuck {
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.esim-store__search-band {
	width: 100%;
	background: var(--esim-store-search-band-bg, #f3f4f6);
	/* border-bottom: 1px solid #e5e7eb; */
}

.esim-store__band-inner {
	width: 100%;
	max-width: var(--esim-store-band-max, 1120px);
	margin: 0 auto;
	padding: 0 24px;
}

.esim-store__tabs-band .esim-store__band-inner {
	padding-top: 35px;
	padding-bottom: 35px;
}

.esim-store__search-band .esim-store__band-inner {
	padding: 22px 75px;
}

.esim-store__tabs {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 12px;
	padding: 0;
	margin: 0;
}

.esim-store__tab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 10px 20px;
	min-height: 42px;
	border: 1px solid #e5e7eb;
	border-radius: 999px;
	background: #fff;
	color: var(--esim-store-tab-text, #1f2937);
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.esim-store__tab-icon {
	display: block;
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
	color: #9ca3af;
}

.esim-store__tab-label {
	display: inline-block;
}

.esim-store__tab:hover {
	border-color: #d1d5db;
	background: #fff;
	color: #111827;
}

.esim-store__tab:hover .esim-store__tab-icon {
	color: #6b7280;
}

/* Default active (All / Standard / Calls + SMS) = teal */
.esim-store__tab.is-active {
	background: #009688;
	border-color: #009688;
	color: #fff;
	box-shadow: none;
}

.esim-store__tab.is-active .esim-store__tab-icon {
	color: #fff;
}

/* Reusable active only = pink/coral from design */
.esim-store__tab--reusable.is-active {
	background: var(--esim-store-reusable-active, oklch(0.645 0.246 16.439));
	border-color: var(--esim-store-reusable-active, oklch(0.645 0.246 16.439));
	color: #fff;
}

.esim-store__tab--reusable.is-active .esim-store__tab-icon {
	color: #fff;
}

.esim-store__tab:focus {
	outline: none;
}

.esim-store__tab:focus-visible {
	outline: 2px solid #009688;
	outline-offset: 2px;
}

.esim-store__tab--reusable.is-active:focus-visible {
	outline-color: var(--esim-store-reusable-active, oklch(0.645 0.246 16.439));
}

.esim-store__search {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.esim-store__search-icon {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: auto;
	margin: auto 0;
	color: #9ca3af;
	pointer-events: none;
	z-index: 1;
}

.esim-store__search-icon svg {
	display: block;
	width: 18px;
	height: 18px;
}

.esim-store__search-input {
	display: block;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 24px 0 50px;
	border: 1px solid #e5e7eb;
	border-radius: 15px;
	background: #fff;
	color: var(--esim-store-text, #111827);
	font: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 52px;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.esim-store__search-input::-webkit-search-decoration,
.esim-store__search-input::-webkit-search-cancel-button,
.esim-store__search-input::-webkit-search-results-button,
.esim-store__search-input::-webkit-search-results-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.esim-store__search-input::placeholder {
	color: #9ca3af;
	opacity: 1;
	font-weight: 400;
	line-height: normal;
}

.esim-store__search-input:focus {
	outline: none;
	border-color: #cfd4dc;
	box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.04);
}

/* Fallback hex for browsers without oklch support */
/* Reusable active color is #ff2056 (set on root vars above). */

/* Beat Elementor/theme input resets on standalone header */
.esim-store-filters-header .esim-store__search-input,
.esim-store-filters-header input.esim-store__search-input[type="search"] {
	height: 52px !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 15px !important;
	background: #fff !important;
	padding: 0 24px 0 50px !important;
	box-shadow: none !important;
	line-height: 52px !important;
}

.esim-store-filters-header .esim-store__search-icon {
	top: 0 !important;
	bottom: 0 !important;
	left: 20px !important;
	transform: none !important;
	margin: auto 0 !important;
}

/* ── Sections ── */

.esim-store-section {
	margin-bottom: 56px; 
}

.esim-store-section.is-hidden {
	display: none !important;
}

.esim-store .esim-plan-card.esim-store-card-hidden {
	display: none !important;
}

.esim-store-section__header {
	margin-bottom: 20px;
}

.esim-store-section__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px;
	padding: 5px 12px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0.01em;
}

.esim-store-section__badge-icon {
	display: block;
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	color: currentColor;
}

.esim-store-section__badge-text {
	display: inline-block;
}

.esim-store-section__badge--calls {
	background: var(--esim-store-calls-bg);
	color: #b45309;
}

.esim-store-section__badge--reusable {
	background: var(--esim-store-reusable-bg);
	color: var(--esim-store-reusable);
}

.esim-store-section__header-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px 24px;
	flex-wrap: wrap;
}

.esim-store-section__copy {
	flex: 1 1 280px;
	min-width: 0;
}

.esim-store-section__title {
	margin: 0 0 6px;
	font-size: clamp(1.35rem, 2.4vw, 1.75rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--esim-store-text);
}

.esim-store-section__subtitle {
	margin: 0;
	max-width: 640px;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--esim-store-muted);
}

.esim-store-section__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	margin-top: 4px;
	color: var(--esim-store-teal);
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.esim-store-section__link:hover,
.esim-store-section__link:focus {
	color: var(--esim-store-teal-dark);
	text-decoration: underline;
}

/* Hide nested shortcode headers — store section headers replace them */
.esim-store .esim-plans-premium-header,
.esim-store .esim-plans-hero {
	display: none !important;
}

/* Nested plans wrappers: tighten padding inside store */
.esim-store .esim-plans-wrapper {
	max-width: none;
	margin: 0;
	padding: 0;
}

/* Column overrides for nested plan grids */
.esim-store-section--premium .esim-plans-wrapper {
	--esim-plan-columns: var(--esim-store-premium-columns);
}

.esim-store-section--premium .esim-plans-grid,
.esim-store-section--premium .esim-plan-groups,
.esim-store-section--premium [class*="esim-plans"] .esim-plans-grid {
	grid-template-columns: repeat(var(--esim-store-premium-columns), minmax(0, 1fr));
}

.esim-store-section--reusable .esim-plans-wrapper {
	--esim-plan-columns: var(--esim-store-reusable-columns);
}

.esim-store-section--reusable .esim-plans-grid,
.esim-store-section--reusable .esim-plan-groups,
.esim-store-section--reusable [class*="esim-plans"] .esim-plans-grid {
	grid-template-columns: repeat(var(--esim-store-reusable-columns), minmax(0, 1fr));
}

@media (max-width: 1400px) {
	.esim-store-section--premium .esim-plans-grid,
	.esim-store-section--premium .esim-plan-groups,
	.esim-store-section--premium [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(5, var(--esim-store-premium-columns)), minmax(0, 1fr));
	}

	.esim-store-section--reusable .esim-plans-grid,
	.esim-store-section--reusable .esim-plan-groups,
	.esim-store-section--reusable [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(4, var(--esim-store-reusable-columns)), minmax(0, 1fr));
	}
}

@media (max-width: 1200px) {
	.esim-store-section--premium .esim-plans-grid,
	.esim-store-section--premium .esim-plan-groups,
	.esim-store-section--premium [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(4, var(--esim-store-premium-columns)), minmax(0, 1fr));
	}

	.esim-store-section--reusable .esim-plans-grid,
	.esim-store-section--reusable .esim-plan-groups,
	.esim-store-section--reusable [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(3, var(--esim-store-reusable-columns)), minmax(0, 1fr));
	}
}

@media (max-width: 1024px) {
	.esim-store-section--premium .esim-plans-grid,
	.esim-store-section--premium .esim-plan-groups,
	.esim-store-section--premium [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(3, var(--esim-store-premium-columns)), minmax(0, 1fr));
	}

	.esim-store-section--reusable .esim-plans-grid,
	.esim-store-section--reusable .esim-plan-groups,
	.esim-store-section--reusable [class*="esim-plans"] .esim-plans-grid {
		grid-template-columns: repeat(min(3, var(--esim-store-reusable-columns)), minmax(0, 1fr));
	}

	.esim-store .esim-countries-grid {
		grid-template-columns: repeat(min(3, var(--esim-store-dest-columns)), minmax(0, 1fr));
	}
}

/* Hide nested plan filter toolbar in reusable (auto-filtered via JS) */
.esim-store-section--reusable .esim-plans-toolbar,
.esim-store-section--reusable .esim-plans-slider-wrap,
.esim-store-section--reusable .esim-plans-duration {
	display: none !important;
}

/* Destinations — full-bleed (Elementor full-width style) */
.esim-store-section--destinations {
	--esim-store-dest-bg: #fbf9fa;
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	margin-bottom: 0;
	padding: 48px 0;
	background-color: var(--esim-store-dest-bg);
	box-sizing: border-box;
}

.esim-store.esim-store--filter-standard .esim-store-section--destinations {
	--esim-store-dest-bg: #fff;
}

.esim-store-section--destinations > .esim-store-section__header,
.esim-store-section--destinations > .esim-store-section__body {
	width: 100%;
	max-width: min(1320px, 100%);
	margin-left: auto;
	margin-right: auto;
	padding-left: 16px;
	padding-right: 16px;
	box-sizing: border-box;
}

.esim-store .esim-countries {
	max-width: none;
	margin: 0;
	padding: 0;
}

.esim-store--hide-countries-search .esim-countries-search {
	display: none !important;
}

.esim-store--hide-countries-filters .esim-countries-type-filters,
.esim-store--hide-countries-filters .esim-countries-tabs {
	display: none !important;
}

.esim-store .esim-countries-grid {
	grid-template-columns: repeat(var(--esim-store-dest-columns), minmax(0, 1fr));
}

/* Soften countries chrome to match store */
.esim-store .esim-countries-type-filter.is-active,
.esim-store .esim-countries-tab.is-active {
	background: var(--esim-store-teal);
	color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
	.esim-store {
		--esim-store-premium-columns: 2;
		--esim-store-reusable-columns: 2;
		--esim-store-dest-columns: 2;
		padding-left: 12px;
		padding-right: 12px;
	}

	.esim-store__band-inner {
		padding-left: 16px;
		padding-right: 16px;
	}

	.esim-store__tabs-band .esim-store__band-inner,
	.esim-store__search-band .esim-store__band-inner {
		padding-top: 18px;
		padding-bottom: 18px;
	}

	.esim-store__tabs {
		gap: 8px;
	}

	.esim-store__tab {
		padding: 9px 14px;
		min-height: 40px;
		font-size: 0.88rem;
	}

	.esim-store-section {
		margin-bottom: 36px;
	}
}

@media (max-width: 520px) {
	.esim-store {
		--esim-store-premium-columns: 1;
		--esim-store-reusable-columns: 1;
		--esim-store-dest-columns: 1;
	}

	.esim-store__tabs {
		justify-content: center;
	}

	.esim-store__search-input {
		height: 48px;
		line-height: 48px;
		border-radius: 999px;
		padding-left: 46px;
	}

	.esim-store__search-icon {
		left: 16px;
	}
}
