/* Childsheart Charity Auction — публични стилове */

.cha-wrap {
	--cha-accent: #c0392b;
	--cha-accent-dark: #962d21;
	--cha-ink: #1f2328;
	--cha-muted: #6b7280;
	--cha-line: #e5e7eb;
	--cha-bg: #ffffff;
	--cha-soft: #f8f7f5;
	--cha-radius: 14px;
	color: var(--cha-ink);
	font-size: 16px;
	line-height: 1.55;
}

.cha-wrap *,
.cha-wrap *::before,
.cha-wrap *::after { box-sizing: border-box; }

/* --- Език --- */
.cha-lang { display: flex; gap: 4px; justify-content: flex-end; margin: 0 0 16px; }
.cha-lang__link {
	font-size: 13px; font-weight: 600; letter-spacing: .04em;
	padding: 5px 12px; border-radius: 999px; text-decoration: none;
	color: var(--cha-muted); border: 1px solid var(--cha-line);
}
.cha-lang__link.is-active { background: var(--cha-accent); border-color: var(--cha-accent); color: #fff; }

/* --- Мрежа --- */
.cha-grid { display: grid; gap: 24px; }
.cha-grid--1 { grid-template-columns: 1fr; }
.cha-grid--2 { grid-template-columns: repeat(2, 1fr); }
.cha-grid--3 { grid-template-columns: repeat(3, 1fr); }
.cha-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 980px) { .cha-grid--3, .cha-grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cha-grid { grid-template-columns: 1fr !important; } }

/* --- Карта --- */
.cha-card {
	background: var(--cha-bg);
	border: 1px solid var(--cha-line);
	border-radius: var(--cha-radius);
	overflow: hidden;
	display: flex; flex-direction: column;
	transition: box-shadow .18s ease, transform .18s ease;
}
.cha-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.09); transform: translateY(-2px); }
.cha-card.is-closed { opacity: .78; }

.cha-card__media { position: relative; display: block; aspect-ratio: 4 / 3; background: var(--cha-soft); overflow: hidden; }
.cha-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cha-card__placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; }

.cha-badge {
	position: absolute; top: 12px; left: 12px;
	background: #1f7a4d; color: #fff;
	font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 999px;
}
.cha-badge--closed { background: #6b7280; }

.cha-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.cha-card__title { margin: 0; font-size: 18px; line-height: 1.3; }
.cha-card__title a { color: inherit; text-decoration: none; }
.cha-card__title a:hover { color: var(--cha-accent); }
.cha-card__artist { margin: -4px 0 0; font-size: 14px; color: var(--cha-muted); }

.cha-price { display: flex; flex-direction: column; gap: 2px; margin-top: auto; }
.cha-price__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--cha-muted); }
.cha-price__value { font-size: 24px; font-weight: 700; color: var(--cha-accent); }
.cha-price__count { font-size: 13px; color: var(--cha-muted); }

/* --- Единичен лот --- */
.cha-single { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .cha-single { grid-template-columns: 1fr; } }
.cha-single__media img { width: 100%; border-radius: var(--cha-radius); display: block; }
.cha-single__title { margin: 0 0 12px; font-size: 30px; line-height: 1.2; }
.cha-single__desc { margin: 16px 0; }

.cha-meta-list { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.cha-meta-list span { color: var(--cha-muted); }

/* --- Панел за наддаване --- */
.cha-panel {
	background: var(--cha-soft);
	border: 1px solid var(--cha-line);
	border-radius: var(--cha-radius);
	padding: 22px;
	margin: 24px 0;
}
.cha-panel__prices { display: flex; flex-wrap: wrap; gap: 20px 32px; margin-bottom: 16px; }
.cha-panel__price { display: flex; flex-direction: column; gap: 2px; }
.cha-panel__label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--cha-muted); }
.cha-panel__value { font-size: 26px; font-weight: 700; color: var(--cha-accent); line-height: 1.1; }
.cha-panel__value--min { color: var(--cha-ink); font-size: 20px; }

.cha-panel__value.is-updated { animation: cha-flash .9s ease; }
@keyframes cha-flash {
	0% { background: rgba(192,57,43,.18); }
	100% { background: transparent; }
}

/* --- Обратен брояч --- */
.cha-countdown {
	display: flex; align-items: baseline; gap: 8px;
	font-size: 14px; margin-bottom: 16px;
	padding: 8px 12px; background: #fff;
	border: 1px solid var(--cha-line); border-radius: 10px;
}
.cha-countdown__label { color: var(--cha-muted); }
.cha-countdown__value { font-weight: 700; font-variant-numeric: tabular-nums; }
.cha-countdown.is-urgent .cha-countdown__value { color: var(--cha-accent); }
.cha-card .cha-countdown { padding: 6px 10px; font-size: 13px; margin-bottom: 4px; }

