/* Shop + ficha: grilla cuadrada tipo Agüero, sin huecos ni cajas anidadas. */

body.tdl-catalog,
body.woocommerce.archive,
body.single-product {
	background: #111;
	color: #f2f2f2;
}

body.tdl-catalog #main-container,
body.woocommerce.archive #main-container,
body.single-product #main-container,
body.tdl-catalog #main,
body.woocommerce.archive #main,
body.single-product #main,
body.tdl-catalog .ct-container,
body.woocommerce.archive .ct-container {
	background: #111;
}

@media (min-width: 1000px) {
	body.tdl-catalog #main > .ct-container,
	body.tdl-catalog #main > .ct-container-full,
	body.woocommerce.archive #main > .ct-container,
	body.single-product #main > .ct-container {
		width: calc(100% - 80px) !important;
		max-width: 1140px !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		margin-left: auto;
		margin-right: auto;
		box-sizing: border-box;
	}
}

body.tdl-catalog .tdl-filter-btn {
	color: #f4f4f4;
}
body.tdl-catalog .tdl-filter-btn:hover,
body.tdl-catalog .tdl-filter-btn:focus-visible {
	color: #f59a57;
}

body.tdl-catalog .tdl-cat-h1 {
	color: #fff;
}
body.tdl-catalog .tdl-cat-bc,
body.tdl-catalog .tdl-cat-count {
	color: #e8e8e8;
}
body.tdl-catalog .tdl-bc-current {
	color: #f5f5f5;
}
body.tdl-catalog .tdl-cat-bc a {
	color: #e8e8e8;
}

body.tdl-catalog .tdl-facet-search input[type="search"] {
	color: #f2f2f2;
	border-bottom-color: #3a3a3a;
}
body.tdl-catalog .tdl-facet-search input[type="search"]::placeholder {
	color: #888;
}
body.tdl-catalog .tdl-facet-search input[type="search"]:focus {
	border-bottom-color: #f59a57;
}
body.tdl-catalog .tdl-facet-search button {
	color: #cfcfcf;
}
body.tdl-catalog .tdl-facet__cats a,
body.tdl-catalog .tdl-facet__cats li {
	color: #e8e8e8;
}

body.tdl-catalog ul.products,
body.tdl-catalog [data-products],
body.woocommerce.archive ul.products {
	gap: 1px !important;
}
@media (min-width: 700px) {
	body.tdl-catalog ul.products,
	body.tdl-catalog [data-products],
	body.woocommerce.archive ul.products {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
		--shop-columns: repeat(3, minmax(0, 1fr)) !important;
		gap: 1px !important;
	}
}
@media (min-width: 1100px) {
	body.tdl-catalog ul.products,
	body.tdl-catalog [data-products],
	body.woocommerce.archive ul.products {
		grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
		--shop-columns: repeat(4, minmax(0, 1fr)) !important;
		gap: 1px !important;
	}
}

body.tdl-catalog ul.products > li.product,
body.woocommerce.archive ul.products > li.product {
	background: #161616;
	padding: 0;
}

body.tdl-catalog .product .ct-media-container,
body.tdl-catalog .product figure {
	position: relative;
	aspect-ratio: 1 / 1;
	background-color: #161616 !important;
	background-image: none !important;
	animation: none !important;
	margin: 0 !important;
	overflow: hidden;
}

body.tdl-catalog .product .ct-media-container img,
body.tdl-catalog .product figure img {
	object-fit: contain;
	object-position: center;
	background: transparent !important;
	padding: 6%;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
}

body.tdl-catalog .woocommerce-loop-product__title,
body.tdl-catalog .product h2,
body.tdl-catalog .product .ct-woo-card-title,
body.tdl-catalog [data-products] .woocommerce-loop-product__title,
body.tdl-catalog ul.products a .woocommerce-loop-product__title {
	margin: 0 !important;
	padding: 5px 8px 8px !important;
	font-size: 12px !important;
	font-weight: 500 !important;
	line-height: 1.25 !important;
	color: #f4f4f4 !important;
	min-height: 0 !important;
	-webkit-line-clamp: 2;
}

/* Chips sobre la foto; sin renglón reservado debajo. */
body.tdl-catalog .tdl-loop-swatches {
	position: absolute;
	left: 8px;
	bottom: 8px;
	z-index: 4;
	display: block;
	margin: 0;
	padding: 0;
	min-height: 0 !important;
	pointer-events: none;
}
body.tdl-catalog .tdl-loop-swatches__items {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	align-items: center;
	min-height: 0 !important;
}
body.tdl-catalog .tdl-swatch--color,
body.tdl-catalog .tdl-swatch--image {
	width: 16px;
	height: 16px;
	border: 1px solid rgba(255, 255, 255, 0.92);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
body.tdl-catalog .tdl-swatch--label,
body.tdl-catalog .tdl-swatch--more {
	color: #fff;
	background: rgba(0, 0, 0, 0.55);
	border-color: rgba(255, 255, 255, 0.4);
}

body.tdl-catalog .tdl-infinite-sent {
	color: #9a9a9a;
}

@media (min-width: 1000px) {
	body.tdl-catalog #sidebar {
		color: #e8e8e8;
	}
}

