/* Cosmod cart — /panier/  [cosmod_cart] */

.cosmod-cart-wrap {
	--cosmod-cart-bg: #f6f5f2;
	--cosmod-cart-ink: #111;
	--cosmod-cart-muted: #666;
	--cosmod-cart-line: #e6e3dc;
	--cosmod-cart-panel: #fff;
	font-family: "DM Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: var(--cosmod-cart-ink);
	max-width: 1320px;
	margin: 0 auto;
	padding: 28px 20px 64px;
}

.cosmod-cart-wrap--empty {
	min-height: 40vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cosmod-cart-empty {
	text-align: center;
	padding: 48px 24px;
}

.cosmod-cart-empty__text {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 22px;
	margin: 0 0 24px;
	letter-spacing: 0.02em;
}

.cosmod-cart-empty__btn {
	display: inline-block;
	background: #111;
	color: #fff !important;
	text-decoration: none !important;
	padding: 14px 32px;
	border-radius: 100px;
	font-size: 13px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-family: Georgia, "Times New Roman", serif;
}

.cosmod-cart-layout {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(440px, 1.15fr);
	gap: 28px;
	align-items: start;
}

.cosmod-cart-panel,
.cosmod-cart-totals {
	background: var(--cosmod-cart-panel);
	border: 1px solid var(--cosmod-cart-line);
	border-radius: 10px;
}

.cosmod-cart-panel {
	overflow: hidden;
}

.cosmod-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 !important;
}

.cosmod-cart-table thead th {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	text-align: left;
	padding: 16px 14px;
	border-bottom: 1px solid var(--cosmod-cart-line);
	color: #333;
	background: #faf9f7;
}

.cosmod-cart-table td {
	padding: 18px 14px;
	border-bottom: 1px solid var(--cosmod-cart-line);
	vertical-align: middle;
	font-size: 14px;
}

.cosmod-cart-table tr:last-child td {
	border-bottom: 0;
}

.cosmod-cart-table .product-remove {
	width: 40px;
}

.cosmod-cart-table .product-thumbnail {
	width: 72px;
}

.cosmod-cart-table .product-thumbnail img {
	width: 56px;
	height: 56px;
	object-fit: contain;
	display: block;
	border-radius: 4px;
	background: #fafafa;
}

.cosmod-cart-table .product-name a {
	color: var(--cosmod-cart-ink) !important;
	text-decoration: none !important;
	font-weight: 500;
	line-height: 1.35;
}

.cosmod-cart-table .product-name a:hover {
	opacity: 0.7;
}

.cosmod-cart-remove {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #a00 !important;
	font-size: 20px;
	line-height: 1;
	text-decoration: none !important;
	background: transparent !important;
}

.cosmod-cart-remove:hover {
	background: #fdeaea !important;
}

.cosmod-cart-table .quantity .qty {
	width: 64px;
	padding: 8px 10px;
	border: 1px solid var(--cosmod-cart-line);
	border-radius: 6px;
	text-align: center;
	font-size: 14px;
	background: #fff;
}

.cosmod-cart-row.is-updating {
	opacity: 0.45;
	transition: opacity 0.15s;
}

.cosmod-cart-actions {
	display: none;
	margin-top: 0;
}

.cosmod-cart-update {
	display: none !important;
}

.cosmod-cart-collaterals {
	position: sticky;
	top: 24px;
}

.cosmod-cart-totals {
	padding: 22px 22px 20px;
}

.cosmod-cart-totals__title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 16px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	margin: 0 0 18px;
	font-weight: 600;
}

.cosmod-cart-totals-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 18px !important;
	table-layout: fixed;
}

.cosmod-cart-totals-table th,
.cosmod-cart-totals-table td {
	padding: 12px 0;
	border-bottom: 1px solid var(--cosmod-cart-line);
	font-size: 14px;
	text-align: left;
	vertical-align: top;
}

.cosmod-cart-totals-table th {
	font-weight: 600;
	width: 42%;
	color: #333;
}

.cosmod-cart-totals-table td {
	text-align: right;
}

/* Flat layout so shipping is never stuck in a narrow table column */
.cosmod-cart-totals-table,
.cosmod-cart-totals-table tbody {
	display: block;
	width: 100%;
}

.cosmod-cart-totals-table tr {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px 16px;
	width: 100%;
	box-sizing: border-box;
	border-bottom: 1px solid var(--cosmod-cart-line);
}

.cosmod-cart-totals-table tr th,
.cosmod-cart-totals-table tr td {
	border-bottom: 0;
	padding: 12px 0;
}

