/* Cart page — scoped under .gd-cart-page */

body.gd-cart-page-body .site-main {
	padding-block: 0;
	background-color: #f5f5f5;
	width: 100%;
	max-width: none;
}

body.gd-cart-page-body .site-main > .container {
	width: 100%;
	max-width: none;
	padding-inline: 0;
}

body.gd-cart-page-body .entry__header,
body.gd-cart-page-body .entry__thumbnail {
	display: none;
}

body.gd-cart-page-body .entry--page,
body.gd-cart-page-body .entry__content,
body.gd-cart-page-body .page-content {
	margin: 0;
	max-width: none;
	width: 100%;
}

body.gd-cart-page-body .entry__content > *:first-child {
	margin-top: 0;
}

body.gd-cart-page-body .entry__content > .woocommerce,
body.gd-cart-page-body .woocommerce-cart .woocommerce {
	display: block;
	width: 100%;
	max-width: none;
	gap: 0;
}

.gd-cart-page__outer,
.gd-cart-page {
	width: 100%;
	max-width: none;
}

.gd-cart-page {
	--gd-cart-bg: #f5f5f5;
	--gd-cart-surface: #ffffff;
	--gd-cart-border: #e2e2e2;
	--gd-cart-border-item: #dddddd;
	--gd-cart-text: #111111;
	--gd-cart-text-muted: #777777;
	--gd-cart-input-bg: #f1f1f1;
	--gd-cart-qty-bg: #f1f1f1;
	--gd-cart-thumb-bg: #f7f7f7;
	--gd-cart-blue: #315cf6;
	--gd-cart-blue-border: #2563eb;
	--gd-cart-red: #ef3b35;
	--gd-cart-radius-panel: 22px;
	--gd-cart-radius-item: 20px;
	--gd-cart-radius-control: 10px;
	--gd-cart-radius-input: 8px;
	--gd-cart-container-max: 1480px;
	--gd-cart-pad: 28px;
	--gd-cart-gap: 32px;
	--gd-cart-shadow: 0 2px 16px rgba(0, 0, 0, 0.04);
	color: var(--gd-cart-text);
	background-color: var(--gd-cart-bg);
	font-family: "Cairo", "Google Sans", system-ui, sans-serif;
	overflow-x: hidden;
	padding-block: clamp(20px, 3vw, var(--gd-cart-pad));
}

.gd-cart-page--ltr {
	font-family: "Google Sans", "Cairo", system-ui, sans-serif;
}

.gd-cart-page__container {
	width: min(100% - 48px, var(--gd-cart-container-max));
	max-width: var(--gd-cart-container-max);
	margin-inline: auto;
}

.gd-cart-page__form {
	margin: 0;
}

.gd-cart-page__layout {
	display: grid;
	grid-template-columns: minmax(0, 68%) minmax(0, 32%);
	gap: var(--gd-cart-gap);
	align-items: start;
	min-width: 0;
}

.gd-cart-page__main,
.gd-cart-page__sidebar,
.gd-cart-page__item,
.gd-cart-page__item-product,
.gd-cart-page__item-info {
	min-width: 0;
}

.gd-cart-page__panel {
	background: var(--gd-cart-surface);
	border: 1px solid var(--gd-cart-border);
	border-radius: var(--gd-cart-radius-panel);
	padding: clamp(20px, 2.5vw, 26px);
	box-shadow: var(--gd-cart-shadow);
}

.gd-cart-page__panel--cart {
	padding: clamp(22px, 2.8vw, var(--gd-cart-pad));
}

.gd-cart-page__sidebar .gd-cart-page__panel + .gd-cart-page__panel {
	margin-top: var(--gd-cart-gap);
}

.gd-cart-page__title,
.gd-cart-page__box-title {
	margin: 0 0 18px;
	font-size: clamp(1.5rem, 2.4vw, 1.75rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--gd-cart-text);
}

.gd-cart-page__box-title {
	font-size: clamp(1.35rem, 2.2vw, 1.625rem);
}

