/**
 * Cart Page Styles - Beevora Theme
 *
 * @package beevora
 */

/* ========================================================================
   Reset WooCommerce defaults on cart page
   ======================================================================== */
.woocommerce-cart .bv-cart .woocommerce-cart-form {
	width: 100%;
}

/* ========================================================================
   Cart Layout
   ======================================================================== */
.bv-cart {
	padding: 30px 0 60px;
	max-width: 1200px;
	margin: 0 auto;
}

.bv-cart__title {
	font-size: 30px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 30px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	text-align: center;
}

.bv-cart__grid {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 35px;
	align-items: start;
}

/* ========================================================================
   Cart Items
   ======================================================================== */
.bv-cart-items {
	display: flex;
	flex-direction: column;
}

.bv-cart-item {
	display: grid;
	grid-template-columns: 90px 1fr auto auto 36px;
	gap: 20px;
	align-items: center;
	padding: 20px 0;
	border-bottom: 1px solid #f0ebe0;
}

.bv-cart-item:last-child {
	border-bottom: none;
}

/* Item Image */
.bv-cart-item__image {
	width: 90px;
	height: 90px;
	border-radius: 12px;
	overflow: hidden;
	background: #faf7f2;
	flex-shrink: 0;
	border: 1px solid #eee;
}

.bv-cart-item__image a {
	display: block;
	width: 100%;
	height: 100%;
}

.bv-cart-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Item Info */
.bv-cart-item__info {
	min-width: 0;
}

