/* ============================================================
   CART PAGE — AUKSYTE THEME
   Responsive, Shopify-style layout
============================================================ */

/* Main layout */
.cart-page, .order-page{
	background: #fff;
	padding: 10px 0 40px 0;
}

.cart-layout {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 40px;
	margin-top: 20px;
}

/* -------------------------------------
   CART ITEMS LIST
-------------------------------------- */
.cart-items-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
}

.cart-items-header h3 {
	font-size: 1.3rem;
	color: #3e3534;
}

.clear-cart-btn {
	background: none;
	border: none;
	color: #999;
	font-size: 0.8rem;
	cursor: pointer;
	text-decoration: underline;
}

.cart-items {
	border-top: 1px solid #eee;
}

.cart-item {
	display: grid;
	grid-template-columns: 100px 1fr auto auto auto;
	gap: 18px;
	padding: 18px 0;
	border-bottom: 1px solid #eee;
	align-items: center;
}

/* Image placeholder OR real product image */
.cart-item-image {
	width: 100px;
	height: 100px;
	background: #fefaf7;
	border: 1px solid #eee;
	border-radius: 3px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.8rem;
	color: #bbb;
}

/* Product Details */
.cart-item-details h3 {
	font-size: 1rem;
	margin-bottom: 4px;
	color: #3e3534;
}

.item-category {
	font-size: 0.85rem;
	color: #8b807d;
	margin-bottom: 6px;
}

.item-price {
	font-size: 0.9rem;
	color: #3e3534;
}

.item-subtotal {
	font-size: 1rem;
	font-weight: 600;
	color: #3e3534;
	width: 80px;
	display: flex;
	flex-direction: column;
}
.item-subtotal span{
	font-weight: 400;
	font-size: 0.85rem;
	color: #8b807d;
	padding-bottom: 13px;
}

/* Quantity */
.item-quantity {
	display: flex;
	flex-direction: column;
	font-size: 0.85rem;
	width: auto;
}

.cart-page .item-quantity span {
	margin-bottom: 4px;
 	color: #8b807d;
}

.order-page .item-quantity {
	font-size: 1rem;
	font-weight: 600;
}

.order-page .item-quantity span{
	font-weight: 400;
    padding: 0 13px 13px 0;
    color: #8b807d;
    font-size: 0.85rem;
}

.item-quantity select {
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 0.9rem;
	background: #fff;
	cursor: pointer;
}

/* Remove button */
.remove-item-btn {
	background: none;
	border: none;
	font-size: 1.3rem;
	color: #999;
	cursor: pointer;
	line-height: 1;
	text-decoration:none;
}

/* Continue Shopping */
.continue-shopping {
	margin-top: 20px;
	font-size: 0.8rem;
}

/* -------------------------------------
   ORDER SUMMARY (RIGHT SIDE)
-------------------------------------- */
.cart-summary-section {
	position: sticky;
	top: 120px;
	height: fit-content;
}

.order-summary {
	padding: 20px;
	background: #fefaf7;
	border: 1px solid #eee;
	border-radius: 3px;
}

.order-summary h2 {
	font-size: 1.4rem;
	margin-bottom: 16px;
	color: #3e3534;
}

.summary-line {
	display: flex;
	justify-content: space-between;
	margin-bottom: 8px;
	font-size: 0.95rem;
}

.summary-line.bottom {
	border-bottom: 1px solid #eee;
	padding-bottom: 5px;
}

.summary-line.total {
	font-size: 1.2rem;
	font-weight: 600;
	border-top: 1px solid #eee;
	padding-top: 10px;
	margin-top: 10px;
}

/* Promo Code */
.promo-code-section {
	margin: 16px 0;
}

.promo-code-section h3 {
	font-size: 1rem;
	margin-bottom: 6px;
}

.promo-input {
	display: flex;
	gap: 6px;
}

.promo-input input {
	flex: 1;
	padding-left: 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
}

.apply-promo-btn {
	background: #ff6b9d;
	color: white;
	border: none;
	padding: 10px 16px;
	border-radius: 3px;
	cursor: pointer;
	font-weight: 600;
}

.apply-promo-btn:hover {
	background: #e85a8a;
}

/* Checkout */
.checkout-btn {
	width: 100%;
	background: #ff6b9d;
	color: white;
	padding: 12px 20px;
	border-radius: 3px;
	border: none;
	font-weight: 600;
	cursor: pointer;
	margin-top: 18px;
	font-size: 1rem;
}

.checkout-btn:hover {
	background: #e85a8a;
}

.messages{
	color: #8b807d;
	background: #fefaf7;
	padding: 5px 10px;
	font-size: 0.9rem;
}

/* -------------------------------------
   EMPTY CART STATE
-------------------------------------- */
.empty-cart {
	text-align: center;
	margin-top: 40px;
}

