/*
 * Rejuvinat — shop styles (cart, checkout, product listing)
 * Modern, minimal, responsive. Uses the theme's design tokens from theme.css.
 */

.shop-main {
	padding: var(--scale-lg-2) 0 var(--scale-lg-4) 0;
}

.shop-container {
	width: 92%;
	max-width: 1200px;
	margin: 0 auto;
}

.shop-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: var(--scale-lg-2);
}

.shop-title {
	font-family: var(--font-h);
	font-weight: 600;
	font-size: var(--scale-lg-3);
	letter-spacing: .5px;
	color: #171717;
	margin: 0;
}

.shop-continue {
	font-family: var(--font-2);
	font-size: var(--scale-sm-8);
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #888;
	text-decoration: none;
}

.shop-continue:hover { color: #171717; }

/* ---- Two-column layout (content + summary) ---- */

.shop-grid {
	display: grid;
	grid-template-columns: 1fr 360px;
	grid-gap: var(--scale-lg-2);
	align-items: start;
}

.shop-col-side { position: sticky; top: 100px; }

@media screen and (max-width: 900px) {
	.shop-grid { grid-template-columns: 1fr; }
	.shop-col-side { position: static; top: auto; }
}

/* ---- Cards ---- */

.shop-card {
	background: #fff;
	border: 1px solid #ececec;
	border-radius: 14px;
	padding: var(--scale-md-2);
	box-shadow: 0 1px 2px rgba(0,0,0,.03);
}

/* ---- Cart lines ---- */

.cart { display: flex; flex-direction: column; }

.cart-header,
.cart-item {
	display: grid;
	grid-template-columns: 84px 1fr 130px 110px 40px;
	grid-gap: 1rem;
	align-items: center;
}

.cart-header {
	font-family: var(--font-2);
	font-size: var(--scale-sm-7);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #999;
	padding: 0 .25rem .9rem .25rem;
	border-bottom: 1px solid #ececec;
}

.cart-header .quantity,
.cart-header .price { text-align: center; }

.cart-item {
	padding: 1.1rem .25rem;
	border-bottom: 1px solid #f0f0f0;
}

.cart-item .image {
	width: 84px;
	height: 84px;
	border-radius: 10px;
	background: #f6f6f6;
	overflow: hidden;
}

.cart-item .image img,
.cart-item .image > div img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.cart-item .title {
	font-family: var(--font-2);
	font-weight: 600;
	font-size: var(--scale-md-1);
	color: #171717;
}

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

.cart-item .unitPrice {
	font-family: var(--font-2);
	font-size: var(--scale-sm-8);
	color: #888;
	margin-top: .25rem;
}

.cart-item .quantity {
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #ddd;
	border-radius: 999px;
	padding: .15rem;
	width: fit-content;
	margin: 0 auto;
}

.cart-item .quantity input[name="quantity"] {
	width: 3em;
	text-align: center;
	border: 0;
	background: transparent;
	font-family: var(--font-2);
	font-size: var(--scale-md-1);
}

.cart-item .quantity button,
.cart-item .quantity .qty-btn {
	border: 0;
	background: transparent;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
	color: #555;
	padding: .35rem .6rem;
}

.cart-item .quantity button:hover { color: #171717; }

.cart-item .price {
	font-family: var(--font-2);
	font-weight: 600;
	font-size: var(--scale-md-1);
	color: #171717;
	text-align: center;
}

.cart-item .endFunctions { text-align: right; }

.cart-item .endFunctions .icon-close,
.cart-item .endFunctions .remove {
	cursor: pointer;
	color: #b5b5b5;
	font-size: 1.4rem;
	line-height: 1;
	background: transparent;
	border: 0;
}

.cart-item .endFunctions .icon-close:hover,
.cart-item .endFunctions .remove:hover { color: #a94442; }

@media screen and (max-width: 760px) {
	.cart-header { display: none; }

	.cart-item {
		grid-template-columns: 72px 1fr 40px;
		grid-template-areas:
			"image info remove"
			"image qty  price";
		row-gap: .5rem;
	}

	.cart-item .image { grid-area: image; width: 72px; height: 72px; }
	.cart-item .title { grid-area: info; }
	.cart-item .unitPrice { grid-area: info; align-self: end; }
	.cart-item .quantity { grid-area: qty; margin: 0; justify-self: start; }
	.cart-item .price { grid-area: price; text-align: right; }
	.cart-item .endFunctions { grid-area: remove; }
}

/* ---- Summary ---- */

.summary {
	background: #fafafa;
	border: 1px solid #ececec;
	border-radius: 14px;
	padding: var(--scale-md-2);
}

.checkoutItemCount {
	font-family: var(--font-2);
	font-size: var(--scale-sm-8);
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #888;
	padding-bottom: 1rem;
	border-bottom: 1px solid #e7e7e7;
	margin-bottom: 1rem;
}

.summaryPriceTable { display: flex; flex-direction: column; gap: .6rem; }

.subtotalPriceTable { display: flex; flex-direction: column; gap: .5rem; }

.subtotalPrice,
.totalPrice {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-family: var(--font-2);
}

.subtotalPrice .label { color: #777; }
.subtotalPrice .value { color: #333; }

.totalPrice {
	margin-top: .8rem;
	padding-top: 1rem;
	border-top: 1px solid #e7e7e7;
	font-size: var(--scale-md-1-5);
	font-weight: 600;
	color: #171717;
}

.finalizeOrder { margin-top: var(--scale-md-2); }

/* ---- Buttons ---- */

.btn-primary {
	display: block;
	width: 100%;
	font-family: var(--font-2);
	text-transform: uppercase;
	font-weight: 600;
	letter-spacing: .2em;
	font-size: var(--scale-sm-7);
	padding: 1.1rem 1.5rem;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(270deg, rgba(223, 190, 106, 0.95), rgba(146, 111, 52, 0.95));
	box-shadow: #8f8f8f55 0 6px 18px -6px;
	transition: filter 150ms ease;
}

.btn-primary:hover { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .5; cursor: default; }

.btn-outline {
	display: inline-block;
	font-family: var(--font-2);
	text-transform: uppercase;
	font-weight: 500;
	letter-spacing: .2em;
	font-size: var(--scale-sm-7);
	padding: 1rem 2rem;
	border: 1px solid #bbb;
	border-radius: 999px;
	background: transparent;
	color: #3e3e3e;
	cursor: pointer;
	transition: background-color 120ms ease, color 120ms ease;
}

.btn-outline:hover { background: #292929; color: #fff; border-color: #292929; }

.cart-empty {
	font-family: var(--font-2);
	color: #888;
	padding: var(--scale-lg-3) 0;
	text-align: center;
}

/* ---- Generic form styling (checkout sections, shipping, payment) ---- */

.shop-container input[type="text"],
.shop-container input[type="email"],
.shop-container input[type="tel"],
.shop-container input[type="number"],
.shop-container input[type="password"],
.shop-container select,
.shop-container textarea {
	width: 100%;
	font-family: var(--font-2);
	font-size: var(--scale-md-1);
	padding: .75rem .9rem;
	border: 1px solid #ddd;
	border-radius: 10px;
	background: #fff;
	box-sizing: border-box;
	margin: .25rem 0 .9rem 0;
}

.shop-container input:focus,
.shop-container select:focus,
.shop-container textarea:focus {
	outline: none;
	border-color: #c9b07a;
	box-shadow: 0 0 0 3px rgba(223,190,106,.18);
}

.shop-container label {
	font-family: var(--font-2);
	font-size: var(--scale-sm-8);
	letter-spacing: .04em;
	color: #555;
}

.shop-container [data-errname] { color: #a94442; font-size: var(--scale-sm-7); }

/* ---- Product listing grid ---- */

.shop-products {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	grid-gap: var(--scale-lg-1-5);
}

.product_card {
	background: #fff;
	border: 1px solid #eee;
	border-radius: 14px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: box-shadow 150ms ease, transform 150ms ease;
}

.product_card:hover {
	box-shadow: 0 12px 30px -18px rgba(0,0,0,.35);
	transform: translateY(-2px);
}

.product_card .product_image {
	aspect-ratio: 1 / 1;
	background: #f6f6f6;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

.product_card .product_image img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.product_card .product_body {
	padding: 1rem 1.1rem 1.3rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: .4rem;
}

.product_card .product_title {
	font-family: var(--font-2);
	font-weight: 600;
	font-size: var(--scale-md-1);
	color: #171717;
}

.product_card .product_title a { color: inherit; text-decoration: none; }

.product_card .product_summary {
	font-family: var(--font-2);
	font-size: var(--scale-sm-8);
	color: #888;
	line-height: 1.5em;
}

.product_card .product_price {
	font-family: var(--font-2);
	font-weight: 600;
	font-size: var(--scale-md-2);
	color: #171717;
	margin-top: auto;
}

.product_card .product_controls { margin-top: .6rem; display: flex; gap: .5rem; }

.product_card .product_controls .btn-primary,
.product_card .product_controls .btn-outline { width: auto; flex: 1; padding: .8rem 1rem; }
