/* PrintForge WooCommerce styling: shop, product page, notices, forms, cart, checkout, account. */

/* ------------------------------------------------------------ breadcrumb and shop header */

.pf-breadcrumb {
	padding: 18px 0 0;
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

.pf-breadcrumb a {
	color: var(--pf-muted);
	text-decoration: none;
}

.pf-breadcrumb a:hover {
	color: var(--pf-ink);
	text-decoration: underline;
}

.pf-crumb-sep {
	margin: 0 8px;
	opacity: 0.6;
}

.pf-shop-hero {
	position: relative;
	margin-top: 14px;
	padding: clamp(28px, 5vw, 64px) 0 clamp(24px, 4vw, 44px);
	overflow: hidden;
}

.pf-shop-hero {
	border-bottom: var(--pf-rule);
	margin-bottom: 28px;
}

.pf-shop-title {
	margin: 0 0 12px;
	max-width: 16ch;
	font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.75rem);
}

.pf-shop-desc {
	max-width: 62ch;
	font-size: 1.125rem;
	color: var(--pf-ink-2);
}

.pf-shop-desc p:last-child {
	margin-bottom: 0;
}

.pf-shop-body {
	padding-bottom: clamp(56px, 8vw, 104px);
}

.pf-shop-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin: 0 0 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--pf-line);
}

.woocommerce-result-count {
	margin: 0;
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

.woocommerce-ordering {
	margin: 0;
}

.woocommerce-ordering select {
	min-height: 44px;
	padding: 0 40px 0 14px;
	border: var(--pf-rule);
	border-radius: 0;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='2' stroke-linecap='square'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center / 18px no-repeat;
	-webkit-appearance: none;
	appearance: none;
	font-weight: 600;
}

.woocommerce-pagination {
	margin-top: 48px;
}

.woocommerce-pagination ul {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.woocommerce-pagination a,
.woocommerce-pagination span {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 12px;
	border: var(--pf-rule);
	border-radius: 0;
	color: var(--pf-ink);
	font-family: var(--pf-mono);
	font-weight: 500;
	text-decoration: none;
}

.woocommerce-pagination .current {
	border-color: var(--pf-ink);
	background: var(--pf-ink);
	color: var(--pf-paper);
}

.woocommerce-info.woocommerce-no-products-found {
	margin: 24px 0;
}

/* ------------------------------------------------------------ notices */

.woocommerce-notices-wrapper {
	max-width: calc(var(--pf-wrap) + var(--pf-gutter) * 2);
	margin: 0 auto;
	padding: 0 var(--pf-gutter);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin: 20px 0 0;
	padding: 14px 18px;
	border: var(--pf-rule);
	border-left: 6px solid var(--pf-ink);
	border-radius: 0;
	background: #fff;
	list-style: none;
	font-weight: 500;
}

.woocommerce-message {
	border-left-color: var(--pf-good);
}

.woocommerce-error {
	border-left-color: var(--pf-bad);
	flex-direction: column;
	align-items: flex-start;
}

.woocommerce-message .button {
	order: 2;
	margin-left: auto;
}

/* ------------------------------------------------------------ generic buttons and fields */

.woocommerce .button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 0 22px;
	border: 1.5px solid var(--pf-ink);
	border-radius: 0;
	background: var(--pf-ink);
	color: var(--pf-paper);
	font-family: var(--pf-font);
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.woocommerce .button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	border-color: var(--pf-magenta);
	background: var(--pf-magenta);
	color: #fff;
}

.woocommerce .button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	border-color: var(--pf-ink);
	background: var(--pf-ink);
	color: var(--pf-paper);
}

.woocommerce .button:disabled,
.woocommerce .button.disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.woocommerce form .form-row {
	margin: 0 0 18px;
	padding: 0;
}

.woocommerce form .form-row label {
	display: block;
	margin: 0 0 6px;
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.05em;
	text-transform: uppercase;
}

.woocommerce form .form-row .required {
	color: var(--pf-bad);
	text-decoration: none;
}

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.woocommerce-page input[type="text"],
.woocommerce-page input[type="email"],
.woocommerce-page input[type="tel"],
.woocommerce-page input[type="password"],
.woocommerce-page input[type="number"] {
	width: 100%;
	min-height: 50px;
	padding: 12px 14px;
	border: 1px solid #8f8a81;
	border-radius: 0;
	background: #fff;
	color: var(--pf-ink);
}

.woocommerce textarea {
	min-height: 120px;
}

.woocommerce input.input-text:focus,
.woocommerce textarea:focus,
.woocommerce select:focus {
	outline: 3px solid var(--pf-cyan);
	outline-offset: 1px;
	border-color: var(--pf-ink);
}

.woocommerce form .form-row.woocommerce-invalid input.input-text {
	border-color: var(--pf-bad);
}

