/*************** ADD CUSTOM CSS HERE.   ***************/

/* Su desktop la sotto-tabella RBFW (celle non spezzabili tipo "FUEL SORRENTO -
   MARINA PICCOLA") forza la colonna carrello oltre il suo 58,33% flex-basis,
   perché .col è flex e di default non si restringe sotto il min-content dei
   figli: risultato, sovrappone la colonna "Totale carrello" a destra. */
.woocommerce.row > .col:first-child {
	min-width: 0;
}

.woocommerce-cart-form__contents {
	width: 100% !important;
	table-layout: fixed;
}

.woocommerce-cart-form__contents th.product-quantity,
.woocommerce-cart-form__contents td.product-quantity {
	display: none;
}

/* Riga "Quantità" dentro la sotto-tabella dettagli prenotazione RBFW
   (classe aggiunta in templates/cart_page.php, tr.rbfw-qty-row). */
.rbfw-qty-row {
	display: none !important;
}

/* Sotto-tabella dettagli prenotazione (plugin RBFW): era una griglia con
   celle strette che spezzavano le parole lettera per lettera. Diventa una
   lista etichetta/valore in riga, coerente con lo stile navy/uppercase
   già usato dal sito (titoli prodotto, header colonne carrello). */
.rbfw_room_cart_table,
.rbfw_bikecarsd_cart_table {
	width: 100% !important;
	table-layout: auto;
	border: none;
	border-collapse: collapse;
	margin: 14px 0 0;
}

.rbfw_room_cart_table tr,
.rbfw_bikecarsd_cart_table tr {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 4px 24px;
	padding: 10px 0;
	border-bottom: 1px solid #ececec;
}

.rbfw_room_cart_table tr:last-child,
.rbfw_bikecarsd_cart_table tr:last-child {
	border-bottom: none;
}

.rbfw_room_cart_table th,
.rbfw_bikecarsd_cart_table th {
	flex: 0 1 auto;
	max-width: 55%;
	border-right: none;
	text-align: left;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #8a8a95;
	white-space: normal;
	overflow-wrap: break-word;
}

.rbfw_room_cart_table th span,
.rbfw_bikecarsd_cart_table th span {
	font-weight: 600;
}

.rbfw_room_cart_table td,
.rbfw_bikecarsd_cart_table td {
	flex: 1 1 auto;
	text-align: right;
	font-size: 14px;
	font-weight: 600;
	color: #1b1b4d;
	white-space: normal;
	overflow-wrap: break-word;
}

/* Prezzo/Subtotale erano centrati verticalmente sulla riga enorme della
   sotto-tabella RBFW: a metà altezza cadevano sopra a una riga qualsiasi
   (es. "FD + FUEL"), sovrapponendosi. Li ancoro in alto. */
.woocommerce-cart-form__contents td.product-price,
.woocommerce-cart-form__contents td.product-subtotal,
.woocommerce-checkout-review-order-table td.product-total {
	vertical-align: top;
}

@media only screen and (max-width: 48em) {
/*************** ADD MOBILE ONLY CSS HERE  ***************/

/* Fix tabella riepilogo ordine (checkout) tagliata su mobile: la sotto-tabella
   RBFW dentro product-name aveva colonne a larghezza fissa che spingevano
   "Subtotale/Totale" fuori dal viewport. */
.woocommerce-checkout-review-order-table {
	table-layout: fixed;
	width: 100% !important;
}

/* Sotto i 480px anche "etichetta / valore" affiancati diventano stretti:
   li impilo (etichetta sopra, valore sotto allineato a sinistra). */
@media only screen and (max-width: 30em) {
	.rbfw_room_cart_table tr,
	.rbfw_bikecarsd_cart_table tr {
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	.rbfw_room_cart_table th,
	.rbfw_bikecarsd_cart_table th,
	.rbfw_room_cart_table td,
	.rbfw_bikecarsd_cart_table td {
		max-width: 100%;
		text-align: left;
	}
}

.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .order-total td {
	white-space: normal !important;
	word-break: break-word;
}

.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order-table .cart-subtotal td,
.woocommerce-checkout-review-order-table .order-total td,
.woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout-review-order-table .cart-subtotal th,
.woocommerce-checkout-review-order-table .order-total th {
	text-align: left !important;
}

}


/* ============================================================
   REDESIGN CARRELLO + CHECKOUT — Sorrento Luxury (2026)
   Card + accordion dettagli prenotazione RBFW. Nessun template
   plugin toccato: markup accordion iniettato da assets/cart-checkout.js.
   ============================================================ */

:root {
	--slx-navy: #1b1b4d;
	--slx-navy-soft: #4a4a72;
	--slx-gold: #b08d57;
	--slx-line: #e7e7ee;
	--slx-label: #8a8a95;
	--slx-bg: #fbfbfd;
}

/* ---------- CARRELLO: da tabella a lista di card ---------- */
.woocommerce-cart-form__contents {
	display: block;
	border: none;
	margin: 0;
}

.woocommerce-cart-form__contents thead {
	display: none;
}

.woocommerce-cart-form__contents tbody {
	display: block;
}

/* Etichette mobile di Flatsome (td::before): disattivate, usiamo la card. */
.woocommerce-cart-form__contents > tbody > tr > td::before {
	display: none !important;
	content: none !important;
}

.woocommerce-cart-form__contents tr.cart_item {
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr) 34px;
	grid-template-areas: "thumb name remove";
	gap: 4px 20px;
	align-items: start;
	position: relative;
	padding: 24px 28px;
	margin: 0 0 16px;
	background: #fff;
	border: 1px solid var(--slx-line);
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(27, 27, 77, .04);
	transition: box-shadow .25s ease, border-color .25s ease;
}

