/* ================================================================
   Shop / archive — scoped stylesheet
   Loaded on is_shop() || is_product_category() || is_product_tag()
   ================================================================ */

/* ================================================================
   Shop / archive page  (body.sc-shop, body.sc-product-cat)
   ================================================================ */

/* ---- Keep Storefront's float layout; just clean up the sidebar ---- */
body.sc-shop .site-main,
body.sc-product-cat .site-main {
	padding: 0 !important;
}

/* Hide blog-only widgets; keep WooCommerce product category widget */
body.sc-shop #secondary .widget_search,
body.sc-shop #secondary .widget_recent_entries,
body.sc-shop #secondary .widget_recent_comments,
body.sc-shop #secondary .widget_archive,
body.sc-shop #secondary .widget_categories,
body.sc-product-cat #secondary .widget_search,
body.sc-product-cat #secondary .widget_recent_entries,
body.sc-product-cat #secondary .widget_recent_comments,
body.sc-product-cat #secondary .widget_archive,
body.sc-product-cat #secondary .widget_categories {
	display: none !important;
}

/* ---- Shop sidebar styling ---- */
body.sc-shop #secondary,
body.sc-product-cat #secondary {
	padding: 0 !important;
}

body.sc-shop #secondary .widget,
body.sc-product-cat #secondary .widget {
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	padding: 0 !important;
	margin-bottom: 1.5rem !important;
}

body.sc-shop #secondary .widget .widget-title,
body.sc-product-cat #secondary .widget .widget-title {
	font-size: 0.7rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #9ca3af !important;
	margin: 0 0 0.75rem !important;
	border: none !important;
	padding: 0 !important;
}

.sc-shop-widget__title {
	font-size: 0.7rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #9ca3af !important;
	margin: 0 0 0.75rem !important;
	padding: 0 !important;
}

.sc-cat-list {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
	display: flex !important;
	flex-direction: column !important;
	gap: 0.125rem !important;
}

.sc-cat-list li a {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 0.5rem 0.75rem !important;
	border-radius: 0.5rem !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: #374151 !important;
	text-decoration: none !important;
	transition: background 0.12s, color 0.12s !important;
}

.sc-cat-list li a:hover {
	background: #f3f4f6 !important;
	color: #111827 !important;
}

.sc-cat-list li.sc-cat-active a {
	background: #fff1ee !important;
	color: #dc4a26 !important;
	font-weight: 600 !important;
}

.sc-cat-count {
	font-size: 0.75rem !important;
	color: #9ca3af !important;
	font-weight: 400 !important;
}

/* ---- Breadcrumb ---- */
body.sc-shop .woocommerce-breadcrumb,
body.sc-product-cat .woocommerce-breadcrumb {
	font-size: 0.8rem !important;
	color: #9ca3af !important;
	margin-bottom: 1.5rem !important;
	background: none !important;
	padding: 0 !important;
}

body.sc-shop .woocommerce-breadcrumb a,
body.sc-product-cat .woocommerce-breadcrumb a {
	color: #9ca3af !important;
	text-decoration: none !important;
}

body.sc-shop .woocommerce-breadcrumb a:hover,
body.sc-product-cat .woocommerce-breadcrumb a:hover {
	color: #dc4a26 !important;
}

/* ---- Shop heading ---- */
body.sc-shop .woocommerce-products-header,
body.sc-product-cat .woocommerce-products-header {
	margin-bottom: 2rem !important;
}

body.sc-shop .woocommerce-products-header__title,
body.sc-product-cat .woocommerce-products-header__title,
body.sc-shop h1.page-title,
body.sc-product-cat h1.page-title {
	font-size: 1.75rem !important;
	font-weight: 800 !important;
	color: #111827 !important;
	margin: 0 !important;
	line-height: 1.2 !important;
}

/* ---- Toolbar (results count + sort) ---- */
body.sc-shop .woocommerce-result-count,
body.sc-product-cat .woocommerce-result-count {
	font-size: 0.85rem !important;
	color: #6b7280 !important;
	margin: 0 !important;
}

body.sc-shop .woocommerce-ordering,
body.sc-product-cat .woocommerce-ordering {
	margin: 0 !important;
}

body.sc-shop .woocommerce-ordering select,
body.sc-product-cat .woocommerce-ordering select {
	font-size: 0.8125rem !important;
	font-weight: 500 !important;
	padding: 0.4rem 2rem 0.4rem 0.75rem !important;
	border: 1px solid #e5e7eb !important;
	border-radius: 0.5rem !important;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	color: #374151 !important;
	outline: none !important;
	cursor: pointer !important;
	box-shadow: none !important;
}

/* ---- WooCommerce category widget in sidebar ---- */
body.sc-shop #secondary .product-categories,
body.sc-product-cat #secondary .product-categories {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

body.sc-shop #secondary .product-categories li,
body.sc-product-cat #secondary .product-categories li {
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
}

body.sc-shop #secondary .product-categories li a,
body.sc-product-cat #secondary .product-categories li a {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	padding: 0.4375rem 0.75rem !important;
	border-radius: 0.5rem !important;
	font-size: 0.875rem !important;
	font-weight: 500 !important;
	color: #374151 !important;
	text-decoration: none !important;
	transition: background 0.12s, color 0.12s !important;
}

body.sc-shop #secondary .product-categories li a:hover,
body.sc-product-cat #secondary .product-categories li a:hover {
	background: #f3f4f6 !important;
	color: #111827 !important;
}

body.sc-shop #secondary .product-categories li.current-cat a,
body.sc-product-cat #secondary .product-categories li.current-cat a {
	background: #fff1ee !important;
	color: #dc4a26 !important;
	font-weight: 600 !important;
}

