/**
 * WebBundl Category Offer Banner - Public Frontend Styles
 *
 * Scoped styling for all 5 banner templates with responsive layouts.
 * Namespace: wb-offer-banner, wb-template-*, wb-*
 */

:root {
	--wb-bg: #1e1b4b;
	--wb-text: #ffffff;
	--wb-accent: #6366f1;
	--wb-btn-bg: #4f46e5;
	--wb-btn-text: #ffffff;
	--wb-radius: 12px;
	--wb-padding: 24px;
}

/* Base Banner Container */
.wb-offer-banner {
	display: block;
	width: 100%;
	margin: 0 0 24px 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	color: var(--wb-text);
	background: var(--wb-bg);
	border-radius: var(--wb-radius);
	overflow: hidden;
	-webkit-mask-image: -webkit-radial-gradient(white, black);
	isolation: isolate;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	position: relative;
	clear: both;
	container-type: inline-size;
	container-name: wbbanner;
}

.wb-offer-banner *,
.wb-offer-banner *::before,
.wb-offer-banner *::after {
	box-sizing: border-box;
}

.wb-banner-inner {
	padding: var(--wb-padding);
	position: relative;
	width: 100%;
}

/* Generic Elements */
.wb-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: rgba(255, 255, 255, 0.15);
	color: inherit;
	backdrop-filter: blur(4px);
	margin-bottom: 12px;
	line-height: 1.2;
}

.wb-heading,
.wb-offer-banner .wb-heading {
	margin: 0 0 6px 0;
	padding: 0;
	color: var(--wb-text) !important;
	font-weight: 800;
	line-height: 1.25;
}

.wb-description,
.wb-offer-banner .wb-description {
	margin: 0;
	padding: 0;
	color: var(--wb-text) !important;
	opacity: 0.92;
	font-size: 0.9375rem;
	line-height: 1.5;
}

.wb-cta-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	background-color: var(--wb-btn-bg);
	color: var(--wb-btn-text) !important;
	border-radius: calc(var(--wb-radius) * 0.6);
	font-size: 0.9375rem;
	font-weight: 700;
	text-decoration: none !important;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	white-space: nowrap;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wb-cta-btn:hover,
.wb-cta-btn:focus {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
	filter: brightness(1.08);
	color: var(--wb-btn-text) !important;
}

.wb-cta-btn:active {
	transform: translateY(0);
}

.wb-arrow-icon {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

.wb-cta-btn:hover .wb-arrow-icon {
	transform: translateX(4px);
}

/* ==========================================================================
   TEMPLATE 1: Modern Sale (Horizontal card, left badge, offer, right CTA)
   ========================================================================== */
.wb-template-1 .wb-banner-content-wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.wb-template-1 .wb-offer-highlight {
	flex-shrink: 0;
}

.wb-template-1 .wb-offer-text {
	display: inline-block;
	font-size: 2.25rem;
	font-weight: 900;
	letter-spacing: -0.02em;
	line-height: 1;
	color: var(--wb-accent);
	background: rgba(255, 255, 255, 0.1);
	padding: 8px 16px;
	border-radius: calc(var(--wb-radius) * 0.6);
	border: 1px solid rgba(255, 255, 255, 0.15);
}

.wb-template-1 .wb-text-group {
	flex: 1 1 auto;
	min-width: 0;
}

.wb-template-1 .wb-heading {
	font-size: 1.5rem;
}

.wb-template-1 .wb-action-wrap {
	flex-shrink: 0;
}

/* ==========================================================================
   TEMPLATE 2: Flash Offer (High-urgency split, flash badge, glowing box)
   ========================================================================== */
.wb-template-2 {
	border-left: 6px solid var(--wb-accent);
	background: linear-gradient(135deg, var(--wb-bg) 0%, rgba(0, 0, 0, 0.85) 100%);
}

.wb-template-2 .wb-flash-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.wb-template-2 .wb-pulse-badge {
	margin-bottom: 0;
	background: var(--wb-accent);
	color: #ffffff;
}

.wb-pulse-dot {
	width: 8px;
	height: 8px;
	background: #ffffff;
	border-radius: 50%;
	display: inline-block;
	animation: wbPulse 1.4s infinite;
}

@keyframes wbPulse {
	0% { transform: scale(0.9); opacity: 1; }
	50% { transform: scale(1.4); opacity: 0.5; }
	100% { transform: scale(0.9); opacity: 1; }
}

.wb-template-2 .wb-urgency-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.8125rem;
	font-weight: 600;
	opacity: 0.85;
}

