/* =========================================================
   SS DECO - APLICACION GLOBAL DEL TEMA
   La Home conserva su composicion intercalada.
   ========================================================= */

/* Paginas normales: fondo y texto segun tema */
html[data-ss-theme] body:not(.home) {
	background: var(--ss-bg) !important;
	color: var(--ss-text);
}

html[data-ss-theme] body:not(.home) .site-main {
	background: var(--ss-bg) !important;
	color: var(--ss-text);
}

/*
 * HOME:
 * No imponemos un fondo global al contenido principal.
 * Sus secciones claras/oscuras siguen gobernadas por el CSS de la Home.
 */
html[data-ss-theme] body.home .site-main {
	background: transparent;
}

/* Header Blocksy */
html[data-ss-theme] #header [data-row],
html[data-ss-theme] header#header [data-row] {
	--theme-text-color: var(--ss-header-text);
	--theme-link-initial-color: var(--ss-header-text);
	--theme-link-hover-color: var(--ss-accent);
}

html[data-ss-theme] #header [data-row="middle"],
html[data-ss-theme] header#header [data-row="middle"] {
	background: var(--ss-header-bg) !important;
	border-color: var(--ss-header-line) !important;
}

html[data-ss-theme] #header .menu > li > a,
html[data-ss-theme] #header [data-id="menu"] a,
html[data-ss-theme] #header .ct-header-trigger,
html[data-ss-theme] #header .ct-icon-container,
html[data-ss-theme] #header .ct-cart-item {
	color: var(--ss-header-text) !important;
}

html[data-ss-theme] #header svg {
	fill: currentColor;
}

/* Transiciones discretas */
@media (prefers-reduced-motion: no-preference) {
	html[data-ss-theme] body,
	html[data-ss-theme] .site-main,
	html[data-ss-theme] #header [data-row="middle"],
	html[data-ss-theme] .ssdeco-shop-intro {
		transition:
			background-color 220ms ease,
			color 220ms ease,
			border-color 220ms ease;
	}
}

/* Formularios de paginas comunes */
html[data-ss-theme] body:not(.home) input:not([type="submit"]):not([type="button"]),
html[data-ss-theme] body:not(.home) textarea,
html[data-ss-theme] body:not(.home) select {
	background-color: var(--ss-surface) !important;
	border-color: var(--ss-line) !important;
	color: var(--ss-text) !important;
}

/* Catalogo actual: puente con sus variables */
html[data-ss-theme] body.woocommerce-shop .site-main,
html[data-ss-theme] body.tax-product_cat .site-main {
	background: var(--ss-shop-paper) !important;
	color: var(--ss-shop-ink) !important;
}

html[data-ss-theme] .ssdeco-shop-intro {
	background: var(--ss-surface) !important;
	border-color: var(--ss-line) !important;
}

html[data-ss-theme] .ssdeco-shop-intro h1,
html[data-ss-theme] body.woocommerce-shop ul.products li.product .woocommerce-loop-product__title,
html[data-ss-theme] body.tax-product_cat ul.products li.product .woocommerce-loop-product__title {
	color: var(--ss-shop-ink) !important;
}

html[data-ss-theme] .ssdeco-shop-intro__meta,
html[data-ss-theme] .ssdeco-product-category,
html[data-ss-theme] .ssdeco-result-count {
	color: var(--ss-shop-muted) !important;
}

/* Imagenes del catalogo: siempre sin marco ni fondo artificial */
html[data-ss-theme] body.woocommerce-shop ul.products li.product .ct-image-container,
html[data-ss-theme] body.tax-product_cat ul.products li.product .ct-image-container,
html[data-ss-theme] body.woocommerce-shop ul.products li.product > a.woocommerce-LoopProduct-link > img,
html[data-ss-theme] body.tax-product_cat ul.products li.product > a.woocommerce-LoopProduct-link > img {
	background: transparent !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

html[data-ss-theme] body.woocommerce-shop ul.products li.product .ct-image-container img,
html[data-ss-theme] body.tax-product_cat ul.products li.product .ct-image-container img,
html[data-ss-theme] body.woocommerce-shop ul.products li.product > a.woocommerce-LoopProduct-link > img,
html[data-ss-theme] body.tax-product_cat ul.products li.product > a.woocommerce-LoopProduct-link > img {
	padding: 0 !important;
	background: transparent !important;
	border: 0 !important;
	outline: 0 !important;
	box-shadow: none !important;
}

/* Botones del catalogo */
html[data-ss-theme="light"] .ssdeco-shop-categories a[aria-current="page"],
html[data-ss-theme="light"] .ssdeco-shop-categories a:hover {
	background: #141416 !important;
	border-color: #141416 !important;
	color: #f3eee6 !important;
}

html[data-ss-theme="dark"] .ssdeco-shop-categories a[aria-current="page"],
html[data-ss-theme="dark"] .ssdeco-shop-categories a:hover {
	background: #f3eee6 !important;
	border-color: #f3eee6 !important;
	color: #141416 !important;
}