.gd-cart-page__title-divider {
	height: 1px;
	background: var(--gd-cart-border);
	margin-bottom: 18px;
}

.gd-cart-page__table-head {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 130px 44px;
	gap: 16px;
	align-items: center;
	margin-bottom: 18px;
	padding-inline: 4px;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--gd-cart-text);
}

.gd-cart-page__table-head-qty,
.gd-cart-page__table-head-price {
	text-align: center;
}

.gd-cart-page__items {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.gd-cart-page__item {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 120px 130px 44px;
	gap: 16px;
	align-items: center;
	min-height: 105px;
	padding: 16px 18px;
	background: var(--gd-cart-surface);
	border: 1px solid var(--gd-cart-border-item);
	border-radius: var(--gd-cart-radius-item);
}

.gd-cart-page__item-product {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

.gd-cart-page__item-thumb {
	flex: 0 0 86px;
	width: 86px;
	height: 86px;
	border-radius: var(--gd-cart-radius-control);
	background: var(--gd-cart-thumb-bg);
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gd-cart-page__item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
}

.gd-cart-page__item-info {
	min-width: 0;
}

.gd-cart-page__item-title {
	margin: 0 0 6px;
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.35;
	color: var(--gd-cart-text);
	overflow-wrap: break-word;
	word-break: normal;
}

.gd-cart-page__item-title a {
	color: inherit;
	text-decoration: none;
}

.gd-cart-page__item-title a:hover,
.gd-cart-page__item-title a:focus-visible {
	text-decoration: underline;
}

.gd-cart-page__item-meta {
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--gd-cart-text-muted);
}

.gd-cart-page__item-meta dl,
.gd-cart-page__item-meta p {
	margin: 0;
}

.gd-cart-page__item-meta dl.variation {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.gd-cart-page__item-meta dl.variation dt {
	font-weight: 400;
	color: var(--gd-cart-text-muted);
}

.gd-cart-page__item-meta dl.variation dt::after {
	content: "";
}

.gd-cart-page__item-meta dl.variation dd {
	margin: 0;
	color: var(--gd-cart-text);
	font-weight: 500;
}

.gd-cart-page__item-meta dl.variation dd p {
	margin: 0;
}

.gd-cart-page__item-qty {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	width: 110px;
	height: 34px;
	margin-inline: auto;
	padding: 0 6px;
	background: var(--gd-cart-qty-bg);
	border-radius: 999px;
}

.gd-cart-page__qty-btn {
	appearance: none;
	border: 0;
	background: transparent;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.1rem;
	line-height: 1;
	color: var(--gd-cart-text-muted);
	cursor: pointer;
	padding: 0;
}

.gd-cart-page__qty-btn:hover,
.gd-cart-page__qty-btn:focus-visible {
	color: var(--gd-cart-text);
}

.gd-cart-page__qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.gd-cart-page__item-qty .quantity {
	margin: 0;
}

.gd-cart-page__item-qty .quantity label.screen-reader-text {
	position: absolute;
}

.gd-cart-page__item-qty .quantity input.qty {
	width: 34px;
	min-width: 34px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: center;
	font-size: 0.95rem;
	font-weight: 700;
	color: var(--gd-cart-text);
	-moz-appearance: textfield;
}

.gd-cart-page__item-qty .quantity input.qty::-webkit-outer-spin-button,
.gd-cart-page__item-qty .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.gd-cart-page__item-price {
	text-align: center;
	font-size: clamp(1.2rem, 2vw, 1.5rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--gd-cart-text);
}

.gd-cart-page__item-price .amount,
.gd-cart-page__summary-row dd .amount,
.gd-cart-page__summary-row--total dd .amount {
	color: inherit;
	font-weight: inherit;
}

.gd-cart-page__item-remove {
	display: flex;
	align-items: center;
	justify-content: center;
}

.gd-cart-page__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	color: var(--gd-cart-text-muted) !important;
	background: transparent !important;
	border: 0;
	border-radius: 8px;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}

.gd-cart-page__remove:hover,
.gd-cart-page__remove:focus-visible {
	color: var(--gd-cart-text) !important;
	background: #f3f3f3 !important;
}

.gd-cart-page__bottom-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 18px;
	margin-top: 24px;
}

