/**
 * Craftory Box — Product calculator responsive (< 1000px)
 */

/* ==========================================================================
   ≤1000px
   ========================================================================== */
@media (max-width: 1000px) {
	.product-calc__inner {
		padding-block: clamp(32px, 6vw, 48px) clamp(48px, 10vw, 72px);
	}

	.product-calc__head {
		margin-bottom: clamp(24px, 5vw, 36px);
		padding-bottom: clamp(20px, 4vw, 28px);
	}

	.product-calc h1.product-calc__title {
		font-size: clamp(24px, 5.8vw, 36px);
	}

	.product-page p.product-calc__lead,
	.catalog-page p.product-calc__lead {
		white-space: normal;
		font-size: clamp(15px, 3.6vw, 18px);
		line-height: 1.35;
	}

	.product-calc__layout {
		grid-template-columns: 1fr;
		gap: clamp(24px, 5vw, 32px);
		margin-bottom: clamp(28px, 6vw, 40px);
	}

	.product-calc__preview {
		min-height: clamp(200px, 45vw, 320px);
	}

	.product-calc h2.product-calc__product-title {
		font-size: clamp(20px, 4.8vw, 28px);
		text-align: center;
	}

	.product-calc__gallery {
		gap: 12px;
		margin-bottom: clamp(20px, 4vw, 28px);
	}

	.product-calc__sizes-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 12px;
	}

	.product-calc__custom-fields {
		grid-template-columns: 1fr;
	}

	.product-calc__field--action {
		margin-top: 4px;
	}

	.product-calc__field-spacer {
		display: none;
	}

	.product-calc__pricing {
		padding-top: clamp(24px, 5vw, 32px);
	}

	.product-calc__table-wrap {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		margin-inline: calc(-1 * var(--front-gutter));
		padding-inline: var(--front-gutter);
		scrollbar-width: thin;
	}

	.product-calc__table {
		width: max-content;
		min-width: 100%;
		table-layout: auto;
	}

	.product-calc__table th,
	.product-calc__table td {
		min-width: 52px;
		white-space: nowrap;
	}

	.product-calc__table thead th:first-child,
	.product-calc__table tbody th {
		position: sticky;
		left: 0;
		z-index: 1;
		min-width: 72px;
		box-shadow: 1px 0 0 rgba(198, 161, 91, 0.55);
	}

	.product-calc__qty-fields {
		flex-direction: column;
		align-items: stretch;
	}

	.product-calc__pricing .product-calc__field--qty,
	.product-calc__pricing .product-calc__field--price {
		width: 100%;
	}

	.product-calc__summary {
		align-items: stretch;
	}

	.product-calc p.product-calc__total {
		justify-content: center;
		text-align: center;
	}

	.product-calc__checkout-error {
		max-width: none;
		text-align: center;
	}

	.product-calc__submit {
		width: 100%;
		max-width: none;
	}
}

/* ==========================================================================
   ≤480px
   ========================================================================== */
@media (max-width: 480px) {
	.product-calc__sizes-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.product-calc__size {
		padding: 10px 12px;
		font-size: 13px;
		white-space: normal;
	}

	.product-calc__thumb {
		width: 72px;
		height: 72px;
	}

	.product-calc__gallery-nav {
		width: 16px;
		height: 28px;
	}

	.product-calc__table th,
	.product-calc__table td {
		padding: 8px 4px;
		font-size: 12px;
	}
}
