/* ============================================================
   Public business website — customer-facing
   ------------------------------------------------------------
   This page has one job: get a stranger to trust this business
   and contact it. Everything is subordinate to that.

   Design decisions:
   - --brand is injected per business (5 themes x 10 colours), so
     every accent derives from it via colour-mix. One variable
     changes the whole page.
   - A sticky action bar pins Call + WhatsApp to the thumb for the
     entire scroll. On a phone the contact action is never more
     than one tap away — that is the signature element here.
   - Proof (rating, review count) sits directly under the business
     name, because trust has to land before the pitch does.
   - Type is Hind: the same family carries Latin and Devanagari, so
     a Marathi service name and an English label share a baseline.
   ============================================================ */

:root {
    --brand: #0F7B5A;            /* overridden inline per business */
    --ink:      #16241F;
    --ink-2:    #55665F;
    --ink-3:    #7C8B85;
    --paper:    #FFFFFF;
    --paper-2:  #F4F7F5;
    --line:     #DEE6E2;
    --star:     #B7791F;
    --wa:       #128C7E;

    --r:     14px;
    --r-lg:  20px;
    --r-pill: 999px;

    --font: 'Hind', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bar-h: 76px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16.5px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.18;
    margin: 0 0 .4em;
}
h1 { font-size: 1.95rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.02rem; }
p  { margin: 0 0 1em; }

.wrap { max-width: 620px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-2); }
.small { font-size: .88rem; }
.num   { font-variant-numeric: tabular-nums; }

/* ---------- Preview strip ---------- */
.preview-banner {
    background: #FBEEDA;
    color: #A65A08;
    text-align: center;
    padding: 9px 16px;
    font-size: .86rem;
    font-weight: 600;
}

/* ---------- Header ---------- */
.site-header {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}
.site-header img {
    width: 38px; height: 38px;
    border-radius: 9px;
    object-fit: cover;
    flex-shrink: 0;
}
.site-header .name {
    font-weight: 700;
    font-size: 1.06rem;
    letter-spacing: -0.015em;
}

/* ---------- Hero ---------- */
.hero { padding: 30px 0 26px; }

.service-tag {
    display: inline-block;
    background: color-mix(in srgb, var(--brand) 11%, white);
    color: color-mix(in srgb, var(--brand) 82%, black);
    font-weight: 600;
    font-size: .87rem;
    padding: 6px 14px;
    border-radius: var(--r-pill);
    margin-bottom: 14px;
}

.hero h1 { margin-bottom: .3em; }
.hero-lede { color: var(--ink-2); font-size: 1.04rem; margin-bottom: 18px; }

.hero-img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: var(--r-lg);
    display: block;
    margin-bottom: 20px;
    background: var(--paper-2);
}

/* Proof line directly under the name */
.proof {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    font-size: .93rem;
}
.proof .score { font-weight: 700; font-variant-numeric: tabular-nums; }
.proof .count { color: var(--ink-2); }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 52px;
    padding: 14px 20px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    border: 1.5px solid transparent;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .04s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 19px; height: 19px; flex-shrink: 0; }

.btn-primary   { background: var(--brand); color: #fff; }
.btn-wa        { background: var(--wa); color: #fff; }
.btn-secondary { background: var(--paper); color: var(--ink); border-color: var(--line); }
.btn-row       { display: flex; gap: 10px; }

/* ---------- Sticky contact bar — the signature element ---------- */
.action-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
}
.action-bar-inner {
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}
.action-bar .btn { min-height: 50px; }

/* Everything above the bar needs clearance */
body.has-action-bar { padding-bottom: var(--bar-h); }

/* ---------- Sections ---------- */
section { padding: 30px 0; border-top: 1px solid var(--line); }
section:first-of-type { border-top: none; }

.section-title {
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-2);
    margin-bottom: 14px;
}

/* ---------- Why us ---------- */
.why-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 13px; }
.why-list li { display: flex; gap: 11px; align-items: flex-start; line-height: 1.45; }
.why-list .check {
    width: 23px; height: 23px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 13%, white);
    color: color-mix(in srgb, var(--brand) 85%, black);
    display: grid; place-items: center;
    flex-shrink: 0;
    font-size: .74rem;
    font-weight: 700;
    margin-top: 1px;
}

/* ---------- Products ---------- */
.product-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
}
.product-card:last-child { margin-bottom: 0; }
.product-card img {
    width: 72px; height: 72px;
    border-radius: 11px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--paper-2);
}
.product-card h3 { margin-bottom: 3px; }
.product-card p  { margin: 0; font-size: .91rem; color: var(--ink-2); line-height: 1.45; }

/* ---------- Reviews ---------- */
.review-slider {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 2px 20px 10px;
    margin: 0 -20px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.review-slider::-webkit-scrollbar { display: none; }

.review-card {
    flex: 0 0 84%;
    scroll-snap-align: start;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 17px;
}
.review-card p { font-size: .95rem; line-height: 1.5; margin: 9px 0 0; }
.stars { color: var(--star); letter-spacing: 1.5px; }
.rname { font-weight: 600; margin-top: 11px; }
.rdate { font-size: .8rem; color: var(--ink-3); }

.view-all {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: color-mix(in srgb, var(--brand) 82%, black);
    font-weight: 700;
    text-decoration: none;
    font-size: .93rem;
    margin-top: 6px;
}

/* ---------- Contact form ---------- */
.form-field { margin-bottom: 15px; }
.form-field label {
    display: block;
    font-size: .89rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 11px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--paper);
    color: var(--ink);
}
.form-field input:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, white);
}
.form-field textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1; }
.form-row .cc { flex: 0 0 92px; }

