/* ==========================================================================
   Hello Marketplace — Main Stylesheet
   Apple/Stripe-inspired premium marketplace UI.
   ========================================================================== */

/* -- Design tokens ------------------------------------------------------- */
:root {
	--hm-bg:            #ffffff;
	--hm-bg-alt:        #f6f9fc;
	--hm-border:        #e3e8ef;
	--hm-text:          #0a2540;
	--hm-text-muted:    #425466;
	--hm-text-soft:     #6b7280;
	--hm-accent:        #2563eb;
	--hm-accent-hover:  #1d4ed8;
	--hm-success:       #10b981;
	--hm-danger:        #ef4444;
	--hm-warning:       #f59e0b;

	--hm-radius-sm:     8px;
	--hm-radius-md:     12px;
	--hm-radius-lg:     16px;
	--hm-radius-xl:     24px;

	--hm-shadow-sm:     0 1px 2px rgba(10, 37, 64, .04), 0 1px 3px rgba(10, 37, 64, .06);
	--hm-shadow-md:     0 4px 6px -1px rgba(10, 37, 64, .06), 0 2px 4px -1px rgba(10, 37, 64, .04);
	--hm-shadow-lg:     0 10px 15px -3px rgba(10, 37, 64, .08), 0 4px 6px -2px rgba(10, 37, 64, .04);
	--hm-shadow-xl:     0 20px 25px -5px rgba(10, 37, 64, .10), 0 10px 10px -5px rgba(10, 37, 64, .04);

	--hm-font-sans:     "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--hm-font-display:  "Playfair Display", Georgia, serif;

	--hm-transition:    .2s cubic-bezier(.4, 0, .2, 1);
}

/* -- Base ---------------------------------------------------------------- */
body {
	font-family: var(--hm-font-sans);
	color: var(--hm-text);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* -- Advanced search ----------------------------------------------------- */
.hm-search {
	display: flex;
	align-items: stretch;
	background: #fff;
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius-lg);
	overflow: hidden;
	box-shadow: var(--hm-shadow-sm);
	transition: box-shadow var(--hm-transition), border-color var(--hm-transition);
	max-width: 720px;
	width: 100%;
}
.hm-search:focus-within {
	border-color: var(--hm-accent);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
.hm-search-category {
	background: var(--hm-bg-alt);
	border: none;
	border-right: 1px solid var(--hm-border);
	padding: 0 16px;
	font-size: 14px;
	color: var(--hm-text-muted);
	max-width: 180px;
	cursor: pointer;
}
.hm-search-input {
	flex: 1;
	border: none;
	padding: 14px 18px;
	font-size: 15px;
	background: transparent;
	color: var(--hm-text);
	outline: none;
}
.hm-search-input::placeholder {
	color: var(--hm-text-soft);
}
.hm-search-submit {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: var(--hm-accent);
	color: #fff;
	border: none;
	padding: 0 22px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background var(--hm-transition);
}
.hm-search-submit:hover {
	background: var(--hm-accent-hover);
}
@media (max-width: 640px) {
	.hm-search-category { max-width: 110px; font-size: 13px; }
	.hm-search-submit span { display: none; }
	.hm-search-submit { padding: 0 16px; }
}

/* -- Countdown timer ----------------------------------------------------- */
.hm-countdown {
	background: linear-gradient(135deg, #0a2540 0%, #1d4ed8 100%);
	color: #fff;
	border-radius: var(--hm-radius-md);
	padding: 18px 20px;
	margin: 18px 0;
	box-shadow: var(--hm-shadow-md);
}
.hm-countdown-label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .85;
	margin-bottom: 10px;
}
.hm-countdown-timer {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
}
.hm-countdown-block {
	background: rgba(255, 255, 255, .1);
	border-radius: var(--hm-radius-sm);
	padding: 10px 4px;
	text-align: center;
	backdrop-filter: blur(10px);
}
.hm-countdown-block span {
	display: block;
	font-size: 26px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	margin-bottom: 4px;
}
.hm-countdown-block small {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: .08em;
	opacity: .8;
}
/* Small variant for cards. */
.hm-countdown--sm {
	background: var(--hm-bg-alt);
	color: var(--hm-text);
	padding: 6px 10px;
	font-size: 12px;
	font-weight: 600;
	font-variant-numeric: tabular-nums;
	border-radius: var(--hm-radius-sm);
	display: inline-block;
	box-shadow: none;
}

/* -- Buy It Now ---------------------------------------------------------- */
.hm-buy-it-now-form {
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--hm-border);
}
.hm-buy-it-now {
	width: 100%;
	background: var(--hm-text) !important;
	color: #fff !important;
	padding: 14px 20px !important;
	border-radius: var(--hm-radius-md) !important;
	font-weight: 600 !important;
	font-size: 15px !important;
	transition: transform var(--hm-transition), background var(--hm-transition) !important;
}
.hm-buy-it-now:hover {
	transform: translateY(-1px);
	background: #000 !important;
}
.hm-buy-it-now-note {
	margin-top: 8px;
	font-size: 13px;
	color: var(--hm-text-soft);
	text-align: center;
}

/* -- Auction grid -------------------------------------------------------- */
.hm-auction-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
}
.hm-auction-card {
	display: block;
	background: #fff;
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius-lg);
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform var(--hm-transition), box-shadow var(--hm-transition);
	box-shadow: var(--hm-shadow-sm);
}
.hm-auction-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--hm-shadow-lg);
}
.hm-auction-card__img {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var(--hm-bg-alt);
}
.hm-auction-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .4s ease;
}
.hm-auction-card:hover .hm-auction-card__img img { transform: scale(1.04); }
.hm-auction-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	background: var(--hm-danger);
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 4px 10px;
	border-radius: 999px;
}
.hm-auction-card__body {
	padding: 16px;
}
.hm-auction-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 10px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.hm-auction-card__price {
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
}
.hm-auction-card__price small {
	font-size: 11px;
	color: var(--hm-text-soft);
	text-transform: uppercase;
	letter-spacing: .06em;
}
.hm-auction-card__price strong {
	font-size: 18px;
	color: var(--hm-accent);
	font-weight: 700;
}

/* -- Vendor grid --------------------------------------------------------- */
.hm-vendor-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 20px;
}
.hm-vendor-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 24px 16px;
	background: #fff;
	border: 1px solid var(--hm-border);
	border-radius: var(--hm-radius-lg);
	text-decoration: none;
	color: inherit;
	transition: transform var(--hm-transition), box-shadow var(--hm-transition);
}
.hm-vendor-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--hm-shadow-md);
}
.hm-vendor-card__avatar {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	overflow: hidden;
	margin-bottom: 12px;
	background: var(--hm-bg-alt);
}
.hm-vendor-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.hm-vendor-card__name {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 4px;
}
.hm-vendor-card__sales {
	font-size: 12px;
	color: var(--hm-text-soft);
}

/* -- Utility ------------------------------------------------------------- */
.hm-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -- Print friendliness -------------------------------------------------- */
@media print {
	.hm-search, .hm-countdown, .hm-buy-it-now-form { display: none; }
}