/* Show/hide password toggle (WooCommerce's default stylesheet is not loaded, so it is styled here) */
.woocommerce .password-input {
	position: relative;
	display: block;
}

.woocommerce .password-input input {
	padding-right: 52px;
}

.woocommerce .show-password-input {
	position: absolute;
	top: 50%;
	right: 3px;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	padding: 0;
	border: 0;
	background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='1.8' stroke-linecap='square'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / 20px no-repeat;
	cursor: pointer;
}

.woocommerce .show-password-input.display-password {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23121212' stroke-width='1.8' stroke-linecap='square'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M3 3l18 18'/%3E%3C/svg%3E");
}

.woocommerce .show-password-input:focus-visible {
	outline: 3px solid var(--pf-cyan);
	outline-offset: -3px;
}

.select2-container--default .select2-selection--single {
	min-height: 50px;
	border: 1px solid #8f8a81;
	border-radius: 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 47px;
	padding-left: 14px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 47px;
}

/* ------------------------------------------------------------ single product */

.pf-single-grid {
	display: grid;
	grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
	gap: clamp(24px, 4.5vw, 72px);
	align-items: start;
	padding-block: 20px clamp(40px, 6vw, 72px);
}

.pf-single-media {
	position: sticky;
	top: calc(var(--pf-header-h) + 24px);
	min-width: 0;
}

.woocommerce-product-gallery {
	position: relative;
	margin: 0;
}

.woocommerce-product-gallery__wrapper {
	margin: 0;
}

.woocommerce-product-gallery__image img,
.woocommerce-product-gallery .wp-post-image {
	width: 100%;
	height: auto;
	border: var(--pf-rule);
	border-radius: 0;
	background: var(--pf-paper-2);
}

.woocommerce-product-gallery__trigger {
	display: none;
}

.flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 10px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.flex-control-thumbs li {
	margin: 0;
}

.flex-control-thumbs img {
	width: 100%;
	height: auto;
	border: 1px solid var(--pf-line);
	border-radius: 0;
	opacity: 0.7;
	cursor: pointer;
	transition: opacity 0.15s ease, border-color 0.15s ease;
}

.flex-control-thumbs img:hover,
.flex-control-thumbs img.flex-active {
	opacity: 1;
	border-color: var(--pf-ink);
}

.pf-single-summary {
	min-width: 0;
}

.pf-single-summary .product_title {
	margin: 0 0 12px;
	font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
	line-height: 1.02;
}

.pf-single-summary .price {
	display: block;
	margin: 0 0 14px;
	font-family: var(--pf-mono);
	font-size: 1.25rem;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	color: var(--pf-ink);
}

.pf-single-summary .woocommerce-product-details__short-description {
	margin-bottom: 26px;
	color: var(--pf-ink-2);
	font-size: 1.0625rem;
}

.pf-single-summary .woocommerce-product-details__short-description p:last-child {
	margin-bottom: 0;
}

.pf-assure {
	display: grid;
	gap: 14px;
	margin: 30px 0 0;
	padding: 24px 0 0;
	border-top: var(--pf-rule);
	list-style: none;
}

.pf-assure li {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: 0;
	font-size: 0.9375rem;
	color: var(--pf-ink-2);
}

.pf-assure .pf-icon {
	width: 28px;
	height: 28px;
	margin-top: 1px;
	padding: 4px;
	border: var(--pf-rule);
	background: var(--pf-white);
	color: var(--pf-ink);
}

.pf-assure strong {
	display: block;
	color: var(--pf-ink);
}

.pf-single-lower {
	padding-bottom: clamp(56px, 8vw, 104px);
}

.woocommerce-tabs {
	margin-bottom: 64px;
}

.woocommerce-tabs ul.tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
	margin: 0 0 28px;
	padding: 0;
	border-bottom: var(--pf-rule);
	list-style: none;
}

.woocommerce-tabs ul.tabs li {
	margin: 0 0 -1px;
}

.woocommerce-tabs ul.tabs a {
	display: block;
	padding: 14px 2px;
	border-bottom: 3px solid transparent;
	color: var(--pf-muted);
	font-weight: 600;
	text-decoration: none;
}

.woocommerce-tabs ul.tabs li.active a {
	border-bottom-color: var(--pf-magenta);
	color: var(--pf-ink);
}

.woocommerce-Tabs-panel {
	max-width: 820px;
}

.woocommerce-Tabs-panel h2 {
	font-size: 1.5rem;
}

.woocommerce-Tabs-panel table {
	width: 100%;
	border-collapse: collapse;
}

.woocommerce-Tabs-panel th,
.woocommerce-Tabs-panel td {
	padding: 12px 10px;
	border-bottom: 1px solid var(--pf-line);
	text-align: left;
}

