/* Cart Page Styles - Premium Coffee Theme */

:root {
	--cart-theme-color: #cfab71;
	--cart-text-dark: #4b2b11;
	--cart-text-dim: #666666;
	--cart-bg-light: #faf8f5;
	--cart-card-bg: #ffffff;
	--cart-border-color: #e5e5e5;
	--cart-glass-bg: rgba(255, 255, 255, 0.75);
	--cart-glass-border: rgba(255, 255, 255, 0.4);
	--cart-shadow: 0 10px 30px rgba(75, 43, 17, 0.08);
}

h1,
h2 {
	margin-top: 1rem;
}

#nrp-cart-wrapper {
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 70px); /* Full viewport minus navbar height */
}

.nrp-cart-page {
	background: radial-gradient(
		circle at top left,
		#fff7ea 0,
		#f3e3cf 35%,
		#f0e4d7 60%,
		#e4d5c4 100%
	);
	flex: 1 1 auto; /* Fill all available space between navbar and newsletter */
	min-height: 0; /* Allow flexbox to shrink if needed */
	display: flex;
	flex-direction: column;
	padding: 2rem 1.5rem 0 1.5rem; /* Remove bottom padding so it extends to newsletter */
	font-family: "Montserrat", "Inter", sans-serif;
	color: var(--cart-text-dark);
	border-radius: 20px 20px 0 0; /* Top corners match navbar, straight bottom */
	margin: 0 !important;
	margin-top: -1px; /* Ensure seamless connection with navbar */
	margin-bottom: 0 !important;
	box-sizing: border-box;
}

/* Layout */
.nrp-cart-layout {
	display: grid;
	grid-template-columns: 1fr minmax(300px, 380px);
	gap: 2rem;
	max-width: 1200px;
	margin: 0 auto;
	align-items: stretch; /* Make both columns same height */
	position: relative;
	z-index: 10;
	flex: 1; /* Fill available space in flex container */
	min-height: 0; /* Allow grid to shrink */
	padding-bottom: 3rem; /* Add bottom padding inside the layout */
}

/* Main Cart Area - with border frame */
.nrp-cart-main {
	background: var(--cart-card-bg);
	border-radius: 24px;
	padding: 2rem;
	box-shadow: var(--cart-shadow);
	border: 2px solid var(--cart-border-color);
}

/* Title */
.nrp-cart-title {
	font-size: 1.6rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--cart-text-dark);
	margin-bottom: 1.5rem;
}

