/* =========================================================
   TESSUTI CREATIVI - Adaptive Product Layout
   Layout prodotto interno in base al formato immagine
   ========================================================= */

body.tc-product-adaptive{
	--tc-gold:#c2a165;
	--tc-bordeaux:#67263a;
	--tc-bordeaux-dark:#4a1a28;
	--tc-ink:#1a1a1a;
	--tc-text:#5f5750;
	--tc-muted:#8a8178;
	--tc-cream:#FDFCFB;
	--tc-soft:#f4f2ef;
	--tc-white:#ffffff;
	--tc-border:rgba(26,26,26,.09);
	--tc-shadow:0 22px 52px rgba(26,26,26,.08);
}

/* Base pagina prodotto */
body.tc-product-adaptive.single-product .site-main,
body.tc-product-adaptive.single-product main{
	background:var(--tc-cream);
}

/* Container WooCommerce prodotto */
body.tc-product-adaptive.single-product div.product{
	max-width:1240px;
	margin:0 auto;
	padding:54px 24px 74px;
	display:grid;
	grid-template-columns:minmax(0, 1.05fr) minmax(390px, .95fr);
	gap:46px;
	align-items:start;
}

/* Elimina float WooCommerce classici */
body.tc-product-adaptive.single-product div.product div.images,
body.tc-product-adaptive.single-product div.product div.summary{
	float:none !important;
	width:auto !important;
	clear:none !important;
}

/* Gallery card */
body.tc-product-adaptive.single-product div.product div.images{
	position:sticky;
	top:132px;
	margin:0 !important;
	padding:18px;
	border-radius:34px;
	background:#fff;
	border:1px solid var(--tc-border);
	box-shadow:var(--tc-shadow);
	overflow:hidden;
}

/* Area immagine principale */
body.tc-product-adaptive.single-product .woocommerce-product-gallery__wrapper{
	margin:0 !important;
}

body.tc-product-adaptive.single-product .woocommerce-product-gallery__image{
	border-radius:24px;
	background:
		linear-gradient(180deg, rgba(244,242,239,.75), rgba(253,252,251,1));
	overflow:hidden;
	display:flex !important;
	align-items:center;
	justify-content:center;
}

/* Regola madre: mostra sempre immagine completa */
body.tc-product-adaptive.single-product .woocommerce-product-gallery__image a,
body.tc-product-adaptive.single-product .woocommerce-product-gallery__image img{
	display:block !important;
	width:100% !important;
	height:100% !important;
}

body.tc-product-adaptive.single-product .woocommerce-product-gallery__image img{
	object-fit:contain !important;
	object-position:center center !important;
	border-radius:0 !important;
	box-shadow:none !important;
	background:transparent !important;
}

/* Thumbnail */
body.tc-product-adaptive.single-product .flex-control-thumbs{
	display:grid !important;
	grid-template-columns:repeat(5, minmax(0, 1fr));
	gap:10px;
	margin:14px 0 0 !important;
	padding:0 !important;
	list-style:none !important;
}

body.tc-product-adaptive.single-product .flex-control-thumbs li{
	width:auto !important;
	float:none !important;
	margin:0 !important;
}

body.tc-product-adaptive.single-product .flex-control-thumbs img{
	width:100% !important;
	aspect-ratio:1 / 1;
	object-fit:cover !important;
	border-radius:12px;
	border:1px solid rgba(26,26,26,.08);
	opacity:.62;
	transition:opacity .2s ease, border-color .2s ease, transform .2s ease;
}

body.tc-product-adaptive.single-product .flex-control-thumbs img.flex-active,
body.tc-product-adaptive.single-product .flex-control-thumbs img:hover{
	opacity:1;
	border-color:var(--tc-gold);
	transform:translateY(-1px);
}

/* Summary card */
body.tc-product-adaptive.single-product div.product div.summary{
	margin:0 !important;
	padding:34px;
	border-radius:34px;
	background:#fff;
	border:1px solid var(--tc-border);
	box-shadow:0 14px 38px rgba(26,26,26,.055);
}