.woocommerce-cart-form__contents tr.cart_item:hover {
	box-shadow: 0 10px 30px rgba(27, 27, 77, .09);
	border-color: #d7d7e4;
}

.woocommerce-cart-form__contents tr.cart_item > td {
	border: none;
	padding: 0;
	background: none;
}

.woocommerce-cart-form__contents td.product-thumbnail {
	grid-area: thumb;
}

.woocommerce-cart-form__contents td.product-thumbnail img {
	width: 104px;
	height: 104px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

.woocommerce-cart-form__contents td.product-name {
	grid-area: name;
	min-width: 0;
}

/* Nome prodotto = titolo card */
.woocommerce-cart-form__contents td.product-name > a {
	display: inline-block;
	margin: 2px 0 4px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	line-height: 1.25;
	color: var(--slx-navy);
}

.woocommerce-cart-form__contents td.product-name > a:hover {
	color: var(--slx-gold);
}

/* Prezzo unitario duplicato del subtotale (qty sempre 1 nei noleggi): un solo
   prezzo mostrato, il subtotale, niente più due cifre identiche affiancate. */
.woocommerce-cart-form__contents td.product-price {
	display: none;
}

/* Prezzo per riga rimosso dal carrello: già visibile nel box "Totale carrello". */
.woocommerce-cart-form__contents td.product-subtotal {
	display: none !important;
}

/* × rimuovi: in flusso normale sotto il prezzo, non più assoluto/sovrapposto */
.woocommerce-cart-form__contents td.product-remove {
	grid-area: remove;
	position: static;
	width: auto;
	text-align: right;
}

.woocommerce-cart-form__contents td.product-remove a.remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	line-height: 24px;
	font-size: 16px;
	color: #b9b9c6 !important;
	background: transparent !important;
	border-radius: 50%;
	transition: color .2s ease, background .2s ease;
}

.woocommerce-cart-form__contents td.product-remove a.remove:hover {
	color: #fff !important;
	background: #d64545 !important;
}

/* ---------- Sotto-tabella dettagli: card interna ---------- */
.rbfw_room_cart_table {
	background: var(--slx-bg);
	border: 1px solid var(--slx-line);
	border-radius: 12px;
	padding: 4px 16px;
	margin: 12px 0 0;
}

.rbfw_room_cart_table tr {
	padding: 9px 0;
}