body.sc-shop #secondary .product-categories .count,
body.sc-product-cat #secondary .product-categories .count {
	font-size: 0.75rem !important;
	color: #9ca3af !important;
	font-weight: 400 !important;
}

/* ---- Product grid ---- */
body.sc-shop ul.products,
body.sc-product-cat ul.products {
	display: grid !important;
	grid-template-columns: repeat(3, 1fr) !important;
	gap: 1.25rem !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 1.5rem 0 0 !important;
	float: none !important;
	clear: both !important;
	width: 100% !important;
}

/* ---- Product card ---- */
body.sc-shop ul.products li.product,
body.sc-product-cat ul.products li.product {
	background: #fff !important;
	border: 1px solid #f3f4f6 !important;
	border-radius: 1rem !important;
	overflow: hidden !important;
	display: flex !important;
	flex-direction: column !important;
	transition: box-shadow 0.18s, border-color 0.18s !important;
	padding: 0 !important;
	margin: 0 !important;
	float: none !important;
	width: auto !important;
}

body.sc-shop ul.products li.product:hover,
body.sc-product-cat ul.products li.product:hover {
	box-shadow: 0 4px 16px 0 rgba(0,0,0,.07) !important;
	border-color: #e5e7eb !important;
}

/* Thumbnail */
body.sc-shop ul.products li.product a img,
body.sc-product-cat ul.products li.product a img {
	width: 100% !important;
	height: 200px !important;
	object-fit: cover !important;
	display: block !important;
	transition: transform 0.3s !important;
	margin: 0 !important;
}

body.sc-shop ul.products li.product:hover a img,
body.sc-product-cat ul.products li.product:hover a img {
	transform: scale(1.03) !important;
}

/* Card content area */
body.sc-shop ul.products li.product .woocommerce-loop-product__link,
body.sc-product-cat ul.products li.product .woocommerce-loop-product__link {
	display: flex !important;
	flex-direction: column !important;
	text-decoration: none !important;
}

/* Category badge */
body.sc-shop ul.products li.product .woocommerce-loop-category__title,
body.sc-shop ul.products li.product .ast-woo-product-category,
body.sc-product-cat ul.products li.product .ast-woo-product-category {
	font-size: 0.68rem !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.08em !important;
	color: #dc4a26 !important;
	padding: 0.875rem 1rem 0 !important;
	margin: 0 !important;
}

/* Product title */
body.sc-shop ul.products li.product .woocommerce-loop-product__title,
body.sc-product-cat ul.products li.product .woocommerce-loop-product__title {
	font-size: 0.9375rem !important;
	font-weight: 600 !important;
	color: #111827 !important;
	padding: 0.5rem 1rem 0 !important;
	margin: 0 !important;
	line-height: 1.4 !important;
}

/* Price */
body.sc-shop ul.products li.product .price,
body.sc-product-cat ul.products li.product .price {
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	color: #374151 !important;
	padding: 0.375rem 1rem 0 !important;
	margin: 0 !important;
	display: block !important;
}

body.sc-shop ul.products li.product .price,
body.sc-product-cat ul.products li.product .price {
	display: flex !important;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
}

body.sc-shop ul.products li.product .price ins,
body.sc-product-cat ul.products li.product .price ins {
	text-decoration: none !important;
	font-weight: 800 !important;
	color: #111827 !important;
}

body.sc-shop ul.products li.product .price del,
body.sc-product-cat ul.products li.product .price del {
	color: #9ca3af !important;
	font-weight: 400 !important;
	font-size: 0.78em !important;
	text-decoration: line-through !important;
}

/* Add to cart button */
body.sc-shop ul.products li.product .button,
body.sc-product-cat ul.products li.product .button {
	display: block !important;
	margin: 0.875rem 1rem 1rem !important;
	padding: 0.6rem 1rem !important;
	background: transparent !important;
	color: #dc4a26 !important;
	border: 1.5px solid #dc4a26 !important;
	border-radius: 0.625rem !important;
	font-size: 0.85rem !important;
	font-weight: 600 !important;
	text-align: center !important;
	text-decoration: none !important;
	transition: background 0.15s, color 0.15s !important;
}

body.sc-shop ul.products li.product .button:hover,
body.sc-product-cat ul.products li.product .button:hover {
	background: #dc4a26 !important;
	color: #fff !important;
}

/* Sale badge */
body.sc-shop ul.products li.product .onsale,
body.sc-product-cat ul.products li.product .onsale {
	top: 0.75rem !important;
	left: 0.75rem !important;
	right: auto !important;
	background: #dc4a26 !important;
	border-radius: 0.375rem !important;
	font-size: 0.7rem !important;
	font-weight: 700 !important;
	padding: 0.2rem 0.5rem !important;
	min-height: unset !important;
	min-width: unset !important;
	line-height: 1.6 !important;
}

/* ---- Shop archive toolbar ---- */

/* Orderby select */
body.sc-shop .sc-orderby select,
body.sc-product-cat .sc-orderby select {
	padding: 0.4rem 2rem 0.4rem 0.75rem;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: #374151;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.6rem center;
	-webkit-appearance: none;
	appearance: none;
	outline: none;
	cursor: pointer;
}

body.sc-shop .sc-orderby select:focus,
body.sc-product-cat .sc-orderby select:focus {
	border-color: #dc4a26;
	box-shadow: 0 0 0 3px rgba(220,74,38,0.08);
}

/* Result count */
body.sc-shop .woocommerce-result-count,
body.sc-product-cat .woocommerce-result-count {
	font-size: 0.875rem;
	color: #9ca3af;
	margin: 0;
}
