/**
 * PCTMart Sales Tools: shipping progress bar, Grid/List toggle, list rows
 * and the Quick order table. Colours follow the theme's brand variables.
 */

/* --------------------------------------------------------------------------
   1. Free shipping progress bar
   -------------------------------------------------------------------------- */

.pctmart-ship-bar {
	display: block;
	width: 100%;
	height: 8px;
	margin: 0 0 16px;
	border: 0;
	border-radius: 4px;
	background: #e4e7ec;
	overflow: hidden;
	-webkit-appearance: none;
	appearance: none;
}

.pctmart-ship-bar::-webkit-progress-bar {
	background: #e4e7ec;
}

.pctmart-ship-bar::-webkit-progress-value {
	border-radius: 4px;
	background: var(--pct-brand-deep, #c8102e);
}

.pctmart-ship-bar::-moz-progress-bar {
	border-radius: 4px;
	background: var(--pct-brand-deep, #c8102e);
}

/* --------------------------------------------------------------------------
   2. Grid / List toggle
   -------------------------------------------------------------------------- */

.pctmart-view-toggle {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 16px;
}

.pctmart-view-link {
	padding: 7px 16px;
	border: 1px solid #d0d5dd;
	border-radius: 25rem;
	color: #1d2327;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
}

.pctmart-view-link:hover,
.pctmart-view-link:focus-visible {
	border-color: #1d2327;
}

.pctmart-view-link.is-current {
	border-color: var(--pct-brand-ink, #111);
	background: var(--pct-brand-ink, #111);
	color: #fff;
}

/* --------------------------------------------------------------------------
   3. List view rows
   -------------------------------------------------------------------------- */

/* The body class adds one class and one element over the theme's column
   rules, so these win on specificity alone. */
body.pctmart-view-list ul.products {
	display: block;
}

body.pctmart-view-list ul.products li.product.pctmart-row {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) minmax(0, 130px) minmax(0, 120px) auto;
	align-items: center;
	gap: 16px;
	float: none;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid #e4e7ec;
	text-align: left;
}

.pctmart-row-img img {
	display: block;
	width: 64px;
	height: 64px;
	object-fit: contain;
}

.pctmart-row-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.pctmart-row-name {
	color: #1d2327;
	font-weight: 600;
	text-decoration: none;
}

.pctmart-row-name:hover,
.pctmart-row-name:focus-visible {
	color: var(--pct-brand-deep, #c8102e);
}

.pctmart-row-meta,
.pctmart-row-strength {
	color: #475467;
	font-size: 14px;
}

.pctmart-row-price {
	font-weight: 600;
}

@media (max-width: 700px) {
	body.pctmart-view-list ul.products li.product.pctmart-row {
		grid-template-columns: 56px minmax(0, 1fr);
		gap: 6px 12px;
	}

	.pctmart-row-img {
		grid-row: span 3;
	}

	.pctmart-row-img img {
		width: 56px;
		height: 56px;
	}
}

/* --------------------------------------------------------------------------
   4. Quick order
   -------------------------------------------------------------------------- */

.pctmart-qo-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 16px;
}

.pctmart-qo-search {
	flex: 1 1 240px;
	min-width: 0;
}

.pctmart-qo-button {
	padding: 10px 22px;
	border: 0;
	border-radius: 25rem;
	background: var(--pct-brand-ink, #111);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.pctmart-qo-button.is-primary {
	background: var(--pct-brand-deep, #c8102e);
}

.pctmart-qo-button:hover,
.pctmart-qo-button:focus-visible {
	background: var(--pct-brand-ink, #111);
}

.pctmart-qo-clear {
	font-size: 14px;
}

.pctmart-qo-scroll {
	overflow-x: auto;
}

.pctmart-qo-table {
	width: 100%;
	border-collapse: collapse;
}

.pctmart-qo-table th,
.pctmart-qo-table td {
	padding: 10px 12px;
	border-bottom: 1px solid #e4e7ec;
	text-align: left;
	vertical-align: middle;
}

.pctmart-qo-table thead th {
	background: #f2f4f7;
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}

.pctmart-qo-sort {
	color: inherit;
	text-decoration: none;
}

.pctmart-qo-sort:hover,
.pctmart-qo-sort:focus-visible,
.pctmart-qo-sort.is-current {
	color: var(--pct-brand-deep, #c8102e);
}

.pctmart-qo-name a {
	color: #1d2327;
	font-weight: 600;
	text-decoration: none;
}

.pctmart-qo-name a:hover,
.pctmart-qo-name a:focus-visible {
	color: var(--pct-brand-deep, #c8102e);
}

.pctmart-qo-pack {
	display: block;
	color: #475467;
	font-size: 13px;
}

.pctmart-qo-price {
	white-space: nowrap;
}

.pctmart-qo-qty {
	width: 80px;
}

.pctmart-qo-soldout {
	color: #b42318;
	font-size: 14px;
}

.pctmart-qo-submit {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
}

.pctmart-qo-hint {
	color: #475467;
	font-size: 13px;
}

.pctmart-qo-pages ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pctmart-qo-pages a,
.pctmart-qo-pages span {
	display: block;
	padding: 6px 12px;
	border: 1px solid #d0d5dd;
	border-radius: 6px;
	color: #1d2327;
	text-decoration: none;
}

.pctmart-qo-pages .current {
	border-color: var(--pct-brand-ink, #111);
	background: var(--pct-brand-ink, #111);
	color: #fff;
}

@media (max-width: 700px) {
	.pctmart-qo-col-ingredient {
		display: none;
	}
}
