/* DTK POD Customizer - giao diện trang sản phẩm */

.dtk-wrap {
	--dtk-border: #e2e5ea;
	--dtk-accent: #2f6fed;
	--dtk-muted: #6b7280;
	--dtk-danger: #d63638;
	--dtk-radius: 10px;

	margin: 20px 0 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.dtk-block {
	border: 1px solid var(--dtk-border);
	border-radius: var(--dtk-radius);
	padding: 16px;
	background: #fff;
}

.dtk-block__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
}

.dtk-block__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.dtk-required {
	color: var(--dtk-danger);
	border: 0;
	text-decoration: none;
	margin-left: 2px;
}

.dtk-fee {
	font-size: 13px;
	font-weight: 600;
	color: var(--dtk-accent);
	background: rgba( 47, 111, 237, 0.08 );
	padding: 3px 8px;
	border-radius: 999px;
	white-space: nowrap;
}

.dtk-fee .amount {
	color: inherit;
}

/* --- Vùng kéo thả ảnh --- */

.dtk-dropzone {
	position: relative;
	border: 2px dashed var(--dtk-border);
	border-radius: var(--dtk-radius);
	padding: 22px 16px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
	background: #fafbfc;
}

.dtk-dropzone:hover,
.dtk-dropzone:focus,
.dtk-dropzone.is-dragover {
	border-color: var(--dtk-accent);
	background: rgba( 47, 111, 237, 0.04 );
	outline: none;
}

.dtk-dropzone.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.dtk-dropzone.is-full {
	display: none;
}

.dtk-dropzone__icon {
	width: 30px;
	height: 30px;
	color: var(--dtk-accent);
	margin-bottom: 4px;
}

.dtk-dropzone__text {
	margin: 0;
	font-size: 14px;
	color: #374151;
}

.dtk-dropzone__text strong {
	color: var(--dtk-accent);
	text-decoration: underline;
}

.dtk-dropzone__hint {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--dtk-muted);
}

.dtk-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* --- Ảnh đã tải lên --- */

.dtk-previews {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.dtk-previews:empty {
	margin: 0;
}

.dtk-preview-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px;
	border: 1px solid var(--dtk-border);
	border-radius: 8px;
	background: #fff;
	margin: 0;
}

.dtk-preview-item.is-loading {
	justify-content: center;
	color: var(--dtk-muted);
	font-size: 13px;
	padding: 14px 8px;
}

.dtk-preview-item__img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 6px;
	flex: 0 0 auto;
	background: #f3f4f6;
}

.dtk-preview-item__meta {
	display: flex;
	flex-direction: column;
	min-width: 0;
	flex: 1 1 auto;
}

.dtk-preview-item__name {
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dtk-preview-item__size {
	font-size: 12px;
	color: var(--dtk-muted);
}

.dtk-wrap .dtk-preview-item__remove {
	-webkit-appearance: none;
	appearance: none;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 26px !important;
	height: 26px !important;
	min-width: 26px;
	line-height: 1 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: #f3f4f6 !important;
	color: #6b7280 !important;
	font-size: 18px;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	transition: background 0.15s ease, color 0.15s ease;
}

.dtk-wrap .dtk-preview-item__remove:hover {
	background: var(--dtk-danger) !important;
	color: #fff !important;
}

/* --- Custom chữ --- */

.dtk-field {
	position: relative;
	margin-bottom: 12px;
}

.dtk-field:last-of-type {
	margin-bottom: 0;
}

.dtk-label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 6px;
	color: #374151;
}

.dtk-text-input,
.dtk-select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--dtk-border);
	border-radius: 8px;
	font-size: 14px;
	background: #fff;
	box-sizing: border-box;
}

.dtk-text-input:focus,
.dtk-select:focus {
	border-color: var(--dtk-accent);
	outline: none;
	box-shadow: 0 0 0 3px rgba( 47, 111, 237, 0.12 );
}

.dtk-text-input {
	padding-right: 64px;
}

.dtk-counter {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY( -50% );
	font-size: 12px;
	color: var(--dtk-muted);
	pointer-events: none;
}

.dtk-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/*
 * Theme và Elementor Kit thường áp style riêng cho mọi thẻ <button>
 * (kích thước, padding, bo góc, nền). Khóa cứng hình dạng của swatch
 * để nút luôn là hình tròn đúng kích thước; màu nền được đặt inline
 * ngay trên từng nút.
 */
.dtk-wrap .dtk-swatch {
	-webkit-appearance: none;
	appearance: none;
	display: inline-block;
	box-sizing: border-box;
	width: 32px !important;
	height: 32px !important;
	min-width: 32px;
	min-height: 32px;
	max-width: 32px;
	line-height: 1 !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 2px solid var(--dtk-border) !important;
	border-radius: 50% !important;
	cursor: pointer;
	position: relative;
	text-indent: 0;
	overflow: hidden;
	transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.dtk-wrap .dtk-swatch:hover {
	transform: scale( 1.08 );
}

.dtk-wrap .dtk-swatch.is-active {
	box-shadow: 0 0 0 2px #fff inset, 0 0 0 2px var(--dtk-accent);
	border-color: var(--dtk-accent) !important;
}

.dtk-wrap .dtk-swatch .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect( 1px, 1px, 1px, 1px );
	white-space: nowrap;
}

.dtk-wrap .dtk-color-free {
	width: 60px !important;
	height: 36px !important;
	padding: 2px !important;
	border: 1px solid var(--dtk-border) !important;
	border-radius: 8px !important;
	background: #fff;
	cursor: pointer;
}

.dtk-preview {
	margin-top: 14px;
	padding: 18px 12px;
	border-radius: 8px;
	background: repeating-linear-gradient( 45deg, #f7f8fa, #f7f8fa 10px, #f1f3f6 10px, #f1f3f6 20px );
	text-align: center;
	position: relative;
	min-height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dtk-preview__label {
	position: absolute;
	top: 6px;
	left: 10px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--dtk-muted);
}

.dtk-preview__text {
	font-size: 26px;
	line-height: 1.3;
	word-break: break-word;
	max-width: 100%;
}

.dtk-preview__text.is-placeholder {
	opacity: 0.35;
}

/* --- Lỗi --- */

.dtk-error {
	display: none;
	margin: 10px 0 0;
	font-size: 13px;
	color: var(--dtk-danger);
}

.dtk-error.is-visible {
	display: block;
}

/* --- Giỏ hàng --- */

.dtk-cart-thumbs {
	display: inline-flex;
	gap: 4px;
	vertical-align: middle;
}

.dtk-cart-thumb {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #e2e5ea;
}

.dtk-cart-color {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	border: 1px solid rgba( 0, 0, 0, 0.15 );
	vertical-align: middle;
}

.dtk-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 6px;
	border-radius: 4px;
	background: rgba( 47, 111, 237, 0.1 );
	color: #2f6fed;
	vertical-align: middle;
}

@media ( max-width: 480px ) {
	.dtk-block__head {
		flex-direction: column;
		align-items: flex-start;
	}

	.dtk-preview__text {
		font-size: 22px;
	}
}
