/* ═══════════════════════════════════════════════════════════════════════
 * GUY Boutique Polish — Editorial styling per pagine WooCommerce
 * ───────────────────────────────────────────────────────────────────────
 * Target pagine: single-product, cart, checkout
 * Approccio: CSS-only override, no template change, brand-tunable.
 * Tutti i valori brand sono variabili in cima — cambiali una volta sola
 * e si applica ovunque.
 * ═══════════════════════════════════════════════════════════════════════ */

:root {
	/* ── Brand palette (modifica QUI per ricolorare tutto) ─────────── */
	--guy-cream:       #FBF7F2;   /* sfondi morbidi, hero */
	--guy-cream-soft:  #F5EFE5;   /* alternative bg */
	--guy-rose:        #C97B7B;   /* accent caldo, prezzi, link */
	--guy-rose-deep:   #A85F5F;   /* hover */
	--guy-rose-soft:   #F4E0DD;   /* badge bg, success bg */
	--guy-ink:         #2A1F1A;   /* testo principale */
	--guy-ink-soft:    #6B5F58;   /* testo secondario */
	--guy-line:        #E8DDD0;   /* divisori, bordi */

	/* ── Typography ─────────────────────────────────────────────────── */
	--guy-display:     'Playfair Display', 'Cormorant Garamond', Georgia, serif;
	--guy-body:        'Inter', 'Poppins', -apple-system, system-ui, sans-serif;

	/* ── Layout tokens ──────────────────────────────────────────────── */
	--guy-radius:      10px;
	--guy-radius-lg:   16px;
	--guy-shadow:      0 1px 3px rgba(42, 31, 26, 0.05);
	--guy-shadow-md:   0 8px 24px -12px rgba(42, 31, 26, 0.18);
}

/* ═══════════════════════════════════════════════════════════════════════
 * SHARED — applicato a tutte le 3 pagine
 * ═══════════════════════════════════════════════════════════════════════ */

/* Override font famiglia su contenuti WC. Non tocco header/footer del tema. */
body.woocommerce-page .woocommerce,
body.woocommerce-cart .woocommerce,
body.woocommerce-checkout .woocommerce,
body.single-product .woocommerce {
	font-family: var(--guy-body);
	color: var(--guy-ink);
	line-height: 1.6;
}

body.woocommerce-page .woocommerce h1,
body.woocommerce-page .woocommerce h2,
body.woocommerce-page .woocommerce h3,
body.single-product .woocommerce h1,
body.woocommerce-cart .woocommerce h1,
body.woocommerce-checkout .woocommerce h1 {
	font-family: var(--guy-display);
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--guy-ink);
}

/* CTA principale — magnetico, soft, Kajabi vibe */
body.woocommerce-page .woocommerce .button.alt,
body.woocommerce-page .woocommerce button[type="submit"].button,
body.single-product .woocommerce .single_add_to_cart_button,
body.woocommerce-cart .checkout-button,
body.woocommerce-checkout #place_order {
	background: var(--guy-rose) !important;
	color: #FFFFFF !important;
	font-family: var(--guy-body) !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	letter-spacing: 0.04em !important;
	padding: 16px 32px !important;
	border-radius: var(--guy-radius) !important;
	border: none !important;
	box-shadow: var(--guy-shadow-md) !important;
	transition: background 0.2s, transform 0.18s !important;
	text-transform: none !important;
}
body.woocommerce-page .woocommerce .button.alt:hover,
body.woocommerce-page .woocommerce button[type="submit"].button:hover,
body.single-product .woocommerce .single_add_to_cart_button:hover,
body.woocommerce-cart .checkout-button:hover,
body.woocommerce-checkout #place_order:hover {
	background: var(--guy-rose-deep) !important;
	transform: translateY(-1px);
}

