/*
 * price-pages.css
 * Shared stylesheet for all ipin.com.pk price pages
 * (Petrol · Gold/Silver/Copper · Steel)
 *
 * Upload to: /home/u481013021/domains/ipin.com.pk/public_html/price-assets/price-pages.css
 * Linked at:  https://ipin.com.pk/price-assets/price-pages.css
 *
 * Accent colours are set per-page via a tiny inline <style> block:
 *   Fuel   → --acc:#534AB7  --acc-bg:#EEEDFE  --acc-dim:#3C3489
 *   Metals → --acc:#854F0B  --acc-bg:#FAEEDA  --acc-dim:#633806
 *   Steel  → --acc:#3B6D11  --acc-bg:#EAF3DE  --acc-dim:#2A5009
 */

/* ─── DEFAULTS ─────────────────────────────────────────────────────────────── */
:root {
  --acc:       #534AB7;
  --acc-bg:    #EEEDFE;
  --acc-dim:   #3C3489;
  --green:     #3B6D11;
  --green-bg:  #EAF3DE;
  --amber:     #633806;
  --amber-bg:  #FAEEDA;
  --red:       #A32D2D;
  --red-bg:    #FCEBEB;
  --ink:       #1a1a1a;
  --muted:     #555;
  --border:    #e5e5e5;
  --page:      #FAFAF8;
}

/* ─── RESET ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── BASE TYPOGRAPHY ────────────────────────────────────────────────────────
   Google recommends 16px base. We use 16px body, 15px secondary, 14px minimum.
   This improves Core Web Vitals and Google rich snippet legibility.
   ─────────────────────────────────────────────────────────────────────────── */
body {
  background: var(--page);
  color: var(--ink);
  font-family: 'Poppins', -apple-system, Segoe UI, Helvetica Neue, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Poppins', Georgia, 'Times New Roman', serif;
  line-height: 1.2;
  color: var(--ink);
}

p { margin-bottom: 0; }

a { color: var(--acc); }

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.wrap {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 16px 80px;
}

/* ─── BREADCRUMB ────────────────────────────────────────────────────────────
   Google uses breadcrumbs for BreadcrumbList rich results.
   ─────────────────────────────────────────────────────────────────────────── */
.crumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.crumb a {
  color: #666;
  text-decoration: none;
}
.crumb a:hover { color: var(--acc); }

/* ─── BADGES ─────────────────────────────────────────────────────────────── */
.badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 14px;       /* was 12.5px — raised to 14px minimum */
  font-weight: 600;
}
.badge.purple { background: var(--acc-bg); color: var(--acc-dim); }
.badge.green  { background: var(--green-bg); color: var(--green); }
.badge.amber  { background: var(--amber-bg); color: var(--amber); }
.badge.red    { background: var(--red-bg); color: var(--red); }
.live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--red);
  animation: pulse 1.3s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ─── HEADER CARD ────────────────────────────────────────────────────────── */
.hcard {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--acc);
  border-radius: 10px;
  padding: 24px 26px;
  margin-bottom: 18px;
}
h1 {
  font-size: 32px;
  margin: 0 0 6px;
}
.meta {
  color: var(--muted);
  font-size: 14px;           /* was 13px — raised */
  margin: 0 0 18px;
}

