/* Hoku Cart & Email Checkout — neutral styles meant to blend into most themes */

.hoku-btn {
	display: inline-block;
	background: #1a1a1a;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 12px 22px;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	transition: opacity .15s ease;
}
.hoku-btn:hover { opacity: .88; }
.hoku-btn:disabled { opacity: .55; cursor: default; }

/* --- product page button --- */
.hoku-atc-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 12px 0;
	flex-wrap: wrap;
}
.hoku-atc-feedback {
	font-size: 14px;
	color: #1c7a3e;
	opacity: 0;
	transform: translateY(2px);
	transition: opacity .2s ease, transform .2s ease;
}
.hoku-atc-feedback.show { opacity: 1; transform: none; }
.hoku-atc-feedback.is-error { color: #b3261e; }

/* --- cart table --- */
.hoku-cart-app { margin: 20px 0; }

.hoku-cart-table-wrap { overflow-x: auto; }
.hoku-cart-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 18px;
}
.hoku-cart-table th,
.hoku-cart-table td {
	padding: 12px 10px;
	border-bottom: 1px solid #ececec;
	text-align: left;
	vertical-align: middle;
}
.hoku-cart-table th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: #666; }
.hoku-cart-table .hoku-c-price,
.hoku-cart-table .hoku-c-sub { text-align: right; white-space: nowrap; }
.hoku-cart-table .hoku-c-qty { white-space: nowrap; }
.hoku-cart-table .hoku-c-rm { text-align: right; width: 40px; }

.hoku-c-strength {
	display: block;
	font-size: 13px;
	color: #777;
	margin-top: 2px;
}

.hoku-qty-dec,
.hoku-qty-inc {
	width: 28px;
	height: 28px;
	border: 1px solid #ddd;
	background: #fafafa;
	border-radius: 5px;
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
}
.hoku-c-qty span { display: inline-block; min-width: 26px; text-align: center; }

.hoku-remove {
	border: none;
	background: none;
	color: #b3261e;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
}

.hoku-cart-total {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 16px;
	font-size: 18px;
	margin-bottom: 18px;
}
.hoku-cart-total strong { font-size: 22px; }

.hoku-cart-actions { text-align: right; margin-bottom: 24px; }

.hoku-empty { padding: 30px 0; color: #666; }

/* --- checkout form --- */
.hoku-checkout {
	border-top: 1px solid #ececec;
	padding-top: 22px;
	max-width: none;
}
.hoku-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 600px) {
	.hoku-field-row { grid-template-columns: 1fr; }
}
.hoku-checkout h3 { margin: 0 0 14px; }

.hoku-summary { list-style: none; margin: 0 0 12px; padding: 0; }
.hoku-summary li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 6px 0;
	border-bottom: 1px dashed #eee;
}
.hoku-summary-total {
	display: flex;
	justify-content: space-between;
	font-size: 17px;
	margin: 8px 0 20px;
	padding-top: 8px;
	border-top: 2px solid #1a1a1a;
}

.hoku-field { margin-bottom: 14px; }
.hoku-field label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 6px;
}
.hoku-field input,
.hoku-field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 6px;
	font-size: 15px;
	box-sizing: border-box;
}
.hoku-field textarea { resize: vertical; }

