/**
 * Nomas-Ecom frontend styles.
 * Scoped: every rule targets .nomas-* so Elementor/Gutenberg stay unaffected.
 */
.nomas-section {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.nomas-section--boxed { max-width: 1400px; }
.nomas-section--full { max-width: none; }

.nomas-section__inner {
	box-sizing: border-box;
	margin: 0 auto;
	padding: 0 15px;
	max-width: 1200px; /* overridden inline per-section when customized */
}

.nomas-section__title {
	margin: 0 0 6px;
	font-size: 32px;
	line-height: 1.25;
	color: #0f172a;
}

.nomas-section__subtitle {
	margin: 0 0 22px;
	font-size: 18px;
	color: #64748b;
}

/* Header block sits above template content */
.nomas-section__inner > .nomas-section__title,
.nomas-section__inner > .nomas-section__subtitle {
	text-align: left;
}

/* ---------- Hero ---------- */
.nomas-hero {
	position: relative;
	display: flex;
	align-items: center;
	background-size: cover;
	background-position: center;
	border-radius: inherit;
	overflow: hidden;
	min-height: 420px;
	box-sizing: border-box;
}

.nomas-hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(2, 6, 23, 0.72) 0%, rgba(2, 6, 23, 0.25) 55%, rgba(2, 6, 23, 0.05) 100%);
}

.nomas-hero--center::before {
	background: linear-gradient(180deg, rgba(2, 6, 23, 0.55) 0%, rgba(2, 6, 23, 0.2) 100%);
}

.nomas-hero--left { justify-content: flex-start; text-align: left; }
.nomas-hero--center { justify-content: center; text-align: center; }
.nomas-hero--right { justify-content: flex-end; text-align: right; }

.nomas-hero__inner {
	position: relative;
	z-index: 1;
	padding: 40px;
	max-width: 620px;
	box-sizing: border-box;
}

.nomas-hero__headline {
	margin: 0 0 12px;
	font-size: clamp(26px, 4vw, 46px);
	line-height: 1.15;
	color: #ffffff;
}

.nomas-hero__sub {
	margin: 0 0 24px;
	font-size: 17px;
	color: rgba(255, 255, 255, 0.85);
}

.nomas-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.nomas-hero--center .nomas-hero__actions { justify-content: center; }
.nomas-hero--right .nomas-hero__actions { justify-content: flex-end; }

.nomas-btn {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 15px;
	text-decoration: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.nomas-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.nomas-btn--primary { background: #2563eb; color: #ffffff; }
.nomas-btn--secondary { background: rgba(255, 255, 255, 0.14); color: #ffffff; border: 1px solid rgba(255, 255, 255, 0.45); }

/* ---------- Category grid ---------- */
.nomas-catgrid {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(4, 1fr);
}

.nomas-catgrid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.nomas-catgrid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.nomas-catgrid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.nomas-catgrid--cols-6 { grid-template-columns: repeat(6, 1fr); }

.nomas-catgrid__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	padding: 16px 10px;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.nomas-catgrid__item:hover { box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); transform: translateY(-2px); }

.nomas-catgrid__media {
	width: 100%;
	aspect-ratio: 1 / 1;
	border-radius: 8px;
	overflow: hidden;
	background: #f8fafc;
}

.nomas-catgrid__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nomas-catgrid__name { font-weight: 600; color: #0f172a; font-size: 14px; text-align: center; }

/* ---------- Product cards / grids ---------- */
.nomas-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 18px;
}

.nomas-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	height: 100%;
}

.nomas-card:hover { box-shadow: 0 12px 28px rgba(15, 23, 42, 0.09); transform: translateY(-3px); }

.nomas-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 2;
	background: #2563eb;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.4px;
	text-transform: uppercase;
	padding: 4px 10px;
	border-radius: 999px;
}

.nomas-card__badge--discount { background: #dc2626; }

.nomas-card__media {
	aspect-ratio: 4 / 3;
	width: 100%;
	background: #f8fafc;
	overflow: hidden;
}

.nomas-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.nomas-card:hover .nomas-card__media img { transform: scale(1.04); }

.nomas-card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }

