/**
 * Kafanek Obchodnik - Elementor Widgets Styles
 *
 * Shared styles for all custom Elementor widgets.
 * Brand colour: #8B4513 (coffee brown).
 *
 * @package Kafanek_Obchodnik
 */

/* ═══════════════════════════════════════════════
   1. Product Showcase
   ═══════════════════════════════════════════════ */

.ko-product-showcase__heading {
	text-align: center;
	margin-bottom: 28px;
	font-weight: 700;
	color: #333;
}

.ko-product-showcase__grid {
	display: grid;
	gap: 24px;
}

.ko-product-showcase__grid--cols-1 { grid-template-columns: 1fr; }
.ko-product-showcase__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ko-product-showcase__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ko-product-showcase__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }

.ko-product-card {
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
	display: flex;
	flex-direction: column;
}

.ko-product-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.ko-product-card__image-link {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 1 / 1;
}

.ko-product-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

.ko-product-card:hover .ko-product-card__image {
	transform: scale(1.05);
}

.ko-product-card__image--placeholder {
	background: linear-gradient(135deg, #f5ebe0, #d5c4a1);
}

.ko-product-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: #e74c3c;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	padding: 4px 10px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	z-index: 1;
}

.ko-product-card__body {
	padding: 16px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.ko-product-card__title-link {
	text-decoration: none;
	color: inherit;
}

.ko-product-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 8px;
	line-height: 1.4;
	color: #333;
}

.ko-product-card__rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-bottom: 8px;
	font-size: 13px;
}

.ko-product-card__rating .star-rating {
	font-size: 13px;
}

.ko-product-card__rating-count {
	color: #999;
	font-size: 12px;
}

.ko-product-card__price {
	font-size: 16px;
	font-weight: 700;
	color: #8B4513;
	margin-bottom: 12px;
	margin-top: auto;
}

.ko-product-card__price del {
	color: #999;
	font-weight: 400;
	font-size: 13px;
}

.ko-product-card__price ins {
	text-decoration: none;
}

.ko-product-card__actions {
	margin-top: 4px;
}

.ko-product-card__cart-btn {
	display: inline-block;
	width: 100%;
	text-align: center;
	padding: 10px 16px;
	background: #8B4513;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
	text-decoration: none;
}

.ko-product-card__cart-btn:hover {
	filter: brightness(1.1);
	transform: scale(1.02);
	color: #fff;
}

/* ═══════════════════════════════════════════════
   2. Promotions Banner
   ═══════════════════════════════════════════════ */

.ko-promo-banner {
	background: #8B4513;
	color: #fff;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
	margin-bottom: 16px;
}

.ko-promo-banner__content {
	max-width: 640px;
	margin: 0 auto;
}

.ko-promo-banner__discount {
	display: inline-block;
	background: rgba(255, 255, 255, 0.2);
	padding: 6px 18px;
	border-radius: 20px;
	font-size: 22px;
	font-weight: 800;
	margin-bottom: 12px;
	letter-spacing: 1px;
}

.ko-promo-banner__title {
	font-size: 24px;
	font-weight: 700;
	margin: 0 0 8px;
	color: inherit;
}

.ko-promo-banner__desc {
	font-size: 15px;
	opacity: 0.9;
	margin: 0 0 20px;
}

/* Countdown */
.ko-countdown {
	display: flex;
	justify-content: center;
	gap: 16px;
	margin-bottom: 20px;
}

.ko-countdown__segment {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 60px;
}

.ko-countdown__number {
	font-size: 32px;
	font-weight: 800;
	line-height: 1;
	background: rgba(255, 255, 255, 0.15);
	padding: 10px 14px;
	border-radius: 8px;
	font-variant-numeric: tabular-nums;
}

.ko-countdown__label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 1px;
	margin-top: 6px;
	opacity: 0.8;
}

/* CTA */
.ko-promo-banner__cta {
	display: inline-block;
	background: #fff;
	color: #8B4513;
	padding: 12px 32px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ko-promo-banner__cta:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	color: #8B4513;
}

/* ═══════════════════════════════════════════════
   3. Loyalty Dashboard
   ═══════════════════════════════════════════════ */