.wb-template-2 .wb-flash-grid {
	display: flex;
	align-items: center;
	gap: 24px;
}

.wb-template-2 .wb-offer-box {
	background: rgba(255, 255, 255, 0.08);
	border: 2px dashed var(--wb-accent);
	padding: 10px 18px;
	border-radius: calc(var(--wb-radius) * 0.7);
	text-align: center;
	flex-shrink: 0;
}

.wb-template-2 .wb-offer-label {
	display: block;
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	opacity: 0.8;
	font-weight: 700;
}

.wb-template-2 .wb-offer-value {
	display: block;
	font-size: 2rem;
	font-weight: 900;
	line-height: 1.1;
	color: var(--wb-accent);
}

.wb-template-2 .wb-flash-info {
	flex: 1 1 auto;
}

.wb-template-2 .wb-heading {
	font-size: 1.5rem;
}

.wb-template-2 .wb-pulse-btn {
	box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

/* ==========================================================================
   TEMPLATE 3: Minimal Discount (Sleek typographic bar banner)
   ========================================================================== */
.wb-template-3 {
	box-shadow: none;
	border: 1px solid rgba(0, 0, 0, 0.08);
}

.wb-template-3 .wb-banner-inner {
	padding: calc(var(--wb-padding) * 0.6) var(--wb-padding);
}

.wb-template-3 .wb-minimal-strip {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.wb-template-3 .wb-minimal-tag {
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 4px;
	background: var(--wb-accent);
	color: #ffffff;
	flex-shrink: 0;
}

.wb-template-3 .wb-minimal-text {
	flex: 1 1 auto;
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
}

.wb-template-3 .wb-minimal-heading {
	font-size: 1.125rem;
	font-weight: 700;
}

.wb-template-3 .wb-minimal-offer {
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--wb-accent);
}

.wb-template-3 .wb-minimal-desc {
	font-size: 0.875rem;
	opacity: 0.85;
}

.wb-template-3 .wb-pill-btn {
	padding: 8px 18px;
	border-radius: 9999px;
	font-size: 0.875rem;
}

/* ==========================================================================
   TEMPLATE 4: Premium Ecommerce (Luxury card with image & gradient)
   ========================================================================== */
.wb-template-4 .wb-banner-inner {
	display: flex;
	align-items: stretch;
	gap: 32px;
	padding: 0;
}

.wb-template-4 .wb-banner-media {
	flex: 0 0 240px;
	max-width: 240px;
	min-height: 180px;
	background: rgba(0, 0, 0, 0.15);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wb-template-4 .wb-promo-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.wb-template-4:hover .wb-promo-img {
	transform: scale(1.05);
}

.wb-template-4 .wb-premium-content {
	flex: 1 1 auto;
	padding: var(--wb-padding);
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wb-template-4 .wb-premium-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 10px;
}

.wb-template-4 .wb-premium-offer-pill {
	font-size: 0.875rem;
	font-weight: 800;
	color: var(--wb-accent);
	background: rgba(255, 255, 255, 0.12);
	padding: 4px 12px;
	border-radius: 9999px;
	margin-bottom: 12px;
}

.wb-template-4 .wb-heading {
	font-size: 1.625rem;
}

.wb-template-4 .wb-luxury-btn {
	border-radius: 9999px;
	padding: 12px 28px;
	letter-spacing: 0.03em;
}

.wb-template-4 .wb-premium-action {
	margin-top: 16px;
}

/* ==========================================================================
   TEMPLATE 5: Bold Promotional (Oversized typography, punchy layout)
   ========================================================================== */
.wb-template-5 {
	position: relative;
}

.wb-template-5 .wb-bold-accent-bar {
	display: none !important;
}

.wb-template-5 .wb-bold-content-grid {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
}

.wb-template-5 .wb-bold-top-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}

.wb-template-5 .wb-solid-badge {
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
}

.wb-template-5 .wb-bold-offer-tag {
	font-size: 0.9375rem;
	font-weight: 900;
	color: var(--wb-accent);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 12px;
}

.wb-template-5 .wb-mega-heading {
	font-size: 2.1rem;
	font-weight: 900;
	letter-spacing: -0.03em;
	text-transform: uppercase;
	line-height: 1.1;
	margin-bottom: 8px;
}

.wb-template-5 .wb-bold-btn {
	font-size: 1.0625rem;
	padding: 14px 30px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 800;
}

/* ==========================================================================
   COUNTDOWN TIMER COMPONENT
   ========================================================================== */
.wb-countdown-wrap {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;
	box-sizing: border-box;
}

.wb-countdown-header {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	color: var(--wb-cd-heading, #ffffff);
	font-size: 0.8125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	line-height: 1.2;
}

.wb-cd-icon {
	flex-shrink: 0;
	opacity: 0.9;
}

.wb-countdown-title {
	color: var(--wb-cd-heading, #ffffff);
}

.wb-countdown-timer {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.wb-cd-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.wb-cd-box {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 4px 8px;
	background: var(--wb-cd-bg, rgba(0, 0, 0, 0.25));
	border: 1px solid var(--wb-cd-border, rgba(255, 255, 255, 0.15));
	border-radius: 8px;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(4px);
	transition: transform 0.2s ease, background 0.2s ease;
}

.wb-cd-digit {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-variant-numeric: tabular-nums;
	font-weight: 800;
	font-size: 1.35rem;
	line-height: 1;
	color: var(--wb-cd-digit, #ffffff);
	letter-spacing: 0.02em;
}

.wb-cd-label {
	margin-top: 4px;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--wb-cd-label, rgba(255, 255, 255, 0.75));
	line-height: 1;
}

.wb-cd-separator {
	font-weight: 800;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--wb-cd-digit, #ffffff);
	opacity: 0.6;
	align-self: center;
	margin-top: -12px;
}

/* Style Variants */
.wb-cd-style-boxed .wb-cd-box {
	border-radius: 8px;
}

.wb-cd-style-pill .wb-cd-box {
	border-radius: 9999px;
	padding: 6px 14px;
}

.wb-cd-style-bordered .wb-cd-box {
	background: transparent;
	border-width: 2px;
	border-style: solid;
	border-color: var(--wb-cd-border, rgba(255, 255, 255, 0.3));
	box-shadow: none;
}

.wb-cd-style-minimal .wb-cd-box {
	background: transparent;
	border: none;
	box-shadow: none;
	backdrop-filter: none;
	min-width: auto;
	min-height: auto;
	padding: 0 4px;
}

.wb-cd-style-digital .wb-cd-box {
	background: #000000;
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.8);
}
.wb-cd-style-digital .wb-cd-digit {
	font-family: "Courier New", Courier, monospace, monospace;
	letter-spacing: 0.08em;
	text-shadow: 0 0 6px currentColor;
}

/* Size Variants */
.wb-cd-size-small .wb-cd-box {
	min-width: 34px;
	min-height: 34px;
	padding: 2px 6px;
}
.wb-cd-size-small .wb-cd-digit {
	font-size: 1.05rem;
}
.wb-cd-size-small .wb-cd-label {
	font-size: 0.625rem;
}

.wb-cd-size-large .wb-cd-box {
	min-width: 54px;
	min-height: 54px;
	padding: 6px 12px;
}
.wb-cd-size-large .wb-cd-digit {
	font-size: 1.75rem;
}
.wb-cd-size-large .wb-cd-label {
	font-size: 0.75rem;
}
.wb-cd-size-large .wb-cd-separator {
	font-size: 1.6rem;
	margin-top: -16px;
}

/* Format: Compact Inline */
.wb-cd-format-compact .wb-countdown-timer {
	gap: 4px;
}
.wb-cd-format-compact .wb-cd-item {
	flex-direction: row;
	align-items: baseline;
	gap: 2px;
}
.wb-cd-format-compact .wb-cd-box {
	min-width: auto;
	min-height: auto;
	padding: 3px 6px;
}
.wb-cd-format-compact .wb-cd-label {
	margin-top: 0;
	font-size: 0.75rem;
}
.wb-cd-format-compact .wb-cd-separator {
	margin-top: 0;
}

/* Expired Notification */
.wb-cd-expired {
	font-weight: 800;
	font-size: 0.9375rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--wb-cd-heading, #ffffff);
	background: rgba(220, 38, 38, 0.25);
	border: 1px solid rgba(220, 38, 38, 0.4);
	padding: 6px 14px;
	border-radius: 6px;
}

/* Positions & Alignments */
.wb-cd-pos-top {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	margin-left: 10px;
}
.wb-cd-pos-top .wb-cd-box {
	min-width: 32px;
	min-height: 32px;
	padding: 2px 5px;
}
.wb-cd-pos-top .wb-cd-digit {
	font-size: 0.95rem;
}
.wb-cd-pos-top .wb-cd-label {
	font-size: 0.58rem;
}

.wb-cd-pos-inline {
	margin-top: 14px;
	margin-bottom: 6px;
}

/* Right alignment */
.wb-template-5 .wb-bold-cta-col {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 16px;
}
.wb-template-1 .wb-action-wrap,
.wb-template-2 .wb-flash-action,
.wb-template-3 .wb-minimal-btn-wrap,
.wb-template-4 .wb-premium-action {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
}
.wb-cd-pos-right {
	align-items: flex-end;
}

/* ==========================================================================
   RESPONSIVE DESIGN (Container Queries & Media Queries for Mobile/Tablet)
   ========================================================================== */

/* 1. Container Queries: Trigger based on the actual banner container width */
@container wbbanner (max-width: 780px) {
	.wb-cd-pos-right,
	.wb-template-5 .wb-bold-cta-col,
	.wb-template-1 .wb-action-wrap,
	.wb-template-2 .wb-flash-action,
	.wb-template-3 .wb-minimal-btn-wrap,
	.wb-template-4 .wb-premium-action {
		align-items: flex-start !important;
	}

	.wb-cd-pos-top {
		flex-direction: column !important;
		align-items: flex-start !important;
		margin-left: 0 !important;
		margin-top: 8px !important;
	}
	.wb-template-1 .wb-banner-content-wrap,
	.wb-template-2 .wb-flash-grid,
	.wb-template-5 .wb-bold-content-grid {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 16px !important;
		width: 100% !important;
	}

	.wb-template-1 .wb-offer-highlight,
	.wb-template-1 .wb-text-group,
	.wb-template-1 .wb-action-wrap,
	.wb-template-2 .wb-flash-info,
	.wb-template-2 .wb-flash-action,
	.wb-template-5 .wb-bold-main-col,
	.wb-template-5 .wb-bold-cta-col {
		width: 100% !important;
		flex: none !important;
	}

	.wb-template-4 .wb-banner-inner {
		flex-direction: column !important;
		width: 100% !important;
	}

	.wb-template-4 .wb-banner-media {
		max-width: 100% !important;
		width: 100% !important;
		flex: 0 0 160px !important;
	}

	.wb-template-3 .wb-minimal-strip {
		flex-direction: column !important;
		align-items: flex-start !important;
		gap: 12px !important;
		width: 100% !important;
	}

	.wb-template-3 .wb-minimal-text,
	.wb-template-3 .wb-minimal-btn-wrap {
		width: 100% !important;
	}

	.wb-cta-btn {
		width: 100% !important;
		justify-content: center !important;
		box-sizing: border-box !important;
	}
}

@container wbbanner (max-width: 520px) {
	.wb-banner-inner {
		padding: calc(var(--wb-padding) * 0.75) !important;
	}

	.wb-template-1 .wb-offer-text {
		font-size: 1.5rem !important;
	}

	.wb-template-2 .wb-offer-value {
		font-size: 1.5rem !important;
	}

	.wb-template-5 .wb-mega-heading {
		font-size: 1.4rem !important;
	}

	.wb-heading {
		font-size: 1.2rem !important;
		line-height: 1.3 !important;
	}

	.wb-description {
		font-size: 0.875rem !important;
		line-height: 1.45 !important;
	}

	.wb-cta-btn {
		width: 100% !important;
		padding: 12px 18px !important;
		font-size: 0.875rem !important;
	}

	.wb-cd-box {
		min-width: 38px !important;
		min-height: 38px !important;
		padding: 3px 6px !important;
	}
	.wb-cd-digit {
		font-size: 1.15rem !important;
	}
	.wb-cd-label {
		font-size: 0.6rem !important;
	}
	.wb-cd-separator {
		font-size: 1.05rem !important;
		margin-top: -10px !important;
	}
}

/* 2. Media Queries: Viewport fallback */
@media screen and (max-width: 900px) {
	.wb-template-1 .wb-banner-content-wrap,
	.wb-template-2 .wb-flash-grid,
	.wb-template-5 .wb-bold-content-grid {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		width: 100%;
	}

	.wb-template-1 .wb-offer-highlight,
	.wb-template-1 .wb-text-group,
	.wb-template-1 .wb-action-wrap,
	.wb-template-2 .wb-flash-info,
	.wb-template-2 .wb-flash-action,
	.wb-template-5 .wb-bold-main-col,
	.wb-template-5 .wb-bold-cta-col {
		width: 100%;
		flex: none;
	}

	.wb-template-4 .wb-banner-inner {
		flex-direction: column;
		width: 100%;
	}

	.wb-template-4 .wb-banner-media {
		max-width: 100%;
		width: 100%;
		flex: 0 0 160px;
	}

	.wb-template-3 .wb-minimal-strip {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
		width: 100%;
	}

	.wb-template-3 .wb-minimal-text,
	.wb-template-3 .wb-minimal-btn-wrap {
		width: 100%;
	}

	.wb-cta-btn {
		width: 100%;
		justify-content: center;
		box-sizing: border-box;
	}
}

@media screen and (max-width: 600px) {
	.wb-banner-inner {
		padding: calc(var(--wb-padding) * 0.75);
	}

	.wb-template-1 .wb-offer-text {
		font-size: 1.5rem;
	}

	.wb-template-2 .wb-offer-value {
		font-size: 1.5rem;
	}

	.wb-template-5 .wb-mega-heading {
		font-size: 1.4rem;
	}

	.wb-heading {
		font-size: 1.2rem !important;
	}

	.wb-description {
		font-size: 0.875rem !important;
	}

	.wb-cta-btn {
		width: 100%;
		padding: 12px 18px;
		font-size: 0.875rem;
	}

	.wb-cd-box {
		min-width: 38px !important;
		min-height: 38px !important;
		padding: 3px 6px !important;
	}
	.wb-cd-digit {
		font-size: 1.15rem !important;
	}
	.wb-cd-label {
		font-size: 0.6rem !important;
	}
	.wb-cd-separator {
		font-size: 1.05rem !important;
		margin-top: -10px !important;
	}
}

/* Archive & Theme Container Isolation */
.wb-banner-archive-container {
	display: block;
	width: 100%;
	max-width: 100%;
	flex: 0 0 100%;
	grid-column: 1 / -1;
	clear: both;
	box-sizing: border-box;
	margin: 15px 0 25px 0;
	position: relative;
}

/* WoodMart Specific Layout Tuning */
.wb-woodmart-banner-container {
	width: 100%;
	max-width: 100%;
	flex: 0 0 100%;
	margin: 12px 0 24px 0;
	position: relative;
	z-index: 2;
}

.wb-woodmart-banner-container .wb-offer-banner {
	margin-bottom: 0;
}

/* Elementor Widget Wrapper */
.wb-elementor-banner-wrap {
	display: block;
	width: 100%;
	clear: both;
	box-sizing: border-box;
}

.wb-elementor-banner-wrap .wb-offer-banner {
	margin-bottom: 0;
}

