/* Floating Cart */
.wcod-floating-cart-wrapper {
	z-index: 99999;
}

/* Floating Button */
.wcod-cart-toggle {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background-color: #000;
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 60px;
	height: 60px;
	cursor: pointer;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	z-index: 100000;
	transition: transform 0.3s ease, opacity 0.3s ease;
}

.wcod-cart-toggle:hover {
	transform: scale(1.1);
}

/* HIDE TOGGLE WHEN ACTIVE */
.wcod-floating-cart-wrapper.active .wcod-cart-toggle {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.8);
}

.wcod-cart-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: #ff0000;
	color: #fff;
	border-radius: 50%;
	padding: 2px 6px;
	font-size: 12px;
	min-width: 18px;
	text-align: center;
	line-height: 1.2;
}

/* Overlay */
.wcod-cart-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
	z-index: 99998;
}

.wcod-floating-cart-wrapper.active .wcod-cart-overlay {
	opacity: 1;
	visibility: visible;
}

/* Sidebar */
.wcod-offcanvas-sidebar {
	position: fixed;
	top: 0;
	right: 0;
	width: 350px;
	max-width: 90%;
	height: 100%;
	background: #fff;
	box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 99999;
	display: flex;
	flex-direction: column;
}

.wcod-floating-cart-wrapper.active .wcod-offcanvas-sidebar {
	transform: translateX(0);
}

/* RTL Support */
.wcod-rtl .wcod-cart-toggle {
	right: auto;
	left: 20px;
}

.wcod-rtl .wcod-offcanvas-sidebar {
	right: auto;
	left: 0;
	transform: translateX(-100%);
	box-shadow: 5px 0 20px rgba(0, 0, 0, 0.15);
}

/* Header */
.wcod-cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #eee;
	padding: 15px 20px;
	background: #f9f9f9;
}

.wcod-cart-header h3 {
	margin: 0;
	font-size: 18px;
}

.wcod-cart-close {
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #333;
}

/* Items */
.wcod-mini-cart-content {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
}

.wcod-cart-items-container {
	flex: 1;
	overflow-y: auto;
	padding: 20px;
}

.wcod-cart-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wcod-cart-item {
	display: flex;
	align-items: flex-start;
	margin-bottom: 20px;
	border-bottom: 1px solid #f0f0f0;
	padding-bottom: 15px;
	position: relative;
	gap: 15px;
}

/* Image */
.wcod-cart-item-image {
	flex-shrink: 0;
}

.wcod-cart-item-image img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

/* Details */
.wcod-cart-item-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 5px;
	min-width: 0;
	/* flex overflow fix */
}

/* Item Header (Name + Remove) */
.wcod-item-header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 10px;
}

.wcod-product-name {
	font-size: 14px;
	font-weight: 600;
	color: #333;
	text-decoration: none;
	line-height: 1.3;
}

.wcod-remove-item {
	color: #999;
	text-decoration: none;
	font-size: 18px;
	line-height: 1;
}

.wcod-remove-item:hover {
	color: #ff0000;
}

/* Meta */
.wcod-item-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 5px;
	flex-wrap: wrap;
	/* allow wrapping on small screens */
	gap: 10px;
}

/* Quantity */
.wcod-quantity {
	display: flex;
	align-items: center;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.wcod-qty-btn {
	background: #f5f5f5;
	border: none;
	padding: 5px 10px;
	cursor: pointer;
	font-weight: bold;
	color: #333;
}

.wcod-qty-btn:hover {
	background: #e5e5e5;
}

.wcod-quantity .qty {
	padding: 0 10px;
	font-size: 14px;
	min-width: 20px;
	text-align: center;
}

/* Prices */
.wcod-price,
.wcod-line-total {
	font-size: 14px;
}

.wcod-line-total {
	font-weight: bold;
}

/* Footer */
.wcod-cart-footer-container {
	border-top: 1px solid #eee;
	padding: 20px;
	background: #f9f9f9;
}

.wcod-cart-total {
	font-size: 18px;
	display: flex;
	justify-content: space-between;
	margin-bottom: 15px;
}

.wcod-cart-buttons {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.wcod-cart-buttons .button {
	width: 100%;
	text-align: center;
	display: block;
	padding: 12px;
	text-decoration: none;
	background: #000;
	color: #fff;
	border-radius: 4px;
	font-weight: bold;
}

.wcod-whatsapp-checkout {
	background-color: #25D366 !important;
}

.wcod-empty-cart {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

/* Scroll Lock */
body.wcod-scroll-lock {
	overflow: hidden !important;
}

/* WhatsApp Popup */
.wcod-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 200000;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease;
}

.wcod-popup-overlay.active {
	opacity: 1;
	visibility: visible;
}

.wcod-popup-modal {
	background: #fff;
	width: 90%;
	max-width: 400px;
	padding: 25px;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
	position: relative;
	transform: translateY(20px);
	transition: transform 0.3s ease;
}

.wcod-popup-overlay.active .wcod-popup-modal {
	transform: translateY(0);
}

.wcod-popup-header {
	margin-bottom: 20px;
	text-align: center;
}

.wcod-popup-header h3 {
	margin: 0;
	font-size: 20px;
	color: #333;
}

.wcod-popup-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
}

.wcod-popup-form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.wcod-form-group label {
	display: block;
	margin-bottom: 5px;
	font-weight: 500;
	font-size: 14px;
	color: #555;
	text-align: left;
}

.wcod-popup-input {
	width: 100%;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
}

.wcod-popup-input:focus {
	border-color: #25D366;
	outline: none;
}

.wcod-popup-error {
	color: #e74c3c;
	font-size: 12px;
	margin-top: 5px;
	display: none;
}

.wcod-popup-btn {
	width: 100%;
	padding: 12px;
	background: #25D366;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-weight: bold;
	cursor: pointer;
	font-size: 16px;
	margin-top: 10px;
}

.wcod-popup-btn:hover {
	background: #1ebc57;
}

.wcod-popup-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
}