/* ─── PRICE STRIP ────────────────────────────────────────────────────────── */
.pstrip {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #FAFAFE, #F3F1FD);
  border: 1px solid #E5E2FA;
  border-radius: 10px;
  padding: 16px 20px;
}
.pstrip.gold-strip {
  background: linear-gradient(135deg, #FFFBF3, #FDF3E0);
  border-color: #F5E5C8;
}
.pstrip.steel-strip {
  background: linear-gradient(135deg, #F3FAF0, #EAF3DE);
  border-color: #C8E4B8;
}
.pbig {
  font-family: 'Poppins', Georgia, serif;
  font-size: 38px;
  font-weight: 700;
  color: var(--acc);
}
.punit {
  font-size: 14px;           /* was 13px */
  color: var(--muted);
}
.pbadge {
  font-weight: 700;
  font-size: 14px;           /* was 13.5px */
  padding: 4px 12px;
  border-radius: 6px;
}
.pbadge.up { background: var(--green-bg); color: var(--green); }
.pbadge.dn { background: var(--red-bg);   color: var(--red); }
.pbadge.fl { background: #f2f2f2;         color: #888; }

/* ─── CARDS ──────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 16px;
}

/* Section label — kept slightly smaller as a UI element, but min 13px */
.lbl {
  font-size: 13px;           /* was 10.5px — raised significantly */
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #888;
  margin: 0 0 14px;
}

/* ─── TWO-COLUMN LAYOUT ─────────────────────────────────────────────────── */
.two {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.half {
  flex: 1;
  min-width: 260px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 20px;
}
.half ul {
  padding-left: 20px;
  font-size: 15px;           /* was 14px — raised */
  line-height: 1.9;
}
.half li { margin-bottom: 4px; }

/* Urdu commentary — Google reads this for regional relevance */
.urdu {
  direction: rtl;
  text-align: right;
  font-family: 'Noto Nastaliq Urdu', 'Jameel Noori Nastaleeq', serif;
  font-size: 18px;           /* already good */
  line-height: 2.4;
  color: #222;
}

/* ─── TREND SPARKLINE ────────────────────────────────────────────────────── */
.trend-stats {
  font-size: 14px;           /* was 12.5px — raised */
  color: #666;
  margin-top: 10px;
  line-height: 1.6;
}
.trend-stats b { color: var(--ink); }

/* ─── PRICE TABLE ────────────────────────────────────────────────────────────
   Google reads structured tables for Dataset and table rich results.
   All table text must be clearly legible — min 14px for cells.
   ─────────────────────────────────────────────────────────────────────────── */
table.pt {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;           /* was 14px — raised */
}
.pt th {
  text-align: left;
  font-size: 13px;           /* was 10px — raised significantly */
  text-transform: uppercase;
  letter-spacing: .04em;
  font-weight: 700;
  color: #888;
  border-bottom: 2px solid #eee;
  padding: 10px 8px;
}
.pt td {
  padding: 12px 8px;
  border-bottom: 1px solid #f1f1f1;
  font-size: 15px;
}
.pt tr:last-child td { border-bottom: none; }
.fn {
  font-weight: 600;
  font-size: 15px;
}
.fs {
  display: block;
  font-size: 14px;           /* was 11px — raised */
  color: #888;
  margin-top: 2px;
  font-weight: 400;
}

/* Change badges */
.chg {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 14px;           /* was 12px — raised */
  padding: 3px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.chg.up { background: var(--green-bg); color: var(--green); }
.chg.dn { background: var(--red-bg);   color: var(--red); }
.chg.fl { background: #f2f2f2;         color: #888; }

/* ─── MOBILE TABLE — stacked cards ─────────────────────────────────────────
   Critical for Core Web Vitals on mobile.
   ─────────────────────────────────────────────────────────────────────────── */
@media (max-width: 560px) {
  .pt thead { display: none; }
  .pt, .pt tbody, .pt tr, .pt td { display: block; width: 100%; }
  .pt tr {
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
  }
  .pt td {
    border-bottom: none;
    padding: 6px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 15px;
  }
  .pt td:before {
    content: attr(data-l);
    font-size: 13px;         /* was 10px */
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #aaa;
    font-weight: 700;
    flex-shrink: 0;
  }
  .pt td.fn-cell {
    display: block;
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px dashed #eee;
  }
  .pt td.fn-cell:before { display: none; }
}

/* ─── STEEL — GRADE PILLS ────────────────────────────────────────────────── */
.grade-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.grade-pill {
  flex: 1;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  text-align: center;
}
.grade-pill .gname {
  font-size: 13px;           /* UI label */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #888;
  margin-bottom: 8px;
}
.grade-pill .gprice {
  font-family: 'Poppins', Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--acc);
}
.grade-pill .gunit {
  font-size: 14px;
  color: var(--muted);
  margin-top: 2px;
}
.grade-pill .gton {
  font-size: 14px;           /* was 12.5px — raised */
  color: #777;
  margin-top: 6px;
}

/* ─── NEWS TICKER ────────────────────────────────────────────────────────── */
.ticker {
  background: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}
.ticker-tag {
  background: var(--acc);
  color: #fff;
  font-size: 13px;           /* was 10.5px — raised */
  font-weight: 700;
  letter-spacing: .05em;
  padding: 12px 16px;
  white-space: nowrap;
}
.ticker-outer { overflow: hidden; flex: 1; }
#tickerInner {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  padding: 12px 16px;
  font-size: 14px;           /* was 13px — raised */
}
#tickerInner a { color: #fff; text-decoration: none; }
#tickerInner a:hover { text-decoration: underline; }
.ticker-hint {
  font-size: 14px;           /* was 12px — raised */
  color: #888;
  margin: 0 0 16px;
}

/* Source tags */
.stag {
  font-size: 12px;           /* was 9.5px — raised */
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}
.stag.ext { background: #f2f2f2; color: #777; }
.stag.int { background: var(--acc-bg); color: var(--acc-dim); }

/* ─── PRICE ALERT ────────────────────────────────────────────────────────── */
.alert-card {
  background: linear-gradient(135deg, #F3F1FD, #FAFAFE);
  border: 1px solid #E5E2FA;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}
.alert-card.gold-alert {
  background: linear-gradient(135deg, #FFFBF3, #FDF3E0);
  border-color: #F5E5C8;
}
.alert-card.steel-alert {
  background: linear-gradient(135deg, #F3FAF0, #EAF3DE);
  border-color: #C8E4B8;
}
.alert-card p {
  font-size: 14px;
  color: #555;
  margin-bottom: 12px;
}
.alert-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.alert-row input {
  flex: 1;
  min-width: 160px;
  padding: 11px 14px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 15px;           /* was 13.5px — raised */
  color: var(--ink);
}
.alert-row button {
  padding: 11px 20px;
  border-radius: 8px;
  border: none;
  background: var(--acc);
  color: #fff;
  font-weight: 600;
  font-size: 15px;           /* was 13.5px — raised */
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.alert-row button:hover { opacity: .9; }

/* ─── EXTERNAL NEWS CARDS ────────────────────────────────────────────────── */
.news-grid { display: flex; flex-direction: column; gap: 10px; }
.nc {
  display: flex;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.nt {
  width: 54px; height: 54px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.nc .title {
  font-weight: 600;
  font-size: 15px;           /* was 14px — raised */
  margin: 0 0 4px;
}
.nc .title a { color: var(--ink); text-decoration: none; }
.nc .title a:hover { color: var(--acc); }
.nc .snip {
  font-size: 14px;           /* was 12.5px — raised */
  color: #666;
  margin: 0 0 4px;
  line-height: 1.6;
}
.nc .nmeta {
  font-size: 14px;           /* was 11.5px — raised */
  color: #999;
}

/* ─── FAQ ────────────────────────────────────────────────────────────────────
   Google reads FAQ markup for FAQPage rich results.
   Question and answer text should be clearly legible — 15-16px.
   ─────────────────────────────────────────────────────────────────────────── */
details.faq {
  border-bottom: 1px solid #eee;
  padding: 14px 2px;
}
details.faq:last-child { border-bottom: none; }
details.faq summary {
  font-weight: 600;
  font-size: 16px;           /* was 14.5px — raised for Google FAQ snippet */
  cursor: pointer;
  list-style: none;
  line-height: 1.5;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::before {
  content: '+ ';
  color: var(--acc);
  font-weight: 700;
}
details.faq[open] summary::before { content: '– '; }
details.faq p {
  margin: 10px 0 0 18px;
  color: #444;
  font-size: 15px;           /* was 13.5px — raised for Google FAQ snippet */
  line-height: 1.75;
}

/* ─── SOURCE NOTE ────────────────────────────────────────────────────────── */
.src-note {
  font-size: 14px;           /* was 12px — raised to minimum */
  color: #888;
  text-align: center;
  margin-top: 20px;
  line-height: 1.9;
}

/* ─── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  h1 { font-size: 26px; }
  .pbig { font-size: 30px; }
  .two { gap: 12px; }
  .half { min-width: 100%; }
  .grade-pill { min-width: 100%; }
  .hcard { padding: 18px 16px; }
  .card { padding: 16px; }
  .alert-row { flex-direction: column; }
  .alert-row input, .alert-row button { width: 100%; }
}

@media (max-width: 400px) {
  .wrap { padding: 16px 12px 60px; }
  h1 { font-size: 22px; }
  .pbig { font-size: 26px; }
}
