/* =========================================================
   IEM Themes - WooCommerce (shop / product archive)
   ========================================================= */

.shop-hero { padding: 70px 0 40px; background: #fff; }
.shop-hero .page-title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); margin-top: 6px; }
.shop-hero .woocommerce-products-header__description { margin-top: 18px; max-width: 62ch; color: var(--text-muted); font-size: 1.05rem; }

.shop-section { padding: 0 0 70px; }

/* Notices */
.woocommerce-notices-wrapper { margin-bottom: 26px; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	list-style: none;
	margin: 0 0 20px;
	padding: 16px 20px;
	border-radius: var(--radius);
	background: var(--blue-light);
	color: var(--navy);
	font-size: 0.95rem;
}
.woocommerce-error { background: #fdeceb; color: #9d1c1c; }

/* Attribute filter bar */
.product-filter-bar {
	background: var(--blue-light);
	border-radius: var(--radius);
	padding: 26px 28px;
	margin: 0 0 32px;
	clear: both;
}
.product-filter-groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 28px;
}
.product-filter-group h3 {
	font-size: 0.85rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--navy);
	margin-bottom: 12px;
}
.product-filter-option {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.92rem;
	color: var(--text-dark);
	padding: 5px 0;
	cursor: pointer;
}
.product-filter-option input { accent-color: var(--navy); width: 16px; height: 16px; cursor: pointer; }
.product-filter-actions {
	display: flex;
	align-items: center;
	gap: 18px;
	margin-top: 22px;
	padding-top: 22px;
	border-top: 1px solid rgba(14, 47, 94, 0.1);
}
.product-filter-actions .btn { padding: 11px 26px; font-size: 0.9rem; }
.product-filter-reset {
	font-size: 0.88rem;
	color: var(--text-muted);
	text-decoration: underline;
}
.product-filter-reset:hover { color: var(--navy); }

/* Result count + ordering bar */
.woocommerce-notices-wrapper + .woocommerce-result-count,
.woocommerce-result-count,
.woocommerce-ordering {
	display: inline-block;
	color: var(--text-muted);
	font-size: 0.9rem;
}
.shop-section > .section-inner > .woocommerce-result-count,
.shop-section > .section-inner > .woocommerce-ordering {
	display: flex;
	align-items: center;
}
.woocommerce-result-count { float: left; margin: 0 0 26px; }
.woocommerce-ordering { float: right; margin: 0 0 26px; }
.woocommerce-ordering select {
	border: 1px solid var(--border-light);
	border-radius: 999px;
	padding: 8px 16px;
	font-family: var(--font);
	color: var(--navy);
	background: #fff;
}

/* Product grid */
ul.products {
	display: flex;
	flex-direction: column;
	gap: 22px;
	margin: 0;
	padding: 0;
	clear: both;
}
/*
 * WooCommerce's own structural CSS (woocommerce-layout.css, still loaded for
 * the product gallery's sake - see functions.php) floats li.product into a
 * percentage-width column grid whenever a "columns-N" class is present,
 * which it always is on related/upsell product loops (default columns: 4).
 * That rule ties in specificity with the plain .product-card selector below
 * and can win on source order, collapsing the card to a sliver. The
 * .product.product-card compound selectors here are deliberately more
 * specific so our single-column card layout always wins regardless of any
 * columns-N class WooCommerce adds.
 */
.products.columns-1 li.product.product-card,
.products.columns-2 li.product.product-card,
.products.columns-3 li.product.product-card,
.products.columns-4 li.product.product-card,
.products.columns-5 li.product.product-card,
.products.columns-6 li.product.product-card {
	float: none;
	width: 100%;
	margin: 0;
}

ul.products li.product-card {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 30px;
	background: var(--blue-light);
	border-radius: 20px;
	padding: 22px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
}
ul.products li.product-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 14px 30px rgba(14, 47, 94, 0.1);
}

ul.products .product-card-media {
	flex: 0 0 240px;
	position: relative;
}
ul.products .product-card-media a { display: block; }
ul.products .product-card-media img {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	object-position: center;
	border-radius: 16px;
	background: #fff;
	padding: 10px;
}