/* Ficha: foto a medida sobre negro, sin placa clara ni cuadrado 50vw. */
body.single-product .product-entry-wrapper {
	max-width: none !important;
	width: 100%;
	background: #111;
}
body.single-product .woocommerce-product-gallery,
body.single-product .ct-product-gallery-container,
body.single-product .ct-media-container {
	background: #111 !important;
	aspect-ratio: auto !important;
}
body.single-product .woocommerce-product-gallery__image img,
body.single-product .ct-product-gallery-container img,
body.single-product .wp-post-image {
	width: auto !important;
	height: auto !important;
	max-width: 100% !important;
	max-height: min(68vh, 520px) !important;
	object-fit: contain;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
	background: transparent !important;
	display: block;
}
body.single-product .summary .price:empty {
	display: none !important;
}

@media (min-width: 900px) {
	body.single-product .product-entry-wrapper,
	body.single-product .product-entry-wrapper.is-width-constrained {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr) !important;
		gap: 0 32px;
		align-items: start;
		max-width: 1140px !important;
		width: calc(100% - 80px) !important;
		margin-left: auto;
		margin-right: auto;
	}
	body.single-product .woocommerce-product-gallery,
	body.single-product .summary.entry-summary {
		width: 100% !important;
		max-width: none !important;
		flex: none !important;
		float: none !important;
	}
	body.single-product .woocommerce-product-gallery {
		aspect-ratio: auto;
		margin: 0;
		max-height: 520px;
	}
	body.single-product .ct-product-gallery-container,
	body.single-product .ct-media-container {
		height: auto;
		aspect-ratio: auto !important;
		display: flex;
		align-items: center;
		justify-content: center;
		background: #111 !important;
	}
	body.single-product .woocommerce-product-gallery__image img,
	body.single-product .ct-product-gallery-container img,
	body.single-product .wp-post-image {
		width: auto !important;
		height: auto !important;
		max-width: 100% !important;
		max-height: 520px !important;
		object-fit: contain;
	}
	body.single-product .summary.entry-summary {
		background: transparent;
		color: #f4f4f4;
		padding: 8px 8px 24px 0;
		margin: 0;
		box-sizing: border-box;
	}
	body.single-product .product_title,
	body.single-product .summary .price,
	body.single-product .summary .price .amount {
		color: #fff;
	}
	body.single-product .summary .price {
		color: #8ec8ff;
	}
	body.single-product .product_meta,
	body.single-product .product_meta a,
	body.single-product .posted_in {
		color: #cfcfcf;
	}
	body.single-product .ct-product-divider {
		border-color: #3a3a3a;
		background: #3a3a3a;
	}
}

body.single-product .woocommerce-tabs {
	background: #111;
	color: #e8e8e8;
	width: calc(100% - 80px);
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding: 28px 0 48px;
	box-sizing: border-box;
}
body.single-product .woocommerce-tabs h2,
body.single-product .woocommerce-Tabs-panel {
	color: #f2f2f2;
}
body.single-product .woocommerce-Tabs-panel,
body.single-product #tab-description {
	padding: 20px 4px 0;
}
body.single-product .woocommerce-tabs li a {
	color: #cfcfcf;
}
body.single-product .woocommerce-tabs li.active a {
	color: #f59a57;
}

/* Relacionados: mismas cajas oscuras que el loop. */
body.single-product ul.products > li.product {
	background: #161616;
	padding: 0;
}
body.single-product ul.products > li.product figure,
body.single-product ul.products .ct-media-container {
	background-color: #161616 !important;
	background-image: none !important;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	margin: 0 !important;
}
body.single-product ul.products > li.product img {
	background: transparent !important;
	object-fit: contain;
	padding: 6%;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
}

body.single-product .related .woocommerce-loop-product__title,
body.single-product .up-sells .woocommerce-loop-product__title,
body.single-product ul.products .woocommerce-loop-product__title {
	color: #f4f4f4 !important;
	padding: 8px 10px 12px !important;
	font-size: 13px !important;
}

@media (max-width: 999.98px) {
	body.single-product .woocommerce-tabs {
		width: 100%;
		padding: 24px max(16px, env(safe-area-inset-left, 0px)) 40px max(16px, env(safe-area-inset-right, 0px));
	}
}
