/* Product Item - Mobile*(only large) and Tablet (Landscape and Portrait) */
@media screen and (pointer: coarse) and (min-width: 768px) and (max-device-width: 1020px) and (max-device-height: 1000px) and (orientation: landscape),
screen and (pointer: coarse) and (min-device-width: 768px) and (min-device-height: 700px) and (orientation: landscape),
screen and (pointer: coarse) and (min-width: 700px) and (min-device-height: 1000px) {
	.section-products .rdc-productlist-desktop-first-row:not(.first-line) {padding-top: 0 !important;}
}

.products .wrapper-page{padding: 0;}
.container-products{min-height: 50vh;}
.container-products.listBreakAvailable .section-products,
.container-products.productListColumnFullWidth .section-products {text-align: center;}
.container-products.overlay::before {z-index: 80;}
.container-products .section-products .column{float: none;display: inline-block;vertical-align: top;}
.container-list{position: relative;}
.list-overlay{display: none; position: absolute;top: 0;left: 0;width: 100%;height: 100%;background: rgba(255,255,255,0.8) url(/sysimages/listloader.gif) center 20vh/60px no-repeat;z-index: 85;}
.bottom-list{text-align: center;}
.bottom-list .loadingIcon{display: none;line-height: 0;}
.bottom-list .loadingIcon img{max-width: 36px;}

/* Search */
.main-search-iframe.solr_1 .content-search {display: none;}
.search .page-content {text-align: center;}

/* Only Tablet (Portrait and Landscape) */
@media screen and (pointer: coarse) and (min-width: 700px) and (min-device-height: 1000px) and (orientation: portrait), 
screen and (pointer: coarse) and (min-device-width: 768px) and (min-device-height: 700px) and (orientation: landscape) {
	body:not(.rdc-platform-api-device-mobile) .container-products {min-height: 50vh;}
}

@media screen and (max-width: 767px){
	.wrapper-products-container {padding-left: 0; padding-right: 0;}
}

@media screen and (max-width: 1199px){
	.container-products{min-height: 40vh;}
	.products .wrapper-page{padding: 0;}
	.container-products, .wrapper-side-menu{float: none;width: 100%;}
	.container-list{float: none;padding-top: 0;}
	.section-products .column.rdc-product-item-with_text {width: 100% !important;}
}

@media screen and (min-width: 1200px) {
	.wrapper-side-menu{float: left;}
	.wrapper-products {position: relative;}
	.container-products.overlay::before {z-index: 40;}
}

/* Product Item - Mobile*(only large) (Landscape) */
@media screen and (pointer: coarse) and (min-width: 768px) and (max-device-width: 1020px) and (max-device-height: 1000px) and (orientation: landscape)  {
	body.rdc-platform-api-device-mobile .wrapper-side-menu {width: auto !important; float: none !important;}
	body.rdc-platform-api-device-mobile .container-products {min-height: 0 !important;}
	body.rdc-platform-api-device-mobile .container-products.list_area_b_active {width: 100% !important;}
}


/* SECTION: CSS Grid Layout */
	.section-products.rdc-grid-layout {
		display: grid;
	}

	/* Neutralizar pseudo-elementos clearfix do .row herdados pelo container da grid */
	.section-products.rdc-grid-layout::before,
	.section-products.rdc-grid-layout::after {
		display: none !important;
		content: none !important;
	}

	/* Numero de colunas desktop por classe rowN (actualizada pelo buildGrid() no JS) */
	.section-products.rdc-grid-layout.row4 { grid-template-columns: repeat(4, 1fr); }
	.section-products.rdc-grid-layout.row3 { grid-template-columns: repeat(3, 1fr); }
	.section-products.rdc-grid-layout.row2 { grid-template-columns: repeat(2, 1fr); }
	.section-products.rdc-grid-layout.row1 { grid-template-columns: 1fr; }

	/* --- Override de largura float: anular col-* nos filhos directos --- */
	.section-products.rdc-grid-layout > .column,
	.section-products.rdc-grid-layout > .column-default {
		width: 1px !important;
		min-width: 100% !important;
		float: none !important;
		display: block !important;
	}
	.section-products.rdc-grid-layout > .columnWidth1 { grid-column: span 1; }

	/* Angular (ng-repeat): selecionar via .rdc-pl-ng-row (> não atravessa display:contents) */
	.section-products.rdc-grid-layout > .rdc-pl-ng-row > .column,
	.section-products.rdc-grid-layout > .rdc-pl-ng-row > .column-default {
		width: 1px !important;
		min-width: 100% !important;
		float: none !important;
		display: block !important;
	}
	.section-products.rdc-grid-layout > .rdc-pl-ng-row > .columnWidth1 { grid-column: span 1; }

/* Tablet (768-991px): buildGrid força 3 colunas para row4 (JS usa row4 no container mas col-sm-4 nos itens); em CSS Grid o span é definido pelo container */
@media screen and (min-width: 768px) and (max-width: 991px) {
	.section-products.rdc-grid-layout.row4 { grid-template-columns: repeat(3, 1fr); }
}

/* --- Mobile --- */
@media screen and (max-width: 767px) {
	.section-products.rdc-grid-layout.rdc-grid-mobile-2 { grid-template-columns: repeat(2, 1fr); }
	.section-products.rdc-grid-layout.rdc-grid-mobile-1 { grid-template-columns: 1fr; }
	/* col-xs-12 (list_mobile_grid=100): produto ocupa linha completa */
	.section-products.rdc-grid-layout > .col-xs-12.column,
	.section-products.rdc-grid-layout > .col-xs-12.column-default,
	.section-products.rdc-grid-layout > .rdc-pl-ng-row > .col-xs-12.column,
	.section-products.rdc-grid-layout > .rdc-pl-ng-row > .col-xs-12.column-default {
		grid-column: 1 / -1;
	}
}