.ko-loyalty {
	background: #fff;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Tier badge */
.ko-loyalty__tier {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 16px;
	margin-bottom: 16px;
	border-bottom: 2px solid #f0e8df;
}

.ko-loyalty__tier-icon {
	font-size: 20px;
}

.ko-loyalty__tier-name {
	font-size: 20px;
	font-weight: 700;
	color: #333;
}

.ko-loyalty__multiplier {
	margin-left: auto;
	font-size: 13px;
	font-weight: 600;
	background: #f5ebe0;
	padding: 4px 12px;
	border-radius: 12px;
	color: #8B4513;
}

/* Points */
.ko-loyalty__points {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 20px;
}

.ko-loyalty__points-label {
	font-size: 14px;
	color: #777;
}

.ko-loyalty__points-value {
	font-size: 28px;
	font-weight: 800;
	color: #8B4513;
}

/* Progress bar */
.ko-loyalty__progress-section {
	margin-bottom: 20px;
}

.ko-loyalty__progress-label {
	font-size: 13px;
	color: #777;
	margin-bottom: 8px;
}

.ko-loyalty__progress-bar {
	height: 10px;
	background: #f0e8df;
	border-radius: 5px;
	overflow: hidden;
}

.ko-loyalty__progress-fill {
	height: 100%;
	background: #8B4513;
	border-radius: 5px;
	transition: width 0.8s ease;
}

/* Rewards */
.ko-loyalty__rewards {
	border-top: 1px solid #f0e8df;
	padding-top: 16px;
}

.ko-loyalty__rewards-heading {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
	color: #333;
}

.ko-loyalty__rewards-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ko-loyalty__reward {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
}

.ko-loyalty__reward--available {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
}

.ko-loyalty__reward--locked {
	background: #fafafa;
	border: 1px solid #e5e5e5;
	opacity: 0.7;
}

.ko-loyalty__reward-name {
	font-weight: 600;
	flex: 1;
	color: #333;
}

.ko-loyalty__reward-points {
	font-weight: 700;
	color: #8B4513;
	white-space: nowrap;
}

.ko-loyalty__reward-short {
	font-size: 12px;
	color: #999;
	white-space: nowrap;
}

/* Guest view */
.ko-loyalty--guest {
	text-align: center;
	background: linear-gradient(135deg, #f5ebe0, #fff);
}

.ko-loyalty__guest-heading {
	font-size: 20px;
	font-weight: 700;
	margin: 0 0 8px;
	color: #333;
}

.ko-loyalty__guest-desc {
	font-size: 14px;
	color: #666;
	margin: 0 0 20px;
}

.ko-loyalty__cta {
	display: inline-block;
	background: #8B4513;
	color: #fff;
	padding: 12px 28px;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: transform 0.2s ease;
}

.ko-loyalty__cta:hover {
	transform: scale(1.05);
	color: #fff;
}

/* ═══════════════════════════════════════════════
   4. Newsletter Form
   ═══════════════════════════════════════════════ */

.ko-newsletter {
	background: #FDF5E6;
	padding: 30px;
	border-radius: 12px;
	text-align: center;
}

.ko-newsletter__heading {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 8px;
	color: #333;
}

.ko-newsletter__desc {
	font-size: 14px;
	color: #666;
	margin: 0 0 20px;
}

/* Inline layout */
.ko-newsletter__form--inline .ko-newsletter__fields {
	display: flex;
	gap: 8px;
	justify-content: center;
	flex-wrap: wrap;
	max-width: 540px;
	margin: 0 auto;
}

/* Stacked layout */
.ko-newsletter__form--stacked .ko-newsletter__fields {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-width: 400px;
	margin: 0 auto;
}

.ko-newsletter__input {
	padding: 12px 16px;
	border: 1px solid #d5c4a1;
	border-radius: 8px;
	font-size: 14px;
	outline: none;
	transition: border-color 0.2s ease;
	background: #fff;
	min-width: 0;
}

.ko-newsletter__input:focus {
	border-color: #8B4513;
}

.ko-newsletter__form--inline .ko-newsletter__input--email {
	flex: 1;
	min-width: 200px;
}

.ko-newsletter__submit {
	padding: 12px 24px;
	background: #8B4513;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.2s ease, transform 0.15s ease;
	white-space: nowrap;
}

.ko-newsletter__submit:hover {
	filter: brightness(1.1);
	transform: scale(1.02);
}

.ko-newsletter__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.ko-newsletter__gdpr {
	font-size: 11px;
	color: #999;
	margin: 12px auto 0;
	max-width: 440px;
}

.ko-newsletter__message {
	margin-top: 12px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
}

.ko-newsletter__message--success {
	background: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.ko-newsletter__message--error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ═══════════════════════════════════════════════
   5. Stats Counter
   ═══════════════════════════════════════════════ */

.ko-stats {
	display: grid;
	gap: 0;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.ko-stats--cols-2 { grid-template-columns: repeat(2, 1fr); }
.ko-stats--cols-3 { grid-template-columns: repeat(3, 1fr); }
.ko-stats--cols-4 { grid-template-columns: repeat(4, 1fr); }

.ko-stats__item {
	text-align: center;
	padding: 28px 16px;
}

.ko-stats__item:not(:last-child) {
	border-right: 1px solid #e0d5c7;
}

.ko-stats__value-wrap {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	margin-bottom: 8px;
}

.ko-stats__value {
	font-size: 36px;
	font-weight: 800;
	color: #8B4513;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.ko-stats__prefix,
.ko-stats__suffix {
	font-size: 20px;
	font-weight: 700;
	color: #8B4513;
	opacity: 0.7;
}

.ko-stats__label {
	font-size: 13px;
	color: #555;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════════
   6. Responsive
   ═══════════════════════════════════════════════ */

@media (max-width: 768px) {
	.ko-product-showcase__grid--cols-3,
	.ko-product-showcase__grid--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.ko-stats--cols-3,
	.ko-stats--cols-4 {
		grid-template-columns: repeat(2, 1fr);
	}

	.ko-stats__item:not(:last-child) {
		border-right: none;
	}

	.ko-stats__item:nth-child(odd) {
		border-right: 1px solid #e0d5c7;
	}

	.ko-stats__value {
		font-size: 28px;
	}

	.ko-countdown__number {
		font-size: 24px;
		padding: 8px 10px;
	}

	.ko-countdown {
		gap: 10px;
	}

	.ko-newsletter__form--inline .ko-newsletter__fields {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.ko-product-showcase__grid--cols-2,
	.ko-product-showcase__grid--cols-3,
	.ko-product-showcase__grid--cols-4 {
		grid-template-columns: 1fr;
	}

	.ko-stats--cols-2,
	.ko-stats--cols-3,
	.ko-stats--cols-4 {
		grid-template-columns: 1fr;
	}

	.ko-stats__item:not(:last-child) {
		border-right: none;
		border-bottom: 1px solid #e0d5c7;
	}

	.ko-promo-banner {
		padding: 20px;
	}

	.ko-promo-banner__discount {
		font-size: 18px;
	}

	.ko-promo-banner__title {
		font-size: 20px;
	}
}
