/* Carrito (solo la página del carrito; el checkout no se toca).
   Color de marca: #680000. Los selectores van bajo body.woocommerce-cart para ganar a las reglas
   generales del Additional CSS que están pensadas para el checkout (.cart_item, .cart-subtotal...). */

body.woocommerce-cart {
	--pc-vino: #680000;
	--pc-vino-osc: #4d0000;
	--pc-borde: #ece7e8;
	--pc-fondo: #faf7f7;
	--pc-texto: #2b2b2b;
	--pc-suave: #7a7173;
}

/* Disposición: productos a la izquierda, resumen a la derecha */
@media (min-width: 900px) {
	body.woocommerce-cart .entry-content > .woocommerce {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 360px;
		gap: 28px;
		align-items: start;
	}
	body.woocommerce-cart .entry-content > .woocommerce > .woocommerce-notices-wrapper { grid-column: 1 / -1; }
	body.woocommerce-cart .entry-content > .woocommerce > .cart-collaterals {
		float: none; width: 100%; position: sticky; top: 20px;
	}
}
body.woocommerce-cart .cart-collaterals { float: none; width: 100%; }
body.woocommerce-cart .cart-collaterals .cart_totals { float: none; width: 100%; margin: 0; }

/* Tabla de productos como tarjeta */
body.woocommerce-cart table.shop_table.cart {
	border: 1px solid var(--pc-borde);
	border-radius: 14px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: #fff;
	box-shadow: 0 2px 14px rgba(104, 0, 0, .06);
	margin: 0 0 18px;
}
body.woocommerce-cart table.shop_table.cart thead th {
	background: var(--pc-fondo);
	color: var(--pc-suave);
	font-size: .72rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	font-weight: 700;
	padding: 14px 16px;
	border: 0;
}
body.woocommerce-cart table.shop_table.cart td {
	padding: 18px 16px;
	border: 0;
	border-top: 1px solid var(--pc-borde);
	vertical-align: middle;
	background: #fff;
}
body.woocommerce-cart table.shop_table.cart tr.cart_item td { padding-bottom: 18px !important; }
body.woocommerce-cart table.shop_table.cart td.product-name {
	display: table-cell !important;
	width: auto !important;
	padding-right: 16px !important;
	margin: 0 !important;
}
body.woocommerce-cart table.shop_table.cart td.product-name a {
	color: var(--pc-texto);
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}
body.woocommerce-cart table.shop_table.cart td.product-name a:hover { color: var(--pc-vino); }
body.woocommerce-cart table.shop_table.cart td.product-name .backorder_notification,
body.woocommerce-cart table.shop_table.cart td.product-name .variation { font-size: .8rem; color: var(--pc-suave); }
body.woocommerce-cart table.shop_table.cart td.product-thumbnail { width: 104px; }
body.woocommerce-cart table.shop_table.cart td.product-thumbnail img {
	width: 80px; height: 80px; object-fit: contain;
	border: 1px solid var(--pc-borde); border-radius: 10px; background: #fff; padding: 4px;
}
body.woocommerce-cart table.shop_table.cart td.product-price,
body.woocommerce-cart table.shop_table.cart td.product-subtotal {
	text-align: right !important;
	min-width: 0 !important;
	color: var(--pc-texto);
}
body.woocommerce-cart table.shop_table.cart td.product-subtotal { font-weight: 800; color: var(--pc-vino); font-size: 1.05rem; }