/* Breadcrumb e meta */
body.tc-product-adaptive.single-product .woocommerce-breadcrumb{
	max-width:1240px;
	margin:24px auto 0;
	padding:0 24px;
	color:var(--tc-muted);
	font-size:13px;
}

body.tc-product-adaptive.single-product .woocommerce-breadcrumb a{
	color:var(--tc-bordeaux);
	text-decoration:none;
}

/* Titolo */
body.tc-product-adaptive.single-product .product_title,
body.tc-product-adaptive.single-product h1.product_title{
	font-family:"Cinzel", serif;
	color:var(--tc-bordeaux);
	font-size:clamp(34px, 4vw, 56px);
	line-height:1.04;
	letter-spacing:-.035em;
	margin:0 0 18px;
}

/* Prezzo */
body.tc-product-adaptive.single-product .summary .price{
	display:block;
	margin:0 0 24px;
	color:var(--tc-bordeaux);
	font-size:30px;
	font-weight:800;
	line-height:1;
}

body.tc-product-adaptive.single-product .summary .price .amount{
	color:var(--tc-bordeaux);
}

body.tc-product-adaptive.single-product .summary .price del{
	color:var(--tc-muted);
	opacity:.5;
	font-size:20px;
	margin-right:10px;
}

body.tc-product-adaptive.single-product .summary .price ins{
	text-decoration:none;
}

/* Descrizione breve */
body.tc-product-adaptive.single-product .woocommerce-product-details__short-description{
	margin:0 0 26px;
	color:var(--tc-text);
	font-size:16px;
	line-height:1.75;
}

/* Varianti */
body.tc-product-adaptive.single-product form.variations_form,
body.tc-product-adaptive.single-product form.cart{
	margin-top:26px;
	padding-top:26px;
	border-top:1px solid rgba(26,26,26,.08);
}

body.tc-product-adaptive.single-product table.variations{
	margin:0 0 20px !important;
}

body.tc-product-adaptive.single-product table.variations th,
body.tc-product-adaptive.single-product table.variations td{
	display:block;
	width:100%;
	padding:0 !important;
	text-align:left;
}

body.tc-product-adaptive.single-product table.variations label{
	display:block;
	margin:0 0 9px;
	font-family:"Cinzel", serif;
	color:var(--tc-bordeaux);
	font-size:13px;
	font-weight:800;
	letter-spacing:1.1px;
	text-transform:uppercase;
}

body.tc-product-adaptive.single-product table.variations select{
	width:100%;
	min-height:48px;
	border-radius:999px;
	border:1px solid rgba(26,26,26,.12);
	background:#fff;
	padding:0 18px;
	color:var(--tc-ink);
	font-size:14px;
}

body.tc-product-adaptive.single-product .reset_variations{
	display:inline-flex !important;
	margin-top:10px;
	color:var(--tc-bordeaux);
	font-size:13px;
	text-decoration:none;
}

/* Quantità + bottone */
body.tc-product-adaptive.single-product form.cart .quantity{
	margin-right:12px !important;
}

body.tc-product-adaptive.single-product form.cart input.qty{
	min-height:50px;
	border-radius:999px;
	border:1px solid rgba(26,26,26,.14);
	background:var(--tc-soft);
	color:var(--tc-ink);
	font-weight:700;
}

body.tc-product-adaptive.single-product .single_add_to_cart_button{
	min-height:52px;
	border-radius:999px !important;
	background:var(--tc-bordeaux) !important;
	color:#fff !important;
	border:1px solid var(--tc-bordeaux) !important;
	padding:0 30px !important;
	font-family:"Cinzel", serif !important;
	font-size:12px !important;
	font-weight:800 !important;
	letter-spacing:1.3px !important;
	text-transform:uppercase !important;
	box-shadow:0 16px 32px rgba(103,38,58,.18) !important;
	transition:transform .22s ease, background .22s ease, color .22s ease, box-shadow .22s ease !important;
}

body.tc-product-adaptive.single-product .single_add_to_cart_button:hover{
	background:var(--tc-bordeaux-dark) !important;
	color:var(--tc-gold) !important;
	transform:translateY(-2px);
	box-shadow:0 22px 42px rgba(74,26,40,.24) !important;
}

