/**
 * Gemora – Style stron produktów
 * assets/css/product-page.css
 *
 * Ładowany TYLKO na stronach produktów przez wp_enqueue_style() w inc/product-functions.php.
 * LiteSpeed Cache cache'uje ten plik jako osobny asset.
 *
 * UWAGA na specyficzność:
 * Style checkboxów #dedykacja-box i #dedykacja-bransoletki-box używają selektorów ID
 * które celowo nadpisują globalne style EPO z style.css (.tm-extra-product-options).
 * NIE zmieniaj kolejności sekcji.
 */

/* ============================================================
   1. Tytuł produktu (split: main + subtitle)
   ============================================================ */

.product_title.entry-title {
	display: flex !important;
	flex-direction: column !important;
	gap: 4px !important;
}
.gemora-title-main {
	display: block;
	font-size: 20px !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	color: #4a122b !important;
	text-align: left !important;
}
@media (min-width: 768px) {
	.gemora-title-main { font-size: 23px !important; }
}
.gemora-title-sub {
	display: block;
	font-size: 15px !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	color: #6B5060 !important;
	letter-spacing: 0 !important;
}
.product_title.entry-title:not(:has(.gemora-title-main)) { font-size: 19px !important; }
@media (min-width: 768px) {
	.product_title.entry-title:not(:has(.gemora-title-main)) { font-size: 22px !important; }
}
@media (max-width: 767px) {
	.product_title.entry-title { margin-top: 10px !important; }
}

/* ============================================================
   2. Checkbox dedykacji — wspólna baza dla obu wariantów
   Selektory ID nadpisują globalne style EPO z style.css
   ============================================================ */

#dedykacja-box,
#dedykacja-bransoletki-box {
	border: 1.5px solid #E8DDE2 !important;
	border-radius: 10px !important;
	padding: 0 !important;
	margin-bottom: 6px !important;
	transition: border-color .2s, background .2s;
}
#dedykacja-box:has(input:checked),
#dedykacja-box.is-checked,
#dedykacja-bransoletki-box:has(input:checked),
#dedykacja-bransoletki-box.is-checked {
	border-color: #6B1A33 !important;
	background: #FDF8F9 !important;
}

#dedykacja-box ul.tmcp-ul-wrap,
#dedykacja-box li.tmcp-field-wrap,
#dedykacja-box .tmcp-field-wrap-inner,
#dedykacja-box .tc-col.tc-field-label-wrap,
#dedykacja-bransoletki-box ul.tmcp-ul-wrap,
#dedykacja-bransoletki-box li.tmcp-field-wrap,
#dedykacja-bransoletki-box .tmcp-field-wrap-inner,
#dedykacja-bransoletki-box .tc-col.tc-field-label-wrap {
	display: block !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	border: none !important;
	background: none !important;
}

/* KLUCZOWE: nadpisuje flex-direction:column z style.css */
#dedykacja-box label.tc-col.tm-epo-field-label,
#dedykacja-box label.tc-col.tm-epo-field-label.fullwidth,
#dedykacja-bransoletki-box label.tc-col.tm-epo-field-label,
#dedykacja-bransoletki-box label.tc-col.tm-epo-field-label.fullwidth {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	text-align: left !important;
	gap: 10px !important;
	cursor: pointer !important;
	width: 100% !important;
	padding: 11px 14px !important;
	margin: 0 !important;
	box-sizing: border-box !important;
}

#dedykacja-box .tc-label-wrap,
#dedykacja-bransoletki-box .tc-label-wrap {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex: 1 1 auto !important;
	width: auto !important;
	gap: 10px !important;
	flex-wrap: nowrap !important;
}
#dedykacja-box .tc-epo-style-wrapper,
#dedykacja-bransoletki-box .tc-epo-style-wrapper { display: none !important; }

#dedykacja-box .gemora-native-chk,
#dedykacja-bransoletki-box .gemora-native-chk {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	accent-color: #6B1A33 !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	align-self: center !important;
	margin: 0 !important;
}