/* Botón quitar */
body.woocommerce-cart table.shop_table.cart a.remove {
	display: inline-flex; align-items: center; justify-content: center;
	width: 28px; height: 28px; border-radius: 50%;
	color: var(--pc-suave) !important; background: var(--pc-fondo);
	font-size: 1.2rem; line-height: 1; text-decoration: none; transition: all .15s;
}
body.woocommerce-cart table.shop_table.cart a.remove:hover { background: var(--pc-vino); color: #fff !important; }

/* Cantidad */
body.woocommerce-cart .quantity .qty {
	width: 70px; text-align: center; padding: 9px 6px;
	border: 1px solid #d9d2d3; border-radius: 10px; background: #fff; font-weight: 700;
}
body.woocommerce-cart .quantity .qty:focus { border-color: var(--pc-vino); outline: 0; box-shadow: 0 0 0 3px rgba(104, 0, 0, .12); }

/* Cupón y actualizar */
body.woocommerce-cart table.shop_table.cart td.actions {
	background: var(--pc-fondo); padding: 16px; border-top: 1px solid var(--pc-borde);
}
body.woocommerce-cart .coupon { display: flex; gap: 8px; align-items: center; float: left; }
body.woocommerce-cart .coupon .input-text {
	width: 200px; padding: 10px 12px; border: 1px dashed #bda9ac; border-radius: 10px; background: #fff;
}
body.woocommerce-cart button.button[name="apply_coupon"] {
	background: #fff; color: var(--pc-vino); border: 2px solid var(--pc-vino); border-radius: 10px;
	padding: 9px 16px; font-weight: 700;
}
body.woocommerce-cart button.button[name="apply_coupon"]:hover { background: var(--pc-vino); color: #fff; }
body.woocommerce-cart button.button[name="update_cart"] {
	float: right; background: #efe6e7; color: var(--pc-vino); border: 0; border-radius: 10px; padding: 11px 18px; font-weight: 700;
}
body.woocommerce-cart button.button[name="update_cart"]:not(:disabled):hover { background: var(--pc-vino); color: #fff; }
body.woocommerce-cart button.button[name="update_cart"]:disabled { opacity: .45; }

/* Tarjeta de totales */
body.woocommerce-cart .cart_totals {
	background: #fff; border: 1px solid var(--pc-borde); border-radius: 14px;
	padding: 22px 22px 20px; box-shadow: 0 6px 24px rgba(104, 0, 0, .09);
}
body.woocommerce-cart .cart_totals h2 {
	font-size: 1.15rem; margin: 0 0 14px; padding-bottom: 12px;
	border-bottom: 2px solid var(--pc-vino); color: var(--pc-texto);
}
body.woocommerce-cart .cart_totals table.shop_table { border: 0; margin: 0; }
body.woocommerce-cart .cart_totals table.shop_table th,
body.woocommerce-cart .cart_totals table.shop_table td {
	padding: 12px 0; border: 0 !important; background: transparent; vertical-align: top;
}
body.woocommerce-cart .cart_totals table.shop_table tr + tr th,
body.woocommerce-cart .cart_totals table.shop_table tr + tr td { border-top: 1px solid var(--pc-borde) !important; }
body.woocommerce-cart .cart_totals th { font-weight: 600 !important; color: var(--pc-suave); width: 30%; }
body.woocommerce-cart .cart_totals td { text-align: right; min-width: 0; }
body.woocommerce-cart .cart-subtotal bdi { font-size: 1rem; }

/* Opciones de envío como tarjetas seleccionables */
body.woocommerce-cart #shipping_method { list-style: none; margin: 0 0 8px; padding: 0; text-align: left; }
body.woocommerce-cart #shipping_method li {
	margin: 0 0 8px; padding: 10px 12px; border: 1.5px solid var(--pc-borde); border-radius: 10px;
	display: flex; gap: 8px; align-items: flex-start; background: #fff; transition: border-color .15s, background .15s;
}
body.woocommerce-cart #shipping_method li::before { display: none; }
body.woocommerce-cart #shipping_method li:has(input:checked) { border-color: var(--pc-vino); background: #fdf3f3; }
body.woocommerce-cart #shipping_method input { margin-top: 3px; accent-color: var(--pc-vino); }
body.woocommerce-cart #shipping_method label { font-weight: 600 !important; font-size: .88rem !important; line-height: 1.35; margin: 0; cursor: pointer; }
body.woocommerce-cart .woocommerce-shipping-destination { font-size: .85rem; color: var(--pc-suave); margin: 4px 0; }
body.woocommerce-cart .shipping-calculator-button { color: var(--pc-vino); font-weight: 700; font-size: .88rem; }

/* El calculador pide provincia y ciudad: sin "(opcional)" */
body.woocommerce-cart .woocommerce-shipping-calculator .optional { display: none; }
body.woocommerce-cart .woocommerce-shipping-calculator select,
body.woocommerce-cart .woocommerce-shipping-calculator .select2-selection {
	border-radius: 10px; border-color: #d9d2d3; min-height: 42px;
}
body.woocommerce-cart .woocommerce-shipping-calculator .button {
	width: 100%; background: var(--pc-vino); color: #fff; border-radius: 10px; font-weight: 700;
}

/* Total */
body.woocommerce-cart .cart_totals .order-total th,
body.woocommerce-cart .cart_totals .order-total td { padding-top: 16px; font-size: 1.1rem; color: var(--pc-texto); }
body.woocommerce-cart .cart_totals .order-total { font-size: 1rem; }
body.woocommerce-cart .cart_totals .order-total td { font-size: 1.6rem; font-weight: 800; color: var(--pc-vino); }
body.woocommerce-cart .cart_totals .order-total td small { display: block; font-size: .72rem; font-weight: 400; color: var(--pc-suave); }

/* Botón principal */
body.woocommerce-cart .wc-proceed-to-checkout { padding: 6px 0 0; }
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
	display: block; width: 100%; box-sizing: border-box; text-align: center; margin: 0;
	background: linear-gradient(180deg, #7d0a0a, var(--pc-vino)); color: #fff !important;
	border-radius: 12px; padding: 17px 20px; font-size: 1.1rem; font-weight: 800; letter-spacing: .02em;
	text-decoration: none !important; box-shadow: 0 6px 16px rgba(104, 0, 0, .28); transition: transform .15s, box-shadow .15s;
}
body.woocommerce-cart .wc-proceed-to-checkout .checkout-button:hover {
	background: linear-gradient(180deg, var(--pc-vino), var(--pc-vino-osc)); transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(104, 0, 0, .36);
}
body.woocommerce-cart .wc-proceed-to-checkout::after {
	content: "Retiro gratis en Cuenca · Envíos a todo el Ecuador";
	display: block; text-align: center; margin-top: 12px; font-size: .78rem; color: var(--pc-suave);
}

/* Celular: cada producto como tarjeta */
@media (max-width: 767px) {
	body.woocommerce-cart table.shop_table.cart { border: 0; box-shadow: none; background: transparent; }
	body.woocommerce-cart table.shop_table.cart thead { display: none; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item {
		display: block; position: relative; margin-bottom: 14px; padding: 6px 0;
		border: 1px solid var(--pc-borde); border-radius: 14px; background: #fff;
		box-shadow: 0 2px 12px rgba(104, 0, 0, .07);
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item td {
		display: flex !important; justify-content: space-between; align-items: center;
		border-top: 0; padding: 8px 14px !important; text-align: right !important; width: auto !important;
	}
	body.woocommerce-cart table.shop_table.cart tr.cart_item td::before {
		float: none; font-weight: 700; font-size: .72rem; text-transform: uppercase; color: var(--pc-suave);
	}
	body.woocommerce-cart table.shop_table.cart td.product-remove { position: absolute; top: 4px; right: 6px; padding: 0 !important; }
	body.woocommerce-cart table.shop_table.cart td.product-remove::before { display: none; }
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail { justify-content: center; }
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail::before { display: none; }
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail img { width: 96px; height: 96px; }
	body.woocommerce-cart table.shop_table.cart td.product-name { display: block !important; text-align: center !important; }
	body.woocommerce-cart table.shop_table.cart td.product-name::before { display: none; }
	body.woocommerce-cart table.shop_table.cart td.actions { display: block; border: 1px solid var(--pc-borde); border-radius: 14px; }
	body.woocommerce-cart .coupon { float: none; flex-wrap: wrap; margin-bottom: 10px; }
	body.woocommerce-cart .coupon .input-text { flex: 1 1 140px; width: auto; }
	body.woocommerce-cart button.button[name="update_cart"] { float: none; width: 100%; }
	body.woocommerce-cart .cart_totals { margin-top: 18px; padding: 18px 16px; }
}

/* Ancho medio: más espacio para el nombre del producto (se oculta la columna de precio unitario) */
@media (min-width: 768px) and (max-width: 1199px) {
	body.woocommerce-cart table.shop_table.cart th.product-price,
	body.woocommerce-cart table.shop_table.cart td.product-price { display: none; }
	body.woocommerce-cart table.shop_table.cart td { padding: 14px 10px; }
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail { width: 76px; }
	body.woocommerce-cart table.shop_table.cart td.product-thumbnail img { width: 62px; height: 62px; }
	body.woocommerce-cart table.shop_table.cart td.product-name { min-width: 160px; }
}
@media (min-width: 900px) {
	body.woocommerce-cart .entry-content > .woocommerce { grid-template-columns: minmax(0, 1fr) 340px; }
}

/* Celular: tarjeta compacta (foto y nombre en una fila; cantidad y subtotal debajo) */
@media (max-width: 767px) {
	body.woocommerce-cart table.shop_table.cart tr.cart_item { display: flex !important; flex-wrap: wrap; align-items: center; padding: 10px 6px 6px; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail { flex: 0 0 92px; padding: 6px 8px !important; justify-content: center; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-thumbnail img { width: 72px; height: 72px; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-name { flex: 1 1 calc(100% - 100px); display: block !important; text-align: left !important; padding: 6px 30px 6px 4px !important; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-price { display: none !important; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity,
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-subtotal { flex: 1 1 50%; box-sizing: border-box; border-top: 1px solid var(--pc-borde); }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity { justify-content: flex-start; gap: 10px; }
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-subtotal { justify-content: flex-end; gap: 10px; }
}
@media (max-width: 767px) {
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-quantity,
	body.woocommerce-cart table.shop_table.cart tr.cart_item td.product-subtotal { width: 50% !important; flex: 0 0 50%; }
}

/* Nota bajo el envío en motorizado. */
body.woocommerce-cart .planet-nota { display: block; font-weight: 400; font-size: .8rem; line-height: 1.35; color: var(--pc-suave); margin-top: 2px; }
