/* A workspace's public website (resources/views/site). One layout for every
   workspace; --brand is the owner's colour from Website → Site Content. */
:root {
    --brand: #0f766e;
    --brand-ink: #ffffff;
    --ink: #1f2937;
    --muted: #6b7280;
    --line: #e5e7eb;
    --soft: #f6f7f9;
    --card: #ffffff;
    --bg: #ffffff;
    --danger: #b91c1c;
    --ok: #15803d;
    --warn: #b45309;
    --radius: 14px;
}
@media (prefers-color-scheme: dark) {
    :root { --ink: #e5e7eb; --muted: #9ca3af; --line: #2d333b; --soft: #161b22; --card: #1c2128; --bg: #0d1117; --danger: #f87171; --ok: #4ade80; --warn: #fbbf24; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.55; font-size: 16px; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* Header */
.s-head { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.s-head .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.s-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.s-brand:hover { text-decoration: none; }
.s-brand img { height: 40px; width: auto; border-radius: 8px; }
.s-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.s-nav a { color: var(--ink); padding: 8px 10px; border-radius: 10px; font-size: .95rem; }
.s-nav a:hover, .s-nav a.on { background: var(--soft); text-decoration: none; }
.s-cart { position: relative; }
.s-badge { position: absolute; top: 0; right: -2px; background: var(--brand); color: var(--brand-ink); border-radius: 999px; font-size: .7rem; min-width: 18px; height: 18px; display: grid; place-items: center; padding: 0 5px; }
.s-menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 8px 12px; font-size: 1rem; }
@media (max-width: 760px) {
    .s-menu-btn { display: block; }
    .s-nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 14px; }
    .s-nav.open { display: flex; }
    .s-nav a { padding: 12px 10px; }
}

/* Buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 11px 18px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; filter: brightness(.95); }
.btn-brand { background: var(--brand); color: var(--brand-ink); }
.btn-line { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { width: 100%; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 11px 12px; font: inherit; }
.field:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
label.lbl { display: block; font-weight: 600; font-size: .9rem; margin: 12px 0 5px; }
.hint { color: var(--muted); font-size: .88rem; }

/* Notices */
.notice { border-radius: 12px; padding: 12px 14px; margin: 16px 0; border: 1px solid var(--line); background: var(--soft); }
.notice.ok { border-color: var(--ok); }
.notice.err { border-color: var(--danger); color: var(--danger); }
.notice ul { margin: 0; padding-left: 18px; }

/* Hero */
.hero { position: relative; border-radius: 22px; overflow: hidden; margin: 22px 0; background: var(--brand); color: var(--brand-ink); min-height: 300px; display: flex; align-items: center; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .4; }
.hero .in { position: relative; padding: 44px 32px; max-width: 640px; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.7rem); line-height: 1.15; margin: 0 0 12px; }
.hero p { font-size: 1.08rem; margin: 0 0 20px; opacity: .95; white-space: pre-line; }
.hero .btn-brand { background: var(--brand-ink); color: var(--brand); }
/* Several slides: one section, the slides stacked in one grid cell (the tallest sets the
   height) and faded between; arrows at the sides, dots over the foot of the banner. */
.hero-slider { position: relative; margin: 22px 0; border-radius: 22px; overflow: hidden; }
.hero-slider .slides { display: grid; }
.hero-slider .hero { grid-area: 1 / 1; margin: 0; opacity: 0; visibility: hidden; transition: opacity .7s ease, visibility .7s; }
.hero-slider .hero.on { opacity: 1; visibility: visible; }
.hero-slider .hero img.bg { transform: scale(1.06); transition: transform 7s ease-out; }
.hero-slider .hero.on img.bg { transform: scale(1); }
.hero-slider .hero .in > * { transform: translateY(14px); opacity: 0; transition: transform .6s ease .15s, opacity .6s ease .15s; }
.hero-slider .hero.on .in > * { transform: none; opacity: 1; }
.hero-slider .hero .in { padding: 44px 76px 56px; }
.hero-arrow { position: absolute; top: 50%; z-index: 3; width: 46px; height: 46px; margin-top: -23px; border-radius: 50%; border: 0; cursor: pointer;
    display: grid; place-items: center; font-size: 1rem; color: var(--brand); background: rgba(255, 255, 255, .88);
    box-shadow: 0 6px 18px rgba(0, 0, 0, .18); transition: transform .2s ease, background .2s ease, opacity .2s ease; opacity: .85; }
