/* ==============================================================
 * CART PAGE
 * ============================================================== */

.sg-cart{
    padding: 0px 15px;
}

.sg-cart__header {
	margin-bottom: 28px;
}

.sg-cart__title {
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.15;
	margin: 0 0 6px;
}

.sg-cart__subtitle {
	color: var(--sg-muted);
	margin: 0;
	font-size: 15px;
}

/* Two-column layout: items on the left, sticky summary on the right */
.sg-cart__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 32px;
	align-items: start;
}

@media (max-width: 980px) {
	.sg-cart__layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}

/* --------------------------------------------------------------
 * Item cards
 * ------------------------------------------------------------ */

.sg-cart__items {
	display: grid;
	gap: 16px;
}

.sg-cart-item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 20px;
	background: #fff;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
	padding: 22px 24px;
	position: relative;
}

.sg-cart-item__body { min-width: 0; }

.sg-cart-item__platform {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sg-primary);
	background: #eef2ff;
	padding: 3px 10px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.sg-cart-item__name {
	font-size: 18px;
	margin: 0 0 12px;
	line-height: 1.35;
}
.sg-cart-item__name a {
	color: var(--sg-text);
	text-decoration: none;
}
.sg-cart-item__name a:hover {
	color: var(--sg-primary);
}

.sg-cart-item__meta {
	margin: 0;
	display: grid;
	gap: 6px;
}

.sg-cart-item__meta-row {
	display: grid;
	grid-template-columns: 110px 1fr;
	gap: 12px;
	font-size: 14px;
	line-height: 1.5;
}

.sg-cart-item__meta-row dt {
	color: var(--sg-muted);
	font-weight: 500;
	margin: 0;
}

.sg-cart-item__meta-row dd {
	margin: 0;
	color: var(--sg-text);
	word-break: break-word;
}

.sg-cart-item__meta-row dd a {
	color: var(--sg-primary);
	text-decoration: none;
	border-bottom: 1px dashed rgba(79,70,229,.35);
}
.sg-cart-item__meta-row dd a:hover {
	border-bottom-style: solid;
}

/* Right column: price + remove */
.sg-cart-item__aside {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	min-width: 130px;
	text-align: right;
}

.sg-cart-item__price {
	font-size: 18px;
	font-weight: 700;
	color: var(--sg-text);
	white-space: nowrap;
}
.sg-cart-item__price .amount { font-weight: 700; }

.sg-cart-item__remove {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--sg-muted);
	text-decoration: none;
	padding: 4px 8px;
	border-radius: 8px;
	transition: color .15s ease, background .15s ease;
}
.sg-cart-item__remove:hover {
	color: var(--sg-danger);
	background: #fef2f2;
}
.sg-cart-item__remove-icon {
	font-size: 16px;
	line-height: 1;
}

@media (max-width: 600px) {
	.sg-cart-item {
		grid-template-columns: 1fr;
		gap: 14px;
		padding: 18px;
	}
	.sg-cart-item__aside {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 100%;
		border-top: 1px solid var(--sg-border);
		padding-top: 12px;
		text-align: left;
	}
	.sg-cart-item__meta-row {
		grid-template-columns: 90px 1fr;
	}
}

/* --------------------------------------------------------------
 * Cart actions: continue, coupon, update
 * ------------------------------------------------------------ */

.sg-cart__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 24px;
	padding: 18px 20px;
	background: var(--sg-surface);
	border-radius: var(--sg-radius);
	border: 1px solid var(--sg-border);
}

.sg-cart__continue {
	color: var(--sg-text);
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
	margin-right: auto;
}
.sg-cart__continue:hover { color: var(--sg-primary); }

.sg-cart__coupon {
	display: flex;
	gap: 8px;
	align-items: center;
}
.sg-cart__coupon input[type="text"] {
	min-width: 200px;
	padding: 10px 12px;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius-sm);
	font-size: 14px;
	background: #fff;
}

.sg-cart__update {
	background: transparent !important;
	color: var(--sg-muted) !important;
	font-size: 13px;
	border: 1px solid var(--sg-border) !important;
	padding: 10px 14px !important;
	border-radius: var(--sg-radius-sm);
	cursor: pointer;
	transition: opacity .15s ease;
}
.sg-cart__update:disabled {
	opacity: .5;
	cursor: not-allowed;
}

@media (max-width: 720px) {
	.sg-cart__actions { flex-direction: column; align-items: stretch; }
	.sg-cart__continue { margin-bottom: 4px; }
	.sg-cart__coupon { flex-direction: column; align-items: stretch; }
	.sg-cart__coupon input[type="text"] { min-width: 0; width: 100%; }
}

/* --------------------------------------------------------------
 * Order summary card
 * ------------------------------------------------------------ */

