/* ==========================================================================
   Bază: tipografie, container, butoane, formulare, utilitare
   ========================================================================== */

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	font-family: var(--dt-font);
	font-size: var(--dt-fs-base);
	line-height: var(--dt-lh-body);
	color: var(--dt-text);
	background-color: var(--dt-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-synthesis-weight: none;
}

/* --- Titluri --- */
.dt-h1,
.dt-h2,
.dt-h3,
.dt-h4 {
	margin: 0;
	color: var(--dt-text);
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.dt-h1 { font-size: var(--dt-fs-h1); line-height: var(--dt-lh-h1); font-weight: 800; letter-spacing: -0.025em; }
.dt-h2 { font-size: var(--dt-fs-h2); line-height: var(--dt-lh-h2); font-weight: 700; letter-spacing: -0.02em; }
.dt-h3 { font-size: var(--dt-fs-h3); line-height: var(--dt-lh-h3); font-weight: 700; }
.dt-h4 { font-size: var(--dt-fs-h4); line-height: 1.3; font-weight: 700; }

.dt-lead {
	font-size: var(--dt-fs-lg);
	line-height: 1.55;
	color: var(--dt-text-2);
	margin: 0;
	text-wrap: pretty;
}

.dt-eyebrow {
	display: inline-block;
	font-size: var(--dt-fs-label);
	line-height: var(--dt-lh-label);
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dt-red);
	margin: 0 0 var(--dt-2);
}

.dt-muted { color: var(--dt-text-2); }
.dt-small { font-size: var(--dt-fs-sm); }

/* --- Layout --- */
.dt-container {
	width: 100%;
	max-width: calc(var(--dt-container) + var(--dt-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--dt-gutter);
}

.dt-section { padding-block: var(--dt-section); }
.dt-section--tight { padding-block: calc(var(--dt-section) * 0.62); }
.dt-section--surface { background: var(--dt-surface); }
.dt-section--bg { background: var(--dt-bg); }
.dt-section--dark { background: var(--dt-charcoal); color: var(--dt-on-dark); }

.dt-section-head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: var(--dt-3);
	margin-bottom: var(--dt-5);
}

.dt-section-head--center {
	flex-direction: column;
	align-items: center;
	text-align: center;
	max-width: 720px;
	margin-inline: auto;
}

.dt-section-head__text { max-width: 640px; display: grid; gap: var(--dt-2); }

.dt-grid { display: grid; gap: var(--dt-3); }
.dt-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dt-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dt-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

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

@media (max-width: 620px) {
	.dt-grid--2,
	.dt-grid--3,
	.dt-grid--4 { grid-template-columns: minmax(0, 1fr); }
}

/* --- Butoane --- */
.dt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: var(--dt-btn-h);
	padding: 0 26px;
	border: 1px solid transparent;
	border-radius: var(--dt-radius-sm);
	font-family: var(--dt-font);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--dt-t), border-color var(--dt-t), color var(--dt-t), transform var(--dt-t);
}

.dt-btn:focus-visible {
	outline: 2px solid var(--dt-red);
	outline-offset: 2px;
}

