/**
 * Runnerp — Cart layout i mobilni prikaz.
 */

.runnerp-cart-page #qodef-page-inner {
	position: relative;
	padding: 30px 0 100px;
}

/* Kolona količine — samo broj (+/−), bez natpisa "Quantity" */
.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.product-quantity .qodef-quantity-label {
	display: none !important;
}

/* WooCommerce responsive tabela — bez labela ispred ćelija */
.runnerp-cart-page .woocommerce-cart-form .shop_table_responsive tr td::before {
	display: none !important;
}

/* Bez "Update cart" dugmeta */
.runnerp-cart-page .woocommerce-cart-form button[name="update_cart"] {
	display: none !important;
}

/* Coupon — čistiji blok */
.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions {
	padding-top: 20px;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 14px;
	margin-right: 0;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon label {
	display: block !important;
	flex: 0 0 100%;
	margin: 0;
	font-family: "Syne", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #604235;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon > * {
	margin-bottom: 0;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions input[type="text"]#coupon_code {
	flex: 1 1 180px;
	min-width: 0;
	min-height: 46px;
	margin-right: 0;
	padding: 12px 14px;
	border: 1px solid #e0e0e0;
	background-color: #F3ECE6;
	box-sizing: border-box;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon .button[name="apply_coupon"] {
	flex: 0 0 auto;
	padding: 12px 20px !important;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: #F3ECE6 !important;
	background-color: #B08968 !important;
	border: 2px solid #B08968 !important;
	overflow: visible;
	white-space: nowrap;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon .button[name="apply_coupon"]::before {
	display: none !important;
}

.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon .button[name="apply_coupon"]:hover {
	color: #F3ECE6 !important;
	background-color: #7A5A45 !important;
	border-color: #7A5A45 !important;
}

/* Mobil: kartice po stavci + totals ispod */
@media only screen and (max-width: 768px) {
	.runnerp-cart-page #qodef-page-inner {
		padding: 16px 0 56px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart {
		flex-direction: column;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .woocommerce-cart-form {
		width: 100%;
		padding-right: 0;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .cart-collaterals {
		width: 100%;
		margin-top: 24px;
		padding: 20px 16px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .cart_totals > h2 {
		font-size: 22px;
		margin-bottom: 16px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .cart-collaterals .shop_table th {
		width: auto;
		font-size: 16px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .cart-collaterals .shop_table td {
		padding-left: 16px;
		font-size: 15px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .wc-proceed-to-checkout .checkout-button {
		padding: 14px 20px;
	}

	/* Tabela proizvoda → kartice */
	.runnerp-cart-page .woocommerce-cart-form__contents thead {
		display: none;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents,
	.runnerp-cart-page .woocommerce-cart-form__contents tbody {
		display: block;
		width: 100%;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item {
		display: grid;
		grid-template-columns: 96px 1fr 44px;
		grid-template-areas:
			"thumb name remove"
			"thumb price remove"
			"thumb qty remove"
			"subtotal subtotal subtotal";
		gap: 4px 12px;
		align-items: start;
		width: 100%;
		padding: 10px 12px 12px;
		margin: 0 0 6px;
		border: 1px solid #F3ECE6 !important;
		border-bottom: 1px solid #F3ECE6 !important;
		box-sizing: border-box;
	}

	.runnerp-cart-page .woocommerce-cart-form table tr {
		border-width: 0;
	}

	.runnerp-cart-page .woocommerce-cart-form table td {
		border-right-width: 0 !important;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item > td,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item > td {
		display: block;
		width: auto !important;
		padding: 0 10px;
		border: 0;
		text-align: left;
	}

	/* Tema na ≤680px skriva thumbnail — na karticama ostaje vidljiv */
	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.product-thumbnail {
		display: block !important;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-remove,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-remove {
		grid-area: remove;
		justify-self: end;
		align-self: start;
		width: auto !important;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-remove a,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-remove a {
		min-width: 40px;
		min-height: 40px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-remove a::after,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-remove a::after {
		position: static;
		transform: none;
		font-size: 25px;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-thumbnail,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-thumbnail {
		grid-area: thumb;
		padding-right: 0;
		width: auto !important;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-thumbnail a,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-thumbnail a {
		max-width: 96px;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-name,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-name {
		grid-area: name;
		min-width: 0;
		font-size: 14px;
		line-height: 1.35;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-name a,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-name a {
		font-size: inherit;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-price,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-price {
		grid-area: price;
		font-weight: 600;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-quantity,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-quantity {
		grid-area: qty;
		text-align: left;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-quantity .runnerp-cart-item-qty,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-quantity .runnerp-cart-item-qty {
		display: inline-block;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr.cart_item td.product-subtotal,
	.runnerp-cart-page .woocommerce-cart-form__contents tr.woocommerce-cart-form__cart-item td.product-subtotal {
		grid-area: subtotal;
		margin-top: 2px;
		padding-top: 8px !important;
		border-top: 1px solid #f0f0f0;
		text-align: right;
		font-weight: 700;
		font-size: 15px;
	}

	/* Coupon — puna širina kartice / forme */
	.runnerp-cart-page .woocommerce-cart-form__contents tr:has(td.actions) {
		display: block;
		width: 100%;
	}

	.runnerp-cart-page .woocommerce-cart-form__contents tr td.actions {
		display: block;
		width: 100% !important;
		max-width: 100%;
		margin-top: 4px;
		padding: 16px 12px !important;
		border: 1px solid #ededed !important;
		background-color: #f8f8f8;
		box-sizing: border-box;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions {
		padding-top: 0 !important;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .qodef-buttons,
	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon {
		width: 100% !important;
		max-width: 100%;
		box-sizing: border-box;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .qodef-buttons {
		align-items: stretch;
		flex-direction: column;
		gap: 0;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr);
		justify-items: stretch;
		align-items: stretch !important;
		gap: 10px;
		margin-right: 0 !important;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon > * {
		margin-bottom: 0 !important;
		justify-self: stretch;
		align-self: stretch;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon label {
		width: 100%;
		margin: 0 0 2px;
		font-size: 12px;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions input[type="text"]#coupon_code,
	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions input[type="text"] {
		grid-column: 1 / -1;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
		min-height: 46px;
		margin: 0 !important;
		display: block;
		text-align: left !important;
	}

	.runnerp-cart-page #qodef-woo-page.qodef--cart .shop_table td.actions .coupon .button[name="apply_coupon"] {
		grid-column: 1 / -1;
		width: 100% !important;
		max-width: none !important;
		min-width: 0;
		display: block !important;
		min-height: 46px;
		margin: 0 !important;
		padding: 12px 20px !important;
		white-space: normal;
		text-align: center;
		box-sizing: border-box;
	}
}