#dedykacja-box span.tc-col.tc-label.tm-label,
#dedykacja-bransoletki-box span.tc-col.tc-label.tm-label {
	display: flex !important;
	align-items: center !important;
	flex: 1 1 auto !important;
	text-align: left !important;
}
#dedykacja-box .tc-label-inner.no-desc,
#dedykacja-bransoletki-box .tc-label-inner.no-desc {
	display: flex !important;
	align-items: center !important;
	width: 100% !important;
	text-align: left !important;
}
#dedykacja-box .tc-col-auto.tc-epo-style-space.tc-price-wrap,
#dedykacja-bransoletki-box .tc-col-auto.tc-epo-style-space.tc-price-wrap {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	width: 100% !important;
	text-align: left !important;
	gap: 8px !important;
}

/* Nadpisuje font-size:13px color:#232323 z style.css */
#dedykacja-box .before-amount,
#dedykacja-bransoletki-box .before-amount {
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #1A1014 !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}
#dedykacja-bransoletki-box .before-amount { flex: 1 1 auto !important; }

/* Ikona ołówka przed etykietą (dedykacja-box) */
#dedykacja-box .before-amount::before {
	content: '';
	display: inline-flex;
	width: 15px; height: 15px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236B1A33' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.5 3.5a2.121 2.121 0 013 3L7 19l-4 1 1-4 12.5-12.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

/* Ikona pudełka przed etykietą (dedykacja-bransoletki-box) */
.tc-extra-product-options #dedykacja-bransoletki-box .before-amount::before,
.custom-woo-cart-button #dedykacja-bransoletki-box .tc-price-wrap .before-amount::before,
#dedykacja-bransoletki-box .before-amount::before {
	content: '';
	display: inline-flex;
	width: 15px; height: 15px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236B1A33' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12V22H4V12'/%3E%3Cpath d='M22 7H2v5h20V7z'/%3E%3Cpath d='M12 22V7'/%3E%3Cpath d='M12 7H7.5a2.5 2.5 0 010-5C11 2 12 7 12 7z'/%3E%3Cpath d='M12 7h4.5a2.5 2.5 0 000-5C13 2 12 7 12 7z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

@media (max-width: 600px) {
	#dedykacja-box .before-amount::before,
	#dedykacja-bransoletki-box .before-amount::before { display: none !important; }
}

/* Cena przy checkboxie — nadpisuje color:#232323 z style.css */
#dedykacja-box .tc-price,
#dedykacja-bransoletki-box .price.tc-price {
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #6B1A33 !important;
	white-space: nowrap !important;
	margin-left: auto !important;
	flex-shrink: 0 !important;
}
#dedykacja-box .tc-price .woocommerce-Price-amount,
#dedykacja-bransoletki-box .price.tc-price .woocommerce-Price-amount,
.custom-woo-cart-button #dedykacja-bransoletki-box .tc-price .woocommerce-Price-amount { color: #6B1A33 !important; }

#dedykacja-box .tc-price::before,
#dedykacja-bransoletki-box .price.tc-price::before,
.custom-woo-cart-button #dedykacja-bransoletki-box .tc-price::before { content: '+' !important; }

/* Ukryj opis pod checkboxem bransoletki */
#dedykacja-bransoletki-box .tm-description { display: none !important; }

/* ============================================================
   2b. Checkboxy "Umieść grawer na odwrocie"
   ============================================================ */