.nomas-card__name { margin: 0; font-size: 14px; font-weight: 600; color: #0f172a; line-height: 1.35; }

.nomas-card__price { font-size: 16px; font-weight: 700; color: #1d4ed8; }

.nomas-card__prices { display: flex; align-items: baseline; gap: 8px; }

.nomas-card__price--sale { color: #dc2626; }
.nomas-card__price--old { color: #94a3b8; text-decoration: line-through; font-size: 13px; font-weight: 500; }

/* ---------- Countdown ---------- */
.nomas-countdown {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 16px 0 0;
	background: #0f172a;
	color: #ffffff;
	padding: 10px 16px;
	border-radius: 10px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.nomas-countdown__unit { min-width: 2ch; text-align: center; }
.nomas-countdown__sep { opacity: 0.5; }

/* ---------- Showcase ---------- */
.nomas-showcase {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px;
	align-items: center;
}

.nomas-showcase--img-left { direction: rtl; }
.nomas-showcase--img-left > * { direction: ltr; }

.nomas-showcase__media {
	background: #f8fafc;
	border-radius: 14px;
	overflow: hidden;
	aspect-ratio: 4 / 3;
}

.nomas-showcase__media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.nomas-showcase__content { text-align: left; }

.nomas-showcase__name { margin: 0 0 12px; font-size: clamp(22px, 3vw, 34px); }

.nomas-showcase__desc { color: #475569; line-height: 1.7; margin: 0 0 18px; }

.nomas-showcase__prices { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }

.nomas-showcase__price { font-size: 28px; font-weight: 800; color: #1d4ed8; }
.nomas-showcase__old { font-size: 17px; color: #94a3b8; text-decoration: line-through; }

/* ---------- Brands ---------- */
.nomas-brands {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.nomas-brands__item {
	flex: 1 1 150px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 90px;
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	padding: 16px;
	text-decoration: none;
	transition: box-shadow 0.2s ease;
}

.nomas-brands__item:hover { box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07); }

.nomas-brands__item img { max-height: 44px; max-width: 120px; object-fit: contain; }

.nomas-brands__name { font-weight: 700; color: #0f172a; font-size: 15px; }

.nomas-brands--tile .nomas-brands__item { min-height: 110px; flex-direction: column; }

/* ---------- Reviews ---------- */
.nomas-review {
	margin: 0;
	padding: 22px;
	background: #ffffff;
	border: 1px solid #eef2f7;
	border-radius: 12px;
	box-sizing: border-box;
	height: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nomas-stars { display: flex; gap: 2px; }
.nomas-stars__star { color: #cbd5e1; font-size: 16px; }
.nomas-stars__star.is-on { color: #f59e0b; }

.nomas-review__text { margin: 0; color: #334155; font-size: 14px; line-height: 1.65; flex: 1; }

.nomas-review__author { color: #0f172a; font-weight: 700; font-size: 13px; }

/* ---------- Carousel ---------- */
.nomas-carousel {
	position: relative;
	overflow: hidden;
}

.nomas-carousel__track {
	display: flex;
	gap: 0;
	overflow-x: hidden;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
}

.nomas-carousel__slide {
	flex: 0 0 25%;
	max-width: 25%;
	padding: 0 9px;
	box-sizing: border-box;
	scroll-snap-align: start;
}

.nomas-carousel__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 5;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #e2e8f0;
	background: #ffffff;
	color: #0f172a;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
	opacity: 0;
	transition: opacity 0.2s ease;
}

.nomas-carousel:hover .nomas-carousel__arrow { opacity: 1; }

.nomas-carousel__arrow--prev { left: 6px; }
.nomas-carousel__arrow--next { right: 6px; }

.nomas-carousel__dots {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
}

.nomas-carousel__dot {
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #cbd5e1;
	border: 0;
	padding: 0;
	cursor: pointer;
	transition: background 0.2s ease, width 0.2s ease;
}

.nomas-carousel__dot.is-active { background: #2563eb; width: 20px; }

/* ---------- Preview frame ---------- */
.nomas-preview-body {
	margin: 0;
	background: #f1f5f9;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nomas-frame__bar {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	background: #0f172a;
	color: #ffffff;
	font-size: 13px;
}

.nomas-frame__title { font-weight: 600; }

.nomas-frame__badge {
	background: #dc2626;
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 999px;
	letter-spacing: 0.5px;
}

.nomas-frame__badge--active { background: #16a34a; }

.nomas-frame__hint { margin-left: auto; color: #94a3b8; }

.nomas-frame__stage { padding: 28px 16px; max-width: 1280px; margin: 0 auto; }

.nomas-error {
	background: #fef2f2;
	color: #b91c1c;
	border: 1px solid #fecaca;
	border-radius: 8px;
	padding: 16px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.nomas-catgrid { grid-template-columns: repeat(3, 1fr); }
	.nomas-catgrid--cols-5, .nomas-catgrid--cols-6 { grid-template-columns: repeat(4, 1fr); }
	.nomas-carousel__slide { flex-basis: 50%; max-width: 50%; }
	.nomas-showcase { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 640px) {
	.nomas-catgrid, .nomas-catgrid--cols-3, .nomas-catgrid--cols-4, .nomas-catgrid--cols-5, .nomas-catgrid--cols-6 { grid-template-columns: repeat(2, 1fr); }
	.nomas-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
	.nomas-carousel__slide { flex-basis: 100%; max-width: 100%; }
	.nomas-hero__inner { padding: 26px; }
	.nomas-section__title { font-size: 26px; }
}

@media (max-width: 380px) {
	.nomas-grid { grid-template-columns: 1fr; }
	.nomas-catgrid { grid-template-columns: 1fr; }
}