/* Input e select editoriali — più aria, font corretto */
body.woocommerce-page .woocommerce input[type="text"],
body.woocommerce-page .woocommerce input[type="email"],
body.woocommerce-page .woocommerce input[type="tel"],
body.woocommerce-page .woocommerce input[type="number"],
body.woocommerce-page .woocommerce input[type="password"],
body.woocommerce-page .woocommerce textarea,
body.woocommerce-page .woocommerce select,
body.woocommerce-cart input[type="text"],
body.woocommerce-checkout input[type="text"],
body.woocommerce-checkout input[type="email"],
body.woocommerce-checkout input[type="tel"],
body.woocommerce-checkout select,
body.woocommerce-checkout textarea {
	background: #FFFFFF;
	border: 1px solid var(--guy-line);
	border-radius: var(--guy-radius);
	padding: 12px 14px;
	font-family: var(--guy-body);
	font-size: 15px;
	color: var(--guy-ink);
	min-height: 48px;
	transition: border-color 0.18s, box-shadow 0.18s;
}
body.woocommerce-page .woocommerce input:focus,
body.woocommerce-page .woocommerce textarea:focus,
body.woocommerce-page .woocommerce select:focus,
body.woocommerce-cart input:focus,
body.woocommerce-checkout input:focus,
body.woocommerce-checkout textarea:focus,
body.woocommerce-checkout select:focus {
	border-color: var(--guy-rose);
	box-shadow: 0 0 0 3px var(--guy-rose-soft);
	outline: none;
}

/* ═══════════════════════════════════════════════════════════════════════
 * SINGLE PRODUCT — hero editoriale con immagine + info
 * ═══════════════════════════════════════════════════════════════════════ */

body.single-product .woocommerce {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 20px 80px;
}

/* Breadcrumb più discreto */
body.single-product .woocommerce-breadcrumb {
	font-size: 12px !important;
	color: var(--guy-ink-soft) !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	margin-bottom: 32px !important;
	padding-bottom: 0 !important;
	border-bottom: none !important;
}
body.single-product .woocommerce-breadcrumb a {
	color: var(--guy-ink-soft) !important;
	text-decoration: none;
}
body.single-product .woocommerce-breadcrumb a:hover { color: var(--guy-rose) !important; }

/* Layout product: immagine sx, info dx */
body.single-product div.product {
	display: grid !important;
	grid-template-columns: 1fr 1fr;
	gap: clamp(32px, 5vw, 64px);
	align-items: start;
	background: var(--guy-cream);
	padding: clamp(24px, 4vw, 56px);
	border-radius: var(--guy-radius-lg);
}

/* Immagine prodotto: morbida, contenuta, no zoom invasivi */
body.single-product div.product .woocommerce-product-gallery {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
}
body.single-product div.product .woocommerce-product-gallery__image img {
	border-radius: var(--guy-radius);
	box-shadow: var(--guy-shadow-md);
}