/* Meta prodotto */
body.tc-product-adaptive.single-product .product_meta{
	margin-top:24px;
	padding-top:20px;
	border-top:1px solid rgba(26,26,26,.08);
	color:var(--tc-muted);
	font-size:13px;
}

body.tc-product-adaptive.single-product .product_meta a{
	color:var(--tc-bordeaux);
	text-decoration:none;
}

/* Tabs sotto */
body.tc-product-adaptive.single-product .woocommerce-tabs{
	max-width:1240px;
	margin:0 auto 70px;
	padding:0 24px;
}

body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs{
	display:flex;
	gap:10px;
	margin:0 0 22px !important;
	padding:0 !important;
	border:0 !important;
}

body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs::before{
	display:none !important;
}

body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs li{
	border:1px solid rgba(26,26,26,.10) !important;
	border-radius:999px !important;
	background:#fff !important;
	margin:0 !important;
	padding:0 !important;
}

body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs li::before,
body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs li::after{
	display:none !important;
}

body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs li a{
	padding:12px 18px !important;
	font-family:"Cinzel", serif;
	font-size:12px;
	font-weight:800;
	letter-spacing:1px;
	text-transform:uppercase;
	color:var(--tc-bordeaux) !important;
}

body.tc-product-adaptive.single-product .woocommerce-tabs .panel{
	padding:30px !important;
	border-radius:28px;
	background:#fff;
	border:1px solid rgba(26,26,26,.08);
	box-shadow:0 12px 30px rgba(26,26,26,.045);
	color:var(--tc-text);
	line-height:1.75;
}

/* Prodotti correlati */
body.tc-product-adaptive.single-product .related.products,
body.tc-product-adaptive.single-product .upsells.products{
	max-width:1240px;
	margin:0 auto 80px;
	padding:0 24px;
}

body.tc-product-adaptive.single-product .related.products > h2,
body.tc-product-adaptive.single-product .upsells.products > h2{
	font-family:"Cinzel", serif;
	color:var(--tc-bordeaux);
	font-size:clamp(26px, 3vw, 38px);
	margin:0 0 26px;
}

/* =========================================================
   TEMPLATE MODE 1: SQUARE
   Foto quadrata / quasi quadrata
   ========================================================= */

body.tc-product-layout-square.single-product .woocommerce-product-gallery__image{
	aspect-ratio:1 / 1;
}

body.tc-product-layout-square.single-product div.product{
	grid-template-columns:minmax(0, 1fr) minmax(390px, .82fr);
}

/* =========================================================
   TEMPLATE MODE 2: PORTRAIT
   Foto verticale normale
   ========================================================= */

body.tc-product-layout-portrait.single-product div.product{
	grid-template-columns:minmax(0, .82fr) minmax(430px, 1fr);
	gap:54px;
}

body.tc-product-layout-portrait.single-product .woocommerce-product-gallery__image{
	aspect-ratio:4 / 5.45;
}

body.tc-product-layout-portrait.single-product div.product div.images{
	max-width:560px;
	justify-self:end;
}

/* =========================================================
   TEMPLATE MODE 3: TALL
   Foto molto verticale
   ========================================================= */

body.tc-product-layout-tall.single-product div.product{
	grid-template-columns:minmax(320px, .68fr) minmax(460px, 1fr);
	gap:58px;
}

body.tc-product-layout-tall.single-product .woocommerce-product-gallery__image{
	aspect-ratio:3 / 5;
}

body.tc-product-layout-tall.single-product div.product div.images{
	max-width:500px;
	justify-self:end;
}

/* =========================================================
   TEMPLATE MODE 4: LANDSCAPE
   Foto orizzontale
   ========================================================= */

body.tc-product-layout-landscape.single-product div.product{
	grid-template-columns:1fr;
	gap:32px;
	max-width:1180px;
}

body.tc-product-layout-landscape.single-product div.product div.images{
	position:relative;
	top:auto;
	width:100%;
}

