/* Product listing cards — grid layout with qty selector */

.product-thumb {
	background: #fff;
	padding: 5px;
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	min-width: 0;
	position: relative;
	overflow: visible;
}

.product-thumb .image {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 200px;
	flex-shrink: 0;
	padding: 0px;
	text-align: center;
}

.product-thumb .image a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.product-thumb .image img {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto;
	max-height: 100%;
	object-fit: contain;
}

.product-thumb .caption {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
	flex-shrink: 0;
	position: relative;
	padding: 0 8px;
	min-height: 10px;
}

.product-thumb h4 {
	margin: 0;
	padding: 8px 0 5px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.3;
	max-width: 100%;
}

.product-thumb h4 a {
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	text-decoration: none;
	color: #333;
}

.product-thumb h4 a:hover {
	color: #111;
}

.product-thumb .description,
.product-thumb .caption > p:not(.price) {
	display: none;
}

.product-thumb .price {
	display: block;
	padding: 0 0 8px;
	font-size: 20px;
	font-weight: bold;
	color: var(--price-color);
	margin: 0 auto;
}

.product-thumb .price-new {
	font-weight: 600;
	color: var(--price-color);
}

.product-thumb .price-old {
	color: #999;
	text-decoration: line-through;
	margin-left: 8px;
	font-size: 14px;
	font-weight: normal;
}

.product-thumb .price-tax {
	color: #999;
	font-size: 12px;
	display: block;
	font-weight: normal;
}

.product-thumb .rating {
	padding-bottom: 6px;
}

.product-thumb .buttons-wrapper {
	margin-top: auto;
	padding: 0 8px 8px;
}

.product-thumb .product-qty {
	margin-bottom: 10px;
	width: 100%;
}

.product-thumb .product-qty .form-control {
	min-width: 50px;
	text-align: center;
	height: 34px;
}

.product-thumb .product-qty .btn-number {
	height: 34px;
	min-width: 34px;
	padding: 6px 10px;
	background: linear-gradient(to bottom, #f8f8f8, #e8e8e8);
	border-color: #ccc;
}

.product-thumb .button-group {
	border: 0;
	border-top: 1px solid #e2e2e2;
	background: transparent;
	overflow: visible;
	padding: 0px 0 0;
}

.product-thumb .cart-button {
	width: 100%;
}

.product-thumb .btn-cart {
	display: block;
	width: 100%;
	padding: 8px 18px;
	background: var(--btn-buy-bg);
	background-image: none;
	border-color: var(--btn-buy-border);
	color: #fff !important;
	font-size: 14px;
	font-weight: 400;
	border-radius: 3px;
}

.product-thumb .btn-cart:hover,
.product-thumb .btn-cart:focus {
	background: var(--btn-buy-hover);
	border-color: var(--btn-buy-hover);
	color: #fff !important;
}

#product-category #list-view,
#product-category #grid-view,
#product-search #list-view,
#product-search #grid-view,
#product-special #list-view,
#product-special #grid-view,
#product-manufacturer #list-view,
#product-manufacturer #grid-view {
	display: none !important;
}

/* Full-width listing container — more columns on wide screens, same card size */
#product-category.container,
#product-search.container,
#product-manufacturer.container {
	width: 100%;
	max-width: none;
}

.container-products {
	--product-grid-col: 270px;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, var(--product-grid-col)), var(--product-grid-col)));
	gap: 20px;
	justify-content: start;
	margin: 0;
	width: 100%;
}

.container-products::before,
.container-products::after {
	display: none;
}

.container-products .product-layout.product-list,
.container-products .product-layout.product-grid {
	float: none;
	width: 100%;
	max-width: 100%;
	min-width: 0;
	padding: 0;
	margin: 0;
}

/* Sobrescreve layout legado OpenCart em cards de produto */
.product-list .product-thumb .caption,
.product-grid .product-thumb .caption,
.product-thumb .caption {
	min-height: 10px !important;
	margin-left: 0 !important;
}

.product-thumb .button-group button + button {
	display: none;
}

