/* Top bar icons white */
.top-bar .menu-item i,
.top-bar .nav a i {
	color: #fff !important;
}

/* Electro product page: hide sidebar, go full-width */
.single-product .sidebar {
	display: none !important;
}
.single-product .content-area {
	width: 100% !important;
	flex: 0 0 100% !important;
	max-width: 100% !important;
}
.single-product .site-content-inner.row > .container,
.single-product .site-content > .container {
	max-width: 1400px;
}

/* Hide Electro's product-actions sidebar on pages with our matrix form */
body:has(.sanmar-matrix-wrap) .product-actions-wrapper {
	display: none !important;
}

/* Hide SKU display */
.single-product .product_meta {
	display: none;
}

/* Hide availability, wishlist, compare on variable products with matrix */
body:has(.sanmar-matrix-wrap) .availability,
body:has(.sanmar-matrix-wrap) .stock,
body:has(.sanmar-matrix-wrap) p.stock,
body:has(.sanmar-matrix-wrap) .electro-stock,
body:has(.sanmar-matrix-wrap) .summary > .wishlist-and-compare {
	display: none !important;
}

/* Center the product gallery image */
.single-product .woocommerce-product-gallery {
	margin: 0 auto;
}
.single-product .woocommerce-product-gallery__image {
	text-align: center;
}
.single-product .woocommerce-product-gallery__image img {
	margin: 0 auto;
}

/* Constrain gallery image size */
.woocommerce-product-gallery__image img {
	max-height: 500px;
	width: auto !important;
	object-fit: contain;
	margin: 0 auto;
}

/* Matrix Product Page Styles */
.sanmar-matrix-wrap {
	margin-top: 15px;
}

/* Price display */
.sanmar-price-display {
	margin-bottom: 15px;
}
.sanmar-price-label {
	display: block;
	font-size: 13px;
	color: #666;
	margin-bottom: 2px;
}
.sanmar-price-amount {
	font-size: 28px;
	font-weight: 700;
	color: #1a1a1a;
}

/* Color swatches */
.sanmar-color-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}
.sanmar-color-swatch {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	border: 2px solid #ddd;
	padding: 2px;
	cursor: pointer;
	overflow: hidden;
	background: #fff;
	transition: border-color 0.2s;
}
.sanmar-color-swatch:hover,
.sanmar-color-swatch.active {
	border-color: #E84C3D;
}
.sanmar-color-swatch img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
.swatch-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 10px;
	color: #999;
	background: #f0f0f0;
	border-radius: 50%;
}

/* Selected color */
.sanmar-selected-color {
	margin-bottom: 15px;
	font-size: 14px;
	color: #444;
}

/* Matrix table */
.sanmar-matrix-table-wrap {
	overflow-x: auto;
	margin-bottom: 15px;
}
.sanmar-matrix-table {
	width: auto;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	font-size: 14px;
	color: #333;
}
.sanmar-matrix-table th,
.sanmar-matrix-table td {
	padding: 14px 16px;
	text-align: center;
	border: none;
	border-bottom: 1px solid #e5e5e5;
	white-space: nowrap;
	min-width: 90px;
}
.sanmar-matrix-table th {
	background: #f5f5f5;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	color: #333;
	border-bottom: 2px solid #ddd;
}
.sanmar-matrix-table td:first-child {
	text-align: left;
	font-weight: 700;
	font-size: 14px;
	color: #333;
	background: transparent;
	min-width: 120px;
}

/* Price row */
.matrix-row-price td {
	font-weight: 600;
	color: #7a6e5d;
	font-size: 15px;
}

/* Stock row */
.matrix-row-stock td {
	font-size: 13px;
}
.matrix-row-stock .stock-badge {
	display: inline-block;
	background: #f0f0f0;
	border-radius: 4px;
	padding: 4px 12px;
	color: #333;
	font-weight: 500;
}
.matrix-row-stock .stock-badge.oos {
	color: #999;
	background: #f5f5f5;
}

/* Qty inputs */
.sanmar-qty-input {
	width: 100%;
	max-width: 240px;
	padding: 12px 8px;
	text-align: center;
	border: 1px solid #bbb;
	border-radius: 3px;
	font-size: 16px;
	color: #1a1a1a;
	background: #fff;
	-moz-appearance: textfield;
	box-sizing: border-box;
}
.sanmar-qty-input::-webkit-outer-spin-button,
.sanmar-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.sanmar-qty-input:focus {
	border-color: #E84C3D;
	outline: none;
	box-shadow: 0 0 0 1px #E84C3D;
}
.sanmar-qty-input:disabled {
	background: #f5f5f5;
	cursor: not-allowed;
}

/* Cart row */
.sanmar-cart-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 0;
	border-top: 1px solid #e5e5e5;
	margin-top: 5px;
}
.sanmar-order-summary {
	font-size: 1.4em;
	color: #1a1a1a;
	font-weight: 700;
}
.sanmar-order-summary .sanmar-total-price {
	color: #E84C3D;
	font-weight: 700;
}
.sanmar-bulk-add-to-cart {
	background: #E84C3D !important;
	color: #fff !important;
	padding: 10px 30px !important;
	font-size: 15px !important;
	border-radius: 4px !important;
	cursor: pointer;
	border: none !important;
}
.sanmar-bulk-add-to-cart:hover {
	background: #C9402F !important;
}
.sanmar-bulk-add-to-cart.loading {
	opacity: 0.7;
	pointer-events: none;
}

/* Success message */
.sanmar-cart-message {
	padding: 10px 15px;
	margin-top: 10px;
	border-radius: 4px;
	font-size: 14px;
}
.sanmar-cart-message.success {
	background: #edfaef;
	color: #1e7e34;
	border: 1px solid #c3e6cb;
}
.sanmar-cart-message.error {
	background: #fce8e8;
	color: #dc3232;
	border: 1px solid #f5c6c6;
}

/* Product Gallery */
.sanmar-product-gallery {
	position: sticky;
	top: 40px;
}
.sanmar-main-image-wrap {
	width: 100%;
	background: #f9f9f9;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 12px;
}
.sanmar-main-image {
	width: 100%;
	height: auto;
	display: block;
	cursor: zoom-in;
}
.sanmar-thumb-strip {
	display: flex;
	gap: 8px;
	justify-content: center;
}
.sanmar-thumb {
	width: 80px;
	height: 80px;
	border: 2px solid #e5e5e5;
	border-radius: 4px;
	padding: 2px;
	cursor: pointer;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s;
}
.sanmar-thumb:hover,
.sanmar-thumb.active {
	border-color: #E84C3D;
}
.sanmar-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