/* --- Форма --- */
.cha-form { display: flex; flex-direction: column; gap: 14px; }
.cha-field { display: flex; flex-direction: column; gap: 6px; }
.cha-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .cha-field-row { grid-template-columns: 1fr; } }

.cha-field label { font-size: 14px; font-weight: 600; }
.cha-field input[type="text"],
.cha-field input[type="email"],
.cha-field input[type="tel"],
.cha-field input[type="number"],
.cha-field textarea {
	width: 100%; padding: 11px 13px; font-size: 16px;
	border: 1px solid var(--cha-line); border-radius: 10px;
	background: #fff; color: var(--cha-ink); font-family: inherit;
}
.cha-field input:focus, .cha-field textarea:focus {
	outline: none; border-color: var(--cha-accent);
	box-shadow: 0 0 0 3px rgba(192,57,43,.14);
}
.cha-field.has-error input, .cha-field.has-error textarea { border-color: #b3261e; }
.cha-field__error { font-size: 13px; color: #b3261e; font-weight: 500; }

.cha-amount-input { position: relative; }
.cha-amount-input input { font-size: 22px; font-weight: 700; padding-right: 64px; }
.cha-currency {
	position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
	color: var(--cha-muted); font-weight: 600; pointer-events: none;
}

.cha-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cha-quick__btn {
	background: #fff; border: 1px solid var(--cha-line); border-radius: 999px;
	padding: 6px 14px; font-size: 14px; font-weight: 600; cursor: pointer;
	color: var(--cha-ink); font-family: inherit;
}
.cha-quick__btn:hover { border-color: var(--cha-accent); color: var(--cha-accent); }

.cha-field--consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; }
.cha-field--consent input { margin-top: 3px; flex: none; }
.cha-terms { font-size: 13px; color: var(--cha-muted); margin: 0; }

.cha-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* --- Бутони --- */
.cha-btn {
	display: inline-block; text-align: center; cursor: pointer;
	background: #fff; border: 1px solid var(--cha-line); border-radius: 10px;
	padding: 12px 22px; font-size: 15px; font-weight: 600;
	color: var(--cha-ink); text-decoration: none; font-family: inherit;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.cha-btn:hover { border-color: var(--cha-accent); color: var(--cha-accent); }
.cha-btn--primary { background: var(--cha-accent); border-color: var(--cha-accent); color: #fff; }
.cha-btn--primary:hover { background: var(--cha-accent-dark); border-color: var(--cha-accent-dark); color: #fff; }
.cha-btn--block { display: block; width: 100%; }
.cha-btn[disabled] { opacity: .6; cursor: not-allowed; }

/* --- Съобщения --- */
.cha-form__message { font-size: 15px; }
.cha-form__message:empty { display: none; }
.cha-form__message { padding: 12px 14px; border-radius: 10px; border-left: 4px solid; }
.cha-form__message.is-success { background: #eef7f1; border-color: #1f7a4d; color: #14532d; }
.cha-form__message.is-error { background: #fdeeed; border-color: #b3261e; color: #7f1d1d; }
.cha-form__message.is-info { background: #eef3f9; border-color: #1f4e79; color: #1e3a5f; }

.cha-closed-note { font-weight: 600; margin: 0 0 8px; }
.cha-winner { margin: 0; }

/* --- История --- */
.cha-history { margin: 32px 0; }
.cha-history h3 { font-size: 18px; margin: 0 0 12px; }
.cha-history__list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--cha-line); border-radius: var(--cha-radius); overflow: hidden; }
.cha-history__item {
	display: grid; grid-template-columns: 1fr auto auto; gap: 16px; align-items: center;
	padding: 11px 16px; font-size: 15px; border-bottom: 1px solid var(--cha-line);
	background: #fff;
}
.cha-history__item:last-child { border-bottom: none; }
.cha-history__item.is-winner { background: #eef7f1; font-weight: 600; }
.cha-history__amount { font-weight: 700; color: var(--cha-accent); }
.cha-history__date { font-size: 13px; color: var(--cha-muted); }
.cha-history__empty { color: var(--cha-muted); }

/* --- Страница с потвърждение --- */
.cha-notice-page { max-width: 640px; margin: 60px auto; padding: 0 20px; }
.cha-notice {
	background: #fff; border: 1px solid #e5e7eb; border-left-width: 5px;
	border-radius: 12px; padding: 24px 26px; font-size: 17px; line-height: 1.6;
}
.cha-notice p { margin: 0 0 12px; }
.cha-notice p:last-child { margin-bottom: 0; }
.cha-notice__meta { font-size: 15px; color: #6b7280; }