/* Item cards */
.nrp-cart-items {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.nrp-cart-item-card {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 1.25rem;
	padding: 1rem 1.25rem;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(75, 43, 17, 0.1);
	border: 1px solid var(--cart-border-color);
	position: relative;
}

.nrp-cart-item-left {
	display: flex;
	align-items: center;
	gap: 1rem;
}

/* Product Image - SQUARED corners */
.nrp-cart-item-img-wrapper {
	width: 80px;
	height: 80px;
	border-radius: 8px;
	overflow: hidden;
	background: #f4ede3;
	border: 2px solid var(--cart-border-color);
	flex-shrink: 0;
}

.nrp-cart-item-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nrp-cart-item-info {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

/* Item Details */
.nrp-cart-item-name {
	font-size: 1rem;
	font-weight: 700;
	color: var(--cart-text-dark);
}

.nrp-cart-item-meta {
	font-size: 0.8rem;
	color: var(--cart-text-dim);
}

.nrp-item-code {
	font-size: 0.75rem;
	color: var(--cart-text-dim);
	background: var(--cart-bg-light);
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
}

/* Quantity controls - pill with plus/minus */
.nrp-cart-item-center {
	display: flex;
	justify-content: center;
}

.nrp-cart-qty-controls {
	display: inline-flex;
	align-items: center;
	gap: 0;
	background: #fff;
	border-radius: 8px;
	padding: 0;
	border: 2px solid var(--cart-border-color);
	overflow: hidden;
}

.nrp-cart-qty-btn {
	width: 36px;
	height: 36px;
	border-radius: 0;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--cart-bg-light);
	color: var(--cart-text-dark);
	font-size: 1.2rem;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.nrp-cart-qty-btn:hover {
	background: var(--cart-theme-color);
	color: #fff;
}

.nrp-cart-qty-btn:active {
	background: #c49f65;
}

.nrp-cart-qty-input {
	width: 48px;
	height: 36px;
	padding: 0;
	border: none;
	border-left: 1px solid var(--cart-border-color);
	border-right: 1px solid var(--cart-border-color);
	background: #fff;
	text-align: center;
	font-family: inherit;
	font-weight: 700;
	font-size: 1rem;
	color: var(--cart-text-dark);
	-moz-appearance: textfield;
	appearance: textfield;
}

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

.nrp-cart-qty-input:focus {
	outline: none;
}

/* Price & Amount - positioned to the right */
.nrp-cart-item-right {
	text-align: right;
	min-width: 90px;
}

.nrp-cart-item-price {
	font-weight: 600;
	color: var(--cart-text-dim);
	font-size: 0.85rem;
}

.nrp-cart-item-amount {
	margin-top: 0.1rem;
	font-size: 1.2rem;
	color: var(--cart-theme-color);
	font-weight: 800;
}

/* Remove Button */
.nrp-cart-remove-btn {
	background: transparent;
	border: none;
	color: #bbb;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0.5rem;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nrp-cart-remove-btn:hover {
	color: #d32f2f;
	background: rgba(211, 47, 47, 0.08);
}

/* Summary Card - GLASSMORPHISM with blurred beans background */
.nrp-cart-summary {
	border-radius: 26px;
	padding: 0;
	box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	align-self: stretch; /* Fill full grid height */
}

.nrp-cart-summary-glass {
	position: relative;
	z-index: 1;
	border-radius: 22px;
	padding: 2rem;
	background: rgb(255 255 255);
	flex: 1; /* Fill available height */
	display: flex;
	flex-direction: column;
}

.nrp-cart-summary-glass .nrp-cart-total-row,
.nrp-cart-summary-glass .nrp-cart-summary-coupon-label,
.nrp-cart-summary-glass .nrp-cart-address-block,
.nrp-cart-summary-glass .nrp-cart-address-empty,
.nrp-cart-summary-glass .nrp-cart-contact-block {
	color: var(--cart-text-dark);
}

.nrp-cart-summary-title {
	font-size: 1.4rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--cart-text-dark);
	margin-bottom: 0.75rem;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid var(--cart-theme-color);
}

.nrp-cart-section-title {
	font-size: 1rem;
	font-weight: 700;
	margin-top: 0.5rem;
	margin-bottom: 0.35rem;
	color: var(--cart-text-dark);
	border-bottom: none;
	padding-bottom: 0;
	display: block;
}

.nrp-cart-address-block,
.nrp-cart-contact-block {
	font-size: 0.9rem;
	color: var(--cart-text-dim);
	line-height: 1.5;
	margin-bottom: 0.5rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.nrp-cart-contact-block {
	border-bottom: none;
}

.nrp-cart-same-address-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.85rem;
	color: var(--cart-text-dim);
	margin: 0.5rem 0 1rem;
}

.nrp-cart-same-address-toggle input {
	accent-color: var(--cart-theme-color);
}

.nrp-cart-same-address-toggle span {
	color: var(--cart-text-dark);
}

.nrp-cart-billing-mirrored {
	font-style: italic;
}

.nrp-cart-totals {
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 2px solid var(--cart-border-color);
}

.nrp-cart-total-row {
	display: flex;
	justify-content: space-between;
	margin-bottom: 0.6rem;
	font-size: 0.95rem;
	color: var(--cart-text-dim);
}

.nrp-cart-grand-total {
	margin-top: 1rem;
	padding-top: 1rem;
	border-top: 2px dashed var(--cart-border-color);
	font-size: 1rem;
	font-weight: 800;
	color: var(--cart-text-dark);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.5rem;
}

.nrp-cart-grand-total span:last-child {
	color: var(--cart-theme-color);
}

/* Checkout Button - GRADIENT */
.nrp-cart-checkout-btn {
	display: block;
	width: 100%;
	background: linear-gradient(135deg, #cfab71 0%, #b8944d 100%);
	color: #fff;
	text-align: center;
	padding: 1rem 1.5rem;
	border-radius: 12px;
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
	margin-top: 1.5rem;
	transition: all 0.3s ease;
	box-shadow: 0 6px 20px rgba(207, 171, 113, 0.4);
	border: none;
	cursor: pointer;
}

.nrp-cart-checkout-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 30px rgba(207, 171, 113, 0.5);
	background: linear-gradient(135deg, #dcb97e 0%, #c9a55e 100%);
}

.nrp-cart-checkout-btn:disabled {
	background: #e0e0e0;
	color: #999;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

/* Coupon Section in summary */
.nrp-cart-summary-coupon {
	margin-top: 1.25rem;
	padding-top: 1.25rem;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.nrp-cart-summary-coupon-label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--cart-text-dark);
	margin-bottom: 0.5rem;
}

.nrp-cart-summary-coupon-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nrp-cart-coupon-input {
	flex: 1;
	padding: 0.7rem 1rem;
	border-radius: 8px;
	border: 2px solid var(--cart-border-color);
	background: #fff;
	font-family: inherit;
	font-size: 0.9rem;
}

.nrp-cart-coupon-input:focus {
	outline: none;
	border-color: var(--cart-theme-color);
}

/* Apply Button - GRADIENT */
.nrp-cart-coupon-apply {
	padding: 0.7rem 1.25rem;
	border-radius: 8px;
	border: none;
	background: linear-gradient(135deg, #cfab71 0%, #b8944d 100%);
	color: #fff;
	font-weight: 700;
	font-size: 0.9rem;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(207, 171, 113, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.nrp-cart-coupon-apply:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(207, 171, 113, 0.5);
	background: linear-gradient(135deg, #dcb97e 0%, #c9a55e 100%);
}

/* Empty State */
.nrp-cart-empty-state {
	text-align: center;
	padding: 4rem 2rem;
	background: #fff;
	border-radius: 24px;
	box-shadow: var(--cart-shadow);
	max-width: 600px;
	margin: auto; /* Center vertically and horizontally */
	border: 2px solid var(--cart-border-color);
	flex: 1; /* Fill available space */
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.nrp-cart-empty-state p {
	font-size: 1.5rem;
	color: var(--cart-text-dim);
	margin-bottom: 2rem;
}

.nrp-cart-continue-btn {
	display: inline-block;
	padding: 1rem 2rem;
	background: linear-gradient(135deg, #cfab71 0%, #b8944d 100%);
	color: #fff;
	text-decoration: none;
	border-radius: 12px;
	font-weight: 700;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(207, 171, 113, 0.35);
}

.nrp-cart-continue-btn:hover {
	background: linear-gradient(135deg, #dcb97e 0%, #c9a55e 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(207, 171, 113, 0.5);
}

/* Address modal */
.nrp-address-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 1050;
	overflow-y: auto;
	padding: 1.5rem 1rem;
}

.nrp-address-modal.is-open {
	display: flex;
}

.nrp-address-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
}

.nrp-address-modal-dialog {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 3rem);
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
	padding: 1.5rem 1.75rem;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.nrp-address-modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.nrp-address-modal-title {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--cart-text-dark);
}

.nrp-address-modal-close {
	border: none;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: var(--cart-text-dim);
}

.nrp-address-modal-form {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}

.nrp-address-modal-body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	padding-right: 0.25rem;
}

.nrp-address-field label {
	display: block;
	font-size: 0.85rem;
	color: var(--cart-text-dim);
	margin-bottom: 0.25rem;
}

.required-star {
	color: #e53935;
}

.nrp-address-field input {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--cart-border-color);
	font-family: inherit;
	font-size: 0.9rem;
}

.nrp-address-field select {
	width: 100%;
	padding: 0.6rem 0.75rem;
	border-radius: 8px;
	border: 1px solid var(--cart-border-color);
	font-family: inherit;
	font-size: 0.9rem;
	background: #fff;
}

.nrp-address-two-col {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
}

.nrp-address-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
	margin-top: 1.25rem;
}

.nrp-address-modal-cancel {
	border-radius: 8px;
	border: 1px solid var(--cart-border-color);
	background: #fff;
	color: var(--cart-text-dark);
	padding: 0.6rem 1.2rem;
	cursor: pointer;
}

.nrp-address-modal-save {
	border-radius: 8px;
	border: none;
	background: linear-gradient(135deg, #cfab71 0%, #b8944d 100%);
	color: #fff;
	padding: 0.6rem 1.4rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(207, 171, 113, 0.35);
}

.nrp-cart-address-add-btn {
	margin: 0.5rem 0 1rem;
	padding: 0.4rem 0.75rem;
	border-radius: 999px;
	border: 1px dashed var(--cart-theme-color);
	background: transparent;
	color: var(--cart-theme-color);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
}

/* Section header with inline + button */
.nrp-cart-section-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.35rem;
	margin-top: 1rem;
}

.nrp-cart-section-header .nrp-cart-section-title {
	margin: 0;
}

/* Inline + button with dashed border */
.nrp-cart-address-add-btn-inline {
	width: 24px;
	height: 24px;
	padding: 0;
	border-radius: 6px;
	border: 1px dashed var(--cart-theme-color);
	background: transparent;
	color: var(--cart-theme-color);
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: all 0.2s ease;
}

.nrp-cart-address-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.nrp-cart-address-choose-btn {
	height: 24px;
	padding: 0 0.6rem;
	border-radius: 6px;
	border: 1px dashed var(--cart-theme-color);
	background: transparent;
	color: var(--cart-theme-color);
	font-size: 0.75rem;
	font-weight: 600;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	transition: all 0.2s ease;
}

.nrp-cart-address-choose-btn:hover {
	background: var(--cart-theme-color);
	color: #fff;
	border-style: solid;
}

.nrp-cart-address-add-btn-inline:hover {
	background: var(--cart-theme-color);
	color: #fff;
	border-style: solid;
}

/* Billing section wrapper - hideable when same as shipping */
.nrp-cart-billing-wrapper {
	transition: opacity 0.2s ease, max-height 0.3s ease;
}

.nrp-cart-billing-wrapper.is-hidden {
	display: none;
}

/* Address picker modal listing */
.nrp-address-picker-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.nrp-address-picker-item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.65rem 0.75rem;
	border: 1px solid var(--cart-border-color);
	border-radius: 10px;
	cursor: pointer;
}

.nrp-address-picker-item input[type="radio"] {
	margin-top: 0.15rem;
}

.nrp-address-picker-content {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
	color: var(--cart-text-dark);
}

.nrp-address-picker-empty {
	color: var(--cart-text-muted);
	font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 1100px) {
	.nrp-cart-layout {
		grid-template-columns: 1fr;
		margin-top: 0;
	}

	.nrp-cart-summary {
		position: static;
		margin-top: 2rem;
		max-width: 480px;
		margin-left: auto;
		margin-right: auto;
	}

	.nrp-cart-item-card {
		grid-template-columns: auto 1fr auto;
		gap: 1rem;
	}

	.nrp-cart-item-center,
	.nrp-cart-item-right {
		grid-column: span 1;
	}
}

/* Summary section responsiveness */
@media (max-width: 600px) {
	.nrp-cart-summary-glass {
		padding: 1.25rem;
	}

	.nrp-cart-summary-title {
		font-size: 1.1rem;
	}

	.nrp-cart-section-title {
		font-size: 0.9rem;
	}

	.nrp-cart-total-row {
		font-size: 0.85rem;
	}

	.nrp-cart-grand-total {
		font-size: 0.9rem;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.25rem;
	}

	.nrp-cart-checkout-btn {
		padding: 0.85rem 1rem;
		font-size: 1rem;
	}

	.nrp-cart-summary-coupon-form {
		flex-direction: column;
	}

	.nrp-cart-coupon-input,
	.nrp-cart-coupon-apply {
		width: 100%;
	}
}

/* Hide global navbar cart icon + badge on cart page itself */
body.cart-page .nrp-nav-actions a[href="/cart"],
body.cart-page .nrp-cart-badge,
body.cart-page #cart-badge,
body.cart-page #cart-count {
	display: none !important;
}