/* ===================================================================
   COMPONENTE: Carrinho de Compras
   Botão do carrinho com contador de itens
   =================================================================== */

.cart-section {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
}

/* ===================================================================
   TABELA DO CARRINHO - Desktop
   Otimização de imagens e layout
   =================================================================== */

/* Apenas para desktop (>768px) */
@media screen and (min-width: 769px) {
	/* Container da tabela do carrinho */
	.CartContents {
		width: 100%;
		border-collapse: collapse;
		background: #fff;
		box-shadow: 0 2px 8px rgba(0,0,0,0.08);
		border-radius: 8px;
		overflow: hidden;
	}

	/* Cabeçalho da tabela */
	.CartContents thead {
		position: relative;
	}

	.CartContents thead tr {
		background: linear-gradient(135deg, #cc0000 0%, #990000 60%, #7a0000 100%);
		box-shadow: 0 4px 12px rgba(153, 0, 0, 0.35);
	}

	.CartContents thead th {
		background: transparent;
		color: #ffffff;
		padding: 18px 14px;
		font-weight: 700;
		font-size: 13px;
		text-transform: uppercase;
		letter-spacing: 1px;
		border-right: 1px solid rgba(255, 255, 255, 0.15);
		border-bottom: 3px solid rgba(255, 204, 0, 0.6);
		position: relative;
	}

	.CartContents thead th:last-child {
		border-right: none;
	}

	/* Destaque especial para coluna "Ítens do Carrinho" */
	.CartContents thead th:first-child {
		font-size: 15px;
		letter-spacing: 1.5px;
		padding-left: 20px;
	}

	.CartContents thead th:first-child::before {
		content: "🛒 ";
		font-size: 16px;
	}

	/* Células da tabela */
	.CartContents tbody td {
		padding: 16px 12px;
		vertical-align: middle;
		border-bottom: 1px solid #f0f0f0;
	}

	/* Coluna de thumbnail - OTIMIZADA */
	.CartContents .CartThumb {
		width: 80px !important;
		padding: 12px !important;
		text-align: center;
	}

	.CartContents .CartThumb img {
		max-width: 70px !important;
		max-height: 70px !important;
		width: auto !important;
		height: auto !important;
		object-fit: contain;
		border-radius: 6px;
		border: 1px solid #e5e5e5;
		transition: all 0.3s ease;
		display: block;
		margin: 0 auto;
	}

	.CartContents .CartThumb img:hover {
		transform: scale(1.1);
		box-shadow: 0 4px 12px rgba(0,0,0,0.15);
		border-color: #667eea;
	}

	/* Nome do produto */
	.CartContents .ProductName {
		max-width: 350px;
		padding-left: 16px !important;
	}

	.CartContents .ProductName a {
		color: #333;
		font-weight: 500;
		font-size: 14px;
		text-decoration: none;
		line-height: 1.5;
		display: block;
		transition: color 0.2s ease;
	}

	.CartContents .ProductName a:hover {
		color: #667eea;
		text-decoration: underline;
	}

	/* Quantidade */
	.CartContents .CartItemQuantity {
		text-align: center;
		width: 120px;
	}

	.CartContents .quantityInput {
		padding: 8px 12px;
		border: 2px solid #e0e0e0;
		border-radius: 6px;
		font-size: 14px;
		font-weight: 500;
		background: #fafafa;
		transition: all 0.2s ease;
		cursor: pointer;
	}

	.CartContents .quantityInput:hover {
		border-color: #667eea;
		background: #fff;
	}

	.CartContents .quantityInput:focus {
		outline: none;
		border-color: #667eea;
		box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
	}

	/* Link remover */
	.CartContents .CartRemoveLink {
		display: inline-block;
		margin-top: 8px;
		color: #dc3545;
		font-size: 12px;
		text-decoration: none;
		font-weight: 500;
		transition: all 0.2s ease;
	}

	.CartContents .CartRemoveLink:hover {
		color: #c82333;
		text-decoration: underline;
	}

	/* Preços */
	.CartContents .CartItemIndividualPrice,
	.CartContents .CartItemTotalPrice {
		text-align: center;
		font-weight: 600;
		color: #333;
		font-size: 15px;
	}

	.CartContents .ProductPrice {
		color: #667eea;
		font-weight: 700;
		font-size: 16px;
		font-style: normal;
	}

	/* Linhas alternadas */
	.CartContents tbody tr:nth-child(odd) {
		background: #fafafa;
	}

	.CartContents tbody tr:nth-child(even) {
		background: #fff;
	}

	.CartContents tbody tr:hover {
		background: #f0f4ff;
	}

	/* Linha de alerta e subtotal */
	.CartContents .Alert td,
	.CartContents .SubTotal td {
		background: #f8f9fa !important;
		font-weight: 600;
		padding: 14px 12px;
	}

	.CartContents .SubTotal.Last td {
		background: linear-gradient(135deg, #cc0000 0%, #990000 100%) !important;
		color: white;
		font-size: 18px;
		padding: 18px 12px;
	}

	.CartContents .SubTotal.Last .ProductPrice {
		color: #ffdd44;
		font-size: 20px;
		text-shadow: 0 1px 3px rgba(0,0,0,0.3);
	}
}

/* Botão do Carrinho */
.cart-button {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	background: #000000;
	color: white;
	padding: 14px 24px;
	border-radius: 50px;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: all 0.3s ease;
	position: relative;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
	white-space: nowrap;
}

.cart-button:hover {
	background: #ff0000;
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
	color: white;
}

.cart-button:active {
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

/* Ícone SVG do Carrinho */
.cart-button svg {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.cart-button:hover svg {
	transform: scale(1.1);
}

/* Contador de Itens */
.cart-count {
	font-size: 13px;
	font-weight: 700;
	min-width: 60px;
	text-align: left;
	letter-spacing: 0.3px;
}

/* Badge de notificação (opcional) */
.cart-button::after {
	content: attr(data-items);
	position: absolute;
	top: -8px;
	right: -8px;
	background: #ff4757;
	color: white;
	border-radius: 50%;
	width: 24px;
	height: 24px;
	display: none; /* Ativar quando tiver JS para contar itens */
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	border: 2px solid white;
	box-shadow: 0 2px 8px rgba(255, 71, 87, 0.4);
}

/* Variação: Carrinho vazio */
.cart-button.empty {
	background: #f5f5f5;
	color: #666;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.cart-button.empty:hover {
	background: #eeeeee;
	color: #333;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.cart-button.empty svg {
	stroke: #666;
}

/* Responsividade */
@media (max-width: 992px) {
	.cart-button {
		padding: 12px 20px;
		gap: 10px;
	}
	
	.cart-button svg {
		width: 22px;
		height: 22px;
	}
	
	.cart-count {
		font-size: 12px;
		min-width: 50px;
	}
}

@media (max-width: 768px) {
	.cart-section {
		width: 100%;
		justify-content: center;
		margin: 10px 0;
	}
	
	.cart-button {
		width: 100%;
		justify-content: center;
		padding: 14px 20px;
	}
}

@media (max-width: 480px) {
	.cart-button {
		padding: 12px 18px;
		font-size: 13px;
		gap: 8px;
	}
	
	.cart-button svg {
		width: 20px;
		height: 20px;
	}
	
	.cart-count {
		font-size: 12px;
		min-width: 45px;
	}
}
