/* Offpace Shop: WooCommerce storefront styles. Builds on the Arp273 theme's tokens. */

.ops,
.woocommerce-cart .content,
.woocommerce-checkout .content,
.woocommerce-account .content {
	--ops-line: #e4e4e4;
	--ops-ink: var(--black, #000);
	--ops-paper: var(--white, #fff);
	--ops-card: var(--card, #f8f8f8);
	--ops-muted: #767676;
	--ops-gutter: var(--gutter, 16px);
	--ops-radius: 6px;
	--ops-mono: var(--mono, "Space Mono", Menlo, Consolas, monospace);
}

.ops {
	padding: 0 var(--ops-gutter) 12vw;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.45;
}
.ops *,.ops *::before, .ops *::after { box-sizing: border-box; }
.ops a:focus-visible,
.ops button:focus-visible,
.ops select:focus-visible,
.ops input:focus-visible,
.ops summary:focus-visible {
	outline: 2px solid var(--ops-ink);
	outline-offset: 3px;
}

/* ---------- Top bar: breadcrumb and cart ---------- */
.ops-bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	padding: 14px 0;
	border-top: 1px solid var(--ops-line);
	font-size: 12px;
}
.ops-crumbs { color: var(--ops-muted); min-width: 0; }
.ops-crumbs a { color: var(--ops-ink); }
.ops-cart { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ops-cart__count {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 22px; height: 22px; padding: 0 6px;
	border-radius: 11px;
	background: var(--ops-ink); color: var(--ops-paper);
	font-size: 11px; line-height: 1;
}

/* ---------- Listing header ---------- */
.ops .woocommerce-products-header { padding: 5vw 0 3.5vw; }
.ops-title {
	margin: 0;
	font-size: clamp(56px, 11vw, 176px);
	font-weight: 700;
	line-height: .9;
	letter-spacing: -.045em;
}
.ops-title__count {
	font-family: var(--ops-mono);
	font-size: clamp(12px, 1.3vw, 20px);
	font-weight: 400;
	letter-spacing: 0;
	color: var(--ops-muted);
	vertical-align: top;
	position: relative; top: .6em;
}
.ops .term-description { max-width: 46em; margin-top: 24px; color: var(--ops-muted); }

.ops-toolbar {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px 24px;
	padding: 12px 0;
	border-top: 1px solid var(--ops-ink);
	margin-bottom: 28px;
}
.ops-cats {
	display: flex; flex-wrap: wrap; gap: 4px;
	margin: 0; padding: 0; list-style: none;
	font-size: 14px;
}
.ops-cats a {
	display: block;
	padding: 9px 16px;
	border-radius: 999px;
	line-height: 1.2;
}
.ops-cats a.is-current { background: var(--ops-ink); color: var(--ops-paper); }
.ops-cats a.is-current:hover { opacity: 1; }

.ops .woocommerce-ordering { margin: 0 0 0 auto; }
.ops select,
.ops .orderby {
	appearance: none; -webkit-appearance: none;
	font: inherit; font-size: 14px; color: inherit;
	padding: 9px 40px 9px 16px;
	border: 1px solid var(--ops-line);
	border-radius: 999px;
	background: var(--ops-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E") no-repeat right 16px center;
	cursor: pointer;
	max-width: 100%;
}

/* ---------- Product grid ---------- */
/* The theme styles .products and .product for its home page; reset both here. */
.ops ul.products {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 40px var(--ops-gutter);
	margin: 0; padding: 0;
	list-style: none;
}
.ops ul.products::before, .ops ul.products::after { content: none; }
.ops section.products { display: block; padding-left: 0; padding-right: 0; }
.ops .product {
	position: relative;
	display: block;
	aspect-ratio: auto;
	background: none;
	overflow: visible;
}
.ops ul.products li.product { margin: 0; padding: 0; width: auto; float: none; min-width: 0; }
.ops ul.products li.product a.woocommerce-loop-product__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 12px 16px;
	align-items: start;
}
.ops ul.products li.product a.woocommerce-loop-product__link:hover { opacity: 1; }
.ops ul.products li.product a img {
	grid-column: 1 / -1;
	width: 100%; height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: var(--ops-card);
	border-radius: var(--ops-radius);
	transition: opacity .2s ease;
}
.ops ul.products li.product a:hover img { opacity: .82; }
.ops ul.products li.product .woocommerce-loop-product__title {
	margin: 0; padding: 0;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -.01em;
	overflow-wrap: anywhere;
}
.ops ul.products li.product .price {
	font-size: 15px;
	line-height: 1.25;
	color: var(--ops-muted);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}
.ops .price del { opacity: .55; margin-right: 6px; }
.ops .price ins { text-decoration: none; color: var(--ops-ink); }
.ops-badge {
	position: absolute;
	top: 12px; left: 12px;
	z-index: 1;
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--ops-ink); color: var(--ops-paper);
	font-size: 10px; line-height: 1;
}
.ops-badge--sale { background: var(--ops-paper); color: var(--ops-ink); border: 1px solid var(--ops-ink); }

.ops .woocommerce-pagination { margin-top: 64px; text-align: center; }
.ops .woocommerce-pagination ul {
	display: inline-flex; gap: 4px;
	margin: 0; padding: 0; list-style: none;
	font-size: 14px;
}
.ops .woocommerce-pagination .page-numbers a,
.ops .woocommerce-pagination .page-numbers span {
	display: block; min-width: 40px; padding: 10px 14px;
	border: 1px solid var(--ops-line); border-radius: 999px;
	line-height: 1.2;
}
.ops .woocommerce-pagination .page-numbers .current {
	background: var(--ops-ink); color: var(--ops-paper); border-color: var(--ops-ink);
}

/* ---------- Product page ---------- */
.ops div.product {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	gap: 32px 4vw;
	align-items: start;
	padding-top: 8px;
}
.ops div.product .woocommerce-product-gallery {
	position: relative;
	width: auto; float: none; margin: 0;
	min-width: 0;
}
.ops .woocommerce-product-gallery__wrapper { margin: 0; }
.ops .woocommerce-product-gallery__image img {
	width: 100%; height: auto;
	background: var(--ops-card);
	border-radius: var(--ops-radius);
}
.ops .woocommerce-product-gallery__image a:hover { opacity: 1; }
.ops .woocommerce-product-gallery__trigger {
	position: absolute; top: 12px; right: 12px; z-index: 2;
	width: 36px; height: 36px;
	border-radius: 50%;
	background: var(--ops-paper);
	font-size: 0;
	display: flex; align-items: center; justify-content: center;
}
.ops .woocommerce-product-gallery__trigger::before {
	content: "+";
	font-size: 20px; line-height: 1; color: var(--ops-ink);
}
.ops .woocommerce-product-gallery__trigger img { display: none !important; }
.ops .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 8px;
	margin: 8px 0 0; padding: 0;
	list-style: none;
}
.ops .flex-control-thumbs img {
	width: 100%; height: auto;
	border-radius: var(--ops-radius);
	cursor: pointer;
	opacity: .5;
}
.ops .flex-control-thumbs img.flex-active,
.ops .flex-control-thumbs img:hover { opacity: 1; }

.ops div.product .summary {
	width: auto; float: none; margin: 0;
	min-width: 0;
	position: sticky; top: 24px;
}
.ops div.product .product_title {
	margin: -.08em 0 0;
	font-size: clamp(44px, 6.6vw, 112px);
	font-weight: 700;
	line-height: .92;
	letter-spacing: -.045em;
	overflow-wrap: anywhere;
}
.ops div.product .summary > .price {
	margin: 24px 0 0;
	font-size: clamp(20px, 2vw, 28px);
	font-weight: 700;
	letter-spacing: -.02em;
	font-variant-numeric: tabular-nums;
}
.ops .woocommerce-product-details__short-description { margin-top: 20px; max-width: 34em; }
.ops .woocommerce-product-details__short-description p { margin: 0 0 1em; }

.ops form.cart { margin: 28px 0 0; }
.ops form.cart:not(.variations_form),
.ops .woocommerce-variation-add-to-cart {
	display: flex; gap: 8px; align-items: stretch;
}
.ops .quantity { flex: none; }
.ops .quantity .qty {
	width: 72px; height: 52px;
	padding: 0 8px;
	border: 1px solid var(--ops-ink);
	border-radius: 999px;
	background: var(--ops-paper); color: var(--ops-ink);
	font: inherit; text-align: center;
	font-variant-numeric: tabular-nums;
}
.ops .quantity .qty[type="hidden"] { display: none; }
.ops .button,
.ops button.button {
	display: inline-flex; align-items: center; justify-content: center;
	min-height: 52px;
	padding: 0 28px;
	border: 1px solid var(--ops-ink);
	border-radius: 999px;
	background: var(--ops-ink); color: var(--ops-paper);
	font: inherit; font-size: 16px;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.ops .button:hover { background: var(--ops-paper); color: var(--ops-ink); opacity: 1; }
.ops .single_add_to_cart_button { flex: 1 1 auto; }
.ops .button.disabled,
.ops .button:disabled { opacity: .35; cursor: not-allowed; }

.ops table.variations { width: 100%; margin: 0 0 16px; border-collapse: collapse; }
.ops table.variations th,
.ops table.variations td { display: block; padding: 0; text-align: left; }
.ops table.variations th.label {
	font-family: var(--ops-mono);
	font-size: 11px; font-weight: 400;
	text-transform: uppercase;
	color: var(--ops-muted);
	margin-bottom: 8px;
}
.ops table.variations select { width: 100%; height: 52px; border-color: var(--ops-ink); }
.ops .reset_variations {
	display: inline-block; margin-top: 8px;
	font-size: 13px; color: var(--ops-muted);
	text-decoration: underline; text-underline-offset: 3px;
}
.ops .woocommerce-variation-price { margin-bottom: 12px; }
.ops .woocommerce-variation-price:empty { display: none; }
.ops .stock {
	margin: 20px 0 0;
	font-family: var(--ops-mono);
	font-size: 12px;
	text-transform: uppercase;
	color: var(--ops-muted);
}
.ops .stock.out-of-stock { color: var(--ops-ink); }

.ops-accordion { margin-top: 36px; border-top: 1px solid var(--ops-line); }
.ops-accordion__item { border-bottom: 1px solid var(--ops-line); }
.ops-accordion__item summary {
	display: flex; justify-content: space-between; align-items: center;
	padding: 18px 0;
	font-size: 15px;
	cursor: pointer;
	list-style: none;
}
.ops-accordion__item summary::-webkit-details-marker { display: none; }
.ops-accordion__item summary::after { content: "+"; font-size: 20px; line-height: 1; }
.ops-accordion__item[open] summary::after { content: "\2212"; }
.ops-accordion__body { padding: 0 0 20px; max-width: 38em; color: #333; }
.ops-accordion__body p { margin: 0 0 1em; }
.ops-accordion__body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ops-accordion__body th,
.ops-accordion__body td { padding: 8px 0; text-align: left; border-top: 1px solid var(--ops-line); font-weight: 400; }
.ops-accordion__body th { width: 40%; color: var(--ops-muted); }

/* Related and upsell rows span the full width under the two columns. */
.ops div.product .related,
.ops div.product .upsells {
	grid-column: 1 / -1;
	margin-top: 10vw;
	padding-top: 14px;
	border-top: 1px solid var(--ops-ink);
}
.ops div.product .related > h2,
.ops div.product .upsells > h2 {
	margin: 0 0 20px;
	font-size: 15px; font-weight: 400; letter-spacing: 0;
}

/* ---------- Notices ---------- */
.ops .woocommerce-notices-wrapper:empty { display: none; }
.ops .woocommerce-message,
.ops .woocommerce-info,
.ops .woocommerce-error {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
	margin: 0 0 24px; padding: 14px 18px;
	border: 1px solid var(--ops-ink);
	border-radius: var(--ops-radius);
	list-style: none;
	font-size: 14px;
}
.ops .woocommerce-message .button,
.ops .woocommerce-info .button { min-height: 36px; padding: 0 16px; font-size: 13px; order: 2; }
.ops .woocommerce-no-products-found { padding: 6vw 0; }

/* ---------- Cart, checkout and account (theme page template) ---------- */
.woocommerce-cart .content,
.woocommerce-checkout .content,
.woocommerce-account .content {
	max-width: 1200px;
	padding-top: 5vw;
	font-size: 16px;
}
.woocommerce-cart .content a,
.woocommerce-checkout .content a,
.woocommerce-account .content a { text-underline-offset: 3px; }
.woocommerce-cart .content .wc-block-components-button:not(.is-link),
.woocommerce-checkout .content .wc-block-components-button:not(.is-link),
.woocommerce-account .content .button {
	border: 1px solid var(--ops-ink);
	border-radius: 999px;
	background: var(--ops-ink); color: var(--ops-paper);
	text-decoration: none;
	min-height: 52px;
}
.woocommerce-account .content .button { display: inline-flex; align-items: center; padding: 0 28px; font: inherit; cursor: pointer; }

/* ---------- Smaller screens ---------- */
@media (max-width: 1000px) {
	.ops ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767px) {
	.ops { padding-bottom: 96px; }
	.ops .woocommerce-products-header { padding: 40px 0 28px; }
	.ops ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 12px; }
	.ops ul.products li.product a.woocommerce-loop-product__link { grid-template-columns: minmax(0, 1fr); gap: 4px; }
	.ops ul.products li.product a img { margin-bottom: 6px; }
	.ops ul.products li.product .woocommerce-loop-product__title,
	.ops ul.products li.product .price { font-size: 13px; }
	.ops .woocommerce-ordering { margin-left: 0; width: 100%; }
	.ops .woocommerce-ordering select { width: 100%; }
	.ops div.product { grid-template-columns: minmax(0, 1fr); }
	.ops div.product .summary { position: static; }
	.ops div.product .related,
	.ops div.product .upsells { margin-top: 72px; }
}
@media (prefers-reduced-motion: reduce) {
	.ops * { transition: none !important; }
}
