/* HappyTails Marketplace — uses the Happy Tails theme tokens with fallbacks */
.htm {
	--h-black: var(--ht-black, #0B0B0D);
	--h-card-dk: var(--ht-card, #1C1C20);
	--h-yellow: var(--ht-yellow, #FFD400);
	--h-yellow-h: var(--ht-yellow-hover, #F4C400);
	--h-yellow-soft: var(--ht-yellow-soft, #FFF6BF);
	--h-bg: var(--ht-bg, #F5F5F7);
	--h-muted: var(--ht-muted, #5F5F67);
	--h-line: var(--ht-line, #E8E8EC);
	--h-line2: var(--ht-line-2, #D4D4DA);
	--h-ok: var(--ht-success, #18864B);
	--h-err: var(--ht-error, #D92D20);
	--h-warn: var(--ht-warn, #9A5B00);
	--h-r: 16px;
	font-family: var(--ht-font, Manrope, 'Segoe UI', system-ui, sans-serif);
	color: var(--h-black);
	max-width: var(--ht-wrap, 1280px);
	margin: 0 auto;
	box-sizing: border-box;
}
.htm *, .htm *::before, .htm *::after { box-sizing: border-box; }
.htm h1, .htm h2, .htm h3, .htm h4 { font-family: inherit; color: inherit; margin: 0 0 .5em; line-height: 1.15; letter-spacing: -0.02em; }
.htm h2 { font-size: 1.6rem; }
.htm h3 { font-size: 1.15rem; }
.htm p { margin: 0 0 1em; }
.htm a { color: inherit; }
.htm-muted { color: var(--h-muted); }
.htm-small { font-size: .875rem; }
.htm-center { text-align: center; }

/* Buttons */
.htm-btn, .htm button.htm-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	background: var(--h-yellow); color: var(--h-black) !important; border: 0; border-radius: 999px;
	padding: .75em 1.4em; font-weight: 800; font-size: .95rem; text-decoration: none !important;
	cursor: pointer; transition: background .15s, transform .15s; font-family: inherit; line-height: 1.2;
}
.htm-btn:hover { background: var(--h-yellow-h); transform: translateY(-1px); }
.htm-btn--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; color: inherit !important; }
.htm-btn--ghost:hover { background: rgba(255, 212, 0, .12); }
.htm-btn--lg { padding: 1em 2em; font-size: 1rem; }
.htm-btn--block { display: flex; width: 100%; }

/* Hero */
.htm-hero {
	background: var(--h-black); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px);
	margin: 0 0 24px; position: relative; overflow: hidden;
}
.htm-hero::after {
	content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 212, 0, .28), transparent 70%);
}
.htm-hero h1 { font-size: clamp(1.9rem, 4.5vw, 3.2rem); font-weight: 800; color: #fff; }
.htm-hero h1 em { font-style: normal; color: var(--h-yellow); }
.htm-hero p { color: #C9C9CF; max-width: 620px; font-size: 1.05rem; }
.htm-hero .htm-btn--ghost { color: #fff !important; margin-top: 8px; }
.htm-eyebrow {
	display: inline-block; font-size: .8rem; font-weight: 700; color: var(--h-yellow);
	border: 1px solid #34343A; border-radius: 999px; padding: .35em .9em; margin-bottom: 16px;
}
.htm-trust { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 4px 0 16px; font-weight: 700; font-size: .9rem; color: #fff; }

.htm-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.htm-steps > div { background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: 18px; }
.htm-steps b { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--h-yellow); margin-bottom: 10px; }
.htm-steps h4 { margin-bottom: .25em; }
.htm-steps p { margin: 0; color: var(--h-muted); font-size: .9rem; }

/* Cards & forms */
.htm-card { background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: clamp(18px, 3vw, 28px); margin-bottom: 20px; }
.htm-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 14px; }
.htm-form input[type=text], .htm-form input[type=email], .htm-form input[type=password], .htm-form input[type=tel],
.htm-form input[type=number], .htm-form input[type=search], .htm-form select, .htm-form textarea, .htm-form input[type=file] {
	display: block; width: 100%; margin-top: 6px; padding: .75em .9em; border: 1px solid var(--h-line2);
	border-radius: 12px; font: inherit; font-weight: 500; background: #fff; color: var(--h-black);
}
.htm-form input:focus, .htm-form select:focus, .htm-form textarea:focus, .htm-filters input:focus, .htm-filters select:focus {
	outline: none; border-color: var(--h-black); box-shadow: 0 0 0 3px rgba(255, 212, 0, .45);
}
.htm-form h3 { margin-top: 8px; }
.htm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.htm-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 16px; }
.htm-checks { border: 0; padding: 0; margin: 0 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.htm-checks legend { font-weight: 700; font-size: .9rem; margin-bottom: 8px; width: 100%; }
.htm-checks label, .htm-seg label { margin: 0; font-weight: 600; }
.htm-checks label { border: 1px solid var(--h-line2); border-radius: 999px; padding: .45em .9em; cursor: pointer; }
.htm-checks label:has(input:checked) { background: var(--h-yellow-soft); border-color: var(--h-yellow); }
.htm-agree { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 500 !important; }
.htm-agree input { margin-top: 3px; accent-color: var(--h-black); }
.htm-seg { display: inline-flex; background: var(--h-bg); border-radius: 999px; padding: 4px; margin-bottom: 18px; gap: 4px; flex-wrap: wrap; }
.htm-seg input { position: absolute; opacity: 0; pointer-events: none; }
.htm-seg span { display: block; padding: .55em 1.1em; border-radius: 999px; cursor: pointer; }
.htm-seg input:checked + span { background: var(--h-black); color: #fff; }
.htm-seg input:disabled + span { cursor: default; }
.htm-hp { position: absolute !important; left: -9999px !important; }

/* Notices & pills */
.htm-notice { padding: 14px 16px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; border: 1px solid; }
.htm-notice--success { background: #E8F6EE; border-color: #B7E2C8; color: var(--h-ok); }
.htm-notice--error { background: #FDECEA; border-color: #F6C1BC; color: var(--h-err); }
.htm-notice--warn { background: var(--h-yellow-soft); border-color: #F1DA6B; color: var(--h-warn); }
.htm-notice a { text-decoration: underline; }
.htm-pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: .3em .8em; border-radius: 999px; background: var(--h-bg); color: var(--h-black); white-space: nowrap; }
.htm-pill--ok { background: #E8F6EE; color: var(--h-ok); }
.htm-pill--warn { background: var(--h-yellow-soft); color: var(--h-warn); }
.htm-pill--err { background: #FDECEA; color: var(--h-err); }
.htm-pill--dark { background: var(--h-black); color: #fff; }

/* Filters */
.htm-filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: 12px; }
.htm-filters input, .htm-filters select { flex: 1 1 150px; padding: .7em .9em; border: 1px solid var(--h-line2); border-radius: 999px; font: inherit; background: #fff; min-width: 0; }
.htm-filters input[type=search] { flex: 2 1 220px; }

/* Product grid */
.htm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.htm-pcard { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); overflow: hidden; text-decoration: none !important; color: var(--h-black) !important; transition: transform .18s, box-shadow .18s; }
.htm-pcard:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(11, 11, 13, .08); }
.htm-pcard__img { position: relative; aspect-ratio: 1; background: var(--h-bg); }
.htm-pcard__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.htm-pcard.is-sold img { filter: grayscale(.9); opacity: .6; }
.htm-badge { position: absolute; top: 10px; left: 10px; background: var(--h-yellow); color: var(--h-black); font-weight: 800; font-size: .75rem; padding: .3em .7em; border-radius: 999px; }
.htm-badge--dark { background: var(--h-black); color: #fff; }
.htm-pcard__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.htm-pcard h3 { font-size: 1rem; margin: 0; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.htm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.htm-tags span { font-size: .72rem; font-weight: 700; background: var(--h-bg); padding: .25em .6em; border-radius: 6px; }
.htm-pcard__price { font-weight: 800; font-size: 1.1rem; margin-top: auto; }
.htm-pcard__price del { opacity: .5; font-weight: 500; font-size: .85em; }
.htm-ask { font-weight: 800; color: var(--h-warn); }
.htm-pcard__meta { display: flex; justify-content: space-between; gap: 8px; font-size: .8rem; color: var(--h-muted); border-top: 1px solid var(--h-line); padding-top: 8px; }
.htm-seller { color: var(--h-ok); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.htm-pager { display: flex; gap: 6px; justify-content: center; margin: 28px 0; }
.htm-pager a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #fff; border: 1px solid var(--h-line); text-decoration: none; font-weight: 700; }
.htm-pager a.is-current { background: var(--h-black); color: #fff; }
.htm-empty { text-align: center; padding: 56px 20px; background: #fff; border: 1px dashed var(--h-line2); border-radius: var(--h-r); }
.htm-empty__icon { font-size: 2.5rem; margin-bottom: 8px; }

/* Store header */
.htm-storehead { display: flex; gap: 20px; align-items: center; background: var(--h-black); color: #fff; border-radius: 24px; padding: clamp(22px, 4vw, 40px); margin-bottom: 22px; }
.htm-storehead h1 { color: #fff; font-size: clamp(1.6rem, 3.5vw, 2.4rem); margin: 8px 0 4px; }
.htm-storehead .htm-muted { color: #A5A5AD; }
.htm-storehead p { color: #C9C9CF; margin: 0; }
.htm-avatar { flex: none; width: 88px; height: 88px; border-radius: 50%; background: var(--h-yellow); color: var(--h-black); display: grid; place-items: center; font-weight: 800; font-size: 2rem; overflow: hidden; }
.htm-avatar img { width: 100%; height: 100%; object-fit: cover; }
.htm-avatar--sm { width: 44px; height: 44px; font-size: 1.1rem; }

/* Seller box on product page */
.htm-sellerbox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: 12px 14px; margin: 16px 0 10px; background: #fff; }
.htm-sellerbox > div:nth-child(2) { flex: 1; min-width: 140px; }
.htm-sellerbox a { text-decoration: none; }
.htm-sellerbox .htm-muted.htm-small:first-child { display: block; }
.htm-assure { list-style: none; padding: 0; margin: 0 0 16px; font-size: .9rem; color: var(--h-muted); }
.htm-assure li { margin: 4px 0; }
.htm-inquiry { margin-top: 12px; }

/* Dashboard */
.htm-dash { display: grid; grid-template-columns: 250px 1fr; gap: 24px; align-items: start; }
.htm-dash__nav { background: var(--h-black); color: #fff; border-radius: 20px; padding: 18px; position: sticky; top: 20px; display: flex; flex-direction: column; gap: 14px; }
.htm-dash__store { display: flex; align-items: center; gap: 10px; }
.htm-dash__store strong { display: block; line-height: 1.2; }
.htm-dash__store a { font-size: .8rem; color: var(--h-yellow); text-decoration: none; }
.htm-dash__nav nav { display: flex; flex-direction: column; gap: 2px; }
.htm-dash__nav nav a { color: #C9C9CF; text-decoration: none; padding: .65em .9em; border-radius: 10px; font-weight: 600; }
.htm-dash__nav nav a:hover { background: #1C1C20; color: #fff; }
.htm-dash__nav nav a.is-active { background: #1C1C20; color: var(--h-yellow); }
.htm-dash__main { min-width: 0; }
.htm-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.htm-head h2 { margin: 0; }
.htm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-bottom: 20px; }
.htm-stat { background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); padding: 16px 18px; }
.htm-stat > span { display: block; color: var(--h-muted); font-size: .85rem; font-weight: 600; }
.htm-stat strong { display: block; font-size: 1.5rem; font-weight: 800; margin: 4px 0 2px; }
.htm-stat small { color: var(--h-muted); font-size: .78rem; }
.htm-stat:first-child { background: var(--h-yellow); border-color: var(--h-yellow); }
.htm-stat:first-child > span, .htm-stat:first-child > small { color: var(--h-black); opacity: .75; }
.htm-howto { margin: 0; padding-left: 1.2em; }
.htm-howto li { margin: 6px 0; }
.htm-list { display: flex; flex-direction: column; gap: 10px; }
.htm-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--h-line); border-radius: 14px; padding: 12px; flex-wrap: wrap; }
.htm-row > img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: none; }
.htm-row__main { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.htm-row__main p { margin: 6px 0 0; }
.htm-row__actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.htm-row__actions a, .htm-row__actions button { font: inherit; font-size: .85rem; font-weight: 700; background: var(--h-bg); border: 0; border-radius: 999px; padding: .45em .9em; cursor: pointer; text-decoration: none; color: var(--h-black); }
.htm-row__actions a:hover, .htm-row__actions button:hover { background: var(--h-line2); }
.htm-row__actions form { margin: 0; }
.htm-row__actions .htm-danger { color: var(--h-err); }
.htm-reason { color: var(--h-err); font-size: .85rem; font-weight: 600; }
.htm-table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--h-line); border-radius: var(--h-r); }
.htm-table { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 0; }
.htm-table th, .htm-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--h-line); white-space: nowrap; }
.htm-table th { background: var(--h-bg); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--h-muted); }
.htm-table tr:last-child td { border-bottom: 0; }

/* Photos */
.htm-photos { border: 1px dashed var(--h-line2); border-radius: 14px; padding: 14px; margin: 0 0 18px; }
.htm-photos legend { font-weight: 700; font-size: .9rem; padding: 0 6px; }
.htm-thumbs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.htm-thumbs:empty { display: none; }
.htm-thumb { position: relative; width: 92px; margin: 0 !important; }
.htm-thumb img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; display: block; }
.htm-thumb input { position: absolute; top: 6px; left: 6px; accent-color: var(--h-black); }
.htm-thumb span { display: block; font-size: .72rem; text-align: center; margin-top: 2px; }
.htm-thumb:has(input:not(:checked)) img { opacity: .3; }
.htm-thumb.is-new img { outline: 2px solid var(--h-yellow); }

/* Show/hide by listing type */
[data-htm-listing].is-pet .htm-only-product, [data-htm-listing].is-product .htm-only-pet { display: none; }

/* Checkout wallet */
.htm-wallet__accounts { list-style: none; padding: 0; margin: 0 0 12px; }
.htm-wallet__accounts li { padding: 8px 12px; background: #FFF6BF; border-radius: 10px; margin-bottom: 6px; }

@media (max-width: 900px) {
	.htm-dash { grid-template-columns: minmax(0, 1fr); }
	.htm-dash__nav { position: static; min-width: 0; }
	.htm-dash__nav nav { scrollbar-width: none; }
	.htm-dash__nav nav { flex-direction: row; overflow-x: auto; }
	.htm-dash__nav nav a { white-space: nowrap; }
	.htm-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
	.htm-grid2, .htm-grid3 { grid-template-columns: 1fr; }
	.htm-steps { grid-template-columns: 1fr; }
	.htm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.htm-pcard__body { padding: 10px; }
	.htm-pcard__meta { flex-direction: column; gap: 2px; }
	.htm-storehead { flex-direction: column; text-align: center; }
	.htm-filters input, .htm-filters select { flex: 1 1 100%; }
}

/* Pet details card (custom product template fallback) */
.htm-petcard { margin: 24px 0; }
.htm-pettable { width: 100%; border-collapse: collapse; margin: 0; }
.htm-pettable th, .htm-pettable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--ht-line, #E8E8EC); font-size: .95rem; }
.htm-pettable th { width: 40%; color: var(--ht-muted, #5F5F67); font-weight: 600; }
.htm-pettable tr:last-child th, .htm-pettable tr:last-child td { border-bottom: 0; }
.htm-pd-extras > [data-htm-move=summary] { margin-top: 4px; }

/* Wider layout for dashboard & marketplace when the theme's page column is narrow */
@media (min-width: 1000px) {
	.htm.htm-dash, .htm-wide {
		width: min(1200px, calc(100vw - 64px));
		max-width: none;
		position: relative;
		left: 50%;
		transform: translateX(-50%);
	}
}
.htm-filters select[name=sort] { flex: 0 1 200px; }
.htm-filters .htm-btn { flex: 0 0 auto; }
.htm-pettable td, .htm-pettable th { font-style: normal !important; background: transparent !important; }
.htm-ask--lg { font-size: 1.6rem; }

.htm-dash > * { min-width: 0; }
@media (max-width: 600px) {
	.htm-row > img { width: 52px; height: 52px; }
	.htm-row__actions { width: 100%; }
	.htm-head .htm-btn { padding: .6em 1em; font-size: .85rem; }
}

/* Homepage marketplace band */
.htm-home .ht-products { margin-bottom: 20px; }
.htm-sellband { display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--h-black); color: #fff; border-radius: 24px; padding: clamp(24px, 4vw, 44px); position: relative; overflow: hidden; max-width: none; }
.htm-sellband::after { content: ""; position: absolute; right: -60px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 212, 0, .25), transparent 70%); pointer-events: none; }
.htm-sellband h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2.1rem); font-weight: 800; margin: 0 0 8px; }
.htm-sellband p { color: #C9C9CF; max-width: 620px; margin: 0 0 12px; }
.htm-sellband__text { flex: 1 1 420px; position: relative; z-index: 1; }
.htm-sellband__cta { display: flex; flex-direction: column; gap: 10px; position: relative; z-index: 1; }
.htm-sellband .htm-btn--ghost { color: #fff !important; }
@media (max-width: 600px) { .htm-sellband__cta { width: 100%; } .htm-sellband__cta .htm-btn { width: 100%; } }