.cosmod-cart-totals-table tr.cart-subtotal th,
.cosmod-cart-totals-table tr.order-total th,
.cosmod-cart-totals-table tr.cart-discount th,
.cosmod-cart-totals-table tr.fee th,
.cosmod-cart-totals-table tr.tax-rate th {
	flex: 1 1 auto;
	width: auto;
	text-align: left;
}

.cosmod-cart-totals-table tr.cart-subtotal td,
.cosmod-cart-totals-table tr.order-total td,
.cosmod-cart-totals-table tr.cart-discount td,
.cosmod-cart-totals-table tr.fee td,
.cosmod-cart-totals-table tr.tax-rate td {
	flex: 0 0 auto;
	width: auto;
	text-align: right;
}

/* Expédition — full-width under the label; prices flush right */
.cosmod-cart-totals-table tr.woocommerce-shipping-totals,
.cosmod-cart-totals-table tr.shipping {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
}

.cosmod-cart-totals-table tr.woocommerce-shipping-totals th,
.cosmod-cart-totals-table tr.shipping th,
.cosmod-cart-totals .cosmod-ship-heading {
	display: block;
	width: 100%;
	max-width: 100%;
	padding: 12px 0 10px;
	font-weight: 600;
	color: #333;
	text-align: left;
	box-sizing: border-box;
}

.cosmod-cart-totals-table tr.woocommerce-shipping-totals td,
.cosmod-cart-totals-table tr.shipping td {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	padding: 0 0 12px;
	text-align: left;
	box-sizing: border-box;
}

.cosmod-cart-totals-table .order-total th,
.cosmod-cart-totals-table .order-total td {
	padding-top: 16px;
	font-size: 16px;
}

.cosmod-cart-totals-table .order-total .amount {
	font-weight: 700;
	font-size: 18px;
}

/* Shipping radios — name left, price at the far right edge */
.cosmod-cart-totals ul#shipping_method {
	list-style: none;
	margin: 0;
	padding: 0;
	width: 100% !important;
	max-width: none !important;
}

.cosmod-cart-totals ul#shipping_method li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	margin: 0 0 12px;
	padding: 0;
	box-sizing: border-box;
}

.cosmod-cart-totals ul#shipping_method li > input[type="radio"] {
	margin: 3px 0 0;
	accent-color: #111;
	flex: 0 0 auto;
}

.cosmod-cart-totals ul#shipping_method label {
	display: flex !important;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	flex: 1 1 auto;
	width: 100% !important;
	min-width: 0;
	max-width: none !important;
	margin: 0 !important;
	font-size: 14px;
	line-height: 1.4;
	cursor: pointer;
	color: #222;
	box-sizing: border-box;
	text-align: left;
}

.cosmod-cart-totals ul#shipping_method label .cosmod-ship-name {
	flex: 1 1 auto;
	min-width: 0;
	text-align: left;
}

.cosmod-cart-totals ul#shipping_method label .amount,
.cosmod-cart-totals ul#shipping_method label .woocommerce-Price-amount,
.cosmod-cart-totals ul#shipping_method label .cosmod-ship-price {
	flex: 0 0 auto;
	margin-left: auto !important;
	white-space: nowrap;
	font-weight: 700;
	text-align: right;
}

.cosmod-cart-totals ul#shipping_method input[type="radio"] {
	margin-top: 3px;
	accent-color: #111;
}

.cosmod-cart-totals .woocommerce-shipping-destination {
	font-size: 13px;
	color: var(--cosmod-cart-muted);
	margin: 8px 0 4px;
	line-height: 1.45;
}

.cosmod-cart-totals .shipping-calculator-button {
	color: #111 !important;
	font-size: 13px;
	text-decoration: underline !important;
	cursor: pointer;
}

.cosmod-cart-totals .woocommerce-shipping-calculator {
	margin-top: 8px;
}

.cosmod-cart-totals .shipping-calculator-form {
	display: none !important;
	margin-top: 12px;
	padding: 14px 0 4px;
	border-top: 1px dashed var(--cosmod-cart-line);
}

.cosmod-cart-totals .shipping-calculator-form.is-open {
	display: block !important;
}

.cosmod-cart-totals .shipping-calculator-form p {
	margin: 0 0 10px;
}

.cosmod-cart-totals .shipping-calculator-form .form-row {
	margin: 0 0 10px;
}

.cosmod-cart-totals .shipping-calculator-form select,
.cosmod-cart-totals .shipping-calculator-form input[type="text"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--cosmod-cart-line);
	border-radius: 6px;
	font-size: 13px;
	box-sizing: border-box;
	background: #fff;
}

