/* =========================================================
   SS DECO - PRODUCTO FIX 2.3
   Responsive + divider + tabs en recuadros
   ========================================================= */

/* ---------------------------------------------------------
   1. DIVIDER QUE CORTA / ATRAVIESA EL TITULO
   --------------------------------------------------------- */

html[data-ss-theme] body.single-product .summary.entry-summary > span[class*="divider"],
html[data-ss-theme] body.single-product .summary .product-entry-divider,
html[data-ss-theme] body.single-product .summary .ct-product-divider,
html[data-ss-theme] body.single-product .summary .product-divider,
html[data-ss-theme] body.single-product span.product-entry-divider {
	display: none !important;
	visibility: hidden !important;
	width: 0 !important;
	height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	overflow: hidden !important;
}

html[data-ss-theme] body.single-product .summary .product_title {
	position: relative !important;
	z-index: 2 !important;
	border: 0 !important;
	box-shadow: none !important;
}

html[data-ss-theme] body.single-product .summary .product_title::before,
html[data-ss-theme] body.single-product .summary .product_title::after {
	display: none !important;
	content: none !important;
}

/* ---------------------------------------------------------
   2. TABS COMO RECUADROS
   --------------------------------------------------------- */

html[data-ss-theme] body.single-product .woocommerce-tabs {
	border-top: 1px solid var(--ss-line) !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs {
	display: flex !important;
	flex-direction: row !important;
	flex-wrap: wrap !important;
	align-items: center !important;
	justify-content: flex-start !important;
	gap: 10px !important;
	width: 100% !important;
	margin: 0 0 30px !important;
	padding: 22px 0 0 !important;
	border: 0 !important;
	background: transparent !important;
	overflow: visible !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs::after,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs::after {
	display: none !important;
	content: none !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li {
	display: block !important;
	flex: 0 0 auto !important;
	width: auto !important;
	min-width: 0 !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li::after,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li::after {
	display: none !important;
	content: none !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li a,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li a {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: auto !important;
	min-height: 44px !important;
	padding: 10px 16px !important;
	border: 1px solid var(--ss-line) !important;
	border-radius: 2px !important;
	background: transparent !important;
	color: var(--ss-text-soft) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	box-shadow: none !important;
	transition:
		background-color 180ms ease,
		border-color 180ms ease,
		color 180ms ease,
		transform 180ms ease;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li a:hover,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li a:hover {
	border-color: var(--ss-accent) !important;
	color: var(--ss-text) !important;
	transform: translateY(-1px);
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li.active a,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li.active a {
	border-color: var(--ss-accent) !important;
	background: var(--ss-accent) !important;
	color: #ffffff !important;
}

html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li.active a::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li.active a::after,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li.active a::before,
html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li.active a::after {
	display: none !important;
	content: none !important;
}

/* ---------------------------------------------------------
   3. CONTRASTE DEL CONTENIDO DE LAS TABS
   --------------------------------------------------------- */

html[data-ss-theme] body.single-product .woocommerce-Tabs-panel,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel p,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel li,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel td,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel dd {
	color: var(--ss-text-soft) !important;
}

html[data-ss-theme] body.single-product .woocommerce-Tabs-panel h1,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel h2,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel h3,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel h4,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel strong,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel b,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel th,
html[data-ss-theme] body.single-product .woocommerce-Tabs-panel dt {
	color: var(--ss-text) !important;
}

/* ---------------------------------------------------------
   4. TABLET
   --------------------------------------------------------- */

@media (max-width: 999px) {

	html[data-ss-theme] body.single-product .site-main > .ct-container {
		padding-top: clamp(24px, 5vw, 44px);
		padding-bottom: clamp(48px, 7vw, 72px);
	}

	html[data-ss-theme] body.single-product div.product {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		gap: clamp(30px, 6vw, 50px) !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-product-gallery,
	html[data-ss-theme] body.single-product .summary.entry-summary {
		width: 100% !important;
		max-width: none !important;
		float: none !important;
		margin: 0 !important;
	}

	html[data-ss-theme] body.single-product .flex-control-thumbs {
		display: flex !important;
		gap: 10px !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		scroll-snap-type: x proximity;
		scrollbar-width: thin;
		padding-bottom: 8px !important;
	}

	html[data-ss-theme] body.single-product .flex-control-thumbs li {
		flex: 0 0 82px !important;
		width: 82px !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}

	html[data-ss-theme] body.single-product .flex-control-thumbs img {
		width: 82px !important;
		height: 82px !important;
		object-fit: cover !important;
	}

	html[data-ss-theme] body.single-product .related ul.products,
	html[data-ss-theme] body.single-product .up-sells ul.products {
		display: grid !important;
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 34px 18px !important;
	}

	html[data-ss-theme] body.single-product .related ul.products li.product,
	html[data-ss-theme] body.single-product .up-sells ul.products li.product {
		width: auto !important;
		margin: 0 !important;
	}
}

/* ---------------------------------------------------------
   5. MOBILE
   --------------------------------------------------------- */

@media (max-width: 767px) {

	html[data-ss-theme] body.single-product .woocommerce-breadcrumb {
		margin-bottom: 20px !important;
		font-size: 11px !important;
		line-height: 1.5 !important;
	}

	html[data-ss-theme] body.single-product div.product {
		gap: 26px !important;
	}

	html[data-ss-theme] body.single-product .summary .product_title {
		margin-bottom: 10px !important;
		font-size: clamp(28px, 8.7vw, 38px) !important;
		line-height: 1.04 !important;
	}

	html[data-ss-theme] body.single-product .summary .price {
		margin-bottom: 18px !important;
		font-size: 21px !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-product-details__short-description {
		margin-bottom: 24px !important;
		font-size: 15px !important;
		line-height: 1.65 !important;
	}

	/* Variaciones siempre antes de cantidad y boton. */
	html[data-ss-theme] body.single-product form.variations_form.cart,
	html[data-ss-theme] body.single-product form.variations_form {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		float: none !important;
	}

	html[data-ss-theme] body.single-product form.variations_form table.variations {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		float: none !important;
		clear: both !important;
		margin: 0 0 18px !important;
	}

	html[data-ss-theme] body.single-product form.variations_form table.variations tbody {
		display: block !important;
		width: 100% !important;
	}

	html[data-ss-theme] body.single-product form.variations_form table.variations tr {
		display: grid !important;
		grid-template-columns: 1fr !important;
		gap: 8px !important;
		width: 100% !important;
		margin: 0 0 16px !important;
	}

	html[data-ss-theme] body.single-product form.variations_form table.variations th,
	html[data-ss-theme] body.single-product form.variations_form table.variations td {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		padding: 0 !important;
		border: 0 !important;
	}

	html[data-ss-theme] body.single-product form.variations_form table.variations select {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		min-height: 52px !important;
		font-size: 16px !important;
	}

	html[data-ss-theme] body.single-product .single_variation_wrap {
		display: block !important;
		width: 100% !important;
		max-width: none !important;
		float: none !important;
		clear: both !important;
		margin: 18px 0 0 !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart,
	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart-enabled,
	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart-disabled {
		display: grid !important;
		grid-template-columns: 96px minmax(0, 1fr) !important;
		gap: 12px !important;
		align-items: stretch !important;
		width: 100% !important;
		max-width: none !important;
		float: none !important;
		clear: both !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart .quantity {
		width: 96px !important;
		min-width: 96px !important;
		max-width: 96px !important;
		min-height: 54px !important;
		margin: 0 !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button {
		width: 100% !important;
		min-width: 0 !important;
		min-height: 54px !important;
		margin: 0 !important;
	}

	/* Tabs-recuadro: una fila desplazable si hace falta. */
	html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs,
	html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs {
		flex-wrap: nowrap !important;
		gap: 8px !important;
		max-width: 100% !important;
		margin-bottom: 24px !important;
		padding-top: 18px !important;
		overflow-x: auto !important;
		overflow-y: hidden !important;
		overscroll-behavior-inline: contain;
		scrollbar-width: thin;
	}

	html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li,
	html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li {
		flex: 0 0 auto !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-tabs ul.tabs li a,
	html[data-ss-theme] body.single-product .woocommerce-tabs ul.wc-tabs li a {
		min-height: 42px !important;
		padding: 9px 13px !important;
		font-size: 12px !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-Tabs-panel {
		max-width: 100% !important;
		padding-top: 10px !important;
		font-size: 15px !important;
		line-height: 1.7 !important;
	}

	/* Relacionados transparentes en ambos modos. */
	html[data-ss-theme] body.single-product .related.products ul.products li.product,
	html[data-ss-theme] body.single-product .up-sells.products ul.products li.product,
	html[data-ss-theme] body.single-product .related.products .product-entry-wrapper,
	html[data-ss-theme] body.single-product .up-sells.products .product-entry-wrapper,
	html[data-ss-theme] body.single-product .related.products .ct-image-container,
	html[data-ss-theme] body.single-product .up-sells.products .ct-image-container {
		background: transparent !important;
		border: 0 !important;
		box-shadow: none !important;
	}
}

@media (max-width: 479px) {

	html[data-ss-theme] body.single-product .site-main > .ct-container {
		padding-inline: 16px !important;
	}

	html[data-ss-theme] body.single-product .flex-control-thumbs li {
		flex-basis: 68px !important;
		width: 68px !important;
	}

	html[data-ss-theme] body.single-product .flex-control-thumbs img {
		width: 68px !important;
		height: 68px !important;
	}

	html[data-ss-theme] body.single-product .related ul.products,
	html[data-ss-theme] body.single-product .up-sells ul.products {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
		gap: 28px 10px !important;
	}
}

@media (max-width: 359px) {

	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart,
	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart-enabled,
	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart-disabled {
		grid-template-columns: 1fr !important;
	}

	html[data-ss-theme] body.single-product .woocommerce-variation-add-to-cart .quantity {
		width: 100% !important;
		min-width: 0 !important;
		max-width: none !important;
	}
}
