/**
 * WooCommerce kosár + pénztár — Gringo / RosaFood stílus
 */

body.woocommerce-cart,
body.woocommerce-checkout {
	--rf-woo-card: var(--rf-surface, #fff);
	--rf-woo-border: var(--rf-border, #e5e0d8);
}

/* Wrapper */
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
	max-width: var(--rf-container, 1320px);
	margin: 0 auto;
}

.woocommerce-cart .entry-title,
.woocommerce-checkout .entry-title {
	font-family: "Barlow Condensed", sans-serif;
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 1.25rem;
}

/* —— Táblázatok (kosár + rendelés összegzés) —— */
.woocommerce table.shop_table,
.woocommerce-checkout-review-order-table {
	width: 100%;
	border: 1px solid var(--rf-woo-border);
	border-radius: var(--rf-radius, 20px);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: var(--rf-woo-card);
	box-shadow: var(--rf-shadow, 0 14px 35px rgba(0, 0, 0, 0.08));
}

.woocommerce table.shop_table thead,
.woocommerce-checkout-review-order-table thead {
	background: var(--rf-cream, #f4f1ea);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce-checkout-review-order-table th,
.woocommerce-checkout-review-order-table td {
	padding: 0.85rem 1rem;
	border-bottom: 1px solid var(--rf-woo-border);
	vertical-align: middle;
	font-size: 0.9375rem;
}

.woocommerce table.shop_table th,
.woocommerce-checkout-review-order-table th {
	font-family: "Barlow Condensed", sans-serif;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.8125rem;
	color: var(--rf-text, #212121);
}

.woocommerce table.shop_table tbody tr:last-child td,
.woocommerce-checkout-review-order-table tbody tr:last-child td {
	border-bottom: 0;
}

.woocommerce table.shop_table .product-thumbnail {
	width: 72px;
}

.woocommerce table.shop_table .product-thumbnail img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 12px;
}

.woocommerce table.shop_table .product-name a {
	font-weight: 700;
	color: var(--rf-text, #212121);
	text-decoration: none;
}

.woocommerce table.shop_table .product-name a:hover {
	color: var(--rf-primary, #d71920);
}

.woocommerce table.shop_table .product-remove a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	background: rgba(215, 25, 32, 0.08);
	color: var(--rf-primary, #d71920) !important;
	font-size: 1.25rem;
	line-height: 1;
	text-decoration: none;
}

.woocommerce table.shop_table .product-quantity .qty {
	min-height: 44px;
	width: 4rem;
	border-radius: 10px;
	border: 1px solid var(--rf-woo-border);
	text-align: center;
}

/* Összesen blokk */
.woocommerce .cart-collaterals,
.woocommerce-checkout #order_review {
	margin-top: 1.5rem;
}

.woocommerce .cart_totals,
.woocommerce-checkout-review-order {
	background: var(--rf-woo-card);
	border: 1px solid var(--rf-woo-border);
	border-radius: var(--rf-radius, 20px);
	padding: 1.25rem 1.5rem;
	box-shadow: var(--rf-shadow);
}

.woocommerce .cart_totals h2,
#order_review_heading {
	font-family: "Barlow Condensed", sans-serif;
	font-size: 1.25rem;
	font-weight: 800;
	text-transform: uppercase;
	margin: 0 0 1rem;
}

.woocommerce .cart_totals table,
.woocommerce-checkout-review-order-table {
	box-shadow: none;
	border-radius: 12px;
}

.woocommerce .cart_totals .order-total th,
.woocommerce .cart_totals .order-total td,
.woocommerce-checkout-review-order-table .order-total th,
.woocommerce-checkout-review-order-table .order-total td {
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--rf-primary, #d71920);
	background: rgba(215, 25, 32, 0.04);
}

/* Gombok */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce #payment #place_order,
.woocommerce button.button.alt,
.woocommerce a.button.alt,
.woocommerce button.button.checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--rf-touch, 44px);
	padding: 0.75rem 1.5rem;
	border-radius: 999px !important;
	background: var(--rf-primary, #d71920) !important;
	color: #fff !important;
	font-weight: 800 !important;
	font-size: 0.9375rem !important;
	border: 0 !important;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	transition: background 0.2s, transform 0.15s;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce #payment #place_order:hover {
	background: var(--primary_hover, #b9151b) !important;
	transform: translateY(-1px);
}

.woocommerce .coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.woocommerce .coupon .input-text {
	min-height: 44px;
	border-radius: 10px;
	border: 1px solid var(--rf-woo-border);
	padding: 0.5rem 0.75rem;
}

/* Pénztár űrlap */
.woocommerce-checkout .col2-set {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
	width: 100%;
	float: none;
}

.woocommerce form .form-row label {
	font-weight: 700;
	font-size: 0.875rem;
	margin-bottom: 0.35rem;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce form .form-row .select2-container .select2-selection {
	min-height: 44px;
	border-radius: 10px !important;
	border: 1px solid var(--rf-woo-border) !important;
	padding: 0.5rem 0.75rem;
}

.woocommerce-checkout #payment {
	background: var(--rf-cream, #f4f1ea);
	border-radius: var(--rf-radius, 20px);
	padding: 1rem 1.25rem;
	border: 1px solid var(--rf-woo-border);
}

.woocommerce-checkout #payment ul.payment_methods {
	border-bottom: 1px solid var(--rf-woo-border);
	padding-bottom: 1rem;
	margin-bottom: 1rem;
}

/* Mobil: kártyás kosár */
@media (max-width: 768px) {
	.woocommerce table.shop_table thead {
		display: none;
	}

	.woocommerce table.shop_table tbody tr {
		display: block;
		padding: 1rem;
		border-bottom: 1px solid var(--rf-woo-border);
	}

	.woocommerce table.shop_table tbody tr:last-child {
		border-bottom: 0;
	}

	.woocommerce table.shop_table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 0.75rem;
		padding: 0.35rem 0;
		border: 0;
		text-align: right;
	}

	.woocommerce table.shop_table td::before {
		content: attr(data-title);
		font-weight: 700;
		font-size: 0.75rem;
		text-transform: uppercase;
		letter-spacing: 0.04em;
		color: var(--rf-muted, #777);
		text-align: left;
		flex: 1;
	}

	.woocommerce table.shop_table .product-thumbnail {
		display: block;
		text-align: center;
		padding-bottom: 0.75rem;
	}

	.woocommerce table.shop_table .product-thumbnail::before {
		display: none;
	}

	.woocommerce table.shop_table .product-name {
		flex-direction: column;
		align-items: flex-start;
		text-align: left;
	}

	.woocommerce-checkout .col2-set {
		grid-template-columns: 1fr;
	}

	.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
	.woocommerce #payment #place_order {
		width: 100%;
	}
}
