/* =============================================================
   AKWASIBUYER CART SYSTEM — CSS
   ============================================================= */

/* ── Cart button in header ── */
.cart-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: var(--ink);
	color: var(--white);
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .82rem;
	padding: 9px 16px;
	border-radius: var(--r-pill);
	border: none;
	cursor: pointer;
	transition: background .15s, transform .15s;
	flex-shrink: 0;
}
.cart-btn:hover { background: var(--ink2); transform: translateY(-1px); }
.cart-btn svg  { flex-shrink: 0; }
.cart-count {
	position: absolute;
	top: -6px; right: -6px;
	width: 18px; height: 18px;
	background: var(--green);
	color: #000;
	font-size: .65rem;
	font-weight: 800;
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-mono);
	border: 2px solid var(--smoke);
	transition: transform .2s;
}
.cart-count.bump { transform: scale(1.4); }
.cart-count.hidden { display: none; }

/* ── Cart slide-over panel ── */
.cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 1100;
	display: none;
}
.cart-overlay.open { display: block; }
.cart-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,.45);
	backdrop-filter: blur(2px);
}
.cart-panel {
	position: absolute;
	top: 0; right: 0; bottom: 0;
	width: min(420px, 100vw);
	background: var(--white);
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 40px rgba(0,0,0,.15);
	animation: slideInRight .25s ease;
}
@keyframes slideInRight {
	from { transform: translateX(100%); }
	to   { transform: translateX(0); }
}

/* Cart header */
.cart-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1.5px solid var(--mist);
	flex-shrink: 0;
}
.cart-header h2 {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1.1rem;
	color: var(--ink);
	letter-spacing: -.01em;
}
.cart-close {
	width: 34px; height: 34px;
	border-radius: 50%;
	background: #f0efe8;
	border: none;
	cursor: pointer;
	font-size: 1.1rem;
	display: flex; align-items: center; justify-content: center;
	color: var(--ink);
	transition: background .15s;
}
.cart-close:hover { background: var(--mist); }

/* Cart items */
.cart-items {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
}
.cart-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100%;
	gap: 12px;
	color: var(--dim);
	padding: 40px 20px;
	text-align: center;
}
.cart-empty-icon { font-size: 3.5rem; }
.cart-empty p { font-size: .9rem; margin: 0; }

.cart-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px;
	border-bottom: 1px solid #f0efe8;
	transition: background .15s;
}
.cart-item:hover { background: #fafaf7; }
.cart-item-thumb {
	width: 56px; height: 56px;
	background: #f0efe8;
	border-radius: 6px;
	overflow: hidden;
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	font-size: 1.6rem;
}
.cart-item-thumb img {
	width: 100%; height: 100%;
	object-fit: cover;
}
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name {
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .88rem;
	color: var(--ink);
	margin-bottom: 3px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.cart-item-price {
	font-size: .82rem;
	color: var(--green);
	font-weight: 700;
	font-family: var(--font-mono);
}
.cart-item-controls {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}
.cart-qty-btn {
	width: 26px; height: 26px;
	border-radius: 50%;
	border: 1.5px solid var(--mist);
	background: var(--white);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: flex; align-items: center; justify-content: center;
	color: var(--ink);
	transition: border-color .15s, background .15s;
}
.cart-qty-btn:hover { border-color: var(--green); background: var(--green-pale); }
.cart-qty-num {
	font-family: var(--font-mono);
	font-size: .82rem;
	font-weight: 700;
	color: var(--ink);
	min-width: 18px;
	text-align: center;
}
.cart-remove {
	width: 26px; height: 26px;
	border-radius: 50%;
	border: none;
	background: transparent;
	font-size: .9rem;
	cursor: pointer;
	color: var(--dim);
	display: flex; align-items: center; justify-content: center;
	transition: color .15s, background .15s;
	margin-left: 4px;
}
.cart-remove:hover { color: #e8374a; background: rgba(232,55,74,.08); }

/* Cart footer */
.cart-footer {
	padding: 16px 20px;
	border-top: 1.5px solid var(--mist);
	background: #fafaf7;
	flex-shrink: 0;
}
.cart-subtotal {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 14px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--mist);
}
.cart-subtotal-label {
	font-size: .85rem;
	color: var(--dim);
	font-weight: 500;
}
.cart-subtotal-amount {
	font-family: var(--font-head);
	font-weight: 800;
	font-size: 1.2rem;
	color: var(--ink);
}

/* Order form inside cart */
.cart-order-form { display: flex; flex-direction: column; gap: 10px; }
.cart-order-form .form-field label { font-size: .75rem; }
.cart-order-form .form-field input {
	padding: 9px 12px;
	font-size: .85rem;
	background: var(--white);
	border: 1.5px solid var(--mist);
	border-radius: var(--r-sm);
	width: 100%;
	transition: border-color .15s;
}
.cart-order-form .form-field input:focus {
	outline: none;
	border-color: rgba(29,185,84,.5);
}
.cart-note { font-size: .72rem; color: var(--dim); margin: 2px 0 0; line-height: 1.45; }

/* Add to cart feedback toast */
.cart-toast {
	position: fixed;
	bottom: 24px; left: 50%;
	transform: translateX(-50%) translateY(80px);
	background: var(--ink);
	color: var(--white);
	font-size: .85rem;
	font-weight: 600;
	padding: 12px 22px;
	border-radius: var(--r-pill);
	box-shadow: 0 4px 20px rgba(0,0,0,.25);
	z-index: 2000;
	transition: transform .3s ease, opacity .3s ease;
	opacity: 0;
	white-space: nowrap;
	font-family: var(--font-head);
}
.cart-toast.show {
	transform: translateX(-50%) translateY(0);
	opacity: 1;
}

/* Add to cart button on product cards */
.btn-add-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: var(--ink);
	color: var(--white);
	font-family: var(--font-head);
	font-weight: 600;
	font-size: .82rem;
	padding: 9px 14px;
	border-radius: var(--r-pill);
	border: none;
	cursor: pointer;
	transition: background .15s, transform .15s;
	white-space: nowrap;
}
.btn-add-cart:hover { background: var(--ink2); transform: translateY(-1px); }

/* Product card CTA update — two buttons */
.product-card__cta {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px;
}

/* Q&A page styles */
.qa-wrap { padding-block: clamp(40px, 6vw, 72px); }
.qa-header { margin-bottom: 36px; }
.qa-linked-product {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--green-pale);
	border: 1px solid rgba(29,185,84,.2);
	border-radius: var(--r-md);
	padding: 10px 14px;
	margin-bottom: 28px;
	font-size: .85rem;
	color: var(--ink);
}
.qa-linked-product a { color: var(--green); font-weight: 600; }

