/* === GENERAL === */


.cart-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.cart-logo {
	height: 32px;
}

.cart-footer {
	bottom: 0;
	background: #fff;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	border-top: 1px solid #eee;
}

.cart-footer #checkout-btn {
	width: 100%;
	margin: 0;
}


.close-btn {
	font-size: 2.5rem;
	background: none;
	border: none;
	cursor: pointer;
}

.card-no-image {
	align-items: center;
	max-width: 100%;
	width: 90px;
	height: 90px;
	justify-content: center;
	display: flex;

}

.cart-title {
	font-size: 24px;
	margin-bottom: 25px;
	color: rgba(0, 0, 0, 0.6);
}

.cart-item {
	display: flex;
	gap: 15px;
	margin-bottom: 30px;
}

.product-image-shopping-modal {
	width: 100%;
	max-width: 90px;
	height: 90px;
	object-fit: contain;
}

.product-image {
	width: 150px;
	height: 100px;
	object-fit: contain;
	background: #fff;
}

.product-name {
	font-weight: bold;
	font-size: 18px;
	margin-top: 0;
	color: #000;
}

.product-price {
	font-size: 1rem;
	color: rgba(127, 127, 127, 1);
	margin-bottom: 6px;
}

.sc-delivery-info {
	display: flex;
	align-items: center;
	font-size: 14px;
	color: #000;
}

.sc-delivery-info svg {
	width: 20px;
	height: 20px;
	margin-right: 5px;
	fill: #f7931e;
}

.remove-btn-shopping-modal {
	margin-left: auto;
	color: #e74c3c;
	cursor: pointer;
	position: relative;
	top: -3rem;
}

.divider {
	border-top: 1px solid #ddd;
	margin: 1rem 0;
}


/* === CUSTOM CHECKBOX === */

.custom-checkbox {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	margin-bottom: 2rem;
}

.custom-checkbox input {
	display: none;
}

.custom-checkbox .checkmark {
	width: 16px;
	height: 16px;
	border: 1px solid #000;
	background-color: #fff;
	margin-right: 8px;
	position: relative;
	display: inline-block;
	box-sizing: border-box;
}

.custom-checkbox input:checked+.checkmark {
	background-color: #000;
}

.custom-checkbox .checkmark::after {
	content: '';
	position: absolute;
	display: none;
	left: 4px;
	top: 1px;
	width: 4px;
	height: 8px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.custom-checkbox input:checked+.checkmark::after {
	display: block;
}


/* === TOTALS === */

.totals-title {
	font-weight: bold;
	font-size: 20px;
	margin-bottom: 1rem;
}

.totals-section {
	color: rgba(0, 0, 0, 0.5);
	font-size: 1rem;
}

.totals-section .line,
.grand-total {
	display: flex;
	justify-content: space-between;
}

.totals-section .line {
	margin: 6px 0;
}

.grand-total {
	font-weight: bold;
	color: #000;
	font-size: 1.1rem;
	margin: 1.875rem 0;
}

button.payment.primary-btn {
	width: 100%;
	margin: 30px 0;
}


/* === CART MODAL === */



#cart-modal .content {
	display: flex;
	flex-grow: 1;
	flex-direction: column;
	background-color: var(--color-white);
	padding: 48px;
	min-width: 384px;
	max-width: 480px;
	height: 100%;
}

#cart-modal .content h2 {
	display: flex;
	justify-content: space-between;
	padding-bottom: 5px;
}

#cart-modal .content svg {
	cursor: pointer;
}

#cart-modal .content p {
	color: var(--color-gray-4);
}


/* === CART LIST === */

#cart-list {
	flex-grow: 1;
	overflow-y: auto;
	padding-right: 10px;
	border-top: 1px solid var(--color-gray-1);
	border-bottom: 1px solid var(--color-gray-1);
	max-height: 60%;
}

#cart-list>div {
	display: grid;
	grid-template-columns: 96px 1fr min-content;
	grid-template-rows: auto auto auto;
	grid-template-areas:
		"img title remove"
		"img title sum"
		"img count price";
	gap: 0 24px;
	padding: 24px 0;
	position: relative;
	box-sizing: content-box;
	border-top: 1px solid var(--color-gray-1);
}

#cart-list>div:first-of-type {
	border-top: none;
}

#cart-list div>* {
	display: flex;
	overflow: hidden;
}

#cart-list div>div {
	grid-area: img;
	aspect-ratio: 1 / 1;
}

#cart-list img {
	width: 100%;
	height: auto;
	object-fit: cover;
	flex-grow: 1;
}

#cart-list h2,
#cart-list h3 {
	grid-area: title;
	width: 100%;
	font-size: 16px;
	max-height: 72px;
	overflow: hidden;
	text-overflow: ellipsis;
	word-break: break-word;
	hyphens: auto;
}

#cart-list h3 {
	grid-area: sum;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	color: var(--color-signal-error);
}

#cart-list h3 b:last-child {
	color: var(--color-black);
}

#cart-list h3 b:nth-child(2) {
	text-decoration: line-through;
	color: var(--color-gray-4);
	font-size: 0.8rem;
	line-height: 0.8rem;
}

#cart-list span {
	grid-area: price;
	color: var(--color-gray-4);
	font-size: 14px;
	line-height: 16px;
	align-self: flex-end;
	justify-content: flex-end;
	width: 100%;
	white-space: nowrap;
}

#cart-list input {
	grid-area: count;
	padding: 4px 8px;
	max-width: 73px;
	font-size: 16px;
}

#cart-list svg {
	grid-area: remove;
	color: var(--color-gray-3);
	height: 24px;
	width: 24px;
	align-self: start;
	justify-self: end;
}


/* === COUNTER === */

.cart-item__quantity {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.cart-item__decrement,
.cart-item__increment {
	width: 32px;
	height: 32px;
	font-size: 20px;
	border: 1px solid #ccc;
	background: white;
	cursor: pointer;
	border-radius: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.cart-item__count {
	min-width: 32px;
	text-align: center;
	font-size: 16px;
}


/* === EMPTY CART === */

.empty-cart-message {
	text-align: center;
	padding: 40px 20px;
	background-color: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	max-width: 400px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.empty-cart-message .empty-text {
	font-size: 18px;
	font-weight: 500;
	margin-bottom: 24px;
	color: #333;
}


/* === DELETE BUTTON === */

.delete-product {
	background: none;
	border: none;
	color: #BA0808;
	font-size: 0.9em;
	font-weight: 500;
	cursor: pointer;
	transition: color 0.2s ease;
}

.delete-product:hover {
	color: #a60000;
	text-decoration: underline;
}

/* === ERROR POP === */


.terms-wrap {
	position: relative;
	margin-top: 1rem;
}

.error-bubble {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: .4rem;
	background: #ffefef;
	color: #b00020;
	border: 1px solid #ffc9c9;
	border-radius: 6px;
	padding: .4rem .7rem;
	font-size: .9rem;
	z-index: 10;
}

.error-bubble::before {
	content: "";
	position: absolute;
	top: -6px;
	left: 12px;
	border: 6px solid transparent;
	border-bottom-color: #ffc9c9;
}

.error-bubble::after {
	content: "";
	position: absolute;
	top: -5px;
	left: 12px;
	border: 6px solid transparent;
	border-bottom-color: #ffefef;
}

.error-bubble.show {
	display: block;
	top: 14rem;
}