body.tc-product-layout-landscape.single-product .woocommerce-product-gallery__image{
	aspect-ratio:16 / 8.4;
}

body.tc-product-layout-landscape.single-product div.product div.summary{
	max-width:880px;
	margin:0 auto !important;
}

/* =========================================================
   TEMPLATE MODE 5: PANORAMIC
   Foto molto larga
   ========================================================= */

body.tc-product-layout-panoramic.single-product div.product{
	grid-template-columns:1fr;
	gap:30px;
	max-width:1240px;
}

body.tc-product-layout-panoramic.single-product div.product div.images{
	position:relative;
	top:auto;
	padding:16px;
}

body.tc-product-layout-panoramic.single-product .woocommerce-product-gallery__image{
	aspect-ratio:21 / 9;
}

body.tc-product-layout-panoramic.single-product div.product div.summary{
	max-width:900px;
	margin:0 auto !important;
}

/* =========================================================
   FALLBACK: NO IMAGE
   ========================================================= */

body.tc-product-layout-no-image.single-product .woocommerce-product-gallery__image{
	aspect-ratio:1 / 1;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width:1024px){
	body.tc-product-adaptive.single-product div.product,
	body.tc-product-layout-square.single-product div.product,
	body.tc-product-layout-portrait.single-product div.product,
	body.tc-product-layout-tall.single-product div.product,
	body.tc-product-layout-landscape.single-product div.product,
	body.tc-product-layout-panoramic.single-product div.product{
		grid-template-columns:1fr;
		gap:26px;
		padding:34px 18px 54px;
	}

	body.tc-product-adaptive.single-product div.product div.images{
		position:relative;
		top:auto;
		max-width:none;
		justify-self:stretch;
	}

	body.tc-product-layout-square.single-product .woocommerce-product-gallery__image,
	body.tc-product-layout-portrait.single-product .woocommerce-product-gallery__image,
	body.tc-product-layout-tall.single-product .woocommerce-product-gallery__image,
	body.tc-product-layout-landscape.single-product .woocommerce-product-gallery__image,
	body.tc-product-layout-panoramic.single-product .woocommerce-product-gallery__image{
		aspect-ratio:1 / 1.08;
	}

	body.tc-product-adaptive.single-product div.product div.summary{
		padding:24px;
		border-radius:26px;
	}

	body.tc-product-adaptive.single-product .woocommerce-tabs,
	body.tc-product-adaptive.single-product .related.products,
	body.tc-product-adaptive.single-product .upsells.products{
		padding-left:18px;
		padding-right:18px;
	}
}

@media (max-width:640px){
	body.tc-product-adaptive.single-product .woocommerce-breadcrumb{
		padding:0 16px;
		margin-top:16px;
	}

	body.tc-product-adaptive.single-product div.product{
		padding:22px 14px 46px;
	}

	body.tc-product-adaptive.single-product div.product div.images{
		padding:10px;
		border-radius:22px;
	}

	body.tc-product-adaptive.single-product .woocommerce-product-gallery__image{
		border-radius:16px;
	}

	body.tc-product-adaptive.single-product .product_title,
	body.tc-product-adaptive.single-product h1.product_title{
		font-size:32px;
	}

	body.tc-product-adaptive.single-product .summary .price{
		font-size:26px;
	}

	body.tc-product-adaptive.single-product form.cart{
		display:flex;
		flex-direction:column;
		gap:12px;
	}

	body.tc-product-adaptive.single-product form.cart .quantity{
		margin-right:0 !important;
	}

	body.tc-product-adaptive.single-product form.cart input.qty,
	body.tc-product-adaptive.single-product .single_add_to_cart_button{
		width:100%;
	}

	body.tc-product-adaptive.single-product .flex-control-thumbs{
		grid-template-columns:repeat(4, minmax(0, 1fr));
	}

	body.tc-product-adaptive.single-product .woocommerce-tabs ul.tabs{
		overflow-x:auto;
		padding-bottom:4px !important;
	}

	body.tc-product-adaptive.single-product .woocommerce-tabs .panel{
		padding:22px !important;
		border-radius:22px;
	}
}