.qa-item {
	background: var(--white);
	border: 1.5px solid var(--mist);
	border-radius: var(--r-lg);
	margin-bottom: 14px;
	overflow: hidden;
	box-shadow: var(--shadow-card);
}
.qa-question {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 18px 20px;
	cursor: pointer;
	user-select: none;
}
.qa-question:hover { background: #fafaf7; }
.qa-q-icon {
	width: 28px; height: 28px;
	background: var(--ink);
	color: var(--white);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-family: var(--font-head);
	font-weight: 800;
	font-size: .8rem;
	flex-shrink: 0;
}
.qa-q-text {
	font-family: var(--font-head);
	font-weight: 600;
	font-size: 1rem;
	color: var(--ink);
	flex: 1;
	line-height: 1.4;
	letter-spacing: -.01em;
}
.qa-toggle {
	width: 22px; height: 22px;
	background: var(--mist);
	border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	font-size: .8rem;
	flex-shrink: 0;
	transition: transform .2s, background .15s;
}
.qa-item.open .qa-toggle { transform: rotate(180deg); background: var(--green-pale); color: var(--green); }

.qa-answer {
	display: none;
	padding: 0 20px 18px 60px;
	color: var(--dim);
	font-size: .9rem;
	line-height: 1.75;
	border-top: 1px solid #f0efe8;
	padding-top: 14px;
}
.qa-item.open .qa-answer { display: block; }
.qa-a-icon {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--font-mono);
	font-size: .68rem;
	color: var(--green);
	text-transform: uppercase;
	letter-spacing: .06em;
	font-weight: 600;
	margin-bottom: 8px;
}

/* Q&A order section */
.qa-order-section {
	margin-top: 48px;
	padding-top: 36px;
	border-top: 2px solid var(--mist);
}
.qa-order-section .sh-label { margin-bottom: 8px; }
.qa-order-section .sh-title { margin-bottom: 6px; font-size: clamp(1.4rem, 3vw, 2rem); }
.qa-order-product-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: var(--white);
	border: 1.5px solid var(--mist);
	border-radius: var(--r-md);
	padding: 14px 16px;
	margin-bottom: 22px;
	box-shadow: var(--shadow-card);
}
.qa-order-product-thumb {
	width: 64px; height: 64px;
	border-radius: 6px;
	overflow: hidden;
	background: #f0efe8;
	flex-shrink: 0;
	display: flex; align-items: center; justify-content: center;
	font-size: 2rem;
}
.qa-order-product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.qa-order-product-name {
	font-family: var(--font-head);
	font-weight: 700;
	font-size: 1rem;
	color: var(--ink);
	margin-bottom: 4px;
}
.qa-order-product-price {
	font-family: var(--font-mono);
	font-size: .9rem;
	color: var(--green);
	font-weight: 700;
}
.qa-order-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	align-items: start;
}
@media (max-width: 640px) {
	.qa-order-grid { grid-template-columns: 1fr; }
}