/* Icone accanto alle label primarie (classe aggiunta via JS) */
.rbfw_room_cart_table th.slx-ic {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.rbfw_room_cart_table th.slx-ic::before {
	content: "";
	flex: 0 0 15px;
	width: 15px;
	height: 15px;
	background: var(--slx-gold);
	-webkit-mask: var(--slx-icon) no-repeat center / contain;
	mask: var(--slx-icon) no-repeat center / contain;
}

.slx-ic-pin   { --slx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.9-3.1-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.slx-ic-cal   { --slx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 2v2H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-2V2h-2v2H9V2H7zm12 7v10H5V9h14z'/%3E%3C/svg%3E"); }
.slx-ic-clock { --slx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm1 10.4 4 2.3-1 1.7-5-2.9V6h2v6.4z'/%3E%3C/svg%3E"); }
.slx-ic-fuel  { --slx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 3h9a2 2 0 0 1 2 2v14h1a1 1 0 0 0 1-1v-6h-1a1 1 0 0 1-1-1V7l3 3v8a3 3 0 0 1-6 0V5H6v16H4V5a2 2 0 0 1 0-2zm2 4h7V5H6v2z'/%3E%3C/svg%3E"); }
.slx-ic-people{ --slx-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 12a4 4 0 1 0 0-8 4 4 0 0 0 0 8zm0 2c-4 0-8 2-8 5v1h16v-1c0-3-4-5-8-5z'/%3E%3C/svg%3E"); }

/* ---------- Accordion: righe secondarie dietro il toggle ---------- */
.rbfw_room_cart_table .slx-secondary {
	display: none;
}

.rbfw_room_cart_table.slx-open .slx-secondary {
	display: flex;
	animation: slxRowIn .28s ease both;
}

@keyframes slxRowIn {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: none; }
}

.slx-toggle {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 12px 0 0;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid var(--slx-line);
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--slx-navy);
	cursor: pointer;
	line-height: 1;
	transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.slx-toggle:hover {
	border-color: var(--slx-gold);
	color: var(--slx-gold);
}

.slx-toggle__chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	margin-top: -2px;
	transition: transform .25s ease;
}

.slx-toggle.is-open .slx-toggle__chevron {
	transform: rotate(-135deg);
	margin-top: 2px;
}

.slx-toggle__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: var(--slx-navy);
	color: #fff;
	border-radius: 999px;
	font-size: 10px;
	letter-spacing: 0;
}

.slx-toggle:hover .slx-toggle__count {
	background: var(--slx-gold);
}

/* ---------- Box "Totale carrello" allineato alle card ---------- */
.cart_totals {
	background: #fff;
	border: 1px solid var(--slx-line);
	border-radius: 16px;
	padding: 26px 28px;
	box-shadow: 0 1px 2px rgba(27, 27, 77, .04);
}

.cart_totals h2 {
	font-size: 14px;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--slx-navy);
}

.cart_totals .order-total .amount {
	color: var(--slx-navy);
}

/* ---------- CHECKOUT: righe ordine come card compatte ---------- */
.woocommerce-checkout-review-order-table tr.cart_item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 2px 14px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--slx-line);
}

.woocommerce-checkout-review-order-table tr.cart_item > td {
	border: none;
	padding: 0;
}

.woocommerce-checkout-review-order-table td.product-name {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
	color: var(--slx-navy);
	line-height: 1.3;
}

/* Quantità "× N" duplicata dal template checkout: nascosta (irrilevante per noleggi) */
.woocommerce-checkout-review-order-table td.product-name .product-quantity {
	display: none;
}

/* La card interna sul checkout è più stretta: meno padding */
.woocommerce-checkout-review-order-table .rbfw_room_cart_table {
	padding: 2px 12px;
	margin-top: 10px;
}

/* ---------- Checkout: righe prezzo per-item ridondanti col Totale ordine ---------- */
/* Un solo prodotto per ordine: prezzo unitario/riga già visibile nella card,
   ripeterlo 3 volte (product-total riga, Subtotal riepilogo, Total) è rumore. */
.woocommerce-checkout-review-order-table th.product-subtotal,
.woocommerce-checkout-review-order-table td.product-subtotal,
.woocommerce-checkout-review-order-table th.product-total,
.woocommerce-checkout-review-order-table td.product-total,
.woocommerce-checkout-review-order-table tr.cart-subtotal {
	display: none !important;
}

/* dt vuoto generato da RBFW (item_data con name/key vuoti in rbfw_show_cart_items,
   Frontend/RBFW_Woocommerse.php:643) — sanitize_html_class('variation-' . '') */
dt.variation- {
	display: none !important;
}

/* Riga "Totale": era ancora una vera riga di tabella (th/td come celle),
   disallineata dal blocco card usato per il prodotto sopra. Diventa una barra
   full-width coerente col resto del redesign. */
.woocommerce-checkout-review-order-table tfoot tr.order-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	border-top: 1px solid var(--slx-line);
	padding-top: 16px;
	margin-top: 6px;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total th,
.woocommerce-checkout-review-order-table tfoot tr.order-total td {
	display: block;
	border: none;
	padding: 0;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total th {
	text-transform: uppercase;
	letter-spacing: .05em;
	font-size: 1em;
	color: var(--slx-navy);
	font-weight: 700;
}

.woocommerce-checkout-review-order-table tfoot tr.order-total td {
	font-size: 20px;
	font-weight: 700;
	color: var(--slx-navy);
	white-space: nowrap;
}

/* ---------- Mobile: card impilata ---------- */
@media only screen and (max-width: 37.5em) {
	.woocommerce-cart-form__contents tr.cart_item {
		grid-template-columns: 76px minmax(0, 1fr) 30px;
		grid-template-areas: "thumb name remove";
		gap: 4px 16px;
		padding: 18px 18px 20px;
	}

	.woocommerce-cart-form__contents td.product-thumbnail img {
		width: 76px;
		height: 76px;
	}
}