/* Amazon Style Shop - front-end styles */

:root {
	--amz-orange: #f0902c;
	--amz-orange-dark: #e0821c;
	--amz-navy: #131921;
	--amz-navy-light: #232f3e;
	--amz-link: #007185;
	--amz-price: #B12704;
	--amz-star: #ffa41c;
	--amz-border: #d5d9d9;
	--amz-bg: #eaeded;
}

.amz-empty { padding: 24px; font-size: 15px; color: #565959; }
.amz-empty a { color: var(--amz-link); text-decoration: none; }
.amz-empty a:hover { text-decoration: underline; color: #c7511f; }

/* ---------- Product Grid ---------- */
.amz-grid {
	display: grid;
	grid-template-columns: repeat(var(--amz-columns, 4), 1fr);
	gap: 18px;
	margin: 20px 0;
}
@media (max-width: 900px) { .amz-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .amz-grid { grid-template-columns: 1fr; } }

.amz-card {
	background: #fff;
	border: 1px solid var(--amz-border);
	border-radius: 8px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	transition: box-shadow .15s ease;
}
.amz-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.12); }

.amz-card-img {
	height: 180px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}
.amz-card-img img { max-height: 180px; max-width: 100%; object-fit: contain; }
.amz-img-placeholder {
	width: 100%; height: 100%;
	display: flex; align-items: center; justify-content: center;
	background: var(--amz-bg); color: #8a8f93; font-size: 13px; border-radius: 6px;
}
.amz-img-placeholder.small { height: 70px; width: 70px; }

.amz-card-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.amz-card-title {
	font-size: 15px; font-weight: 400; line-height: 1.3; margin: 0;
	color: var(--amz-link); display: -webkit-box; -webkit-line-clamp: 2;
	-webkit-box-orient: vertical; overflow: hidden;
}

.amz-stars { display: flex; align-items: center; gap: 4px; }
.amz-star { color: var(--amz-star); font-size: 15px; line-height: 1; }
.amz-star.empty { color: #d5d9d9; }
.amz-review-count { color: var(--amz-link); font-size: 13px; margin-left: 2px; }

.amz-price-row { display: flex; align-items: baseline; gap: 8px; }
.amz-price { font-size: 21px; font-weight: 600; color: #0f1111; }
.amz-price::before { content: "$"; display:none; } /* price already includes $ */
.amz-price-strike { font-size: 13px; color: #565959; text-decoration: line-through; }

.amz-stock { font-size: 13px; }
.amz-in-stock { color: #007600; }
.amz-out-stock { color: #B12704; }

.amz-btn {
	background: linear-gradient(to bottom, #f7dfa5, var(--amz-orange));
	border: 1px solid #a88734;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 14px;
	font-weight: 500;
	color: #0f1111;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	display: inline-block;
	margin-top: 8px;
	transition: filter .1s ease;
}
.amz-btn:hover { filter: brightness(0.97); }
.amz-btn:active { filter: brightness(0.92); }
.amz-btn:disabled, .amz-btn.amz-disabled {
	opacity: .5; cursor: not-allowed; pointer-events: none;
}
.amz-add-cart-btn.amz-added { background: #eaeded; border-color: var(--amz-border); }

/* ---------- Toast ---------- */
.amz-toast {
	position: fixed; bottom: 24px; right: 24px;
	background: #232f3e; color: #fff; padding: 12px 20px;
	border-radius: 6px; font-size: 14px; z-index: 9999;
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	opacity: 0; transform: translateY(10px);
	transition: opacity .2s ease, transform .2s ease;
}
.amz-toast.amz-toast-show { opacity: 1; transform: translateY(0); }

/* ---------- Cart Page ---------- */
.amz-cart-wrap { max-width: 1100px; margin: 0 auto; padding: 10px 0 40px; }
.amz-section-title { font-size: 24px; font-weight: 500; border-bottom: 1px solid var(--amz-border); padding-bottom: 10px; margin-bottom: 16px; }

.amz-cart-layout { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: flex-start; }
@media (max-width: 800px) { .amz-cart-layout { grid-template-columns: 1fr; } }

.amz-cart-items { background: #fff; border-radius: 8px; }
.amz-cart-line {
	display: grid; grid-template-columns: 90px 1fr auto;
	gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--amz-border);
	align-items: center;
}
.amz-cart-line-img img { width: 90px; height: 90px; object-fit: contain; }
.amz-cart-line-title { font-size: 16px; color: var(--amz-link); margin-bottom: 6px; }
.amz-cart-line-price { font-weight: 600; margin-bottom: 6px; }
.amz-cart-line-actions { display: flex; gap: 16px; align-items: center; font-size: 13px; }
.amz-qty-select { padding: 4px 8px; border-radius: 4px; border: 1px solid var(--amz-border); }
.amz-link-btn { background: none; border: none; color: var(--amz-link); cursor: pointer; padding: 0; font-size: 13px; }
.amz-link-btn:hover { text-decoration: underline; color: #c7511f; }
.amz-cart-line-total { font-weight: 600; font-size: 16px; white-space: nowrap; }

.amz-cart-summary, .amz-summary-box {
	background: #fff; border: 1px solid var(--amz-border);
	border-radius: 8px; padding: 18px;
}
.amz-summary-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.amz-summary-total { border-top: 1px solid var(--amz-border); margin-top: 8px; padding-top: 10px; font-size: 17px; color: var(--amz-price); }
.amz-checkout-btn { width: 100%; margin-top: 14px; box-sizing: border-box; }

/* ---------- Checkout Page ---------- */
.amz-checkout-wrap { max-width: 1100px; margin: 0 auto; padding: 10px 0 50px; }
.amz-checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 28px; align-items: flex-start; }
@media (max-width: 800px) { .amz-checkout-layout { grid-template-columns: 1fr; } }

.amz-checkout-form {
	background: #fff; border: 1px solid var(--amz-border); border-radius: 8px; padding: 22px;
}
.amz-checkout-form h3 { margin-top: 0; font-size: 17px; border-bottom: 1px solid var(--amz-border); padding-bottom: 8px; }
.amz-form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 4px; }
.amz-form-row label { font-size: 13px; font-weight: 600; }
.amz-form-row input[type="text"],
.amz-form-row input[type="email"] {
	padding: 9px 10px; border: 1px solid #888c8c; border-radius: 4px; font-size: 14px;
}
.amz-form-row-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.amz-form-row-split > div { display: flex; flex-direction: column; gap: 4px; }
.amz-payment-options { flex-direction: row; gap: 20px; font-weight: 400; font-size: 14px; flex-wrap: wrap; }
.amz-payment-options label { font-weight: 400; display: flex; align-items: center; gap: 6px; }

.amz-place-order-btn { width: 100%; padding: 12px; font-size: 15px; box-sizing: border-box; }
.amz-error { background: #fdf3f4; color: var(--amz-price); border: 1px solid #f5c2c7; border-radius: 4px; padding: 10px; font-size: 13px; margin-bottom: 14px; }

.amz-order-review { background: #fff; border: 1px solid var(--amz-border); border-radius: 8px; padding: 18px; }
.amz-review-line { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: #333; }

.amz-checkout-success-box {
	background: #fff; border: 1px solid var(--amz-border); border-radius: 8px;
	padding: 40px 30px; text-align: center;
}
.amz-checkout-success-box h2 { color: #007600; }
.amz-checkout-success-box .amz-order-number { font-size: 18px; font-weight: 600; margin: 10px 0; }