/* ---------- Address ---------- */
.address-line { white-space: pre-line; margin-bottom: 16px; }

/* ---------- Footer ---------- */
footer {
    text-align: center;
    padding: 28px 20px 34px;
    color: var(--ink-3);
    font-size: .84rem;
    border-top: 1px solid var(--line);
}
footer a { color: var(--ink-2); }

/* ---------- Standalone pages (reviews list, review form, thank-you) ---------- */
.page-head { padding: 26px 0 18px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 44px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: .92rem;
    text-decoration: none;
}

.alert {
    padding: 13px 15px;
    border-radius: 11px;
    font-size: .93rem;
    margin-bottom: 16px;
    line-height: 1.45;
}
.alert-error   { background: #FBE9E7; color: #B42318; }
.alert-success { background: color-mix(in srgb, var(--brand) 12%, white); color: color-mix(in srgb, var(--brand) 80%, black); }

.stars-input { display: flex; gap: 6px; }
.stars-input span {
    font-size: 2.1rem;
    line-height: 1;
    cursor: pointer;
    color: #D8DEDA;
    padding: 4px;
    transition: color .1s ease;
}
.stars-input span.active { color: var(--star); }

.confirm-screen { text-align: center; padding: 64px 24px 40px; }
.confirm-mark {
    width: 62px; height: 62px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--brand) 13%, white);
    color: var(--brand);
    display: grid; place-items: center;
    margin: 0 auto 18px;
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}

/* Logo shape declared by the owner — a wide logo must not be cropped
   into a square, and a square one must not be stretched. */
.site-header img.logo-square    { width: 38px; height: 38px; object-fit: cover; border-radius: 9px; }
.site-header img.logo-rectangle { width: auto; max-width: 150px; height: 34px; object-fit: contain; border-radius: 0; }

/* Country code is fixed, so it is shown as a fixed affix rather than an
   editable box the customer has to think about. */
.phone-input { display: flex; align-items: stretch; }
.phone-cc {
    display: flex; align-items: center;
    padding: 0 12px;
    background: var(--paper-2);
    border: 1.5px solid var(--line);
    border-right: none;
    border-radius: 11px 0 0 11px;
    color: var(--ink-2);
    font-weight: 600;
    font-size: .95rem;
}
.phone-input input { border-radius: 0 11px 11px 0 !important; }

/* ---- Photo gallery ("Our work") ---- */
.gallery-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.gallery-item { margin:0; }
.gallery-item img { width:100%; aspect-ratio:4/3; object-fit:cover; border-radius:12px; display:block; }
.gallery-item figcaption { font-size:.82rem; color:var(--muted, #55665F); margin-top:5px; }
@media (min-width:720px) { .gallery-grid { grid-template-columns:repeat(4, 1fr); } }

/* ---- Business hours ---- */
.hours-block { margin:14px 0; }
.open-badge { display:inline-block; font-size:.8rem; font-weight:700; padding:4px 12px; border-radius:999px; margin-bottom:10px; }
.open-badge.open { background:#E1F2EB; color:#0F7B5A; }
.open-badge.closed { background:#FBE9E7; color:#B42318; }
.hours-table { width:100%; max-width:340px; border-collapse:collapse; font-size:.92rem; }
.hours-table td { padding:5px 0; }
.hours-table td:last-child { text-align:right; font-variant-numeric:tabular-nums; }
.hours-table tr.today td { font-weight:700; }

/* ---- Owner reply under a review ---- */
.owner-reply { margin-top:10px; padding:10px 12px; background:rgba(0,0,0,.045); border-radius:10px; border-left:3px solid var(--brand); }
.owner-reply-tag { display:block; font-size:.76rem; font-weight:700; color:var(--brand); margin-bottom:3px; }
.owner-reply p { margin:0; font-size:.9rem; }

/* ---- Country-code dropdown inside phone fields ---- */
.phone-input .phone-cc-select { flex: 0 0 auto; width: 104px; padding: 0 6px; border: 1px solid var(--line); border-right: none; border-radius: var(--r) 0 0 var(--r); background: var(--paper-2); font: inherit; font-size: .9rem; color: inherit; }
.phone-input input { flex: 1; min-width: 0; }

/*
 * Nothing a business types may push its own website wider than a phone.
 *
 * An email address, a web address or a long word has no space in it, so a
 * browser will make the page as wide as that word unless told otherwise.
 * One address — customer.support.<longname>@gmail.com — laid fourteen of
 * the twenty-two themes out at up to 493px on a 390px screen. The visitor
 * gets a page that slides sideways, and the business looks broken through
 * no fault of its own.
 *
 * The older rules come first on purpose: an inexpensive Android phone runs
 * an older WebView that ignores overflow-wrap: anywhere, and those are the
 * phones these sites are read on.
 *
 * Breaking is allowed only where it is needed — inside text a business
 * supplies. A word only breaks when it genuinely cannot fit.
 */
html, body { overflow-x: hidden; }

h1, h2, h3, h4, p, li, td, th, dd, dt, address, blockquote, figcaption, summary, label, a, span, b, strong, em, small {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Grid and flex children default to a minimum of their longest word, which
   is what lets one address widen a whole card. */
[class*="grid"] > *, [class*="row"] > *, [class*="col"] > *,
[class*="card"], [class*="box"], [class*="item"] { min-width: 0; }

img, svg, video, iframe, table { max-width: 100%; }
