/*
Theme Name: Halal7
Description: Front end for the Halal7 directory — location search, the 7 sections, map + list results. Requires the Halal7 Core plugin.
Version: 0.2.3
Author: Halal7
Text Domain: halal7
*/

:root {
	--ink: #14231c;
	--ink-2: #4b5a52;
	--ink-3: #7c8a82;
	--bg: #f7f4ec;
	--card: #ffffff;
	--line: #e4ded0;
	--green: #0d5c3f;
	--green-2: #0a4831;
	--green-soft: #e3efe8;
	--gold: #c99a2e;
	--radius: 14px;
	--shadow: 0 1px 2px rgba(20,35,28,.06), 0 6px 20px rgba(20,35,28,.06);
	--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }

/* Header */
.site-header { background: var(--green); color: #fff; position: sticky; top: 0; z-index: 1000; }
.site-header .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; font-size: 22px; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--green-2); display: grid; place-items: center; font-size: 18px; font-weight: 800; }
.brand b { color: var(--gold); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; }
.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.main-nav a { display: block; color: #e6f1ec; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; white-space: nowrap; }
.main-nav a:hover, .main-nav .current a { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
@media (max-width: 1080px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--green-2); padding: 8px 20px 16px; }
	.main-nav.open { display: block; }
	.main-nav ul { flex-direction: column; }
}