ul.products .product-card-body { flex: 1; min-width: 0; }
ul.products .product-card-body a.woocommerce-LoopProduct-link {
	display: block;
	color: inherit;
}
ul.products .woocommerce-loop-product__title {
	font-size: 1.2rem;
	margin-bottom: 10px;
	color: var(--navy);
}
ul.products .product-card-excerpt {
	color: var(--text-muted);
	font-size: 0.93rem;
	line-height: 1.55;
	margin-bottom: 14px;
}
ul.products .product-card-excerpt ul { margin: 10px 0; padding-left: 20px; }
ul.products .product-card-excerpt li { margin-bottom: 4px; }
ul.products .product-card-excerpt strong { color: var(--navy); }
ul.products .product-card-excerpt table {
	/* !important: these tables are scraped from the original site and often
	   carry an inline style="width: 320px" (etc.) on the <table> tag, which
	   would otherwise pin them to that fixed width and waste the available
	   card space. */
	width: 100% !important;
	max-width: 100% !important;
	border-collapse: collapse;
	margin: 14px 0;
	font-size: 0.85rem;
	display: block;
	overflow-x: auto;
}
ul.products .product-card-excerpt td,
ul.products .product-card-excerpt th {
	border: 1px solid #a9b8c9;
	padding: 8px 12px;
}
ul.products .product-card-excerpt tr:first-child td { background: #fff; }
ul.products .price {
	display: block;
	font-size: 1rem;
	font-weight: 700;
	color: var(--blue);
	margin-bottom: 14px;
}
ul.products .price del { color: var(--text-muted); font-weight: 400; opacity: 0.7; }
ul.products .price ins { text-decoration: none; }
ul.products .star-rating { margin-bottom: 10px; font-size: 0.85rem; color: #f3b700; }

ul.products .onsale {
	position: absolute;
	top: -8px;
	left: -8px;
	background: var(--navy);
	color: #fff;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	padding: 5px 12px;
	border-radius: 999px;
	z-index: 1;
}

ul.products a.button,
ul.products a.add_to_cart_button {
	display: inline-block;
	padding: 12px 26px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.88rem;
	border: 2px solid var(--navy);
	color: var(--navy);
	background: transparent;
	transition: all 0.2s ease;
}
ul.products a.button:hover,
ul.products a.add_to_cart_button:hover {
	background: var(--navy);
	color: #fff;
}
ul.products a.added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 0.85rem;
	color: var(--blue);
}

@media (max-width: 720px) {
	ul.products li.product-card { flex-direction: column; align-items: stretch; }
	ul.products .product-card-media { flex-basis: auto; }
}
@media (max-width: 560px) {
	.woocommerce-result-count,
	.woocommerce-ordering { float: none; display: block; margin-bottom: 14px; }
}

/* No products found */
.woocommerce-info {
	clear: both;
}

/* Pagination */
nav.woocommerce-pagination { clear: both; margin-top: 46px; text-align: center; }
nav.woocommerce-pagination ul.page-numbers {
	display: inline-flex;
	gap: 8px;
	list-style: none;
	margin: 0;
	padding: 0;
}
nav.woocommerce-pagination .page-numbers li { list-style: none; }
nav.woocommerce-pagination a.page-numbers,
nav.woocommerce-pagination span.page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 8px;
	border-radius: 999px;
	color: var(--navy);
	font-weight: 600;
	font-size: 0.9rem;
}
nav.woocommerce-pagination a.page-numbers:hover { background: var(--blue-light); }
nav.woocommerce-pagination span.page-numbers.current { background: var(--navy); color: #fff; }

/* =========================================================
   Single product page
   ========================================================= */

body.single-product #content {
	max-width: var(--container-width);
	margin: 0 auto;
	padding: 36px 32px 70px;
}

.woocommerce-breadcrumb {
	color: var(--text-muted);
	font-size: 0.88rem;
	margin-bottom: 30px;
}
.woocommerce-breadcrumb a { color: var(--blue); }
.woocommerce-breadcrumb a:hover { text-decoration: underline; }