.related.products > h2,
.upsells.products > h2 {
	margin-bottom: 28px;
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
}

#reviews #comments ol {
	padding: 0;
	list-style: none;
}

.star-rating {
	color: var(--pf-ink);
}

/* ------------------------------------------------------------ cart and checkout (block based) */

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	font-family: var(--pf-font);
}

.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	min-height: 54px;
	border: 0;
	border-radius: 0;
	background: var(--pf-ink);
	color: var(--pf-paper);
	font-family: var(--pf-font);
	font-size: 1.0625rem;
	font-weight: 700;
	transition: background-color 0.16s ease;
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--pf-magenta);
	color: #fff;
}

.wc-block-components-button:not(.is-link):focus-visible {
	outline: 3px solid var(--pf-cyan);
	outline-offset: 3px;
}

.wc-block-cart-items,
.wc-block-cart-items th {
	border-color: var(--pf-line);
}

.wc-block-cart-items__header th,
.wc-block-cart-items__header span {
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

.wc-block-cart-items__header th {
	border-bottom: var(--pf-rule);
}

.wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
	border: var(--pf-rule);
	border-radius: 0;
	object-fit: cover;
}

.wc-block-components-product-name {
	font-family: var(--pf-display);
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--pf-ink);
	text-decoration: none;
}

.wc-block-components-product-details {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--pf-ink-2);
}

.wc-block-components-product-details__name {
	font-weight: 700;
}

.wc-block-components-product-details li {
	margin: 0 0 2px;
}

.wp-block-woocommerce-cart-order-summary-block,
.wc-block-components-sidebar .wc-block-components-totals-wrapper:first-child {
	font-weight: 600;
}

.wc-block-components-sidebar-layout .wc-block-components-main,
.wc-block-components-sidebar-layout .wc-block-components-sidebar {
	box-sizing: border-box;
}

/* Totals panel: a rounded white card */
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	position: relative;
	padding: 24px !important;
	border: var(--pf-rule);
	border-radius: 20px;
	background: #fff;
	align-self: start;
}

.wc-block-components-totals-item__value,
.wc-block-formatted-money-amount {
	font-family: var(--pf-mono);
	font-variant-numeric: tabular-nums;
}

.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-size: 1.375rem;
	font-weight: 600;
}

.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-country-input select,
.wc-block-components-state-input select,
.wc-block-components-form .wc-block-components-text-input input[type="text"],
.wc-block-components-form .wc-block-components-text-input input[type="email"],
.wc-block-components-form .wc-block-components-text-input input[type="tel"] {
	border: 1px solid #8f8a81;
	border-radius: 0;
	background: #fff;
	color: var(--pf-ink);
	font-family: var(--pf-font);
}

.wc-block-components-text-input input:focus,
.wc-block-components-textarea:focus {
	border-color: var(--pf-ink);
	box-shadow: 0 0 0 3px rgba(0, 114, 163, 0.35);
}

.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border-radius: var(--pf-radius);
}

.wc-block-components-radio-control--highlight-checked .wc-block-components-radio-control__option-checked {
	border-color: var(--pf-ink);
}

.wc-block-components-checkout-step__title,
.wc-block-components-title.wc-block-components-title {
	font-family: var(--pf-display);
	font-weight: 600;
	letter-spacing: -0.005em;
}

.wc-block-components-notice-banner {
	border-radius: var(--pf-radius);
}

.wc-block-components-product-metadata {
	color: var(--pf-ink-2);
}

/* ------------------------------------------------------------ my account */

.woocommerce-account .woocommerce {
	display: block;
}

body.woocommerce-account.logged-in .woocommerce {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: clamp(24px, 4vw, 56px);
	align-items: start;
}

/* Account menu: an index card of ruled lines */
.woocommerce-MyAccount-navigation ul {
	display: grid;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	border: var(--pf-rule);
	background: var(--pf-white);
}

.woocommerce-MyAccount-navigation li + li {
	border-top: 1px solid var(--pf-line);
}

.woocommerce-MyAccount-navigation a {
	display: block;
	padding: 13px 16px;
	color: var(--pf-ink);
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.woocommerce-MyAccount-navigation a:hover {
	background: var(--pf-paper-2);
}

.woocommerce-MyAccount-navigation .is-active a {
	background: var(--pf-ink);
	color: var(--pf-paper);
}

.woocommerce-MyAccount-content {
	min-width: 0;
	padding: clamp(20px, 3vw, 36px);
	border: var(--pf-rule);
	background: #fff;
}

.woocommerce-MyAccount-content h2,
.woocommerce-MyAccount-content h3 {
	font-size: 1.375rem;
}

.woocommerce-MyAccount-content > p:first-child {
	font-size: 1.0625rem;
}

.u-columns.col2-set,
.woocommerce .col2-set {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(20px, 4vw, 48px);
}

.woocommerce .col2-set .col-1,
.woocommerce .col2-set .col-2 {
	width: auto;
	float: none;
	padding: clamp(20px, 3vw, 36px);
	border: var(--pf-rule);
	background: #fff;
}

.woocommerce form.login,
.woocommerce form.register,
.woocommerce form.woocommerce-form-login {
	margin: 0;
	padding: 0;
	border: 0;
}

.woocommerce-form-login__rememberme {
	display: inline-flex !important;
	align-items: center;
	gap: 8px;
	margin-right: 16px;
}

.woocommerce-LostPassword {
	margin-top: 14px;
}

table.shop_table,
table.woocommerce-orders-table,
table.woocommerce-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.9375rem;
}

