/* ============================================================
   Custom WooCommerce Cart Styles
   Add to: Appearance > Customize > Additional CSS
   OR enqueue via functions.php (see instructions at the bottom)
   ============================================================ */
td.col-price ins {
    color: #B72300;
}

.woocommerce-cart h1.alignwide.wp-block-post-title {
	display: none;
}

.woocommerce-cart main {
	background: #F4F4F4;
	margin-top: 0px;
}

.woocommerce-cart main .woocommerce {
	max-width: 100%;
}

th.col-qty {
	text-align: center !important;
}

th.col-product,
td.col-product,
th.col-price,
td.col-price {
	text-align: left !important;
}

.woocommerce-cart main .entry-content {
	margin-top: 0;
}

/* ---------- Wrapper ---------- */
.custom-cart-wrapper {

	margin: 0 auto;
	padding: 0px 20px 40px;
	font-family: Georgia, 'Times New Roman', serif;
	color: #2c2c2c;
}

/* ---------- Header ---------- */
.custom-cart-title {
	text-align: center;
	font-size: 42px;
	font-weight: 400;
	letter-spacing: 0.02em;
	margin-bottom: 1em;
	color: #1a1a1a;
	text-transform: none;
}

.cart-icon {
	font-size: 1.6rem;
	margin-right: 6px;
}

/* Shipping notice */
.cart-shipping-notice {
	text-align: center;
	font-family: 'calibri';
	font-size: 17px;
	font-weight: 400;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #000000;
	margin-bottom: 10px;
}

.cart-shipping-notice--met .notice-check {
	color: #2d6a2d;
	margin-right: 4px;
}

/* Progress bar */
.cart-progress-bar {
	height: 5px;
	background: #e0e0e0;
	border-radius: 3px;
	margin-bottom: 32px;
	overflow: hidden;
}

.cart-progress-bar__fill {
	height: 100%;
	background: #3a7d3a;
	border-radius: 3px;
	transition: width 0.5s ease;
}

/* ---------- Cart table ---------- */

.custom-cart-wrapper {
    max-width: 1590px;
}

.custom-cart-table-wrapper {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 28px;
}

.custom-cart-table {
	width: 100%;
	border-collapse: collapse;
}

.custom-cart-table thead tr {
	border-bottom: 1px solid #e8e8e8;
}

.custom-cart-table thead th {
	padding: 16px 20px;
	font-family: 'calibri';
	font-size: 0.78rem;
	font-weight: 400;
	color: #888;
	text-align: left;
	letter-spacing: 0.04em;
}

.custom-cart-table .col-price,
.custom-cart-table .col-qty,
.custom-cart-table .col-subtotal {
	text-align: right;
	white-space: nowrap;
}

.custom-cart-table .col-qty {
	text-align: center;
}

/* Quantity +/- controls */
.cart-qty-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
	width: fit-content;
	margin: 0 auto;
}

.qty-btn {
	background: none;
	border: none;
	padding: 6px 12px;
	font-size: 1.1rem;
	cursor: pointer;
	color: #555;
	line-height: 1;
	transition: background 0.15s;
	user-select: none;
}

.qty-btn:hover {
	background: #f5f5f5;
}

.qty-input {
	width: 44px;
	text-align: center;
	border: none;
	border-left: 1px solid #ddd;
	border-right: 1px solid #ddd;
	font-size: 0.9rem;
	padding: 6px 4px;
	-moz-appearance: textfield;
}

.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

/* Table rows */
.custom-cart-table tbody tr {
	border-bottom: 1px solid #f0f0f0;
}

.custom-cart-table tbody tr:last-child {
	border-bottom: none;
}

.custom-cart-table tbody td {
	padding: 20px 20px;
	vertical-align: middle;
}

/* Product cell */
.cart-product-cell {
	display: flex;
	align-items: center;
	gap: 16px;
}

.cart-product-thumb {
	width: 64px;
	height: 64px;
	flex-shrink: 0;
}

