/* DS WooCommerce Cotizaciones — frontend */

.dswc-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	background: rgba(17, 24, 39, 0.55);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.dswc-modal-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.dswc-modal {
	width: min(420px, 100%);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	transform: translateY(12px) scale(0.98);
	transition: transform 0.2s ease;
}

.dswc-modal-overlay.is-open .dswc-modal {
	transform: translateY(0) scale(1);
}

.dswc-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.25rem 0.75rem;
	border-bottom: 1px solid #ececec;
}

.dswc-modal__title {
	margin: 0;
	font-size: 1.1rem;
	line-height: 1.3;
	color: #111827;
}

.dswc-modal__close {
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	border: 0;
	border-radius: 999px;
	background: #f3f4f6;
	color: #374151;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
}

.dswc-modal__close:hover {
	background: #e5e7eb;
}

.dswc-modal__body {
	display: grid;
	grid-template-columns: 88px 1fr;
	gap: 1rem;
	padding: 1.15rem 1.25rem;
}

.dswc-modal__media {
	width: 88px;
}

.dswc-modal__image {
	width: 88px;
	height: 88px;
	border-radius: 10px;
	object-fit: cover;
	background: #f3f4f6;
	display: block;
}

.dswc-modal__placeholder.is-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #9ca3af;
	font-size: 0.75rem;
}

.dswc-modal__placeholder[hidden],
.dswc-modal__image[hidden] {
	display: none !important;
}

.dswc-modal__meta {
	min-width: 0;
}

.dswc-modal__product-name {
	margin: 0 0 0.85rem;
	font-size: 0.98rem;
	font-weight: 600;
	color: #111827;
	word-break: break-word;
}

.dswc-modal__qty-label {
	display: block;
	margin-bottom: 0.4rem;
	font-size: 0.85rem;
	color: #4b5563;
}

.dswc-modal__qty-row {
	display: inline-flex;
	align-items: center;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	overflow: hidden;
}

.dswc-modal__qty-btn {
	width: 2.25rem;
	height: 2.25rem;
	border: 0;
	background: #f9fafb;
	color: #111827;
	font-size: 1.1rem;
	cursor: pointer;
}

.dswc-modal__qty-btn:hover {
	background: #f3f4f6;
}

.dswc-modal__qty-input {
	width: 3.5rem;
	height: 2.25rem;
	border: 0;
	border-left: 1px solid #d1d5db;
	border-right: 1px solid #d1d5db;
	text-align: center;
	font-size: 0.95rem;
	-moz-appearance: textfield;
}

.dswc-modal__qty-input::-webkit-outer-spin-button,
.dswc-modal__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.dswc-modal__notice {
	grid-column: 1 / -1;
	margin: 0;
	padding: 0.75rem 0.85rem;
	border-radius: 10px;
	background: #fff7ed;
	color: #9a3412;
	font-size: 0.9rem;
}

.dswc-modal__notice[hidden] {
	display: none !important;
}

.dswc-modal__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
	justify-content: flex-end;
	padding: 0.9rem 1.25rem 1.2rem;
	border-top: 1px solid #ececec;
	background: #fafafa;
}

.dswc-modal__footer .button {
	margin: 0;
}

.dswc-modal__footer .button.loading {
	opacity: 0.7;
	pointer-events: none;
}

.dswc-quote-fab {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 99999;
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.75rem 1rem;
	border-radius: 999px;
	background: #111827;
	color: #fff !important;
	text-decoration: none !important;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
	font-size: 0.92rem;
	font-weight: 600;
	line-height: 1;
	transition: transform 0.15s ease, background 0.15s ease;
}

.dswc-quote-fab:hover,
.dswc-quote-fab:focus {
	background: #1f2937;
	color: #fff !important;
	transform: translateY(-2px);
}

.dswc-quote-fab__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.35rem;
	height: 1.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: #f59e0b;
	color: #111827;
	font-size: 0.78rem;
}

.dswc-quote-fab.is-empty .dswc-quote-fab__count {
	background: #6b7280;
	color: #fff;
}