/* Hero + search */
.hero { background: radial-gradient(1200px 400px at 80% -10%, #1b7a55 0%, transparent 60%), var(--green); color: #fff; padding: 64px 0 72px; }
.hero h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; max-width: 760px; }
.hero p { color: #cfe3d9; font-size: 18px; max-width: 620px; margin: 0 0 28px; }
.search { display: flex; gap: 8px; background: #fff; padding: 8px; border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.18); max-width: 860px; flex-wrap: wrap; }
.search input, .search select { font: inherit; border: 0; background: transparent; color: var(--ink); padding: 12px 14px; min-width: 0; }
.search input { flex: 2 1 220px; }
.search select { flex: 1 1 170px; border-left: 1px solid var(--line); }
.search input:focus, .search select:focus { outline: 2px solid var(--green-soft); border-radius: 10px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; border: 0; border-radius: 12px; padding: 12px 20px; cursor: pointer; background: var(--green); color: #fff; }
.btn:hover { background: var(--green-2); text-decoration: none; }
.btn-gold { background: var(--gold); color: var(--green-2); }
.btn-gold:hover { background: #b5891f; }
.btn-ghost { background: var(--green-soft); color: var(--green); }
.btn-ghost:hover { background: #d3e6db; }
.near { margin-top: 14px; background: none; border: 0; color: #fff; font: inherit; font-weight: 600; cursor: pointer; opacity: .9; padding: 0; }
.near:hover { opacity: 1; text-decoration: underline; }

/* Sections grid */
.section { padding: 56px 0; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-title h2 { font-size: 26px; margin: 0; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.cat { position: relative; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.cat:hover { transform: translateY(-2px); border-color: var(--green); text-decoration: none; }
.cat-num { position: absolute; top: 18px; right: 20px; font-size: 13px; font-weight: 800; color: var(--gold); }
.cat-icon { width: 46px; height: 46px; border-radius: 12px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-bottom: 14px; }
.cat-icon svg { width: 24px; height: 24px; }
.cat h3 { font-size: 18px; margin-bottom: 4px; }
.cat p { margin: 0; color: var(--ink-2); font-size: 14px; }
.cat .count { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--green); }
.soon { display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--ink-3); background: #f0ece2; padding: 2px 8px; border-radius: 99px; }

/* Page head */
.page-head { background: var(--green); color: #fff; padding: 32px 0; }
.page-head h1 { font-size: 30px; margin: 0 0 4px; }
.page-head p { margin: 0; color: #cfe3d9; }
.page-head .search { margin-top: 20px; box-shadow: none; }

/* Results */
.results { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 20px; padding: 24px 0 56px; align-items: start; }
.results-map { position: sticky; top: 84px; height: calc(100vh - 110px); min-height: 420px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.results-meta { color: var(--ink-2); font-size: 14px; margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.results-meta form { display: inline; }
.results-meta select { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: #fff; }
.note { background: #fff7e3; border: 1px solid #f0dca6; border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }
.place { display: flex; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
.place.active { border-color: var(--green); }
.place-n { flex: 0 0 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }
.place h3 { font-size: 17px; margin: 0 0 2px; }
.place h3 a { color: var(--ink); }
.place .addr { color: var(--ink-2); font-size: 14px; }
.place .tags { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }
.tag { font-size: 12px; font-weight: 600; background: var(--green-soft); color: var(--green); padding: 2px 8px; border-radius: 99px; }
.dist { margin-left: auto; white-space: nowrap; font-weight: 700; font-size: 14px; color: var(--green); }
.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--ink-2); }
@media (max-width: 860px) {
	.results { grid-template-columns: 1fr; }
	.results-map { position: relative; top: 0; height: 320px; min-height: 0; order: -1; }
}

/* Single place */
.single { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; padding: 28px 0 56px; }
.box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.facts { list-style: none; margin: 0; padding: 0; }
.facts li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts b { flex: 0 0 110px; color: var(--ink-3); font-weight: 600; font-size: 14px; }
.verified { display: inline-flex; align-items: center; gap: 6px; background: #fff; color: var(--green); font-size: 13px; font-weight: 700; padding: 3px 10px; border-radius: 99px; margin-top: 10px; }
.mini-map { height: 280px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; }
@media (max-width: 860px) { .single { grid-template-columns: 1fr; } }

/* Generic content */
.content { padding: 40px 0 64px; max-width: 760px; }

/* Footer */
.site-footer { background: #0b2a1f; color: #a9bdb3; padding: 40px 0; font-size: 14px; }
.site-footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.site-footer a { color: #e6f1ec; }

/* Nav CTA */
.main-nav a.nav-cta { background: var(--gold); color: var(--green-2); margin-left: 6px; }
.main-nav a.nav-cta:hover { background: #b5891f; color: var(--green-2); }

/* CTA band */
.cta { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--green-soft); border: 1px solid #c9dfd2; border-radius: var(--radius); padding: 26px 28px; }
.cta h2 { font-size: 22px; margin: 0 0 4px; }
.cta p { margin: 0; color: var(--ink-2); }

/* Forms */
.h7-form h2 { font-size: 18px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid2 .full { grid-column: 1 / -1; }
.h7-form label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.h7-form input, .h7-form select, .h7-form textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.h7-form input:focus, .h7-form select:focus, .h7-form textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.h7-form .req { color: #b4442c; }
.h7-form .hint { color: var(--ink-2); font-size: 14px; margin-top: -6px; }
@media (max-width: 600px) { .grid2 { grid-template-columns: 1fr; } }

/* Dropdown menu */
.main-nav > ul { align-items: center; }
.has-sub { position: relative; }
.sub-toggle { background: none; border: 0; font: inherit; color: #e6f1ec; padding: 8px 10px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.sub-toggle:hover, .has-sub.current > .sub-toggle, .has-sub.open > .sub-toggle { background: rgba(255,255,255,.12); color: #fff; }
.sub-toggle span { font-size: 11px; opacity: .8; }
.main-nav .sub { display: none; position: absolute; top: 100%; left: 0; min-width: 300px; background: #fff; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); padding: 8px; flex-direction: column; gap: 2px; z-index: 10; }
.has-sub.open > .sub { display: flex; }
@media (hover: hover) and (min-width: 1081px) {
	.has-sub:hover > .sub { display: flex; }
	.has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
}
.main-nav .sub a { display: flex; gap: 12px; align-items: flex-start; color: var(--ink); padding: 10px 12px; white-space: normal; }
.main-nav .sub a:hover, .main-nav .sub .current a { background: var(--green-soft); color: var(--ink); }
.sub-icon { flex: 0 0 34px; height: 34px; border-radius: 9px; background: var(--green-soft); color: var(--green); display: grid; place-items: center; }
.sub-icon svg { width: 18px; height: 18px; }
.main-nav .sub strong { display: block; font-size: 14px; }
.main-nav .sub small { display: block; color: var(--ink-3); font-weight: 400; font-size: 12.5px; line-height: 1.4; }
@media (max-width: 1080px) {
	.main-nav > ul { align-items: stretch; }
	.sub-toggle { width: 100%; text-align: left; }
	.main-nav .sub { position: static; box-shadow: none; min-width: 0; margin: 4px 0 8px; }
}

/* Filter chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; padding-top: 20px; }
.chip { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); padding: 7px 14px; border-radius: 99px; font-size: 14px; font-weight: 600; }
.chip svg { width: 16px; height: 16px; }
.chip span { background: #f0ece2; color: var(--ink-2); font-size: 12px; padding: 0 7px; border-radius: 99px; }
.chip:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.chip.on span { background: rgba(255,255,255,.2); color: #fff; }
.chip.zero { opacity: .55; }
.results { padding-top: 16px; }

/* Islamic Tools */
.tools .chips { padding-bottom: 16px; }
.loc-bar { margin-bottom: 18px; }
.loc-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.loc-form input { flex: 1 1 240px; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.loc-now { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 12px; }
.tool { scroll-margin-top: 84px; }
.tool h2 { font-size: 20px; }
.tool-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-head h2 { margin: 0; }
.tool select, .tool input[type=number], .tool input[type=date] { font: inherit; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; background: #fff; }
.madhab { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); margin: 12px 0; }
.times { list-style: none; margin: 0; padding: 0; }
.times li { display: flex; justify-content: space-between; padding: 10px 12px; border-radius: 10px; }
.times li:nth-child(odd) { background: #faf8f2; }
.times li.sun { color: var(--ink-3); }
.times li.next { background: var(--green); color: #fff; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.big { font-size: 28px; font-weight: 800; margin: 6px 0; color: var(--green); }
.compass { position: relative; width: 190px; height: 190px; margin: 6px auto 10px; border-radius: 50%; border: 2px solid var(--line); background: radial-gradient(circle, #fff 60%, var(--green-soft) 100%); }
.compass svg { position: absolute; inset: 12px; width: calc(100% - 24px); height: calc(100% - 24px); transition: transform .4s ease; }
.compass span { position: absolute; font-size: 12px; font-weight: 800; color: var(--ink-3); }
.compass .n { top: 4px; left: 50%; transform: translateX(-50%); color: #b4442c; }
.compass .s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass .e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass .w { left: 6px; top: 50%; transform: translateY(-50%); }
#qibla { text-align: center; }
.conv { margin-top: 14px; }
.conv label { font-size: 14px; color: var(--ink-2); font-weight: 600; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.zgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.zgrid label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.zgrid input, .zgrid select { display: block; width: 100%; margin-top: 4px; }
.nisab { margin: 14px 0; font-size: 14px; }
.nisab summary { cursor: pointer; font-weight: 600; color: var(--green); margin-bottom: 10px; }
.zres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zres > div { background: #faf8f2; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; }
.zres strong { font-size: 18px; }
.zres .due { background: var(--green); color: #fff; }
@media (max-width: 860px) { .tool-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .zgrid, .zres { grid-template-columns: 1fr; } }

/* Ingredient scanner */
.scanner { max-width: 760px; padding-top: 24px; padding-bottom: 56px; }
.scan-box { text-align: center; }
.scan-btn { font-size: 18px; padding: 16px 28px; width: 100%; max-width: 360px; }
.cam { position: relative; margin: 16px auto 0; max-width: 420px; border-radius: 12px; overflow: hidden; background: #000; }
.cam video { display: block; width: 100%; }
.cam-line { position: absolute; left: 10%; right: 10%; top: 50%; height: 2px; background: #e5484d; box-shadow: 0 0 8px #e5484d; }
.scan-form { display: flex; gap: 8px; margin-top: 16px; }
.scan-form input { flex: 1; min-width: 0; font: inherit; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.recent { margin-top: 12px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; align-items: center; }
.recent .chip { cursor: pointer; font: inherit; font-size: 13px; padding: 4px 10px; }
#s-result { margin: 18px 0; }
.verdict { border-left: 6px solid var(--line); }
.v-top { display: flex; gap: 16px; align-items: flex-start; }
.v-top img { width: 84px; height: 84px; object-fit: contain; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.v-top h3 { margin: 2px 0 8px; font-size: 20px; }
.v-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 6px 12px; border-radius: 99px; margin: 0; }
.v-badge span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 13px; }
.v-haram { border-left-color: #c0392b; } .v-haram .v-badge { background: #fdecea; color: #a12b1f; } .v-haram .v-badge span { background: #c0392b; }
.v-doubtful { border-left-color: #d4a017; } .v-doubtful .v-badge { background: #fff6dc; color: #8a6400; } .v-doubtful .v-badge span { background: #d4a017; }
.v-clear { border-left-color: var(--green); } .v-clear .v-badge { background: var(--green-soft); color: var(--green); } .v-clear .v-badge span { background: var(--green); }
.v-unknown .v-badge { background: #f0ece2; color: var(--ink-2); } .v-unknown .v-badge span { background: var(--ink-3); }
.tagline { display: inline-block; margin: 8px 6px 0 0; font-size: 12px; font-weight: 700; background: #f0ece2; padding: 2px 8px; border-radius: 99px; }
.tagline.ok { background: var(--green-soft); color: var(--green); }
.flags { list-style: none; margin: 16px 0 0; padding: 0; }
.flags li { padding: 10px 12px; border-radius: 10px; margin-bottom: 6px; background: #faf8f2; border-left: 4px solid var(--line); }
.flags .f-haram { border-left-color: #c0392b; background: #fdf3f1; }
.flags .f-doubtful { border-left-color: #d4a017; background: #fffaeb; }
.verdict h4 { margin: 18px 0 6px; font-size: 15px; }
.adds { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.verdict details { margin-top: 14px; }
.verdict summary { cursor: pointer; font-weight: 600; color: var(--green); font-size: 14px; }
.disclaimer { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.how h3 { font-size: 17px; }
.legend { list-style: none; padding: 0; margin: 0 0 10px; font-size: 14px; }
.legend li { padding: 5px 0; display: flex; gap: 8px; align-items: baseline; }
.dot { flex: 0 0 10px; height: 10px; border-radius: 50%; display: inline-block; }
.d-haram { background: #c0392b; } .d-doubtful { background: #d4a017; } .d-clear { background: var(--green); }

/* Verified vs listed-from-source */
.verified.unverified { background: rgba(255,255,255,.14); color: #e6f1ec; font-weight: 600; }
.vtag { display: inline-block; vertical-align: middle; margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 1px 7px; border-radius: 99px; }

/* Halal detail filters */
.hfilters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 12px; }
.hf { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); background: #fff; border: 1px dashed var(--line); padding: 5px 12px; border-radius: 99px; cursor: pointer; }
.hf input { accent-color: var(--green); margin: 0; }
.hf.on { border-style: solid; border-color: var(--green); color: var(--green); background: var(--green-soft); }

/* City pages */
.crumbs { font-size: 13px; margin-bottom: 6px; color: #cfe3d9; }
.crumbs a { color: #cfe3d9; }
.city-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.city-list a { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.city-list a:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.city-list span { color: var(--ink-3); font-weight: 400; font-size: 12px; margin-left: 2px; }
.big-list a { font-size: 15px; }
/* Install button */
.nav-install { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35); color: #fff; font: inherit; font-size: 14px; font-weight: 600; padding: 7px 12px; border-radius: 8px; cursor: pointer; }

.foot-links { margin: 8px 0 0; }
.content h2 { font-size: 20px; margin-top: 1.6em; }
.content li { margin-bottom: 6px; }

/* Order box */
.order-box { margin-bottom: 14px; display: flex; flex-direction: column; gap: 8px; }
.order-title { margin: 0 0 4px; font-weight: 800; font-size: 17px; }
.order-btn { width: 100%; }
.order-whatsapp { background: #25d366; color: #fff; }
.order-whatsapp:hover { background: #1eb457; }
.order-box .btn-gold.order-whatsapp { background: #25d366; color: #fff; }
