/**
 * Cart details card.
 *
 * A port of the cart card in the "Inside the cart" section of
 * `RenoCart Landing Page.dc.html`. Every value is the design's own; they were
 * inline there and are addressed by class here.
 */

.rccd {
	width: 100%;
}

.rccd *,
.rccd *::before,
.rccd *::after {
	box-sizing: border-box;
}

/* Layout ------------------------------------------------------------------ */

/*
 * The design ships two layouts and swaps them at 860px rather than reflowing
 * one. Both are rendered; the breakpoint at the end of this file decides.
 */
/*
 * The card and the list are separate children of the section's flex column in
 * the design, so their spacing is that column's `clamp(40px, 5vw, 64px)` --
 * not the 40px on the vestigial single-child wrapper around the card.
 */
.rccd__narrow {
	display: flex;
	flex-direction: column;
	gap: clamp(40px, 5vw, 64px);
}

.rccd__grid {
	display: grid;
	grid-template-columns: 1fr minmax(360px, 440px) 1fr;
	align-items: stretch;
	gap: 0;
}

.rccd__center {
	grid-column: 2;
	grid-row: 1;
}

.rccd__column {
	position: relative;
	grid-row: 1;
}

.rccd__column--left {
	grid-column: 1;
}

.rccd__column--right {
	grid-column: 3;
}

.rccd__callout {
	position: absolute;
	z-index: 4;
	left: 0;
	right: 0;
	top: var(--rccd-top);
	transform: translateY(-50%);
}

.rccd__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	border-radius: 12px;
	background: #fff;
	box-shadow:
		inset 0 0 0 1px #e8e8ed,
		0 30px 60px -24px rgba(15, 17, 23, 0.26);
	overflow: hidden;
}

/* Callouts ---------------------------------------------------------------- */

.rccd__callout-inner {
	display: flex;
	align-items: center;
}

.rccd__callout-card {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	gap: 5px;
	max-width: 240px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #fff;
	box-shadow:
		inset 0 0 0 1px #e8e8ed,
		0 10px 28px -14px rgba(15, 17, 23, 0.14);
}

.rccd__column--left .rccd__callout-card {
	align-items: flex-end;
	text-align: right;
}

.rccd__callout-head {
	display: flex;
	align-items: center;
	gap: 9px;
}

.rccd__callout-number {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: #eef2ff;
	color: #4f46e5;
	font-family: Roboto, monospace;
	font-size: 11px;
	font-weight: 700;
}

.rccd__callout-title {
	color: #0f1117;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.005em;
	white-space: nowrap;
}

.rccd__callout-text {
	color: #6b7280;
	font-size: 14px;
	line-height: 1.55;
}

.rccd__callout-text.is-narrow {
	max-width: 21ch;
}

/*
 * The connectors run back under the card by the design's own reach for each
 * callout, so every line stops beneath the point it marks.
 */
.rccd__connector {
	flex: 1 1 auto;
	min-width: 18px;
	height: 1px;
}

.rccd__column--left .rccd__connector {
	margin-right: var(--rccd-reach);
	background: linear-gradient(to right, #e0e4f0 0%, #c7d2fe 62%, rgba(199, 210, 254, 0.35) 100%);
	transform-origin: left center;
}

.rccd__column--right .rccd__connector {
	margin-left: var(--rccd-reach);
	background: linear-gradient(to left, #e0e4f0 0%, #c7d2fe 62%, rgba(199, 210, 254, 0.35) 100%);
	transform-origin: right center;
}

/* Anchor dots ------------------------------------------------------------- */

.rccd__dot {
	position: absolute;
	top: 50%;
	z-index: 3;
	width: 7px;
	height: 7px;
	border-radius: 999px;
	background: #4f46e5;
	box-shadow: 0 0 0 2px #fff;
	transform: translateY(-50%);
}

.rccd__dot--1 { left: -6px; }
.rccd__dot--2 { left: -4px; }
.rccd__dot--3 { right: -5px; }
.rccd__dot--4 { left: -14px; }
.rccd__dot--5 { right: -5px; }
.rccd__dot--6 { left: -5px; }

/* Head -------------------------------------------------------------------- */

.rccd__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px;
	border-bottom: 1px solid #eef0f2;
}

.rccd__title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #141618;
	font-size: 16px;
	font-weight: 600;
}