/* Summary (info colonna dx) */
body.single-product div.product .summary {
	width: 100% !important;
	float: none !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

body.single-product div.product .product_title {
	font-size: clamp(28px, 4vw, 42px) !important;
	font-weight: 600 !important;
	line-height: 1.1 !important;
	margin: 0 !important;
	text-transform: none !important; /* override eventuale uppercase del tema */
}

/* Prezzo prominente */
body.single-product div.product .price {
	font-family: var(--guy-display) !important;
	font-size: 32px !important;
	font-weight: 600 !important;
	color: var(--guy-rose) !important;
	margin: 0 !important;
}
body.single-product div.product .price ins {
	background: transparent !important;
	text-decoration: none !important;
}
body.single-product div.product .price del {
	color: var(--guy-ink-soft) !important;
	font-size: 18px !important;
	margin-right: 8px;
}

/* Description sotto il prezzo */
body.single-product div.product .woocommerce-product-details__short-description {
	color: var(--guy-ink-soft);
	font-size: 16px;
	line-height: 1.7;
	margin: 0;
}

/* Form add to cart: pulizia + spacing */
body.single-product div.product form.cart {
	display: flex !important;
	gap: 12px !important;
	align-items: stretch;
	margin: 8px 0 !important;
	padding: 0 !important;
	background: transparent !important;
	border: none !important;
}
body.single-product div.product form.cart .quantity {
	flex-shrink: 0;
}
body.single-product div.product form.cart .quantity input.qty {
	width: 70px !important;
	height: 52px !important;
	text-align: center;
	font-size: 16px;
	font-weight: 500;
}
body.single-product div.product form.cart button.single_add_to_cart_button {
	flex: 1;
	min-height: 52px;
	font-size: 16px !important;
}

/* Trust signals: aggiunta in pseudo-content sotto il button */
body.single-product div.product .summary::after {
	content: "Pagamento sicuro · Accesso immediato dopo il pagamento · Garanzia 14 giorni soddisfatti o rimborsati";
	display: block;
	font-size: 12px;
	color: var(--guy-ink-soft);
	letter-spacing: 0.04em;
	padding: 16px 0 0;
	border-top: 1px solid var(--guy-line);
	margin-top: 12px;
	text-align: center;
}

/* Meta (SKU, categories, tags): più discreti */
body.single-product div.product .product_meta {
	font-size: 11px !important;
	color: var(--guy-ink-soft) !important;
	border-top: 1px solid var(--guy-line) !important;
	padding-top: 16px !important;
	margin-top: 8px !important;
}
body.single-product div.product .product_meta > span {
	display: block;
	margin-bottom: 4px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}
body.single-product div.product .product_meta a {
	color: var(--guy-ink-soft) !important;
	text-decoration: none;
}
body.single-product div.product .product_meta a:hover {
	color: var(--guy-rose) !important;
	text-decoration: underline;
}

/* Related products: hero più sobrio */
body.single-product .related.products {
	margin-top: 64px !important;
	padding-top: 48px;
	border-top: 1px solid var(--guy-line);
}
body.single-product .related.products > h2 {
	font-size: 24px !important;
	font-weight: 600 !important;
	margin-bottom: 32px !important;
	text-align: center;
}
body.single-product .related.products ul.products li.product .woocommerce-loop-product__title {
	font-family: var(--guy-display) !important;
	font-size: 18px !important;
	font-weight: 500 !important;
	color: var(--guy-ink) !important;
}
body.single-product .related.products ul.products li.product .price {
	font-size: 16px !important;
	color: var(--guy-rose) !important;
	font-weight: 500 !important;
}
body.single-product .related.products ul.products li.product img {
	border-radius: var(--guy-radius);
}

/* Mobile single product */
@media (max-width: 768px) {
	body.single-product div.product {
		grid-template-columns: 1fr !important;
		padding: 24px 18px !important;
		gap: 24px;
	}
	body.single-product div.product form.cart {
		flex-direction: column !important;
	}
	body.single-product div.product form.cart .quantity input.qty {
		width: 100% !important;
	}
}

/* ═══════════════════════════════════════════════════════════════════════
 * CART — tabella elegante, focus sul totale e CTA
 * ═══════════════════════════════════════════════════════════════════════ */

body.woocommerce-cart .woocommerce {
	max-width: 1000px;
	margin: 0 auto;
	padding: 32px 20px 80px;
}

/* Header carrello */
body.woocommerce-cart .woocommerce::before {
	content: "Il tuo carrello";
	display: block;
	font-family: var(--guy-display);
	font-size: clamp(28px, 4vw, 36px);
	font-weight: 600;
	margin-bottom: 32px;
	text-align: center;
}

/* Empty state */
body.woocommerce-cart .cart-empty {
	background: var(--guy-cream);
	padding: 48px 24px !important;
	border-radius: var(--guy-radius-lg) !important;
	text-align: center;
	font-size: 17px !important;
	color: var(--guy-ink-soft) !important;
	border: none !important;
	margin: 0 0 24px !important;
}
body.woocommerce-cart .return-to-shop {
	text-align: center;
	margin-top: 24px !important;
}
body.woocommerce-cart .return-to-shop .button {
	background: var(--guy-rose) !important;
	color: #FFFFFF !important;
	padding: 14px 28px !important;
	border-radius: var(--guy-radius) !important;
	font-weight: 600;
}

/* Tabella carrello pulita */
body.woocommerce-cart table.cart {
	border: none !important;
	background: transparent !important;
}
body.woocommerce-cart table.cart thead {
	display: none; /* Nasconde header tabella, poco utile, schifoso */
}
body.woocommerce-cart table.cart tbody tr {
	background: #FFFFFF;
	border-radius: var(--guy-radius-lg);
	box-shadow: var(--guy-shadow);
	display: grid !important;
	grid-template-columns: 100px 1fr auto auto auto;
	align-items: center;
	gap: 16px;
	padding: 16px;
	margin-bottom: 12px;
	border: 1px solid var(--guy-line);
}
body.woocommerce-cart table.cart tbody tr td {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
	display: flex;
	align-items: center;
}
body.woocommerce-cart table.cart .product-thumbnail img {
	width: 80px;
	height: 80px;
	object-fit: cover;
	border-radius: var(--guy-radius);
}
body.woocommerce-cart table.cart .product-name a {
	font-family: var(--guy-display);
	font-size: 17px;
	font-weight: 600;
	color: var(--guy-ink) !important;
	text-decoration: none;
}
body.woocommerce-cart table.cart .product-name a:hover { color: var(--guy-rose) !important; }
body.woocommerce-cart table.cart .product-price,
body.woocommerce-cart table.cart .product-subtotal {
	font-weight: 600;
	color: var(--guy-rose);
	font-size: 16px;
}
body.woocommerce-cart table.cart .product-quantity input {
	width: 64px !important;
	min-height: 40px !important;
	padding: 8px !important;
	text-align: center;
}
body.woocommerce-cart table.cart .product-remove a.remove {
	font-size: 20px !important;
	color: var(--guy-ink-soft) !important;
	opacity: 0.6;
	background: transparent !important;
	width: auto !important;
	height: auto !important;
}
body.woocommerce-cart table.cart .product-remove a.remove:hover {
	color: var(--guy-rose) !important;
	opacity: 1;
}

/* Riga "Aggiorna carrello" + coupon */
body.woocommerce-cart table.cart .actions {
	display: block !important;
	background: transparent !important;
	padding: 24px 0 !important;
	border: none !important;
	grid-template-columns: none !important;
}
body.woocommerce-cart table.cart .coupon {
	display: flex;
	gap: 8px;
	max-width: 400px;
	margin-bottom: 16px;
}
body.woocommerce-cart table.cart .coupon input#coupon_code {
	flex: 1;
	min-height: 44px;
}
body.woocommerce-cart table.cart .coupon button.button {
	background: transparent !important;
	color: var(--guy-rose) !important;
	border: 1px solid var(--guy-rose) !important;
	box-shadow: none !important;
	padding: 10px 20px !important;
	font-weight: 500 !important;
	font-size: 13px !important;
}