.cosmod-cart-totals .shipping-calculator-form button[name="calc_shipping"],
.cosmod-cart-totals .shipping-calculator-form p:has(button[name="calc_shipping"]),
.cosmod-cart-totals .shipping-calculator-form .button {
	display: none !important;
}

.cosmod-cart-checkout {
	margin-top: 8px;
}

.cosmod-cart-checkout a.checkout-button,
.cosmod-cart-checkout .checkout-button {
	display: block !important;
	width: 100%;
	box-sizing: border-box;
	text-align: center;
	background: #111 !important;
	color: #fff !important;
	padding: 16px 20px !important;
	border-radius: 100px !important;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-family: Georgia, "Times New Roman", serif !important;
	font-size: 13px !important;
	text-decoration: none !important;
	border: 1px solid #111 !important;
	transition: background 0.2s, color 0.2s;
}

.cosmod-cart-checkout a.checkout-button:hover,
.cosmod-cart-checkout .checkout-button:hover {
	background: #333 !important;
}

.cosmod-cart-wrap .woocommerce-message,
.cosmod-cart-wrap .woocommerce-error,
.cosmod-cart-wrap .woocommerce-info {
	border-top-color: #111;
	background: #faf9f7;
	padding: 14px 18px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 18px;
}

@media (max-width: 900px) {
	.cosmod-cart-layout {
		grid-template-columns: 1fr;
	}

	.cosmod-cart-collaterals {
		position: static;
	}
}

@media (max-width: 640px) {
	.cosmod-cart-wrap {
		padding-left: 12px;
		padding-right: 12px;
	}

	.cosmod-cart-table thead {
		display: none;
	}

	.cosmod-cart-table,
	.cosmod-cart-table tbody,
	.cosmod-cart-table tr,
	.cosmod-cart-table td {
		display: block;
		width: 100%;
	}

	.cosmod-cart-table tr.cart_item,
	.cosmod-cart-table tr.cosmod-cart-row {
		position: relative;
		padding: 20px 16px 18px;
		margin: 0 0 14px;
		border: 1px solid var(--cosmod-cart-line);
		border-radius: 14px;
		border-bottom: 1px solid var(--cosmod-cart-line);
		background: #fff;
		box-shadow: 0 2px 10px rgba(17, 17, 17, 0.04);
		text-align: center;
	}

	.cosmod-cart-table td {
		padding: 8px 0;
		border: 0;
		text-align: center !important;
	}

	.cosmod-cart-table .product-remove {
		position: absolute;
		top: 10px;
		right: 10px;
		width: auto;
		padding: 0;
		z-index: 2;
	}

	.cosmod-cart-table .product-thumbnail {
		display: flex;
		justify-content: center;
		align-items: center;
		width: 100% !important;
		max-width: 100%;
		margin: 4px 0 10px;
		padding-top: 8px;
	}

	.cosmod-cart-table .product-thumbnail img,
	.cosmod-cart-table .product-thumbnail > div {
		width: 88px !important;
		height: 88px !important;
		margin: 0 auto;
		border-radius: 8px;
	}

	.cosmod-cart-table .product-name a {
		display: block;
		max-width: 28ch;
		margin: 0 auto;
		line-height: 1.4;
	}

	.cosmod-cart-table .product-quantity .quantity {
		display: flex;
		justify-content: center;
	}

	.cosmod-cart-table .quantity .qty {
		width: 72px;
		margin: 0 auto;
	}

	.cosmod-cart-table td::before {
		content: attr(data-title);
		display: block;
		font-size: 11px;
		letter-spacing: 0.06em;
		text-transform: uppercase;
		color: #888;
		margin-bottom: 4px;
		font-family: Georgia, "Times New Roman", serif;
		text-align: center;
	}

	.cosmod-cart-table .product-remove::before,
	.cosmod-cart-table .product-thumbnail::before {
		display: none;
	}

	.cosmod-cart-totals__title {
		text-align: center;
	}

	.cosmod-cart-totals-table tr.cart-subtotal,
	.cosmod-cart-totals-table tr.order-total {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		text-align: center;
	}

	.cosmod-cart-totals-table tr.cart-subtotal th,
	.cosmod-cart-totals-table tr.cart-subtotal td,
	.cosmod-cart-totals-table tr.order-total th,
	.cosmod-cart-totals-table tr.order-total td {
		text-align: center !important;
		width: 100%;
	}

	.cosmod-cart-totals .cosmod-ship-heading {
		text-align: center;
	}

	.cosmod-cart-totals .woocommerce-shipping-destination,
	.cosmod-cart-totals .shipping-calculator-button {
		text-align: center;
		display: block;
	}
}