.rccd__title svg {
	display: block;
	flex-shrink: 0;
}

.rccd__close {
	color: #6b7280;
	font-size: 24px;
	line-height: 1;
}

/* Line items -------------------------------------------------------------- */

.rccd__items {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 22px 24px;
}

.rccd__line {
	display: flex;
	gap: 14px;
}

/*
 * Both thumbnails carry the oatmeal gradient in the design -- the apron keeps
 * it too -- so it is one rule rather than one per product.
 */
.rccd__media {
	position: relative;
	flex-shrink: 0;
	width: 64px;
	height: 64px;
}

.rccd__remove {
	position: absolute;
	top: -6px;
	left: -6px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #f1f2f4;
	color: #6b7280;
	box-shadow: 0 0 0 2px #fff;
}

.rccd__remove svg {
	display: block;
}

.rccd__thumb {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	background: linear-gradient(150deg, #e8e1d4 0%, #d9cfbd 100%);
	overflow: hidden;
}

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

.rccd__detail {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.rccd__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.rccd__name {
	color: #141618;
	font-size: 15px;
	font-weight: 600;
}

.rccd__prices {
	display: flex;
	flex-shrink: 0;
	align-items: baseline;
	gap: 7px;
}

.rccd__was {
	color: #d94f2b;
	font-size: 13px;
	text-decoration: line-through;
}

.rccd__now {
	flex-shrink: 0;
	color: #141618;
	font-size: 15px;
	font-weight: 600;
}

.rccd__variant {
	position: relative;
	color: #6b7280;
	font-size: 13px;
}

.rccd__saving {
	flex-shrink: 0;
	color: #2f8f4e;
	font-size: 13px;
	font-weight: 600;
}

.rccd__badge {
	position: relative;
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	height: 24px;
	padding: 0 9px;
	border-radius: 2px;
	background: #fef3c7;
	color: #b45309;
	font-size: 12px;
	font-weight: 600;
}

.rccd__stepper {
	position: relative;
	display: flex;
	align-items: center;
	width: 84px;
	height: 28px;
	margin-top: 4px;
	border-radius: 5px;
	box-shadow: inset 0 0 0 1px #eef0f2;
}

.rccd__stepper > span:not(.rccd__dot) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 27px;
	color: #6b7280;
	font-size: 13px;
}

.rccd__stepper .rccd__stepper-value {
	align-self: stretch;
	width: 30px;
	box-shadow: inset 1px 0 0 #eef0f2, inset -1px 0 0 #eef0f2;
	color: #141618;
	font-weight: 600;
}

/* Foot -------------------------------------------------------------------- */

.rccd__foot {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px 24px 24px;
	border-top: 1px solid #eef0f2;
}

.rccd__coupon {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rccd__coupon-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: #0f1117;
	font-size: 15px;
	font-weight: 600;
}

.rccd__chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #0f1117;
}

.rccd__chevron svg {
	display: block;
}

.rccd__coupon-form {
	display: flex;
	gap: 10px;
}

.rccd__coupon-input {
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 0;
	height: 42px;
	padding: 0 14px;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px #e8e8ed;
	color: #9ca3af;
	font-size: 14px;
}

.rccd__coupon-apply {
	position: relative;
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 20px;
	border-radius: 8px;
	background: #141618;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.rccd__rule {
	height: 1px;
	margin: 4px 0;
	background: #eef0f2;
}

.rccd__totals {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rccd__total-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	color: #141618;
	font-size: 16px;
	font-weight: 400;
}

.rccd__total-row--strong {
	font-weight: 700;
}

.rccd__total-row--coupon {
	align-items: center;
}

.rccd__total-row--total {
	position: relative;
}

