/* Fort Mill Sun Business Directory */
.fmsd {
	--fmsd-accent: #0b3d6b;
	--fmsd-gold: #c9971c;
	--fmsd-gold-soft: #fdf6e3;
	--fmsd-ink: #1d2327;
	--fmsd-muted: #5f6b76;
	--fmsd-line: #dfe3e8;
	--fmsd-bg: #ffffff;
	--fmsd-radius: 10px;
	color: var(--fmsd-ink);
	font-size: 16px;
	line-height: 1.5;
	box-sizing: border-box;
}
.fmsd *, .fmsd *::before, .fmsd *::after { box-sizing: inherit; }
.fmsd [hidden] { display: none !important; }
.fmsd-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.fmsd-btn {
	display: inline-block;
	padding: .6em 1.1em;
	border-radius: 999px;
	background: var(--fmsd-accent);
	color: #fff !important;
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none !important;
	border: 0;
	cursor: pointer;
	line-height: 1.2;
	transition: filter .15s;
}
.fmsd-btn:hover { filter: brightness(1.12); }
.fmsd-btn-gold { background: var(--fmsd-gold); color: #1d1500 !important; }
.fmsd-link { color: var(--fmsd-accent); font-weight: 600; }

/* Toolbar */
.fmsd-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin-bottom: 14px;
}
.fmsd-search { flex: 1 1 240px; }
.fmsd-search input {
	width: 100%;
	padding: .65em 1em;
	border: 1px solid var(--fmsd-line);
	border-radius: 999px;
	font-size: 1rem;
	background: var(--fmsd-bg);
}
.fmsd-search input:focus { outline: 2px solid var(--fmsd-accent); outline-offset: 1px; }
.fmsd-towns { display: flex; gap: 4px; background: #f1f3f5; padding: 4px; border-radius: 999px; }
.fmsd-town {
	padding: .4em .9em;
	border-radius: 999px;
	text-decoration: none !important;
	color: var(--fmsd-muted) !important;
	font-weight: 600;
	font-size: .9rem;
	white-space: nowrap;
}
.fmsd-town.is-active { background: var(--fmsd-bg); color: var(--fmsd-accent) !important; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.fmsd-ctas { display: flex; gap: 8px; flex-wrap: wrap; }

/* Category tabs */
.fmsd-tabs {
	border-bottom: 2px solid var(--fmsd-line);
	margin-bottom: 22px;
	position: relative;
}
.fmsd-tabs-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 4px;
}
.fmsd-tab {
	flex: 0 0 auto;
	padding: .7em 1em;
	text-decoration: none !important;
	color: var(--fmsd-muted) !important;
	font-weight: 600;
	font-size: .93rem;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	white-space: nowrap;
}
.fmsd-tab:hover { color: var(--fmsd-ink) !important; }
.fmsd-tab.is-active { color: var(--fmsd-accent) !important; border-bottom-color: var(--fmsd-accent); }

/* Category dropdown */
.fmsd-catform { flex: 0 1 280px; margin: 0; display: flex; gap: 6px; }
.fmsd-cat {
	width: 100%;
	padding: .65em 2.4em .65em 1em;
	border: 1px solid var(--fmsd-line);
	border-radius: 999px;
	font: inherit;
	font-size: 1rem;
	color: var(--fmsd-ink);
	background: var(--fmsd-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%235f6b76' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 1em center;
	-webkit-appearance: none;
	appearance: none;
	cursor: pointer;
}
.fmsd-cat:focus { outline: 2px solid var(--fmsd-accent); outline-offset: 1px; }

/* Get listed / sponsor banner */
.fmsd-cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 20px;
	background: var(--fmsd-gold-soft);
	border: 1px solid #ecd9a0;
	border-left: 5px solid var(--fmsd-gold);
	border-radius: var(--fmsd-radius);
	padding: 14px 18px;
	margin: 0 0 18px;
}
.fmsd-cta-bottom { margin: 28px 0 0; }
.fmsd-cta-text { flex: 1 1 320px; font-size: .98rem; }
.fmsd-cta-text strong { color: var(--fmsd-ink); }
.fmsd-cta-btns { display: flex; flex-wrap: wrap; gap: 8px; }

/* Sections */
.fmsd-section-title {
	font-size: 1.25rem;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	gap: .4em;
}
.fmsd-star { color: var(--fmsd-gold); }
.fmsd-sponsors {
	background: var(--fmsd-gold-soft);
	border: 1px solid #ecd9a0;
	border-radius: 14px;
	padding: 18px;
	margin-bottom: 28px;
}

/* Grid and cards */
.fmsd-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 16px;
}
.fmsd-grid-sponsors { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.fmsd-card {
	background: var(--fmsd-bg);
	border: 1px solid var(--fmsd-line);
	border-radius: var(--fmsd-radius);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	transition: box-shadow .15s, transform .15s;
}
.fmsd-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); transform: translateY(-1px); }
.fmsd-card-sponsor { border: 2px solid var(--fmsd-gold); }
.fmsd-card-head { display: flex; gap: 12px; align-items: flex-start; }
.fmsd-logo {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: #f1f3f5;
	display: flex;
	align-items: center;
	justify-content: center;
}
.fmsd-card-sponsor .fmsd-logo { flex-basis: 72px; width: 72px; height: 72px; }
.fmsd-logo img { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.fmsd-logo-mono { background: var(--fmsd-accent); color: #fff; font-weight: 700; font-size: 1.5rem; }
.fmsd-card-title { min-width: 0; }
.fmsd-card h3 { margin: 0; font-size: 1.08rem; line-height: 1.3; }
.fmsd-card h3 a { color: var(--fmsd-ink); text-decoration: none; }
.fmsd-card h3 a:hover { color: var(--fmsd-accent); text-decoration: underline; }
.fmsd-meta-line { margin: 2px 0 0; font-size: .85rem; color: var(--fmsd-muted); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fmsd-town-pill {
	background: #eef3f8;
	color: var(--fmsd-accent);
	padding: 1px 8px;
	border-radius: 999px;
	font-size: .75rem;
	font-weight: 600;
}
.fmsd-badge {
	display: inline-block;
	background: var(--fmsd-gold);
	color: #1d1500;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 4px;
	margin-bottom: 4px;
}
.fmsd-summary { margin: 0; font-size: .92rem; color: #3c434a; }
.fmsd-contact { list-style: none; margin: auto 0 0; padding: 0; font-size: .88rem; }
.fmsd-contact li { margin: 2px 0; overflow-wrap: anywhere; }
.fmsd-contact a { color: var(--fmsd-accent); text-decoration: none; }
.fmsd-contact a:hover { text-decoration: underline; }
.fmsd-hours { color: var(--fmsd-muted); }
.fmsd-empty { text-align: center; padding: 30px 10px; color: var(--fmsd-muted); }

/* Submission form */
.fmsd-form fieldset {
	border: 1px solid var(--fmsd-line);
	border-radius: var(--fmsd-radius);
	padding: 16px 18px 6px;
	margin: 0 0 18px;
}
.fmsd-form legend { font-weight: 700; padding: 0 6px; }
.fmsd-row { margin-bottom: 14px; }
.fmsd-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fmsd-form label { display: block; font-weight: 600; font-size: .92rem; }
.fmsd-form input[type=text],
.fmsd-form input[type=email],
.fmsd-form input[type=tel],
.fmsd-form input[type=file],
.fmsd-form select,
.fmsd-form textarea {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: .55em .7em;
	border: 1px solid #c3c9cf;
	border-radius: 6px;
	font: inherit;
	font-weight: 400;
	background: #fff;
}
.fmsd-form input:focus, .fmsd-form select:focus, .fmsd-form textarea:focus { outline: 2px solid var(--fmsd-accent); outline-offset: 0; }
.fmsd-form .req { color: #b32d2e; }
.fmsd-check { display: flex !important; gap: 10px; align-items: flex-start; font-weight: 400 !important; margin-bottom: 12px; }
.fmsd-check input { margin-top: 4px; flex: 0 0 auto; }
.fmsd-sponsor-opt { background: var(--fmsd-gold-soft); border-color: #ecd9a0 !important; }
.fmsd-benefits { margin: 4px 0 12px 30px; font-size: .9rem; }
.fmsd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Notices */
.fmsd-notice { border-radius: var(--fmsd-radius); padding: 14px 18px; margin-bottom: 18px; }
.fmsd-notice h3 { margin-top: 0; }
.fmsd-notice-ok { background: #edf7ee; border: 1px solid #b7dfba; }
.fmsd-notice-err { background: #fcf0f1; border: 1px solid #f0b8bd; color: #8a1f28; }

/* Sponsor box */
.fmsd-sponsor-box {
	background: var(--fmsd-gold-soft);
	border: 2px solid var(--fmsd-gold);
	border-radius: 14px;
	padding: 20px 22px;
}
.fmsd-sponsor-box h3 { margin: 0 0 4px; }
.fmsd-price { font-size: 1.4rem; font-weight: 700; margin: 0 0 8px; }
.fmsd-sponsor-box .fmsd-benefits { margin-left: 20px; }
.fmsd-sponsor-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin: 0; }

/* Single listing */
.fmsd-single { border: 1px solid var(--fmsd-line); border-radius: var(--fmsd-radius); padding: 16px 18px; margin-bottom: 22px; }
.fmsd-details { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 8px; }
.fmsd-details dt { font-weight: 700; color: var(--fmsd-muted); }
.fmsd-details dd { margin: 0; overflow-wrap: anywhere; }
.fmsd-details a { color: var(--fmsd-accent); }

@media (max-width: 640px) {
	.fmsd-row-2 { grid-template-columns: 1fr; }
	.fmsd-catform { flex: 1 1 100%; }
	.fmsd-towns { width: 100%; justify-content: stretch; }
	.fmsd-town { flex: 1; text-align: center; }
	.fmsd-cta-btns { width: 100%; flex-direction: column; }
	.fmsd-cta-btns .fmsd-btn { flex: 1; text-align: center; }
	.fmsd-tabs-inner {
		flex-wrap: nowrap;
		overflow-x: auto;
		overflow-y: hidden;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
	}
	.fmsd-tabs-inner::-webkit-scrollbar { display: none; }
	.fmsd-sponsors { padding: 12px; }
	.fmsd-grid, .fmsd-grid-sponsors { grid-template-columns: 1fr; }
	.fmsd-details { grid-template-columns: 1fr; }
	.fmsd-details dd { margin-bottom: 6px; }
}