.hero-arrow:hover, .hero-arrow:focus-visible { opacity: 1; transform: scale(1.08); background: #fff; outline: none; }
.hero-arrow.prev { left: 16px; }
.hero-arrow.next { right: 16px; }
.hero-dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 3; display: flex; gap: 8px; justify-content: center; }
.hero-dots button { width: 10px; height: 10px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .55); cursor: pointer; padding: 0; transition: width .3s ease, background .3s ease; }
.hero-dots button.on { background: var(--brand-ink); width: 28px; }
@media (max-width: 640px) {
    .hero-slider .hero .in { padding: 32px 22px 52px; }
    .hero-arrow { width: 36px; height: 36px; font-size: .85rem; top: auto; bottom: 8px; margin-top: 0; }
    .hero-arrow.prev { left: 10px; }
    .hero-arrow.next { right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-slider .hero, .hero-slider .hero img.bg, .hero-slider .hero .in > * { transition: none; }
}

/* Sections */
.sec { margin: 40px 0; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head h2 { margin: 0; font-size: 1.5rem; }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.feature { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: var(--radius); padding: 16px; }
.feature i { font-size: 1.4rem; color: var(--brand); width: 28px; text-align: center; margin-top: 3px; }
.feature h3 { margin: 0 0 3px; font-size: 1rem; }
.feature p { margin: 0; color: var(--muted); font-size: .92rem; }

/* Products */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card .pic { aspect-ratio: 1 / 1; background: var(--soft); display: grid; place-items: center; color: var(--muted); font-size: 2rem; position: relative; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.card .name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.card .price { font-weight: 700; color: var(--brand); }
.card form { margin-top: auto; }
.tag { display: inline-block; font-size: .75rem; padding: 2px 8px; border-radius: 99px; background: var(--soft); color: var(--muted); }
.tag.out { color: var(--danger); }
.fav { position: absolute; top: 8px; right: 8px; }
.fav button { border: 0; background: var(--card); width: 34px; height: 34px; border-radius: 99px; cursor: pointer; color: var(--muted); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.fav button.on { color: #e11d48; }

/* Product page */
.product { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin: 26px 0; }
@media (max-width: 760px) { .product { grid-template-columns: 1fr; gap: 18px; } }
.product .pic { border-radius: 18px; overflow: hidden; background: var(--soft); aspect-ratio: 1 / 1; display: grid; place-items: center; font-size: 4rem; color: var(--muted); }
.product .pic img { width: 100%; height: 100%; object-fit: cover; }
.product h1 { margin: 0 0 6px; font-size: 1.8rem; }
.product .price { font-size: 1.5rem; font-weight: 700; color: var(--brand); margin: 6px 0 14px; }
.product .desc { white-space: pre-line; color: var(--ink); }
.qty-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 18px 0; }
.qty-row .field { width: 90px; }

/* Tables (cart, orders) */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th, .tbl td { text-align: left; padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { color: var(--muted); font-weight: 600; font-size: .85rem; }
.tbl .r { text-align: right; white-space: nowrap; }
.tbl .field { width: 80px; padding: 8px; }
@media (max-width: 640px) {
    .tbl.stack thead { display: none; }
    .tbl.stack tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
    .tbl.stack td { border: 0; padding: 2px 0; }
}
.totals { margin-left: auto; max-width: 360px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { font-weight: 700; font-size: 1.15rem; border-top: 2px solid var(--ink); margin-top: 6px; padding-top: 10px; }

/* Two-column pages (checkout, account) */
.cols { display: grid; grid-template-columns: 1fr 380px; gap: 28px; margin: 24px 0; align-items: start; }
@media (max-width: 860px) { .cols { grid-template-columns: 1fr; } }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { margin-top: 0; font-size: 1.15rem; }
.acc-nav { display: flex; gap: 6px; flex-wrap: wrap; margin: 22px 0 6px; }
.acc-nav a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--ink); }
.acc-nav a.on { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.acc-nav a:hover { text-decoration: none; }
.auth { max-width: 440px; margin: 40px auto; }

/* Status */
.st { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--soft); }
.st-warning { color: var(--warn); } .st-info { color: #2563eb; } .st-primary { color: var(--brand); } .st-success { color: var(--ok); } .st-danger { color: var(--danger); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 16px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 99px; background: var(--brand); }
.timeline li:last-child { border-left-color: transparent; }
.timeline small { color: var(--muted); display: block; }

/* FAQ, page text, footer */
details.faq { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; background: var(--card); }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 10px 0 0; white-space: pre-line; color: var(--muted); }
.page-text { white-space: pre-line; max-width: 760px; }
.s-foot { margin-top: 60px; background: var(--soft); border-top: 1px solid var(--line); padding: 34px 0 20px; font-size: .93rem; }
.s-foot .cols3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 22px; }
.s-foot h4 { margin: 0 0 8px; font-size: 1rem; }
.s-foot a { color: var(--ink); display: block; padding: 3px 0; }
.s-foot .base { margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.s-foot .base a { display: inline; color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 50px 10px; }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 10px; }
.wa { position: fixed; right: 16px; bottom: 16px; width: 54px; height: 54px; border-radius: 99px; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 1.6rem; box-shadow: 0 4px 14px rgba(0,0,0,.2); z-index: 30; }
.wa:hover { text-decoration: none; }

/* Urdu: the page runs right to left (layout sets dir="rtl"); Nastaliq for the words. */
[dir="rtl"] body { font-family: "Noto Nastaliq Urdu", -apple-system, "Segoe UI", Roboto, Arial, sans-serif; line-height: 2; }
[dir="rtl"] .s-nav { margin-left: 0; margin-right: auto; }
[dir="rtl"] .s-menu-btn { margin-left: 0; margin-right: auto; }
[dir="rtl"] .tbl th, [dir="rtl"] .tbl td { text-align: right; }
[dir="rtl"] .tbl .r { text-align: left; }
[dir="rtl"] .totals { margin-left: 0; margin-right: auto; }
[dir="rtl"] .fav { right: auto; left: 8px; }
[dir="rtl"] .wa { right: auto; left: 16px; }
[dir="rtl"] .timeline li { border-left: 0; border-right: 2px solid var(--line); padding: 0 22px 16px 0; margin: 0 6px 0 0; }
[dir="rtl"] .timeline li::before { left: auto; right: -7px; }
[dir="rtl"] .fa-arrow-right, [dir="rtl"] .fa-arrow-left { transform: scaleX(-1); }
/* Numbers, prices, phones and emails read left to right inside Urdu text. */
[dir="rtl"] .price, [dir="rtl"] input[type="email"], [dir="rtl"] input[inputmode="tel"] { direction: ltr; unicode-bidi: isolate; }