#umiesc-ten-sam-grawer,
#umiesc-inny-grawer {
	border: 1.5px solid #E8DDE2 !important;
	border-radius: 10px !important;
	padding: 0 !important;
	margin-bottom: 6px !important;
	transition: border-color .2s, background .2s;
}
#umiesc-ten-sam-grawer:has(input:checked),
#umiesc-ten-sam-grawer.is-checked,
#umiesc-inny-grawer:has(input:checked),
#umiesc-inny-grawer.is-checked {
	border-color: #6B1A33 !important;
	background: #FDF8F9 !important;
}
#umiesc-ten-sam-grawer ul.tmcp-ul-wrap,
#umiesc-ten-sam-grawer li.tmcp-field-wrap,
#umiesc-ten-sam-grawer .tmcp-field-wrap-inner,
#umiesc-ten-sam-grawer .tc-col.tc-field-label-wrap,
#umiesc-inny-grawer ul.tmcp-ul-wrap,
#umiesc-inny-grawer li.tmcp-field-wrap,
#umiesc-inny-grawer .tmcp-field-wrap-inner,
#umiesc-inny-grawer .tc-col.tc-field-label-wrap {
	display: block !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	list-style: none !important;
	border: none !important;
	background: none !important;
}
#umiesc-ten-sam-grawer label.tc-col.tm-epo-field-label,
#umiesc-ten-sam-grawer label.tc-col.tm-epo-field-label.fullwidth,
#umiesc-inny-grawer label.tc-col.tm-epo-field-label,
#umiesc-inny-grawer label.tc-col.tm-epo-field-label.fullwidth {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	justify-content: flex-start !important;
	text-align: left !important;
	gap: 10px !important;
	cursor: pointer !important;
	width: 100% !important;
	padding: 11px 14px !important;
	margin: 0 !important;
	box-sizing: border-box !important;
}
#umiesc-ten-sam-grawer .tc-label-wrap,
#umiesc-inny-grawer .tc-label-wrap {
	display: flex !important;
	flex-direction: row !important;
	align-items: center !important;
	flex: 1 1 auto !important;
	gap: 10px !important;
	flex-wrap: nowrap !important;
}
#umiesc-ten-sam-grawer .tc-epo-style-wrapper,
#umiesc-inny-grawer .tc-epo-style-wrapper { display: none !important; }

#umiesc-ten-sam-grawer .tc-label-text,
#umiesc-inny-grawer .tc-label-text {
	font-size: 12px !important;
	font-weight: 600 !important;
	color: #1A1014 !important;
	font-family: inherit !important;
	display: inline-flex !important;
	align-items: center !important;
	gap: 6px !important;
}

/* Ikona kopiowania */
#umiesc-ten-sam-grawer .tc-label-text::before {
	content: '';
	display: inline-flex;
	width: 15px; height: 15px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236B1A33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2'/%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

/* Ikona ołówka */
#umiesc-inny-grawer .tc-label-text::before {
	content: '';
	display: inline-flex;
	width: 15px; height: 15px;
	flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%236B1A33' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7'/%3E%3Cpath d='M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
}

@media (max-width: 600px) {
	#umiesc-ten-sam-grawer .tc-label-text::before,
	#umiesc-inny-grawer .tc-label-text::before { display: none !important; }
}

#umiesc-ten-sam-grawer .price.tc-price,
#umiesc-inny-grawer .price.tc-price {
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #6B1A33 !important;
	white-space: nowrap !important;
	margin-left: auto !important;
	flex-shrink: 0 !important;
}
#umiesc-ten-sam-grawer .price.tc-price .woocommerce-Price-amount,
#umiesc-inny-grawer .price.tc-price .woocommerce-Price-amount { color: #6B1A33 !important; }
#umiesc-ten-sam-grawer .price.tc-price::before,
#umiesc-inny-grawer .price.tc-price::before { content: '+' !important; }

#umiesc-ten-sam-grawer .gemora-native-chk,
#umiesc-inny-grawer .gemora-native-chk {
	width: 18px !important;
	height: 18px !important;
	min-width: 18px !important;
	accent-color: #6B1A33 !important;
	cursor: pointer !important;
	flex-shrink: 0 !important;
	align-self: center !important;
	margin: 0 !important;
}

/* ============================================================
   3. Textarea / pola tekstowe EPO
   ============================================================ */