.gd-cart-page__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 58px;
	padding-inline: 4px;
	font-size: 1rem;
	font-weight: 600;
	color: var(--gd-cart-text);
	text-decoration: none;
	background: transparent;
	border: 0;
}

.gd-cart-page__back:hover,
.gd-cart-page__back:focus-visible {
	text-decoration: underline;
}

.gd-cart-page__cancel-order {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 190px;
	height: 58px;
	padding-inline: 24px;
	font-size: 1rem;
	font-weight: 700;
	color: #ffffff;
	text-decoration: none;
	background: var(--gd-cart-red);
	border: 0;
	border-radius: var(--gd-cart-radius-control);
	transition: filter 0.2s ease;
}

.gd-cart-page__cancel-order:hover,
.gd-cart-page__cancel-order:focus-visible {
	color: #ffffff;
	filter: brightness(0.95);
}

.gd-cart-page__form-actions {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.gd-cart-page__coupon {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.gd-cart-page__coupon-input {
	width: 100%;
	height: 58px;
	padding-inline: 18px;
	border: 0;
	border-radius: var(--gd-cart-radius-input);
	background: var(--gd-cart-input-bg);
	font-size: 1rem;
	color: var(--gd-cart-text);
}

.gd-cart-page__coupon-input::placeholder {
	color: #9a9a9a;
}

.gd-cart-page__coupon-input:focus {
	outline: 2px solid rgba(49, 92, 246, 0.35);
	outline-offset: 1px;
}

.gd-cart-page__coupon-btn {
	width: 100%;
	height: 58px;
	border: 2px solid var(--gd-cart-blue-border) !important;
	border-radius: var(--gd-cart-radius-input) !important;
	background: #ffffff !important;
	color: var(--gd-cart-blue-border) !important;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gd-cart-page__coupon-btn:hover,
.gd-cart-page__coupon-btn:focus-visible {
	background: rgba(37, 99, 235, 0.06) !important;
	color: var(--gd-cart-blue-border) !important;
}

.gd-cart-page__summary-rows {
	margin: 0;
}

.gd-cart-page__summary-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 12px;
}

.gd-cart-page__summary-row dt,
.gd-cart-page__summary-row dd {
	margin: 0;
}

.gd-cart-page__summary-row dt {
	font-size: 1rem;
	font-weight: 500;
	color: var(--gd-cart-text-muted);
}

.gd-cart-page__summary-row dd {
	font-size: 1rem;
	font-weight: 600;
	color: var(--gd-cart-text);
	text-align: end;
}

.gd-cart-page__summary-row--total {
	margin-top: 8px;
	padding-top: 16px;
	border-top: 1px solid var(--gd-cart-border);
}

.gd-cart-page__summary-row--total dt {
	color: var(--gd-cart-text-muted);
}

.gd-cart-page__summary-row--total dd {
	font-size: clamp(1.5rem, 2.5vw, 1.75rem);
	font-weight: 800;
}

.gd-cart-page__payment-options {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}

.gd-cart-page__payment-option {
	min-width: 82px;
	max-width: 140px;
	min-height: 54px;
	padding: 8px 10px;
	border: 1px solid var(--gd-cart-border);
	border-radius: var(--gd-cart-radius-input);
	background: var(--gd-cart-thumb-bg);
	color: var(--gd-cart-text);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1.2;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	text-align: center;
}

.gd-cart-page__payment-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 100%;
}

.gd-cart-page__payment-icon img {
	display: block;
	max-width: 100%;
	max-height: 24px;
	width: auto;
	height: auto;
}

.gd-cart-page__payment-label {
	display: block;
	max-width: 100%;
	overflow-wrap: break-word;
	word-break: normal;
}

.gd-cart-page__payment-empty {
	margin: 0 0 20px;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--gd-cart-text-muted);
}