.empty-cart p {
	color: #8b807d;
	margin-bottom: 40px;
}

/* ==========================================
   Quantity Selector (imported from product.css)
============================================== */
.quantity-selector {
	display: inline-flex;
	align-items: center;
	border-radius: 3px;
	border: 1px solid #e5d7cf;
	overflow: hidden;
}

.quantity-btn {
	border: none;
	background: #faf4f1;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 1.1rem;
	line-height: 1;
	color: #645652;
	transition: background .2s ease;
}

.quantity-btn:hover {
	background: #f0e3dc;
}

.quantity-input {
	border: none;
	width: 25px;
	text-align: center;
	font-size: 0.95rem;
	background: #fff;
	color: #3e3534;
	margin-left: 13px;
}

/* ==========================================
   Courier Select (Shipping method)
   Styled to match Auksyte theme
============================================== */

/* Shipping layout */
.shipping-line {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-bottom: 8px;
}

.shipping-label {
	font-size: 0.95rem;
	color: #3e3534;
}

.shipping-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* Courier Selector (same styling as before) */
.select-courier {
	width: 100%;
	min-width: 0;
	padding: 8px 12px;
	font-size: 0.95rem;
	font-family: inherit;
	background: #fff;
	border: 1px solid #e5d7cf;
	border-radius: 3px;
	cursor: pointer;
	color: #3e3534;
	transition: border-color .2s ease, box-shadow .2s ease;
	appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%23645652' stroke-width='2' fill='none'/></svg>");
	background-repeat: no-repeat;
	background-position: right 10px center;
	background-size: 14px;
	padding-right: 34px;
}

.select-courier:hover {
	border-color: #ff6b9d;
	box-shadow: 0 0 0 2px rgba(255,107,157,0.15);
}

.select-courier:focus {
	outline: none;
	border-color: #ff6b9d;
	box-shadow: 0 0 0 2px rgba(255,107,157,0.25);
}

/* Price next to selector */
.shipping-price {
	font-size: 1rem;
	color: #3e3534;
	margin-left: 14px;
	min-width: 80px;
	text-align: end;
}

.offstockmsg {color: red}


/* FREE SHIPPING BAR */
.free-shipping-progress {
    margin-top: 12px;
    background: #fefaf7;
    border-radius: 3px;
}

.fsp-message {
    font-size: 0.8rem;
    margin-bottom: 8px;
    color: #645652;
}

.fsp-bar {
    width: 100%;
    height: 6px;
    background: #eee;
    border-radius: 100px;
    overflow: hidden;
}

.fsp-bar span {
    display: block;
    height: 6px;
    width: 0%;
    background: #ff6b9d;
    transition: width 0.3s ease;
}


/* ============================================================
   STEP 2
============================================================ */
.checkout-flex{
	display: flex;
	justify-content: space-between;
}

.checkout-address-section {
    animation: fadeIn 0.3s ease;
}

.checkout-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.checkout-form-grid {
    display: grid;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: row;
    gap: 6px;
}

.form-field label {
    font-size: 14px;
    color: #555;
    width: 100px;
	display: flex;
	align-items: center;
}

.order-page .form-field label {
	font-size: 12px;
}

.cart-page .form-field input {
    background: #fff;
    font-size: 15px;
	flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.order-page .form-field input {
	background: #fefaf7;
	font-size: 14px;
	flex: 1;
	padding: 0;
	border: none;
	color: #333;
	text-align:right;
}

.form-field input:focus {
	border-color: #b7a4ff;
	box-shadow: 0 0 0 3px rgba(183,164,255,0.25);
	outline: none;
}


/* Smooth appearing animation */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE BEHAVIOR
============================================================ */

/* ---------- TABLET (≤ 992px) ---------- */
@media (max-width: 992px) {
	/* Stack layout instead of columns */
	.cart-layout {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	/* Disable sticky summary */
	.cart-summary-section {
		position: static;
		top: auto;
		margin-top: 20px;
	}
}

/* ---------- MOBILE (≤ 600px) ---------- */
@media (max-width: 600px) {
	/* Reformat cart item layout */
	.cart-item {
		grid-template-columns: 100px 1fr auto;
		grid-template-areas:
			"image title title"
			"remove qty subtotal";
		gap: 5px 10px;
	}

	.cart-item-image { grid-area: image; }
	.cart-item-details { grid-area: title; }
	.item-quantity { grid-area: qty; display: flow;}
	.item-subtotal { grid-area: subtotal; }
	.remove-item-btn { grid-area: remove; justify-self: end; }

	.item-price,
	.item-subtotal {
		font-size: 0.95rem;
	}

	.item-quantity select {
		padding: 8px;
		font-size: 1rem;
	}
	.order-summary{padding:15px}
}