/* Cajuzinho — mini-cart (drawer do header).
   Escopo: .cart-widget-side. Não altera header, home, loja, PDP, carrinho ou checkout. */

.cart-widget-side {
	--caju-green: #00a650;
	--caju-green-dark: #008a43;
	--caju-green-text: #174c32;
	--caju-green-deep: #08723f;
	--caju-price: #83b735;
	--caju-muted: #8a8f8c;
	--caju-body: #3d5248;
	--caju-title: #2d2a2a;
	--caju-img-bg: #f6f3ee;
	--caju-img-radius: 10px;
	--caju-chip-bg: #f3f7f3;
}

/* -------------------------------------------------------------------------
   Drawer shell
   ------------------------------------------------------------------------- */

.cart-widget-side.wd-side-hidden {
	width: 360px;
	max-width: 100%;
	background: #fff;
	box-shadow: -12px 0 40px rgba(23, 76, 50, 0.12);
}

.cart-widget-side .widget.woocommerce.widget_shopping_cart {
	display: flex;
	flex-direction: column;
	height: calc(100% - 72px);
	margin: 0;
}

.cart-widget-side .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.cart-widget-side .shopping-cart-widget-body {
	flex: 1 1 auto;
}

/* -------------------------------------------------------------------------
   Heading
   ------------------------------------------------------------------------- */

.cart-widget-side .widget-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 18px 20px 16px;
	background: var(--caju-img-bg);
	border-bottom: 1px solid rgba(23, 76, 50, 0.08);
	min-height: 0;
	height: auto;
}

.cart-widget-side .widget-heading .title,
.cart-widget-side .widget-heading .widget-title {
	margin: 0;
	padding: 0;
	color: var(--caju-green-text) !important;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.02em;
	text-transform: none !important;
	border: 0;
}

.cart-widget-side .close-side-widget {
	margin: 0;
}

.cart-widget-side .close-side-widget a {
	font-size: 0 !important;
	color: var(--caju-green-deep) !important;
	text-transform: none !important;
}

.cart-widget-side .close-side-widget a::before {
	font-size: 16px !important;
	color: var(--caju-green-deep);
}

.cart-widget-side .close-side-widget a:hover,
.cart-widget-side .close-side-widget a:focus-visible,
.cart-widget-side .close-side-widget a:hover::before {
	color: var(--caju-green-text) !important;
}

/* -------------------------------------------------------------------------
   Items
   ------------------------------------------------------------------------- */

.cart-widget-side .woocommerce-mini-cart {
	margin: 0;
	padding: 8px 0;
}

.cart-widget-side .mini_cart_item {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
	padding: 14px 20px;
	border-bottom: 1px solid rgba(23, 76, 50, 0.06);
	list-style: none;
}

.cart-widget-side .mini_cart_item:last-child {
	border-bottom: 0;
}

.cart-widget-side .cart-item-link.wd-fill {
	font-size: 0 !important;
	line-height: 0;
	color: transparent !important;
	z-index: 1;
}

.cart-widget-side .cart-item-image {
	position: relative;
	z-index: 2;
	flex: 0 0 72px;
	width: 72px;
	height: 72px;
	overflow: hidden;
	background: var(--caju-img-bg);
	border-radius: var(--caju-img-radius);
}

.cart-widget-side .cart-item-image img,
.cart-widget-side .mini_cart_item img {
	display: block;
	width: 72px !important;
	height: 72px !important;
	max-width: none;
	object-fit: contain;
	object-position: center;
	background: var(--caju-img-bg);
	border-radius: var(--caju-img-radius);
}

.cart-widget-side .cart-info {
	position: relative;
	z-index: 2;
	flex: 1 1 auto;
	min-width: 0;
	padding-right: 22px;
}

.cart-widget-side .wd-entities-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	margin: 0 0 6px;
	color: var(--caju-title);
	font-size: 13.5px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none !important;
}

.cart-widget-side .cart-info .quantity,
.cart-widget-side .cart-info .quantity .amount,
.cart-widget-side .cart-info .quantity .amount bdi {
	color: var(--caju-price);
	font-size: 13px;
	font-weight: 700;
}

.cart-widget-side .remove.remove_from_cart_button {
	position: absolute;
	top: 12px;
	right: 14px;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--caju-muted) !important;
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