.cart-product-thumb img {
	width: 64px;
	height: 64px;
	object-fit: cover;
	border-radius: 4px;
}

.cart-product-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cart-product-name a,
.cart-product-name {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.88rem;
	color: #2c2c2c;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cart-remove-link {
	font-family: 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.75rem;
	color: #888;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	transition: color 0.2s;
}

.cart-remove-link:hover {
	color: #c0392b;
}

/* Price column */
.col-price {
	font-family: 'calibri';
	font-size: 0.88rem;
	color: #2c2c2c;
}

.cart-price-amount {
	display: block;
	font-weight: 500;
}

.cart-price-tax {
	display: block;
	font-size: 0.72rem;
	color: #aaa;
	margin-top: 2px;
}

/* Subtotal column */
.col-subtotal {
	font-family: 'calibri';
	font-size: 0.88rem;
	font-weight: 500;
	color: #2c2c2c;
}

td.col-subtotal {
	align-items: end !important;
	/*display: flex;*/
	justify-content: end;
}

td.col-subtotal td.col-subtotal {
	padding: 0;
}

/* ---------- Quantity input ---------- */
.cart-qty-wrapper {
	display: flex;
	justify-content: center;
}

.cart-qty-wrapper .quantity {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.cart-qty-wrapper .qty {
	width: 44px;
	text-align: center;
	border: none;
	font-family: 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.9rem;
	padding: 6px 4px;
	-moz-appearance: textfield;
}

.cart-qty-wrapper .qty::-webkit-inner-spin-button,
.cart-qty-wrapper .qty::-webkit-outer-spin-button {
	-webkit-appearance: none;
}

/* WooCommerce default qty buttons */
.woocommerce .quantity .qty {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 6px 10px;
	width: 56px;
	text-align: center;
	font-size: 0.9rem;
}

/* ---------- Bottom section ---------- */
.custom-cart-bottom {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: start;
}

/* Coupon */

h2.coupon-title {
    text-transform: none;
    font-size: 28px;
}

.cart-coupon-section {
	padding-top: 8px;
}

.cart-coupon-section label {
	display: block;
	font-family: 'Helvetica Neue', Arial, sans-serif;
	font-size: 0.8rem;
	color: #666;
	margin-bottom: 10px;
}

.cart-coupon-row {
	display: flex;
	gap: 10px;
}

.cart-coupon-row input[type="text"] {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.88rem;
	font-family: 'Helvetica Neue', Arial, sans-serif;
	color: #aaa;
	max-width: 243px;
}

.cart-coupon-row input[type="text"]:focus {
	outline: none;
	border-color: #3a7d3a;
}

.cart-coupon-btn.button,
button.cart-coupon-btn {
	padding: 10px 22px;
	background: #CEC9BA;
	color: #000;
	border: none;
	border-radius: 4px;
	font-family: 'calibri';
	font-size: 0.88rem;
	cursor: pointer;
	transition: background 0.2s;
	white-space: nowrap;
}

.cart-coupon-btn.button:hover,
button.cart-coupon-btn:hover {
	background: #6a6a5a;
}

/* ---------- Cart Totals ---------- */
.custom-cart-bottom {
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 8px;
	padding: 28px 28px 24px;
}

.cart-totals-title {
	font-family: "orpheuspro", serif;
	font-size: 1.4rem;
	font-weight: 400;
	color: #1a1a1a;
	margin: 0 0 20px 0;
	text-transform: none;
}

.cart-totals-table {
	width: 100%;
	border-collapse: collapse;
}

.cart-totals-table tr {
	border-bottom: 1px solid #ececec;
}

.cart-totals-table tr:last-of-type {
	border-bottom: none;
}

.cart-totals-table th,
.cart-totals-table td {
	padding: 12px 0;
	font-family: 'calibri';
	font-size: 0.88rem;
	color: #555;
	vertical-align: middle;
}

.cart-totals-table th {
	font-weight: 400;
	text-align: left;
}

.cart-totals-table td {
	text-align: right;
}

.free-shipping {
	color: #1C4100 !important;
	font-weight: bold !important;
}

/* Order total row */
.cart-totals-table tr.order-total th,
.cart-totals-table tr.order-total td {
	padding-top: 16px;
	font-size: 1.05rem;
	font-weight: 700;
	color: #1a1a1a;
	border-top: 1px solid #ccc;
}

.cart-total-tax {
	display: block;
	font-size: 0.72rem;
	font-weight: 400;
	color: #aaa;
	margin-top: 3px;
}

/* Checkout button */
.cart-checkout-btn-wrapper {
	margin-top: 20px;
}

.cart-checkout-btn-wrapper .checkout-button,
.cart-checkout-btn-wrapper a.checkout-button {
	display: block;
	width: 100%;
	max-width: 182px;
	padding: 14px 20px;
	background: #CEC9BA;
	color: #000 !important;
	text-align: center;
	font-family: 'Calibri';
	font-size: 20px;
	font-weight: 400;
	text-decoration: none;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	transition: background 0.2s;
	float: right;
}

.cart-checkout-btn-wrapper .checkout-button:hover,
.cart-checkout-btn-wrapper a.checkout-button:hover {
	background: #6a6a5a;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    tr.woocommerce-cart-form__cart-item.cart_item td.col-subtotal::before {
    content: "Yhteensä";
    font-weight: bold;
}
tr.woocommerce-cart-form__cart-item.cart_item td.col-subtotal {
    justify-content: space-between;
    display: flex;
}

tr.woocommerce-cart-form__cart-item.cart_item td.col-price::before {
    content: "Hinta";
    font-weight: bold;
}

tr.woocommerce-cart-form__cart-item.cart_item td.col-price {
    display: flex;
    justify-content: space-between;
}
    
    .woocommerce ul#shipping_method {
    text-align: left;
}

    .cart-totals-table tr:last-of-type td {
    justify-content: center;
    align-items: center !important;
    display: flex;
    margin-left: 2em;
}
    .cart-qty-wrapper, td.col-qty, td.col-subtotal {
    justify-content: flex-start;
    margin: 0;
}

    .woocommerce-cart main {
    padding-left: 20px;
    padding-right: 20px;
}
    .custom-cart-title {
	    font-size: 28px;
    }
	.custom-cart-bottom {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.custom-cart-table thead {
		display: none;
	}

	.custom-cart-table tbody tr {
		display: flex;
		flex-wrap: wrap;
		padding: 16px;
		gap: 12px;
		border-bottom: 1px solid #f0f0f0;
	}

	.custom-cart-table tbody td {
		padding: 0;
	}

	.col-product {
		width: 100%;
	}

	.col-price,
	.col-qty,
	.col-subtotal {
		flex: 1;
		text-align: left !important;
	}
}

td.col-subtotal span.tax-rate {
    padding-left: 3px;
}

/* Android mobile */

@media (max-width: 768px) {
    .cart-coupon-row input[type="text"] {
    -webkit-appearance: none;
    appearance: none;
}
    .cart-coupon-row {
        flex-wrap: wrap;
    }
    
    .cart-coupon-row input[type="text"] {
        max-width: 100%;
        width: 100%;
        flex: 1 1 auto;
    }
    
    .cart-coupon-btn.button,
    button.cart-coupon-btn {
        width: 100%;
    }
}

/* =============================================================
   functions.php snippet — enqueue the stylesheet properly
   Add this to your theme's functions.php
   =============================================================

function mytheme_enqueue_cart_styles() {
	if ( is_cart() ) {
		wp_enqueue_style(
			'custom-cart-style',
			get_stylesheet_directory_uri() . '/woocommerce/cart/cart-style.css',
			array(),
			'1.0.0'
		);
	}
}
add_action( 'wp_enqueue_scripts', 'mytheme_enqueue_cart_styles' );

   ============================================================= */