.custom-woo-cart-button textarea.poletekstowe,
.poletekstowe-div textarea,
textarea.tmcp-textarea {
	border-radius: 9px !important;
	border: 1.5px solid #E8DDE2 !important;
	padding: 12px !important;
	font-family: inherit !important;
	font-size: 16px !important;
	line-height: 1.5 !important;
	vertical-align: top !important;
	outline: none !important;
	transition: border-color .2s !important;
	resize: vertical !important;
	box-sizing: border-box !important;
}
.custom-woo-cart-button textarea.poletekstowe:focus,
.poletekstowe-div textarea:focus,
textarea.tmcp-textarea:focus { border-color: #6B1A33 !important; }

/* Krótkie pole */
textarea.krotkie-pole,
.custom-woo-cart-button textarea.krotkie-pole,
.tc-extra-product-options textarea.krotkie-pole {
	height: 42px !important;
	min-height: 42px !important;
	line-height: 42px !important;
	padding: 0 12px !important;
	overflow-y: hidden !important;
	resize: none !important;
	border-radius: 9px !important;
	border: 1.5px solid #E8DDE2 !important;
	font-size: 16px !important;
	font-family: inherit !important;
	box-sizing: border-box !important;
	display: block !important;
	vertical-align: middle !important;
}
.tc-extra-product-options label.tc-col.tm-epo-field-label.fullwidth:has(textarea.krotkie-pole) {
	flex-direction: column !important;
	align-items: flex-start !important;
	justify-content: flex-start !important;
}

/* ============================================================
   4. Select EPO
   ============================================================ */

.tmcp-select.tm-epo-field,
select.tmcp-select,
.tc-extra-product-options select {
	border-radius: 9px !important;
	border: 1.5px solid #E8DDE2 !important;
	padding: 8px 36px 8px 12px !important;
	font-family: inherit !important;
	font-size: 15px !important;
	line-height: 1.4 !important;
	outline: none !important;
	transition: border-color .2s !important;
	box-sizing: border-box !important;
	width: 100% !important;
	background-color: #fff !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B1A33' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat !important;
	background-position: right 14px center !important;
}
.tmcp-select.tm-epo-field:focus,
select.tmcp-select:focus,
.tc-extra-product-options select:focus { border-color: #6B1A33 !important; }

/* ============================================================
   5. Produkty proste — ilość + przycisk "Dodaj do koszyka"
   ============================================================ */

form.cart:not(.variations_form) {
	display: flex !important;
	align-items: center !important;
	gap: 9px !important;
	flex-wrap: nowrap !important;
}


.kwt-add-to-cart-wrap form.cart:not(.variations_form) {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100% !important;
    flex-wrap: nowrap !important;
}

.kwt-add-to-cart-wrap form.cart:not(.variations_form) .single_add_to_cart_button {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
}


.quantity.spinners-added {
	display: flex !important;
	align-items: center !important;
	border: 1.5px solid #E8DDE2 !important;
	border-radius: 9px !important;
	background: #fff !important;
	overflow: hidden !important;
	height: 50px !important;
	padding: 0 !important;
	width: fit-content !important;
	flex-shrink: 0 !important;
}
.quantity.spinners-added input.minus,
.quantity.spinners-added input.plus {
	width: 40px !important; height: 50px !important;
	background: none !important; border: none !important;
	box-shadow: none !important; font-size: 18px !important;
	color: #6B1A33 !important; cursor: pointer !important;
	padding: 0 !important; margin: 0 !important;
	border-radius: 0 !important; line-height: 1 !important;
	transition: background .15s !important;
	-webkit-appearance: none !important; appearance: none !important;
}
.quantity.spinners-added input.minus:hover,
.quantity.spinners-added input.plus:hover { background: #F9F0F3 !important; }

.quantity.spinners-added input.qty {
	width: 36px !important; height: 50px !important;
	text-align: center !important; font-size: 15px !important;
	font-weight: 600 !important; border: none !important;
	outline: none !important; background: none !important;
	color: #1A1014 !important; padding: 0 !important;
	box-shadow: none !important; border-radius: 0 !important;
	-moz-appearance: textfield !important;
}
.quantity.spinners-added input.qty::-webkit-outer-spin-button,
.quantity.spinners-added input.qty::-webkit-inner-spin-button { -webkit-appearance: none !important; }

form.cart:not(.variations_form) .single_add_to_cart_button {
	flex: 1 1 0 !important; min-width: 0 !important;
	height: 50px !important; background: #6B1A33 !important;
	color: #fff !important; border: none !important;
	border-radius: 9px !important; font-family: inherit !important;
	font-size: 15px !important; font-weight: 600 !important;
	cursor: pointer !important; display: inline-flex !important;
	align-items: center !important; justify-content: center !important;
	gap: 8px !important; padding: 0 18px !important;
	transition: background .2s, transform .12s !important;
	box-shadow: 0 3px 12px rgba(107,26,51,.22) !important;
	text-transform: none !important; letter-spacing: 0 !important;
	text-decoration: none !important; float: none !important;
	vertical-align: unset !important; line-height: 50px !important;
	width: auto !important;
}
form.cart:not(.variations_form) .single_add_to_cart_button:hover {
	background: #7E1F3D !important;
	transform: translateY(-1px) !important;
}
form.cart:not(.variations_form) .single_add_to_cart_button::before {
	content: ''; display: inline-flex; width: 18px; height: 18px; flex-shrink: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 001.99 1.61h9.72a2 2 0 001.99-1.61L23 6H6'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-size: contain;
}
form.cart:not(.variations_form) .single_add_to_cart_button.added::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='17' height='17' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
}

/* ============================================================
   6. EPO totals — ukryj wizualnie
   ============================================================ */

#tm-epo-totals,
.tc-totals-form {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ============================================================
   7. WCPH (historia cen) i odstępy
   ============================================================ */

.kwt-add-to-cart-single { margin-bottom: 1em !important; }
.only-simple-product + .wc-price-history { display: none !important; }
.only-simple-product + .wc-price-history + p:empty,
.only-simple-product ~ p:empty {
	display: none !important;
	margin: 0 !important; padding: 0 !important;
	height: 0 !important; line-height: 0 !important;
}
.wp-block-kadence-shortcode:has(.gemora-price-includes) {
	margin: 0 !important;
	padding: 0 !important;
}
.product-type-variable .only-simple-product { display: none !important; }
.only-simple-product { display: block; }

/* ============================================================
   8. Widżet "Przewidywana dostawa"
   ============================================================ */

.gemora-del-wrap {
	display: flex; align-items: center; gap: 12px;
	background: #fff; border: 1px solid #E8DDE2; border-radius: 10px;
	padding: 11px 15px; margin: 10px 0; font-size: 13px;
	color: #1A1014; line-height: 1.4; box-sizing: border-box; width: 100%;
}
.gemora-del-logo { flex-shrink: 0; display: flex; align-items: center; }
.gemora-del-text { font-size: 13px; color: #444; }
.gemora-del-text strong { font-weight: 700; color: #1A1014; }

@media (max-width: 480px) {
	.gemora-del-wrap { align-items: flex-start; }
	.gemora-del-logo { padding-top: 2px; }
	.gemora-del-text { display: flex; flex-direction: column; gap: 1px; }
	.gemora-del-text strong { display: block; }
}

/* ============================================================
   9. Widżet "Ogląda teraz X osób"
   ============================================================ */

.gemora-viewers-wrap {
	display: flex; align-items: center; gap: 7px;
	font-size: 13px; color: #444; margin: 8px 0; line-height: 1.4;
}
.gemora-viewers-dot {
	width: 8px; height: 8px; background: #22c55e;
	border-radius: 50%; flex-shrink: 0;
	animation: gemora-pulse 1.8s ease-in-out infinite;
}
@keyframes gemora-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: .5; transform: scale(1.35); }
}
.gemora-viewers-text strong { font-weight: 700; color: #1a1014; }

/* ============================================================
   10. Przycisk wariantów — pełna szerokość
   ============================================================ */

.kwt-add-to-cart-wrap {
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
}
.kwt-add-to-cart-wrap .single_add_to_cart_button {
    flex: 1 1 auto !important;
    width: 100% !important;
}
.kwt-add-to-cart-wrap .woocommerce-variation-add-to-cart,
.kwt-add-to-cart-wrap .woocommerce-variation-add-to-cart-disabled {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}