/* Full-width product listings — hide left sidebar */
#product-category #column-left,
#product-search #column-left,
#product-manufacturer #column-left {
	display: none !important;
}

#product-category #content,
#product-search #content,
#product-manufacturer #content {
	width: 100%;
	flex: 0 0 100%;
	max-width: 100%;
}

#product-category .pagination-results .text-right,
#product-search .pagination-results .text-right,
#product-manufacturer .pagination-results .text-right {
	display: none !important;
}

#product-category .pagination-results .text-left,
#product-search .pagination-results .text-left,
#product-manufacturer .pagination-results .text-left {
	width: 100%;
	text-align: center;
}

/* Category sub-navigation — above product grid */
.category-subnav {
	margin: 0 0 22px;
	padding: 14px 16px 12px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.category-subnav-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.category-subnav-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 20px;
	background: var(--account-accent-soft, rgba(29, 96, 188, 0.12));
	color: var(--account-accent, #1d60bc);
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}

.category-subnav-back:hover,
.category-subnav-back:focus {
	background: var(--account-accent, #1d60bc);
	color: #fff;
	text-decoration: none;
}

.category-subnav-label {
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--account-muted, #777);
}

.category-subnav-scroll {
	position: relative;
	margin: 0;
	padding: 0;
	overflow: visible;
}

.category-subnav-list {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-subnav-item {
	position: relative;
	flex: 0 1 auto;
	max-width: 100%;
}

.category-subnav-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 9px 16px;
	border: 1px solid #ddd;
	border-radius: 24px;
	background: #fafafa;
	color: #333;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.category-subnav-link:hover,
.category-subnav-link:focus {
	border-color: var(--account-accent, #1d60bc);
	background: #fff;
	color: var(--account-accent, #1d60bc);
	text-decoration: none;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.category-subnav-item.is-active > .category-subnav-link {
	border-color: var(--account-accent, #1d60bc);
	background: var(--account-accent, #1d60bc);
	color: #fff;
	box-shadow: 0 3px 10px var(--account-accent-soft, rgba(29, 96, 188, 0.25));
}

.category-subnav-item.is-active > .category-subnav-link:hover {
	background: var(--account-accent, #1d60bc);
	color: #fff;
	opacity: 0.92;
}

.category-subnav-caret {
	font-size: 11px;
	opacity: 0.75;
}

.category-subnav-dropdown {
	position: absolute;
	left: 0;
	top: calc(100% + 6px);
	min-width: 200px;
	max-width: 280px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
	z-index: 50;
	overflow: hidden;
}

.category-subnav-item.has-children:hover > .category-subnav-dropdown,
.category-subnav-item.has-children:focus-within > .category-subnav-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.category-subnav-dropdown-list {
	margin: 0;
	padding: 6px 0;
	list-style: none;
}

.category-subnav-dropdown-list a {
	display: block;
	padding: 8px 16px;
	color: #444;
	font-size: 13px;
	text-decoration: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.category-subnav-dropdown-list a:hover,
.category-subnav-dropdown-list a.is-active {
	background: var(--account-accent-soft, rgba(29, 96, 188, 0.12));
	color: var(--account-accent, #1d60bc);
	text-decoration: none;
}

.category-subnav-tier2 {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed #e0e0e0;
}

.category-subnav-tier2-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.category-subnav-tier2-link {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 16px;
	background: #f3f3f3;
	color: #555;
	font-size: 12px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.2s ease, color 0.2s ease;
}

.category-subnav-tier2-link:hover,
.category-subnav-tier2-link.is-active {
	background: var(--account-accent-soft, rgba(29, 96, 188, 0.12));
	color: var(--account-accent, #1d60bc);
	text-decoration: none;
}

.category-subnav-tier2-link.is-active {
	font-weight: 600;
}

@media (min-width: 768px) {
	.category-subnav-tier2 {
		display: none;
	}
}

@media (max-width: 767px) {
	.category-subnav-item.has-children > .category-subnav-dropdown {
		display: none;
	}

	.category-subnav {
		padding: 12px 12px 10px;
		margin-bottom: 16px;
	}
}
