/* Pagina coșului pe mobil — vezi inc/cos/cos.php */

@media (max-width: 767px) {
	/* Bannerul de ~250px devine un titlu simplu */
	.woocommerce-cart #pagetitle {
		min-height: 0;
		padding: 18px 0 0;
		margin: 0;
		background: none !important;
		text-align: left;
	}
	.woocommerce-cart #pagetitle:before,
	.woocommerce-cart #pagetitle:after,
	.woocommerce-cart #pagetitle .ct-breadcrumb {
		display: none;
	}
	.woocommerce-cart #pagetitle .page-title-inner {
		padding: 0;
		min-height: 0;
	}
	.woocommerce-cart #pagetitle .page-title {
		margin: 0;
		color: var(--secondary-color, #191919);
		font-size: 26px;
		line-height: 1.2;
		text-align: left;
	}
	.woocommerce-cart #content.site-content {
		padding-top: 8px;
		padding-bottom: 96px; /* loc pentru bara fixă de jos */
	}

	/* Pagina e pe toată lățimea (Elementor): conținutul coșului lipea de marginile ecranului */
	.woocommerce-cart .entry-content > .woocommerce,
	.woocommerce-cart .elementor-widget-shortcode .woocommerce,
	.woocommerce-cart .elementor-widget-woocommerce-cart .woocommerce,
	.woocommerce-cart .woocommerce:has(> .woocommerce-cart-form) {
		padding-left: 16px;
		padding-right: 16px;
	}

	/* Un rând compact pe produs: poză | nume + ștergere / cantitate + subtotal */
	.woocommerce-cart table.shop_table.cart {
		border: 0;
		margin: 0 0 16px;
	}
	.woocommerce-cart table.shop_table.cart thead {
		display: none;
	}
	.woocommerce-cart table.shop_table.cart tbody,
	.woocommerce-cart table.shop_table.cart tr.cart_item {
		display: block;
		width: 100%;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item {
		display: grid;
		grid-template-columns: 72px minmax(0, 1fr) auto;
		grid-template-areas:
			"poza nume sterge"
			"poza cant total";
		align-items: center;
		column-gap: 12px;
		row-gap: 8px;
		padding: 14px 0;
		border: 0;
		border-bottom: 1px solid rgba(0, 0, 0, .08);
		background: none !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td {
		display: block !important;
		width: auto !important;
		padding: 0 !important;
		border: 0 !important;
		background: none !important;
		text-align: left !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td::before {
		display: none !important;
		content: none !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail {
		grid-area: poza;
		align-self: start;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail img {
		display: block;
		width: 72px !important;
		height: 72px;
		max-width: none;
		object-fit: cover;
		border-radius: 10px;
		margin: 0 !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name {
		grid-area: nume;
		font-size: 15px;
		font-weight: 600;
		line-height: 1.3;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name a {
		color: inherit;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name dl.variation {
		margin: 2px 0 0;
		font-size: 13px;
		font-weight: 400;
		color: #6b6b6b;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-price {
		display: none !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove {
		grid-area: sterge;
		align-self: start;
		justify-self: end;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-remove a.remove {
		display: flex !important;
		align-items: center;
		justify-content: center;
		width: 30px !important;
		height: 30px !important;
		line-height: 1 !important;
		margin: 0 !important;
		border-radius: 50%;
		background: #f2f2f2 !important;
		color: #777 !important;
		font-size: 20px !important;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity {
		grid-area: cant;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity .quantity {
		float: none;
		margin: 0;
		justify-content: flex-start;
	}
	.woocommerce-cart table.shop_table.cart tr.cart_item td.product-subtotal {
		grid-area: total;
		font-size: 16px;
		font-weight: 700;
		text-align: right !important;
		white-space: nowrap;
	}

	/* Rândul cu cuponul: compact, pe un rând; „Actualizează coșul” dispare (se face singur) */
	.woocommerce-cart table.shop_table.cart tr:not(.cart_item),
	.woocommerce-cart table.shop_table.cart td.actions {
		display: block;
		padding: 0 !important;
		border: 0 !important;
		background: none !important;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon {
		display: flex;
		gap: 8px;
		width: 100%;
		margin: 14px 0 8px;
		float: none;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon #coupon_code {
		flex: 1 1 auto;
		width: auto !important;
		min-width: 0;
		margin: 0 !important;
	}
	.woocommerce-cart table.shop_table.cart td.actions .coupon .button {
		flex: none;
		width: auto !important;
		margin: 0 !important;
		padding: 0 16px !important;
	}
	.agb-cos-js .woocommerce-cart-form button[name="update_cart"] {
		display: none !important;
	}

	/* Bara fixă de jos: totalul și drumul spre plată, mereu la îndemână */
	.agb-cos-bara {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9990;
		display: flex;
		align-items: center;
		gap: 12px;
		padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
		background: #fff;
		border-top: 1px solid rgba(0, 0, 0, .08);
		box-shadow: 0 -6px 18px rgba(0, 0, 0, .08);
		transition: transform .2s ease;
	}
	.agb-cos-bara.este-ascunsa {
		transform: translateY(110%);
	}
	.agb-cos-bara__total {
		flex: 1 1 auto;
		min-width: 0;
		font-size: 13px;
		line-height: 1.25;
		color: #6b6b6b;
	}
	.agb-cos-bara__total strong {
		display: block;
		font-size: 18px;
		color: var(--secondary-color, #191919);
	}
	.agb-cos-bara__buton {
		flex: none;
		padding: 13px 20px;
		border-radius: 8px;
		background: var(--primary-color, #76a713);
		color: #fff !important;
		font-size: 15px;
		font-weight: 600;
		line-height: 1;
		text-decoration: none;
	}
}

@media (min-width: 768px) {
	.agb-cos-bara {
		display: none;
	}
}