.sg-cart-totals {
	background: #fff;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
	padding: 24px;
	position: sticky;
	top: 24px;
}
@media (max-width: 980px) {
	.sg-cart-totals { position: static; }
}

.sg-cart-totals__title {
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--sg-muted);
	margin: 0 0 18px;
}

.sg-cart-totals__rows {
	display: grid;
	gap: 12px;
	margin-bottom: 18px;
}

.sg-cart-totals__row {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	font-size: 15px;
}

.sg-cart-totals__label {
	color: var(--sg-muted);
}

.sg-cart-totals__value {
	color: var(--sg-text);
	font-weight: 600;
	white-space: nowrap;
}

.sg-cart-totals__row--total {
	border-top: 1px solid var(--sg-border);
	padding-top: 16px;
	margin-top: 6px;
	font-size: 16px;
}
.sg-cart-totals__row--total .sg-cart-totals__label {
	color: var(--sg-text);
	font-weight: 700;
}
.sg-cart-totals__row--total .sg-cart-totals__value {
	font-size: 26px;
	font-weight: 800;
	color: var(--sg-text);
}

.sg-cart-totals__checkout {
	margin-top: 20px;
}

/* The WooCommerce checkout button */
.sg-cart-totals .checkout-button,
.sg-cart-totals a.checkout-button.button,
.sg-cart-totals .wc-proceed-to-checkout a {
	display: block;
	width: 100%;
	text-align: center;
	padding: 15px 22px;
	border-radius: var(--sg-radius-sm);
	background: var(--sg-primary);
	color: #fff !important;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
	transition: background .15s ease, transform .1s ease;
	box-shadow: 0 10px 20px -10px rgba(79,70,229,.6);
}
.sg-cart-totals .checkout-button:hover,
.sg-cart-totals .wc-proceed-to-checkout a:hover {
	background: #4338ca;
	transform: translateY(-1px);
}

.sg-cart-totals__note {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--sg-muted);
	line-height: 1.5;
}

/* Tiny inline lock icon drawn with CSS */
.sg-cart-totals__lock {
	flex: 0 0 auto;
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-top: 3px;
	position: relative;
	border: 2px solid currentColor;
	border-radius: 3px;
}
.sg-cart-totals__lock::before {
	content: "";
	position: absolute;
	left: 50%;
	top: -8px;
	width: 8px;
	height: 8px;
	border: 2px solid currentColor;
	border-bottom: 0;
	border-radius: 6px 6px 0 0;
	transform: translateX(-50%);
}

/* --------------------------------------------------------------
 * Empty cart
 * ------------------------------------------------------------ */

.sg-cart-empty {
	max-width: 520px;
	margin: 40px auto 80px;
	text-align: center;
	padding: 40px 24px;
	background: #fff;
	border: 1px solid var(--sg-border);
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
}

.sg-cart-empty__icon {
	width: 56px;
	height: 56px;
	margin: 0 auto 18px;
	border-radius: 50%;
	background: #eef2ff;
	position: relative;
}
.sg-cart-empty__icon::before,
.sg-cart-empty__icon::after {
	content: "";
	position: absolute;
	background: var(--sg-primary);
}
.sg-cart-empty__icon::before {
	left: 50%;
	top: 50%;
	width: 20px;
	height: 2px;
	transform: translate(-50%, -50%) rotate(45deg);
}
.sg-cart-empty__icon::after {
	left: 50%;
	top: 50%;
	width: 20px;
	height: 2px;
	transform: translate(-50%, -50%) rotate(-45deg);
}

.sg-cart-empty__title {
	font-size: 22px;
	margin: 0 0 8px;
}
.sg-cart-empty__text {
	color: var(--sg-muted);
	margin: 0 0 22px;
}

/* --------------------------------------------------------------
 * WooCommerce notices on cart page
 * ------------------------------------------------------------ */

.woocommerce-cart .woocommerce-notices-wrapper {
	margin-bottom: 20px;
}
.woocommerce-cart .woocommerce-message,
.woocommerce-cart .woocommerce-error,
.woocommerce-cart .woocommerce-info {
	border-radius: var(--sg-radius-sm);
	padding: 14px 18px;
	border: 0;
	background: #eef2ff;
	color: var(--sg-text);
	list-style: none;
	margin: 0 0 10px;
	font-size: 14px;
}
.woocommerce-cart .woocommerce-error { background: #fef2f2; color: #991b1b; }
.woocommerce-cart .woocommerce-message { background: #ecfdf5; color: #166534; }
.woocommerce-cart .woocommerce-info::before,
.woocommerce-cart .woocommerce-message::before,
.woocommerce-cart .woocommerce-error::before { display: none; }