.dswc-toast {
	position: fixed;
	left: 50%;
	bottom: 5.5rem;
	z-index: 100001;
	transform: translateX(-50%) translateY(12px);
	max-width: min(420px, calc(100vw - 2rem));
	padding: 0.85rem 1.1rem;
	border-radius: 12px;
	background: #065f46;
	color: #fff;
	font-size: 0.92rem;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	pointer-events: none;
}

.dswc-toast.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.dswc-toast.is-error {
	background: #991b1b;
}

body.dswc-modal-open {
	overflow: hidden;
}

.dswc-custom-product-content {
	margin: 0.75rem 0;
	padding: 0.85rem 1rem;
	background: #f7f7f7;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	color: #1f2937;
	font-size: 0.95rem;
	line-height: 1.5;
}

.dswc-custom-product-content p:last-child {
	margin-bottom: 0;
}

.dswc-content-before-title {
	margin-top: 0;
	margin-bottom: 0.5rem;
}

.dswc-content-after-title {
	margin-top: 0.35rem;
}

.dswc-content-before-price {
	margin-bottom: 0.35rem;
}

.dswc-content-after-price {
	margin-top: 0.35rem;
}

.dswc-content-after-category {
	margin-top: 0.75rem;
}

.dswc-content-before-description,
.dswc-content-after-description {
	margin: 1.25rem 0;
}

/* Botones de carrito/checkout (bloques WC) — texto legible en hover */
body.dswc-quote-mode .wc-block-cart__submit-button,
body.dswc-quote-mode .wc-block-cart .wc-block-components-button,
body.dswc-quote-mode .wc-block-checkout__actions_row .wc-block-components-button,
body.dswc-quote-mode .woocommerce-cart .checkout-button,
body.dswc-quote-mode .woocommerce-checkout #place_order {
	color: #fff !important;
}

body.dswc-quote-mode .wc-block-cart__submit-button:hover,
body.dswc-quote-mode .wc-block-cart__submit-button:focus,
body.dswc-quote-mode .wc-block-cart .wc-block-components-button:hover,
body.dswc-quote-mode .wc-block-cart .wc-block-components-button:focus,
body.dswc-quote-mode .wc-block-checkout__actions_row .wc-block-components-button:hover,
body.dswc-quote-mode .wc-block-checkout__actions_row .wc-block-components-button:focus,
body.dswc-quote-mode .woocommerce-cart .checkout-button:hover,
body.dswc-quote-mode .woocommerce-cart .checkout-button:focus,
body.dswc-quote-mode .woocommerce-checkout #place_order:hover,
body.dswc-quote-mode .woocommerce-checkout #place_order:focus {
	color: #fff !important;
	background-color: #1f2937 !important;
	border-color: #1f2937 !important;
}

body.dswc-quote-mode .wc-block-components-button:hover .wc-block-components-button__text,
body.dswc-quote-mode .wc-block-components-button:focus .wc-block-components-button__text {
	color: #fff !important;
}

body.dswc-quote-mode .wc-block-components-totals-coupon,
body.dswc-quote-mode .wp-block-woocommerce-cart-order-summary-coupon-form-block,
body.dswc-quote-mode .wp-block-woocommerce-checkout-order-summary-coupon-form-block,
body.dswc-quote-mode .wc-block-components-panel__button[aria-controls*='coupon'] {
	display: none !important;
}

body.dswc-quote-mode.dswc-quote-zero-total .wc-block-components-totals-item,
body.dswc-quote-mode.dswc-quote-zero-total .wc-block-components-totals-footer-item,
body.dswc-quote-mode.dswc-quote-zero-total .wc-block-cart-item__total-price-and-sale-badge,
body.dswc-quote-mode.dswc-quote-zero-total .wc-block-components-order-summary-item__total-price,
body.dswc-quote-mode.dswc-quote-zero-total .wc-block-components-product-price,
body.dswc-quote-mode.dswc-quote-zero-total .cart-subtotal,
body.dswc-quote-mode.dswc-quote-zero-total .order-total {
	display: none !important;
}

@media (max-width: 480px) {
	.dswc-modal__body {
		grid-template-columns: 1fr;
	}

	.dswc-modal__media {
		width: 100%;
	}

	.dswc-modal__image {
		width: 100%;
		height: 160px;
	}

	.dswc-quote-fab {
		right: 0.85rem;
		bottom: 0.85rem;
	}
}