/* Cart totals box: prominente */
body.woocommerce-cart .cart-collaterals {
	background: var(--guy-cream);
	padding: 28px;
	border-radius: var(--guy-radius-lg);
	margin-top: 24px;
}
body.woocommerce-cart .cart-collaterals .cart_totals h2 {
	font-family: var(--guy-display);
	font-size: 22px;
	font-weight: 600;
	margin-bottom: 16px !important;
	color: var(--guy-ink);
}
body.woocommerce-cart .cart-collaterals table.shop_table {
	background: transparent !important;
	border: none !important;
}
body.woocommerce-cart .cart-collaterals table.shop_table tr {
	background: transparent !important;
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--guy-line);
}
body.woocommerce-cart .cart-collaterals table.shop_table tr:last-child { border-bottom: none; }
body.woocommerce-cart .cart-collaterals table.shop_table th,
body.woocommerce-cart .cart-collaterals table.shop_table td {
	padding: 4px 0 !important;
	border: none !important;
	background: transparent !important;
}
body.woocommerce-cart .cart-collaterals .order-total {
	font-size: 20px;
	font-weight: 600;
}
body.woocommerce-cart .cart-collaterals .order-total .amount {
	color: var(--guy-rose);
	font-family: var(--guy-display);
	font-size: 24px;
}
body.woocommerce-cart .cart-collaterals .wc-proceed-to-checkout {
	padding: 16px 0 0 !important;
}
body.woocommerce-cart .cart-collaterals .checkout-button {
	width: 100%;
	display: block;
	text-align: center;
}

/* Mobile cart */
@media (max-width: 768px) {
	body.woocommerce-cart table.cart tbody tr {
		grid-template-columns: 64px 1fr auto;
		grid-template-rows: auto auto;
		gap: 12px;
	}
	body.woocommerce-cart table.cart .product-thumbnail {
		grid-row: 1 / 3;
	}
	body.woocommerce-cart table.cart .product-name {
		grid-column: 2 / 4;
	}
	body.woocommerce-cart table.cart .product-quantity {
		grid-column: 2 / 3;
	}
	body.woocommerce-cart table.cart .product-subtotal {
		grid-column: 3 / 4;
		justify-content: flex-end;
	}
	body.woocommerce-cart table.cart .product-remove {
		grid-column: 1 / 4;
		justify-content: flex-end;
	}
	body.woocommerce-cart table.cart .product-price {
		display: none; /* su mobile basta subtotal */
	}
}

/* ═══════════════════════════════════════════════════════════════════════
 * CHECKOUT — due colonne (form + summary), Kajabi-grade
 * ═══════════════════════════════════════════════════════════════════════ */

body.woocommerce-checkout .woocommerce {
	max-width: 1100px;
	margin: 0 auto;
	padding: 32px 20px 80px;
}

body.woocommerce-checkout .woocommerce::before {
	content: "Completa l'ordine";
	display: block;
	font-family: var(--guy-display);
	font-size: clamp(28px, 4vw, 36px);
	font-weight: 600;
	margin-bottom: 32px;
	text-align: center;
}