h3.bv-cart-item__name,
.bv-cart-item__name {
	font-size: 16px;
	font-weight: 700;
	color: #222;
	margin: 0 0 4px;
	margin-top: 0 !important;
	line-height: 1.4;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.bv-cart-item__name a,
.bv-cart-item__name a:visited {
	color: #222 !important;
	text-decoration: none;
}

.bv-cart-item__name a:hover {
	color: var(--beevora-gold, #ce9f47) !important;
}

.bv-cart-item__meta {
	font-size: 13px;
	color: #999;
	line-height: 1.6;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.bv-cart-item__meta dt {
	display: inline;
	font-weight: 600;
	color: #888;
}

.bv-cart-item__meta dd {
	display: inline;
	margin: 0 0 0 2px;
}

.bv-cart-item__meta dd p {
	display: inline;
	margin: 0;
}

.bv-cart-item__meta dl {
	margin: 0;
}

/* Item Attributes (Size, Type) */
.bv-cart-item__attrs {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 4px;
}

.bv-cart-item__attr {
	font-size: 13px;
	color: #888;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	line-height: 1.5;
}

.bv-cart-item__backorder {
	font-size: 12px;
	color: #e67e22;
	margin: 4px 0 0;
}

/* Item Price */
.bv-cart-item__price {
	font-size: 16px;
	font-weight: 700;
	color: var(--beevora-gold, #ce9f47);
	white-space: nowrap;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.bv-cart-item__price .woocommerce-Price-amount {
	color: var(--beevora-gold, #ce9f47);
}

/* Item Remove */
.bv-cart-item__remove {
	display: flex;
	align-items: center;
	justify-content: center;
}

.bv-cart-item__remove a,
.bv-cart-item__remove .remove {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: transparent;
	color: #999 !important;
	font-size: 20px;
	line-height: 1;
	text-decoration: none !important;
	transition: color 0.2s ease;
	border: none;
}

.bv-cart-item__remove a:hover,
.bv-cart-item__remove .remove:hover {
	color: #e74c3c !important;
}

/* ========================================================================
   Quantity Controls
   ======================================================================== */
.bv-cart-item__qty {
	display: inline-flex;
	align-items: center;
	border: none;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
}

.bv-qty-btn {
	width: 36px;
	height: 36px;
	border: none;
	background: var(--beevora-gold, #ce9f47);
	font-size: 18px;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease;
	padding: 0;
	line-height: 1;
}

.bv-qty-btn:hover {
	background: var(--beevora-brown, #5d3615);
}

.bv-qty-input {
	width: 44px;
	height: 36px;
	text-align: center;
	border: 1.5px solid #e0d5c3;
	border-radius: 0;
	font-size: 15px;
	font-weight: 600;
	color: #333;
	background: #fff;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	-moz-appearance: textfield;
	appearance: textfield;
	outline: none;
}

.bv-qty-input::-webkit-inner-spin-button,
.bv-qty-input::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* ========================================================================
   Cart Actions (Coupon + Update)
   ======================================================================== */
.bv-cart-actions {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 24px 0 0;
	flex-wrap: wrap;
}

.bv-cart-coupon {
	display: flex;
	gap: 8px;
	align-items: center;
}

.bv-coupon-input {
	width: 200px;
	padding: 12px 14px !important;
	border: 1.5px solid #ddd !important;
	border-radius: 10px !important;
	font-size: 14px;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	outline: none;
	transition: border-color 0.3s ease;
	background: #fff;
}

.bv-coupon-input:focus {
	border-color: var(--beevora-gold, #ce9f47);
}

.bv-coupon-btn {
	padding: 15px 22px;
	background: var(--beevora-brown, #5d3615);
	color: #fff;
	border: none;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	transition: background 0.3s ease;
	white-space: nowrap;
}

.bv-coupon-btn:hover {
	background: var(--beevora-gold, #ce9f47);
}

.bv-update-cart-btn {
	display: none;
}

/* ========================================================================
   Order Summary
   ======================================================================== */
.bv-cart__summary-col {
	position: relative;
}

.bv-cart-summary {
	position: sticky;
	top: 120px;
	background: #f9f6f1;
	border-radius: 14px;
	padding: 28px;
	border: 1px solid #efe8da;
}

.bv-cart-summary__title {
	font-size: 20px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 20px;
	padding-bottom: 14px;
	border-bottom: 2px solid #e5ddd0;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.bv-cart-summary__rows {
	margin-bottom: 22px;
}

.bv-cart-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 11px 0;
	font-size: 14px;
	color: #777;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	border-bottom: 1px solid #efe8da;
}

.bv-cart-summary__row span:last-child {
	font-weight: 600;
	color: #333;
}

.bv-cart-summary__shipping-val {
	font-size: 13px;
}

/* Discount row */
.bv-cart-summary__row--discount {
	color: #27ae60;
}

.bv-discount-amount {
	color: #27ae60 !important;
	font-weight: 600;
}

.bv-remove-coupon {
	font-size: 12px;
	color: #e74c3c;
	text-decoration: none;
	margin-inline-start: 4px;
}

.bv-remove-coupon:hover {
	text-decoration: underline;
}

/* Total */
.bv-cart-summary__total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-top: 16px;
	margin-top: 4px;
	border-top: 2px solid #e5ddd0;
	border-bottom: none;
}

.bv-cart-summary__total > span:first-child {
	font-size: 16px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

.bv-cart-summary__total > span:last-child {
	font-size: 24px;
	font-weight: 700;
	color: var(--beevora-gold, #ce9f47);
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* Checkout Button */
.bv-checkout-btn,
a.bv-checkout-btn,
a.bv-checkout-btn:visited {
	display: block;
	width: 100%;
	text-align: center;
	background: var(--beevora-gold, #ce9f47);
	color: #fff !important;
	padding: 15px;
	border-radius: 10px;
	font-size: 17px;
	font-weight: 700;
	text-decoration: none !important;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	transition: background 0.3s ease, transform 0.2s ease;
	letter-spacing: 0.3px;
	box-sizing: border-box;
}

.bv-checkout-btn:hover,
a.bv-checkout-btn:hover {
	background: var(--beevora-brown, #5d3615);
	color: #fff !important;
	transform: translateY(-1px);
}

/* Payment Icons */
.bv-payment-icons {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 0 0;
}

.bv-payment-icons svg {
	width: 38px;
	height: 24px;
	opacity: 0.55;
	transition: opacity 0.3s ease;
}

.bv-payment-icons svg:hover {
	opacity: 1;
}

.bv-payment-icons .bv-lock-icon {
	width: 20px;
	height: 20px;
}

/* ========================================================================
   Free Shipping Progress
   ======================================================================== */
.bv-shipping-progress {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid #efe8da;
}

.bv-shipping-progress__text {
	font-size: 13px;
	color: #666;
	margin: 0 0 10px;
	text-align: center;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
	line-height: 1.6;
}

.bv-shipping-progress__text strong {
	color: var(--beevora-brown, #5d3615);
}

.bv-shipping-progress__text--done {
	color: #27ae60;
	font-weight: 600;
}

.bv-shipping-progress__bar {
	height: 8px;
	background: #e5ddd0;
	border-radius: 4px;
	overflow: hidden;
}

.bv-shipping-progress__fill {
	height: 100%;
	background: var(--beevora-gold, #ce9f47);
	border-radius: 4px;
	transition: width 0.5s ease;
}

.bv-shipping-progress__text--done + .bv-shipping-progress__bar .bv-shipping-progress__fill {
	background: #27ae60;
}

.bv-shipping-progress__amounts {
	display: flex;
	justify-content: space-between;
	margin-top: 6px;
	font-size: 12px;
	color: #999;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* ========================================================================
   Cross-sells (You Might Also Like)
   ======================================================================== */
.bv-cart-crosssells {
	margin-top: 50px;
	padding-top: 30px;
	border-top: 2px solid #f0ebe0;
}

.bv-cart-crosssells h2.bv-cart-crosssells__title,
.bv-cart-crosssells__title {
	font-size: 22px;
	font-weight: 700;
	color: var(--beevora-brown, #5d3615);
	margin: 0 0 30px !important;
	font-family: var(--beevora-font-ar, 'Cairo', sans-serif);
}

/* ========================================================================
   Loading Overlay
   ======================================================================== */
.bv-cart--loading {
	position: relative;
	pointer-events: none;
}

.bv-cart--loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0.6);
	z-index: 10;
}

.bv-cart--loading::before {
	content: '';
	position: absolute;
	top: 200px;
	left: 50%;
	width: 36px;
	height: 36px;
	margin-left: -18px;
	border: 3px solid #e0e0e0;
	border-top-color: var(--beevora-gold, #ce9f47);
	border-radius: 50%;
	animation: bvCartSpin 0.7s linear infinite;
	z-index: 11;
}

@keyframes bvCartSpin {
	to { transform: rotate(360deg); }
}

/* ========================================================================
   WooCommerce Notices on Cart Page
   ======================================================================== */
.woocommerce-cart .woocommerce-notices-wrapper {
	margin-bottom: 20px;
}

.woocommerce-cart .woocommerce-message {
	background: #e8f5e9;
	color: #2e7d32;
	border-inline-start: 4px solid #4caf50;
}

.woocommerce-cart .woocommerce-error {
	background: #fdf2f2;
	color: #c0392b;
	border-inline-start: 4px solid #e74c3c;
}

.woocommerce-cart .woocommerce-error li {
	color: #c0392b;
}

.woocommerce-cart .woocommerce-info {
	background: #f9f6f1;
	color: var(--beevora-brown, #5d3615);
	border-inline-start: 4px solid var(--beevora-gold, #ce9f47);
}

/* ========================================================================
   Responsive
   ======================================================================== */
@media (max-width: 991.98px) {
	.bv-cart__grid {
		grid-template-columns: 1fr;
	}

	.bv-cart-summary {
		position: static;
	}

	.bv-cart-item {
		grid-template-columns: 90px 1fr auto auto 36px;
		gap: 14px;
	}
}

@media (max-width: 767.98px) {
	.bv-cart {
		padding: 20px 0 40px;
	}

	.bv-cart__title {
		font-size: 22px;
		margin-bottom: 20px;
	}

	.bv-cart-item {
		grid-template-columns: 80px 1fr 36px;
		grid-template-rows: auto auto;
		gap: 10px 12px;
	}

	.bv-cart-item__image {
		width: 80px;
		height: 80px;
		grid-row: 1 / 3;
	}

	.bv-cart-item__info {
		grid-column: 2 / 3;
	}

	.bv-cart-item__remove {
		grid-column: 3 / 4;
		grid-row: 1 / 2;
	}

	.bv-cart-item__qty {
		grid-column: 2 / 3;
		grid-row: 2 / 3;
		justify-self: start;
	}

	.bv-cart-item__price {
		grid-column: 3 / 4;
		grid-row: 2 / 3;
		font-size: 14px;
		align-self: center;
		margin-right: -20px;
	}

	.bv-cart-coupon {
		width: 100%;
	}

	.bv-coupon-input {
		flex: 1;
		width: auto;
	}

	.bv-cart-summary {
		padding: 22px;
		border-radius: 10px;
	}

	.bv-cart-summary__title {
		font-size: 18px;
	}

	.bv-cart-summary__total > span:last-child {
		font-size: 20px;
	}

	.bv-checkout-btn,
	a.bv-checkout-btn {
		font-size: 15px;
		padding: 13px;
	}

	.bv-cart-crosssells {
		margin-top: 30px;
		padding-top: 20px;
	}

	.bv-cart-crosssells__title {
		font-size: 18px;
		margin-bottom: 16px;
	}
}

@media (max-width: 575.98px) {
	.bv-cart-item__image {
		width: 70px;
		height: 70px;
		border-radius: 10px;
	}

	.bv-cart-item__name {
		font-size: 14px;
	}

	.bv-qty-btn {
		width: 32px;
		height: 32px;
		font-size: 16px;
	}

	.bv-qty-input {
		width: 40px;
		height: 32px;
		font-size: 14px;
	}

	.bv-cart-item__price {
		font-size: 13px;
	}
}