div.product .woocommerce-product-gallery__wrapper {
	border-radius: var(--radius);
	overflow: hidden;
	background: var(--blue-light);
}
div.product .woocommerce-product-gallery__image img { width: 100%; height: auto; display: block; }
div.product .flex-control-thumbs {
	display: flex;
	gap: 10px;
	margin: 14px 0 0;
	padding: 0;
	list-style: none;
}
div.product .flex-control-thumbs li { list-style: none; width: auto; }
div.product .flex-control-thumbs img {
	border-radius: 8px;
	cursor: pointer;
	opacity: 0.55;
	transition: opacity 0.2s ease;
}
div.product .flex-control-thumbs img.flex-active,
div.product .flex-control-thumbs img:hover { opacity: 1; }

div.product .summary.entry-summary .product_title {
	font-size: clamp(1.6rem, 3vw, 2.1rem);
	color: var(--navy);
	margin-bottom: 18px;
}
div.product .summary.entry-summary > .price {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--blue);
	margin-bottom: 18px;
}
div.product .summary.entry-summary > .price:empty { display: none; }

.woocommerce-product-details__short-description {
	color: var(--text-dark);
	font-size: 0.95rem;
	line-height: 1.65;
}
.woocommerce-product-details__short-description ul { margin: 14px 0; padding-left: 20px; }
.woocommerce-product-details__short-description li { margin-bottom: 6px; }

.product_meta {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid var(--border-light);
	font-size: 0.85rem;
	color: var(--text-muted);
}
.product_meta > span { display: block; margin-bottom: 6px; }
.product_meta a { color: var(--blue); }
.product_meta a:hover { text-decoration: underline; }

div.product .cart { margin: 24px 0; display: flex; align-items: center; gap: 14px; }
.single_add_to_cart_button.button {
	display: inline-block;
	padding: 14px 32px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 0.95rem;
	background: var(--navy);
	color: #fff;
	border: 2px solid var(--navy);
}
.single_add_to_cart_button.button:hover { background: var(--blue); border-color: var(--blue); }
div.product .quantity .qty {
	width: 70px;
	padding: 12px;
	border: 1px solid var(--border-light);
	border-radius: 8px;
	font-family: var(--font);
	font-size: 0.95rem;
}

/* Spec tables embedded in the short description and description tab.
   !important: same scraped inline style="width: ...px" issue as the
   archive card excerpt tables above - these must win over that. */
.woocommerce-product-details__short-description table,
.woocommerce-Tabs-panel table {
	width: 100% !important;
	max-width: 100% !important;
	border-collapse: collapse;
	margin: 18px 0;
	font-size: 0.88rem;
	display: block;
	overflow-x: auto;
}
.woocommerce-product-details__short-description td,
.woocommerce-product-details__short-description th,
.woocommerce-Tabs-panel td,
.woocommerce-Tabs-panel th {
	border: 1px solid #a9b8c9;
	padding: 10px 14px;
	text-align: left;
}
.woocommerce-product-details__short-description tr:first-child td,
.woocommerce-product-details__short-description tr:first-child th,
.woocommerce-Tabs-panel tr:first-child td,
.woocommerce-Tabs-panel tr:first-child th {
	background: var(--blue-light);
}

.woocommerce-tabs { margin-top: 54px; }
ul.tabs.wc-tabs {
	list-style: none;
	margin: 0 0 28px;
	padding: 0;
	border-bottom: 1px solid var(--border-light);
}
ul.tabs.wc-tabs li { list-style: none; margin: 0 8px -1px 0; }
ul.tabs.wc-tabs li a {
	display: inline-block;
	padding: 12px 18px;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--text-muted);
	border-bottom: 3px solid transparent;
}
ul.tabs.wc-tabs li.active a,
ul.tabs.wc-tabs li a:hover { color: var(--navy); border-bottom-color: var(--navy); }

.woocommerce-Tabs-panel {
	color: var(--text-dark);
	font-size: 0.95rem;
	line-height: 1.7;
	max-width: 100%;
	overflow-x: auto;
}
.woocommerce-Tabs-panel h2 { font-size: 1.3rem; color: var(--navy); margin-bottom: 18px; }

.related.products {
	clear: both;
	margin-top: 60px;
	padding-top: 46px;
	border-top: 1px solid var(--border-light);
}
.related.products > h2 { font-size: 1.5rem; color: var(--navy); margin-bottom: 26px; }

@media (max-width: 900px) {
	div.product .images,
	div.product .summary { float: none; width: 100%; }
	.woocommerce-tabs { margin-top: 40px; }
}