/* Notice info nella parte alta (login, coupon, ecc.): più morbide */
body.woocommerce-checkout .woocommerce-info,
body.woocommerce-checkout .woocommerce-message {
	background: var(--guy-cream) !important;
	border-left: 3px solid var(--guy-rose) !important;
	border-top: none !important;
	padding: 16px 20px !important;
	color: var(--guy-ink) !important;
	border-radius: var(--guy-radius) !important;
	font-size: 14px !important;
}
body.woocommerce-checkout .woocommerce-info::before,
body.woocommerce-checkout .woocommerce-message::before {
	color: var(--guy-rose) !important;
}

/* Form layout: 2 colonne su desktop */
body.woocommerce-checkout form.checkout {
	display: grid;
	grid-template-columns: 1fr 380px;
	gap: 40px;
	align-items: start;
}
body.woocommerce-checkout #customer_details {
	grid-column: 1 / 2;
}
body.woocommerce-checkout h3 {
	font-family: var(--guy-display);
	font-size: 22px;
	font-weight: 600;
	margin: 0 0 20px !important;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--guy-line);
	color: var(--guy-ink);
}

body.woocommerce-checkout .form-row {
	margin-bottom: 16px !important;
}
body.woocommerce-checkout .form-row label {
	display: block;
	font-size: 13px;
	font-weight: 500;
	color: var(--guy-ink) !important;
	margin-bottom: 6px;
	letter-spacing: 0.02em;
}
body.woocommerce-checkout .form-row .required { color: var(--guy-rose); }

/* Order summary: card prominente, sticky su desktop */
body.woocommerce-checkout #order_review_heading,
body.woocommerce-checkout #order_review {
	grid-column: 2 / 3;
}
body.woocommerce-checkout #order_review_heading {
	margin: 0 0 16px !important;
}
body.woocommerce-checkout #order_review {
	background: var(--guy-cream);
	padding: 24px;
	border-radius: var(--guy-radius-lg);
	position: sticky;
	top: 100px;
	box-shadow: var(--guy-shadow);
}
body.woocommerce-checkout #order_review table.shop_table {
	background: transparent !important;
	border: none !important;
	margin-bottom: 16px !important;
}
body.woocommerce-checkout #order_review table.shop_table th,
body.woocommerce-checkout #order_review table.shop_table td {
	padding: 8px 0 !important;
	border: none !important;
	border-bottom: 1px solid var(--guy-line) !important;
	background: transparent !important;
	font-size: 14px !important;
}
body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total {
	font-size: 18px;
	font-weight: 600;
}
body.woocommerce-checkout #order_review table.shop_table tfoot tr.order-total .amount {
	color: var(--guy-rose);
	font-family: var(--guy-display);
	font-size: 22px;
}

/* Payment methods */
body.woocommerce-checkout #payment {
	background: transparent !important;
	border-radius: var(--guy-radius) !important;
	padding-top: 16px !important;
}
body.woocommerce-checkout #payment ul.payment_methods {
	background: #FFFFFF;
	border: 1px solid var(--guy-line) !important;
	border-radius: var(--guy-radius) !important;
	padding: 12px 16px !important;
}
body.woocommerce-checkout #payment ul.payment_methods li {
	border-bottom: 1px solid var(--guy-line) !important;
	padding: 8px 0 !important;
}
body.woocommerce-checkout #payment ul.payment_methods li:last-child { border-bottom: none !important; }
body.woocommerce-checkout #payment div.payment_box {
	background: var(--guy-cream-soft) !important;
	border-radius: var(--guy-radius) !important;
	margin: 8px 0 !important;
	padding: 14px 16px !important;
	font-size: 13px;
	color: var(--guy-ink-soft);
}

/* Place order button */
body.woocommerce-checkout #place_order {
	width: 100%;
	font-size: 16px !important;
	min-height: 56px;
	margin-top: 16px;
}

/* Trust signals sotto il bottone */
body.woocommerce-checkout #order_review::after {
	content: "Pagamento criptato · Conferma immediata via email";
	display: block;
	font-size: 11px;
	color: var(--guy-ink-soft);
	letter-spacing: 0.06em;
	text-transform: uppercase;
	text-align: center;
	margin-top: 16px;
}

/* Mobile checkout: 1 colonna */
@media (max-width: 900px) {
	body.woocommerce-checkout form.checkout {
		grid-template-columns: 1fr;
	}
	body.woocommerce-checkout #order_review_heading,
	body.woocommerce-checkout #order_review {
		grid-column: 1 / 2;
	}
	body.woocommerce-checkout #order_review {
		position: static;
	}
}