.cart-widget-side .remove.remove_from_cart_button::after {
	display: none !important;
}

.cart-widget-side .remove.remove_from_cart_button:hover,
.cart-widget-side .remove.remove_from_cart_button:focus-visible {
	background: var(--caju-chip-bg);
	color: var(--caju-green-text) !important;
}

.cart-widget-side .mini_cart_item .quantity.hidden,
.cart-widget-side .mini_cart_item .qty {
	max-width: 64px;
}

/* -------------------------------------------------------------------------
   Empty
   ------------------------------------------------------------------------- */

.cart-widget-side .wd-empty-mini-cart {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 48px 24px;
	text-align: center;
}

.cart-widget-side .woocommerce-mini-cart__empty-message,
.cart-widget-side .wd-empty-mini-cart .empty.title {
	margin: 0;
	color: var(--caju-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.45;
	text-transform: none !important;
}

.cart-widget-side .wd-empty-mini-cart .btn,
.cart-widget-side .wd-empty-mini-cart .wc-backward {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 18px;
	border: 0;
	border-radius: 8px !important;
	background: var(--caju-green) !important;
	color: #fff !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	text-decoration: none;
}

.cart-widget-side .wd-empty-mini-cart .btn:hover,
.cart-widget-side .wd-empty-mini-cart .wc-backward:hover {
	background: var(--caju-green-dark) !important;
	color: #fff !important;
}

/* -------------------------------------------------------------------------
   Footer + CTAs
   ------------------------------------------------------------------------- */

.cart-widget-side .shopping-cart-widget-footer {
	margin-top: auto;
	padding: 16px 20px 80px;
	background: #fff;
	border-top: 1px solid rgba(23, 76, 50, 0.08);
}

.cart-widget-side .woocommerce-mini-cart__total,
.cart-widget-side .shopping-cart-widget-footer .total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 14px;
	padding: 0;
	color: var(--caju-green-text);
	font-size: 14px;
}

.cart-widget-side .woocommerce-mini-cart__total strong,
.cart-widget-side .shopping-cart-widget-footer .total strong {
	color: var(--caju-green-text);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none !important;
}

.cart-widget-side .woocommerce-mini-cart__total .amount,
.cart-widget-side .woocommerce-mini-cart__total .amount bdi,
.cart-widget-side .shopping-cart-widget-footer .total .amount {
	color: var(--caju-price);
	font-size: 20px;
	font-weight: 700;
}

.cart-widget-side .woocommerce-mini-cart__buttons,
.cart-widget-side .shopping-cart-widget-footer .buttons {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
}

.cart-widget-side .woocommerce-mini-cart__buttons .button,
.cart-widget-side .shopping-cart-widget-footer .button,
.cart-widget-side a.button.btn-cart,
.cart-widget-side a.button.checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 48px;
	margin: 0;
	padding: 0 16px;
	border-radius: 8px !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.cart-widget-side a.button.btn-cart,
.cart-widget-side .woocommerce-mini-cart__buttons .button.btn-cart {
	background: #fff !important;
	border: 1px solid rgba(8, 114, 63, 0.18) !important;
	color: var(--caju-green-deep) !important;
}

.cart-widget-side a.button.btn-cart:hover,
.cart-widget-side a.button.btn-cart:focus-visible {
	background: var(--caju-chip-bg) !important;
	border-color: var(--caju-green) !important;
	color: var(--caju-green-text) !important;
	transform: translateY(-1px);
}

.cart-widget-side a.button.checkout,
.cart-widget-side .woocommerce-mini-cart__buttons .button.checkout {
	background: var(--caju-green) !important;
	border: 0 !important;
	color: #fff !important;
}

.cart-widget-side a.button.checkout:hover,
.cart-widget-side a.button.checkout:focus-visible {
	background: var(--caju-green-dark) !important;
	color: #fff !important;
	transform: translateY(-1px);
}

@media (max-width: 430px) {
	.cart-widget-side.wd-side-hidden {
		width: 100%;
	}

	.cart-widget-side .shopping-cart-widget-footer {
		padding-bottom: 88px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cart-widget-side a.button.btn-cart,
	.cart-widget-side a.button.checkout {
		transition: none;
	}

	.cart-widget-side a.button.btn-cart:hover,
	.cart-widget-side a.button.checkout:hover {
		transform: none;
	}
}
