/* ==========================================================
   DressPeru Size + Add to Cart Module (core/theme side)
   ========================================================== */

/* -------------------------------
   Size picker UI
-------------------------------- */
body.single-product .dp-core-size-picker,
.dp-size-atc-shortcode .dp-core-size-picker {
	margin: 14px 0 16px;
}

body.single-product .dp-core-size-picker__title,
.dp-size-atc-shortcode .dp-core-size-picker__title {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.2;
	color: #212121;
}

body.single-product .dp-core-size-picker__title strong,
.dp-size-atc-shortcode .dp-core-size-picker__title strong {
    font-size: 14px;
	letter-spacing: 0.01em;
    font-weight: 400;
}

body.single-product .dp-core-size-picker__current,
.dp-size-atc-shortcode .dp-core-size-picker__current {
    font-size: 14px;
	color: #8f8f8f;
}

body.single-product .dp-core-size-picker__grid,
.dp-size-atc-shortcode .dp-core-size-picker__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
}

body.single-product .dp-core-size-option,
.dp-size-atc-shortcode .dp-core-size-option {
	border: 1px solid #d8d8d8;
	background: #fff;
	color: #1f1f1f;
	font-size: 14px;
	line-height: 1;
	min-height: 30px;
	padding: 0px 10px;
	cursor: pointer;
    text-align: center;
	transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

body.single-product .dp-core-size-option:hover,
.dp-size-atc-shortcode .dp-core-size-option:hover {
	border-color: #222;
}

body.single-product .dp-core-size-option.is-selected,
.dp-size-atc-shortcode .dp-core-size-option.is-selected {
	border-color: #1d1d1d;
	background: #1d1d1d;
	color: #fff;
}

body.single-product .dp-core-size-option:disabled,
body.single-product .dp-core-size-option[disabled],
body.single-product .dp-core-size-option.is-disabled,
.dp-size-atc-shortcode .dp-core-size-option:disabled,
.dp-size-atc-shortcode .dp-core-size-option[disabled],
.dp-size-atc-shortcode .dp-core-size-option.is-disabled {
	opacity: 1 !important;
	background: #f2f2f2 !important;
	background-image: linear-gradient(#f2f2f2, #f2f2f2) !important;
	border-color: #d6d6d6 !important;
	border-style: dashed !important;
	color: #9a9a9a !important;
	-webkit-text-fill-color: #9a9a9a !important;
	text-decoration: line-through;
	cursor: not-allowed !important;
	pointer-events: none;
}

/* Hide native WooCommerce size select once replaced by module UI */
body.single-product .dp-core-size-native-row-hidden,
body.single-product .dp-core-size-native-hidden {
	display: none !important;
}

/* Hide native color selector in module form (color is handled by swatches UI) */
.dp-size-atc-native-form select[name="attribute_pa_color"],
.dp-size-atc-native-form select[name="attribute_color"] {
	display: none !important;
}

.dp-size-atc-native-form .variations tr.dp-core-color-row-hidden,
body.single-product .variations tr.dp-core-color-row-hidden {
	display: none !important;
}

body.single-product form.cart .variations {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	height: 0 !important;
	min-height: 0 !important;
}

/* -------------------------------
   Quantity + add to cart row
-------------------------------- */
body.single-product form.cart .dp-core-atc-row {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	align-items: stretch;
	width: 100%;
}

body.single-product form.cart .reset_variations {
	display: none !important;
}

body.single-product form.cart .single_variation_wrap > .woocommerce-variation.single_variation {
	display: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-height: 0 !important;
}

body.single-product form.cart .dp-core-atc-row .woocommerce-variation-price,
body.single-product form.cart .dp-core-atc-row .woocommerce-variation-availability,
body.single-product form.cart .dp-core-atc-row .reset_variations {
	display: none !important;
}

body.single-product form.cart .dp-core-atc-row .quantity {
	margin: 0;
	min-height: 56px;
	display: flex;
	border: 1px solid #ddd6d0;
	background: #fff;
	align-items: stretch;
	overflow: hidden;
	width: auto !important;
	min-width: 104px;
	max-width: 112px !important;
}
form.cart .quantity input, form.woocommerce-cart-form .quantity input {
    order: initial !important;
}

body.single-product form.cart .dp-core-atc-row .quantity .dp-core-qty-btn--minus {
	grid-column: 1;
}

body.single-product form.cart .dp-core-atc-row .quantity .qty {
	grid-column: 2;
	width: 100% !important;
	max-width: none !important;
}

body.single-product form.cart .dp-core-atc-row .quantity .dp-core-qty-btn--plus {
	grid-column: 3;
}

body.single-product form.cart .dp-core-atc-row .quantity .qty {
	border: 0;
	min-height: 54px;
	text-align: center;
	font-size: 14px;
	font-weight: 400;
	margin: 0;
	padding: 0;
	width: 100%;
	box-shadow: none;
	background: transparent;
	appearance: textfield;
	-moz-appearance: textfield;
}

body.single-product form.cart .dp-core-atc-row .quantity .qty::-webkit-outer-spin-button,
body.single-product form.cart .dp-core-atc-row .quantity .qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

body.single-product form.cart .dp-core-atc-row .dp-core-qty-btn {
	border: 0;
	background: #fff;
	color: #111;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	font-weight: 300;
	border-radius: 0;
	box-shadow: none;
	width: 34px;
	min-width: 34px;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button {
	margin: 0;
	min-height: 56px;
	width: 100%;
	border: 0;
	background: #d85a67;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 0 18px;
	font-size: 18px;
	font-weight: 600;
	letter-spacing: -0.01em;
	border-radius: 0;
	box-shadow: none;
	text-transform: none;
	justify-content: space-between;
	flex-wrap: nowrap;
	white-space: nowrap;
}

body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button .dp-core-atc-label {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.1;
	white-space: nowrap;
}

body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button .dp-core-atc-price {
	font-size: 16px;
	font-weight: 700;
	white-space: nowrap;
}

body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button.disabled {
	opacity: 1;
	filter: none;
}


/* Tablet */
@media (min-width: 768px) {
	body.single-product .dp-core-size-picker__grid,
	.dp-size-atc-shortcode .dp-core-size-picker__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	body.single-product form.cart .dp-core-atc-row {
		grid-template-columns: 104px 1fr;
	}

	body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button {
		justify-content: space-between;
	}

	body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button .dp-core-atc-label {
		font-size: 14px;
        font-weight: 700;
	}
}


/* Desktop */
@media (min-width: 1024px) {
	body.single-product .dp-core-size-picker__grid,
	.dp-size-atc-shortcode .dp-core-size-picker__grid {
		grid-template-columns: repeat(4, minmax(56px, 1fr));
	}

	body.single-product form.cart .dp-core-atc-row {
		grid-template-columns: 112px 1fr;
	}

	body.single-product form.cart .dp-core-atc-row .quantity {
		min-height: 56px;
	}

	body.single-product form.cart .dp-core-atc-row .single_add_to_cart_button.dp-core-atc-button {
		justify-content: space-between;
		gap: 14px;
	}
}