.hoku-checkout-msg { min-height: 20px; font-size: 14px; margin-bottom: 8px; }
.hoku-checkout-msg.is-error { color: #b3261e; }

.hoku-success {
	padding: 22px;
	background: #eef8f0;
	border: 1px solid #cbe8d3;
	border-radius: 8px;
	color: #1c7a3e;
	font-size: 16px;
}

/* --- cart link + icon + count badge --- */
.hoku-cart-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	position: relative;
	color: inherit;
	line-height: 1;
	text-decoration: none;
}
.hoku-cart-link:hover { opacity: .85; }
.hoku-cart-icon { width: 22px; height: 22px; display: block; color: #ffffff !important; }
.hoku-cart-count {
	display: inline-block;
	min-width: 20px;
	padding: 0 6px;
	height: 20px;
	line-height: 20px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	border-radius: 10px;
	background: #e07b1a;
	color: #120a02;
}
/* dim the badge when the cart is empty */
.hoku-cart-count.is-empty { background: #888; opacity: .6; }

/* --- responsive: collapse table into rows --- */
@media (max-width: 560px) {
	.hoku-cart-table thead { display: none; }
	.hoku-cart-table,
	.hoku-cart-table tbody,
	.hoku-cart-table tr,
	.hoku-cart-table td { display: block; width: 100%; }
	.hoku-cart-table tr {
		border: 1px solid #ececec;
		border-radius: 8px;
		margin-bottom: 12px;
		padding: 6px 10px;
	}
	.hoku-cart-table td {
		border: none;
		display: flex;
		justify-content: space-between;
		align-items: center;
		text-align: right;
		padding: 8px 0;
	}
	.hoku-cart-table td[data-label]::before {
		content: attr(data-label);
		font-weight: 600;
		color: #666;
		text-align: left;
	}
	.hoku-cart-table .hoku-c-name { font-weight: 600; }
}

/* =========================================================
   Dark cart redesign. The cart markup is entirely plugin-owned,
   so these styles apply wherever [hoku_cart] renders — no toggle,
   no body class, and no theme/Elementor conflict.
   ========================================================= */

.hoku-cart-app {
	background:
		radial-gradient(120% 70% at 15% 0%, rgba(229, 129, 28, .08), transparent 55%),
		linear-gradient(180deg, #121215, #0c0c0e);
	border: 1px solid #2a2a30;
	border-radius: 6px;
	padding: 34px;
	color: #f3f1ec;
}

.hoku-cart-app .hoku-cart-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid #2a2a30;
}
.hoku-cart-app .hoku-cart-eyebrow {
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
	font-size: 13px;
	letter-spacing: .16em;
	color: #e5811c;
}
.hoku-cart-app .hoku-cart-meta {
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
	font-size: 12px;
	letter-spacing: .06em;
	color: #8b8b93;
	text-transform: uppercase;
}

.hoku-cart-app .hoku-cart-table th {
	color: #8b8b93;
	border-bottom-color: #2a2a30;
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
	font-weight: 500;
}
.hoku-cart-app .hoku-cart-table td { border-bottom-color: #2a2a30; color: #f3f1ec; }
.hoku-cart-app .hoku-c-strength {
	color: #8b8b93;
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
}
.hoku-cart-app .hoku-c-price,
.hoku-cart-app .hoku-c-sub { font-family: ui-monospace, 'IBM Plex Mono', monospace; }

.hoku-cart-app .hoku-qty-dec,
.hoku-cart-app .hoku-qty-inc {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #1c1c20;
	border: 1px solid #34343c;
	border-radius: 8px;
	color: #f3f1ec;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.hoku-cart-app .hoku-qty-dec:hover,
.hoku-cart-app .hoku-qty-inc:hover {
	background: #e5811c;
	border-color: #e5811c;
	color: #120a02;
}
.hoku-cart-app .hoku-qty-dec:active,
.hoku-cart-app .hoku-qty-inc:active { transform: scale(.9); }
.hoku-cart-app .hoku-c-qty span {
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
	min-width: 28px;
	font-size: 15px;
	color: #f59a2e;
}
.hoku-cart-app .hoku-remove {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0 !important;
	background: #1c1c20 !important;
	border: 1px solid #34343c !important;
	border-radius: 8px;
	color: #8b8b93;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: background .15s, border-color .15s, color .15s, transform .1s;
}
.hoku-cart-app .hoku-remove:hover {
	background: #c0392b !important;
	border-color: #c0392b !important;
	color: #fff;
}
.hoku-cart-app .hoku-remove:active { transform: scale(.9); }

.hoku-cart-app .hoku-cart-total {
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
	letter-spacing: .05em;
}
.hoku-cart-app .hoku-cart-total strong { color: #f59a2e; }

.hoku-cart-app .hoku-empty { color: #8b8b93; text-align: center; }

/* checkout form on dark */
.hoku-cart-app .hoku-checkout { border-top-color: #2a2a30; }
.hoku-cart-app .hoku-checkout h3 { color: #f3f1ec; }
.hoku-cart-app .hoku-summary li { border-bottom-color: #2a2a30; color: #d7d7dd; }
.hoku-cart-app .hoku-summary-total {
	border-top-color: #e5811c;
	font-family: ui-monospace, 'IBM Plex Mono', monospace;
}
.hoku-cart-app .hoku-summary-total strong { color: #f59a2e; }
.hoku-cart-app .hoku-field label { color: #cfcfd4; }
.hoku-cart-app .hoku-field input,
.hoku-cart-app .hoku-field textarea {
	background: #161619;
	border-color: #2a2a30;
	color: #f3f1ec;
}
.hoku-cart-app .hoku-field input:focus,
.hoku-cart-app .hoku-field textarea:focus {
	outline: none;
	border-color: #e5811c;
}
.hoku-cart-app .hoku-success {
	background: rgba(127, 207, 148, .08);
	border-color: #2a5f38;
	color: #8fe0a3;
}

@media (max-width: 560px) {
	.hoku-cart-app .hoku-cart-table tr { border-color: #2a2a30; }
	.hoku-cart-app .hoku-cart-table td[data-label]::before { color: #8b8b93; }
}

/* =========================================================
   Optional whole-page darkening for the Cart page.
   Applied via body.hoku-dark-page (added only on the configured
   cart page). Covers common theme + Elementor wrappers and hides
   the duplicate page title, since our panel has its own header.
   ========================================================= */

body.hoku-dark-page { background: #0a0a0b !important; }

body.hoku-dark-page #content,
body.hoku-dark-page .site-content,
body.hoku-dark-page .content-area,
body.hoku-dark-page main,
body.hoku-dark-page .site-main,
body.hoku-dark-page .entry-content,
body.hoku-dark-page .page-content,
body.hoku-dark-page .elementor,
body.hoku-dark-page .elementor-section,
body.hoku-dark-page .elementor-container,
body.hoku-dark-page .elementor-widget-wrap,
body.hoku-dark-page .e-con,
body.hoku-dark-page .e-con-inner { background: transparent !important; }

/* our cart panel supplies its own "YOUR CART" header, so hide the
   theme/Elementor page title on this page to avoid the white strip */
body.hoku-dark-page .entry-title,
body.hoku-dark-page .page-title,
body.hoku-dark-page .elementor-page-title,
body.hoku-dark-page h1.elementor-heading-title,
body.hoku-dark-page .wp-block-post-title { display: none !important; }