.dt-btn--primary { background: var(--dt-red); color: #fff; }
.dt-btn--primary:hover { background: var(--dt-red-hover); color: #fff; }

.dt-btn--ghost {
	background: transparent;
	color: var(--dt-text);
	border-color: var(--dt-border-strong);
}
.dt-btn--ghost:hover { border-color: var(--dt-text); color: var(--dt-text); }

.dt-btn--on-dark {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.4);
}
.dt-btn--on-dark:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; color: #fff; }

.dt-btn--dark { background: var(--dt-charcoal); color: #fff; }
.dt-btn--dark:hover { background: var(--dt-charcoal-2); color: #fff; }

.dt-btn--sm { min-height: var(--dt-btn-h-sm); padding: 0 18px; font-size: 14px; }
.dt-btn--block { width: 100%; }

.dt-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--dt-red);
	font-weight: 600;
	font-size: var(--dt-fs-sm);
	text-decoration: none;
	transition: gap var(--dt-t), color var(--dt-t);
}
.dt-link:hover { color: var(--dt-red-hover); gap: 12px; }
.dt-link .dt-icon { flex: none; }

/* --- Carduri --- */
.dt-card {
	background: var(--dt-surface);
	border: 1px solid var(--dt-border);
	border-radius: var(--dt-radius-lg);
	transition: border-color var(--dt-t), box-shadow var(--dt-t);
}
.dt-card:hover { border-color: var(--dt-border-strong); box-shadow: var(--dt-shadow); }

/* --- Insigne și stări --- */
.dt-badge {
	display: inline-flex;
	align-items: center;
	height: 24px;
	padding: 0 10px;
	border-radius: var(--dt-radius-sm);
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	white-space: nowrap;
}
.dt-badge--new { background: var(--dt-red); color: #fff; }
.dt-badge--pack { background: var(--dt-charcoal); color: #fff; }
.dt-badge--sale { background: var(--dt-warning); color: #fff; }

.dt-stock {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: var(--dt-fs-sm);
	font-weight: 600;
}
.dt-stock--in { color: var(--dt-success); }
.dt-stock--backorder { color: var(--dt-warning); }
.dt-stock--out { color: var(--dt-text-3); }
.dt-stock::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
	flex: none;
}

/* Chip de specificație, folosit în carduri și pe pagina de produs. */
.dt-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 10px;
	border: 1px solid var(--dt-border);
	border-radius: var(--dt-radius-sm);
	background: var(--dt-surface);
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	color: var(--dt-text-2);
	white-space: nowrap;
}
.dt-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* --- Preț --- */
.dt-price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-weight: 800;
	font-size: 1.375rem;
	letter-spacing: -0.02em;
	color: var(--dt-text);
}
.dt-price__cur { font-size: 0.8125rem; font-weight: 700; color: var(--dt-text-2); letter-spacing: 0; }
.dt-price__old { font-size: 0.9375rem; font-weight: 600; color: var(--dt-text-3); text-decoration: line-through; }

/* --- Formulare --- */
.dt-field {
	width: 100%;
	min-height: var(--dt-field-h);
	padding: 0 14px;
	border: 1px solid var(--dt-border);
	border-radius: var(--dt-radius-sm);
	background: var(--dt-surface);
	font-family: var(--dt-font);
	font-size: 15px;
	color: var(--dt-text);
	transition: border-color var(--dt-t), box-shadow var(--dt-t);
}
textarea.dt-field { min-height: 140px; padding: 12px 14px; line-height: 1.55; }
.dt-field:focus {
	outline: none;
	border-color: var(--dt-red);
	box-shadow: 0 0 0 3px var(--dt-red-soft);
}
.dt-label {
	display: block;
	margin-bottom: 6px;
	font-size: var(--dt-fs-label);
	font-weight: 600;
	line-height: var(--dt-lh-label);
	color: var(--dt-text-2);
}
select.dt-field {
	appearance: none;
	padding-right: 38px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2362676D' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6.5 9.5 5.5 5.5 5.5-5.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
}

/* --- Accesibilitate --- */
.dt-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.dt-skip-link {
	position: absolute;
	left: -9999px;
	z-index: 999;
	padding: 12px 20px;
	background: var(--dt-charcoal);
	color: #fff;
	border-radius: 0 0 var(--dt-radius-sm) 0;
}
.dt-skip-link:focus { left: 0; top: 0; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--dt-red);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Ținte de atingere de minimum 44x44 px pe mobil. */
@media (pointer: coarse) {
	.dt-tap { min-width: 44px; min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}

/* --- Apariție ușoară la scroll ---
   Conținutul se ascunde doar dacă JavaScript rulează. Fără el, sau dacă
   observatorul nu pornește, totul rămâne vizibil. */
.dt-js .dt-reveal {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity var(--dt-t-slow), transform var(--dt-t-slow);
}
.dt-js .dt-reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	.dt-js .dt-reveal { opacity: 1; transform: none; }
}