.rccd__coupon-label {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

/*
 * 28px, not the design's 26px: the design has no box-sizing reset, so its
 * 26px content box plus the 1px dashed border top and bottom comes to 28.
 * This is the only fixed-height bordered element in the card, so it is the
 * only place the reset changes the result.
 */
.rccd__coupon-tag {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	height: 28px;
	padding: 0 5px 0 10px;
	border: 1px dashed #9bd8ae;
	border-radius: 999px;
	background: #f0fbf4;
}

.rccd__coupon-code {
	color: #141618;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.rccd__coupon-remove {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 999px;
	background: #d3d5da;
	color: #fff;
	font-size: 10px;
	line-height: 1;
}

.rccd__coupon-value {
	color: #2f8f4e;
	font-size: 16px;
	font-weight: 600;
	white-space: nowrap;
}

.rccd__note {
	color: #9ca3af;
	font-size: 13px;
	line-height: 1.5;
}

.rccd__checkout {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	border-radius: 8px;
	background: #141618;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}

.rccd__secondary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.rccd__secondary div {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	border-radius: 8px;
	background: #f3f4f6;
	color: #141618;
	font-size: 14px;
	font-weight: 500;
}

/* Breakpoints ------------------------------------------------------------- */

/* Narrow layout ----------------------------------------------------------- */

/*
 * The design's own sub-860px section. It is a second, smaller card rather
 * than a reflow of the wide one: no item count in the heading, a remove pin
 * on each thumbnail, 84x28 steppers, 15px totals, no "shipping and taxes"
 * line, the total in the checkout button, and the six feature numbers pinned
 * inside the card with the descriptions listed underneath.
 */
.rccd-n__card {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 380px;
	margin: 0 auto;
	border-radius: 12px;
	background: #fff;
	box-shadow:
		inset 0 0 0 1px #e8e8ed,
		0 30px 60px -24px rgba(15, 17, 23, 0.26);
}

.rccd-n__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 20px 24px;
	border-bottom: 1px solid #eef0f2;
}

.rccd-n__title {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #141618;
	font-size: 16px;
	font-weight: 600;
}

.rccd-n__title svg {
	display: block;
	flex-shrink: 0;
}

.rccd-n__close {
	color: #6b7280;
	font-size: 24px;
	line-height: 1;
}

.rccd-n__items {
	display: flex;
	flex-direction: column;
	gap: 22px;
	padding: 22px 24px;
}

.rccd-n__line {
	display: flex;
	gap: 14px;
}

.rccd-n__media {
	position: relative;
	flex-shrink: 0;
	width: 64px;
	height: 64px;
}

.rccd-n__remove {
	position: absolute;
	top: -6px;
	left: -6px;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	border-radius: 999px;
	background: #f1f2f4;
	color: #6b7280;
	box-shadow: 0 0 0 2px #fff;
}

.rccd-n__remove svg {
	display: block;
}

.rccd-n__thumb {
	width: 100%;
	height: 100%;
	border-radius: 8px;
	background: linear-gradient(150deg, #e8e1d4 0%, #d9cfbd 100%);
	overflow: hidden;
}

.rccd-n__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rccd-n__detail {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.rccd-n__row {
	position: relative;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 10px;
}

.rccd-n__name {
	color: #141618;
	font-size: 15px;
	font-weight: 600;
}

.rccd-n__prices {
	display: flex;
	flex-shrink: 0;
	align-items: baseline;
	gap: 7px;
}

.rccd-n__was {
	color: #d94f2b;
	font-size: 13px;
	text-decoration: line-through;
}

.rccd-n__now {
	flex-shrink: 0;
	color: #141618;
	font-size: 15px;
	font-weight: 600;
}

.rccd-n__variant {
	color: #6b7280;
	font-size: 13px;
}

.rccd-n__saving {
	flex-shrink: 0;
	color: #2f8f4e;
	font-size: 13px;
	font-weight: 600;
}

.rccd-n__badge {
	position: relative;
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	height: 24px;
	padding: 0 9px;
	border-radius: 2px;
	background: #fef3c7;
	color: #b45309;
	font-size: 12px;
	font-weight: 600;
}

.rccd-n__stepper {
	position: relative;
	display: flex;
	align-items: center;
	width: 84px;
	height: 28px;
	margin-top: 4px;
	border-radius: 5px;
	box-shadow: inset 0 0 0 1px #eef0f2;
}

.rccd-n__stepper > span:not(.rccd-n__pin) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 27px;
	color: #6b7280;
	font-size: 13px;
}

.rccd-n__stepper .rccd-n__stepper-value {
	align-self: stretch;
	width: 30px;
	box-shadow: inset 1px 0 0 #eef0f2, inset -1px 0 0 #eef0f2;
	color: #141618;
	font-weight: 600;
}

.rccd-n__foot {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 20px 24px 24px;
	border-top: 1px solid #eef0f2;
}

.rccd-n__coupon {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.rccd-n__coupon-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	color: #0f1117;
	font-size: 15px;
	font-weight: 600;
}

.rccd-n__chevron {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #0f1117;
}

.rccd-n__chevron svg {
	display: block;
}

.rccd-n__coupon-form {
	display: flex;
	gap: 10px;
}

.rccd-n__coupon-input {
	display: flex;
	flex: 1;
	align-items: center;
	min-width: 0;
	height: 42px;
	padding: 0 14px;
	border-radius: 8px;
	box-shadow: inset 0 0 0 1px #e8e8ed;
	color: #9ca3af;
	font-size: 14px;
}

.rccd-n__coupon-apply {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	height: 42px;
	padding: 0 20px;
	border-radius: 8px;
	background: #141618;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
}

.rccd-n__rule {
	height: 1px;
	margin: 4px 0;
	background: #eef0f2;
}

.rccd-n__totals {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rccd-n__total-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	color: #141618;
	font-size: 15px;
	font-weight: 400;
}

.rccd-n__total-row--strong {
	font-weight: 700;
}

.rccd-n__total-row--coupon {
	align-items: center;
}

.rccd-n__total-row--total {
	position: relative;
	font-size: 16px;
	font-weight: 700;
}

.rccd-n__coupon-label {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

/* 26px, not the design's 24px: see the wide card's tag for why. */
.rccd-n__coupon-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 26px;
	padding: 0 5px 0 9px;
	border: 1px dashed #9bd8ae;
	border-radius: 999px;
	background: #f0fbf4;
}

.rccd-n__coupon-code {
	color: #141618;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.02em;
}

.rccd-n__coupon-remove {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 15px;
	height: 15px;
	border-radius: 999px;
	background: #d3d5da;
	color: #fff;
	font-size: 10px;
	line-height: 1;
}

.rccd-n__coupon-value {
	color: #2f8f4e;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.rccd-n__checkout {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 50px;
	border-radius: 8px;
	background: #141618;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}

.rccd-n__secondary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.rccd-n__secondary div {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	border-radius: 8px;
	background: #f3f4f6;
	color: #141618;
	font-size: 14px;
	font-weight: 500;
}

/* The numbered pins inside the narrow card. */
.rccd-n__pin {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: #4f46e5;
	color: #fff;
	font-family: Roboto, monospace;
	font-size: 11px;
	font-weight: 700;
	transform: translateY(-50%);
	box-shadow: 0 0 0 2px #fff, 0 4px 10px -4px rgba(15, 17, 23, 0.3);
}

.rccd-n__pin--1 { top: 32px; left: -22px; }
.rccd-n__pin--2 { top: 50%; right: 105px; }
.rccd-n__pin--3 { top: 50%; right: 332px; }
.rccd-n__pin--4 { top: 50%; right: -20px; }
.rccd-n__pin--5 { top: 70px; left: 350px; }
.rccd-n__pin--6 { top: 50%; right: -16px; }

/* The feature list under the narrow card. */
.rccd-n__list {
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.rccd-n__feature {
	display: flex;
	gap: 14px;
}

.rccd-n__feature-number {
	display: inline-flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: #eef2ff;
	color: #3730a3;
	font-family: Roboto, monospace;
	font-size: 12px;
	font-weight: 700;
}

.rccd-n__feature-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.rccd-n__feature-title {
	color: #0f1117;
	font-size: 16px;
	line-height: 1.3;
	font-weight: 600;
	letter-spacing: -0.005em;
}

.rccd-n__feature-desc {
	color: #6b7280;
	font-size: 14px;
	line-height: 1.55;
}

/* The switch ---------------------------------------------------------------
 *
 * One breakpoint, at the design's own `narrow = w < 860`.
 */

.rccd__wide {
	display: none;
}

@media (min-width: 860px) {

	.rccd__wide {
		display: block;
	}

	.rccd__narrow {
		display: none;
	}
}