table.shop_table th,
table.shop_table td,
table.woocommerce-orders-table th,
table.woocommerce-orders-table td {
	padding: 14px 10px;
	border-bottom: 1px solid var(--pf-line);
	text-align: left;
	vertical-align: top;
}

table.shop_table th,
table.woocommerce-orders-table th {
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

table.shop_table thead th,
table.woocommerce-orders-table thead th {
	border-bottom: var(--pf-rule);
}

.woocommerce-orders-table__cell-order-actions .button {
	min-height: 38px;
	margin: 2px 4px 2px 0;
	padding: 0 14px;
	font-size: 0.8125rem;
}

.woocommerce-order-details,
.woocommerce-customer-details {
	margin-top: 32px;
}

.woocommerce-customer-details h2,
.woocommerce-column__title,
.woocommerce-order-details__title {
	margin: 0 0 16px;
	font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem);
}

.wc-block-components-address-form {
	row-gap: 14px;
}

.wc-block-components-address-form > .wc-block-components-text-input,
.wc-block-components-address-form > .wc-block-components-country-input,
.wc-block-components-address-form > .wc-block-components-state-input,
.wc-block-components-address-form > .wc-blocks-components-select {
	margin-top: 0;
}

.woocommerce-customer-details address {
	padding: 18px;
	border: var(--pf-rule);
	background: var(--pf-paper);
	font-style: normal;
}

.wc-item-meta,
.woocommerce table .wc-item-meta {
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
	color: var(--pf-ink-2);
}

.wc-item-meta li p {
	display: inline;
	margin: 0;
}

/* ------------------------------------------------------------ order received */

/* Order received: the overview reads as the stub of a job ticket */
ul.woocommerce-order-overview {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 0;
	margin: 0 0 32px;
	padding: 0;
	list-style: none;
	border-top: var(--pf-rule);
	border-left: var(--pf-rule);
}

ul.woocommerce-order-overview li {
	margin: 0;
	padding: 16px 18px;
	border-right: var(--pf-rule);
	border-bottom: var(--pf-rule);
	background: #fff;
	font-family: var(--pf-mono);
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--pf-muted);
}

ul.woocommerce-order-overview li strong {
	display: block;
	margin-top: 6px;
	font-family: var(--pf-font);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--pf-ink);
	overflow-wrap: anywhere;
}

.woocommerce-thankyou-order-received {
	padding: 18px 20px;
	border: var(--pf-rule);
	border-left: 8px solid var(--pf-ink);
	background: #fff;
	font-family: var(--pf-display);
	font-size: 1.5rem;
	font-weight: 600;
}

/* ------------------------------------------------------------ responsive */

@media (max-width: 960px) {
	.pf-single-grid {
		grid-template-columns: 1fr;
	}

	.pf-single-media {
		position: static;
	}

	body.woocommerce-account.logged-in .woocommerce {
		grid-template-columns: 1fr;
	}

	.woocommerce-MyAccount-navigation ul {
		display: flex;
		gap: 6px;
		overflow-x: auto;
		padding-bottom: 6px;
	}

	.woocommerce-MyAccount-navigation a {
		white-space: nowrap;
	}
}

@media (max-width: 700px) {
	.u-columns.col2-set,
	.woocommerce .col2-set {
		grid-template-columns: 1fr;
	}

	.pf-shop-toolbar {
		flex-direction: column;
		align-items: flex-start;
	}

	.woocommerce-ordering,
	.woocommerce-ordering select {
		width: 100%;
	}

	.flex-control-thumbs {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	table.woocommerce-orders-table thead {
		display: none;
	}

	table.woocommerce-orders-table tr {
		display: block;
		margin-bottom: 14px;
		border: var(--pf-rule);
	}

	table.woocommerce-orders-table td {
		display: flex;
		justify-content: space-between;
		gap: 12px;
		border-bottom: 1px solid var(--pf-line);
	}

	table.woocommerce-orders-table td::before {
		content: attr(data-title);
		font-weight: 700;
		color: var(--pf-muted);
	}
}