.gd-cart-page__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 58px;
	padding: 14px 24px;
	border: 0;
	border-radius: var(--gd-cart-radius-control);
	background: var(--gd-cart-blue);
	color: #ffffff !important;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.2s ease;
}

.gd-cart-page__checkout:hover,
.gd-cart-page__checkout:focus-visible {
	color: #ffffff !important;
	filter: brightness(0.96);
}

.gd-cart-page__panel--empty {
	max-width: 720px;
	margin-inline: auto;
	text-align: center;
}

.gd-cart-page__empty-message {
	margin-block: 24px;
	color: var(--gd-cart-text-muted);
	font-size: 1.05rem;
}

.gd-cart-page__empty-message .cart-empty {
	margin: 0;
}

.gd-cart-page__empty-message .woocommerce-info {
	margin: 0;
	padding: 16px 18px;
	border: 1px solid var(--gd-cart-border);
	border-radius: var(--gd-cart-radius-input);
	background: #fafafa;
	color: var(--gd-cart-text);
	text-align: start;
}

.gd-cart-page__empty-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 16px;
	margin-top: 24px;
}

.gd-cart-page__checkout--shop {
	max-width: 280px;
}

/* WooCommerce notices within cart page */
.gd-cart-page-body .woocommerce-notices-wrapper {
	width: min(100% - 48px, var(--gd-cart-container-max));
	max-width: var(--gd-cart-container-max);
	margin: 16px auto 0;
}

.gd-cart-page-body .woocommerce-message,
.gd-cart-page-body .woocommerce-info,
.gd-cart-page-body .woocommerce-error {
	border-radius: var(--gd-cart-radius-input);
}

/* Neutralize default WooCommerce cart table styles inside custom layout */
.gd-cart-page .shop_table {
	border: 0;
	margin: 0;
	background: transparent;
}

.gd-cart-page table.shop_table th,
.gd-cart-page table.shop_table td {
	border: 0;
	padding: 0;
	background: transparent;
}

/* Tablet */
@media (max-width: 1024px) {
	.gd-cart-page__layout {
		grid-template-columns: minmax(0, 1fr) minmax(280px, 34%);
		gap: 24px;
	}
}

/* Stack sidebar */
@media (max-width: 900px) {
	.gd-cart-page__layout {
		grid-template-columns: 1fr;
	}

	.gd-cart-page__sidebar .gd-cart-page__panel + .gd-cart-page__panel {
		margin-top: 24px;
	}
}

/* Mobile */
@media (max-width: 768px) {
	.gd-cart-page {
		padding-block: 16px;
	}

	.gd-cart-page__container {
		width: min(100% - 24px, var(--gd-cart-container-max));
	}

	.gd-cart-page__table-head {
		display: none;
	}

	.gd-cart-page__item {
		grid-template-columns: 1fr auto;
		grid-template-areas:
			"product remove"
			"qty price";
		gap: 14px 12px;
		min-height: 0;
		padding: 14px;
	}

	.gd-cart-page__item-product {
		grid-area: product;
	}

	.gd-cart-page__item-qty {
		grid-area: qty;
		margin-inline: 0;
		justify-self: start;
	}

	.gd-cart-page__item-price {
		grid-area: price;
		justify-self: end;
		text-align: end;
	}

	.gd-cart-page__item-remove {
		grid-area: remove;
		justify-self: end;
		align-self: start;
	}

	.gd-cart-page__bottom-actions {
		flex-direction: column;
		align-items: stretch;
	}

	.gd-cart-page__back,
	.gd-cart-page__cancel-order,
	.gd-cart-page__checkout,
	.gd-cart-page__checkout--shop {
		width: 100%;
		max-width: none;
	}

	.gd-cart-page__payment-options {
		justify-content: center;
	}
}

@media (max-width: 390px) {
	.gd-cart-page__item-thumb {
		flex-basis: 72px;
		width: 72px;
		height: 72px;
	}

	.gd-cart-page__item-product {
		gap: 12px;
	}

	.gd-cart-page__payment-option {
		flex: 1 1 calc(50% - 6px);
		max-width: none;
	}
}
