/*
Theme Name: Gold Price Gulf
Theme URI: https://goldpricegulf.com
Description: Live gold rates tracker for Gulf countries — displays current gold prices for Dubai, Saudi Arabia, Oman, Kuwait, Bahrain & Qatar across 24K, 22K, 21K & 18K karats.
Version: 2.0.0
Author: Gold Price Gulf
Author URI: https://goldpricegulf.com
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gold-price-gulf
*/

:root {
  --gold-bright: #d4a843;
  --gold-mid: #b8922e;
  --gold-deep: #a0732e;
  --gold-muted: #8a6324;
  --gold-light: #fdf1c8;
  --gold-bg: #fcf7ed;
  --gold-bg-alt: #fdf8ef;
  --text-primary: #333333;
  --text-secondary: #666666;
  --text-muted: #9ca3af;
  --white: #ffffff;
  --border: #e5e0d5;
  --red: #ef4444;
  --green: #22c55e;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--gold-bg);
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  line-height: 1.2;
}

a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1600px; margin: 0 auto; padding: 0 24px; }

/* ── Page Layout (left ad + content + right ad) ── */
.page-layout {
  display: flex;
  gap: 28px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 24px;
  justify-content: center;
}

.main-content { flex: 1; min-width: 0; max-width: 920px; }

.sidebar-left,
.sidebar-right {
  width: 160px;
  flex-shrink: 0;
}

/* ── Header ── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.header-brand:hover { text-decoration: none; }

.brand-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #d4a843 0%, #b8922e 50%, #8a6324 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--white);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(180,140,50,0.3);
}

.brand-text h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text span {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}

/* Country tabs in header */
.country-tabs {
  display: flex;
  gap: 3px;
  background: var(--gold-bg);
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}

.country-tab {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.country-tab:hover {
  background: rgba(212,168,67,0.1);
  color: var(--gold-deep);
  text-decoration: none;
}

.country-tab.active {
  background: var(--gold-deep);
  color: var(--white);
  box-shadow: 0 1px 3px rgba(160,115,46,0.3);
}

.country-tab .flag { font-size: 14px; }

.header-time {
  text-align: right;
  flex-shrink: 0;
  min-width: 160px;
}

.header-time .time {
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}

.header-time .date {
  font-size: 11px;
  color: var(--text-muted);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-bottom: 36px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(252,247,237,0.93) 0%, rgba(252,247,237,0.78) 50%, rgba(252,247,237,0.45) 100%),
    url('https://images.unsplash.com/photo-1610375461246-83df859d849d?w=1400&q=80') center/cover no-repeat;
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 50px 0;
}

.hero-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--gold-deep);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.hero-title {
  font-size: 38px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.hero-title .gold { color: var(--gold-deep); }

.hero-subtitle {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.7;
}

/* ── Section Headings ── */
.section-heading { margin-bottom: 20px; }
.section-heading h2 { font-size: 26px; color: var(--text-primary); margin-bottom: 4px; }
.section-heading p { font-size: 13px; color: var(--text-muted); }

/* ── Karat Cards ── */
.karat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 40px;
}

.karat-card {
  background: var(--gold-light);
  border-radius: 12px;
  padding: 18px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 150px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.karat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(180,140,50,0.15);
  border-color: var(--gold-bright);
  text-decoration: none;
  color: inherit;
}

.karat-card-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.karat-card-purity { font-size: 12px; color: var(--gold-muted); font-weight: 500; margin-bottom: 4px; }
.karat-card-desc { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; line-height: 1.4; }
.karat-card-price { font-size: 17px; font-weight: 700; color: var(--gold-deep); font-family: 'Inter', sans-serif; }

.karat-card-arrow {
  position: absolute;
  top: 18px;
  right: 14px;
  font-size: 18px;
  color: var(--gold-mid);
  opacity: 0.5;
  transition: all 0.2s ease;
}

.karat-card:hover .karat-card-arrow { opacity: 1; transform: translateX(3px); }

/* ── Price Table ── */
.price-section { margin-bottom: 40px; }

.price-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gold-deep);
  color: var(--white);
  padding: 10px 18px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 500;
}

.live-badge { display: flex; align-items: center; gap: 8px; font-size: 12px; }

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

.price-table-wrap {
  background: var(--white);
  border-radius: 0 0 10px 10px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.price-table { width: 100%; border-collapse: collapse; }

.price-table thead th {
  padding: 12px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
}

.price-table tbody td {
  padding: 14px 18px;
  font-size: 14px;
  border-bottom: 1px solid #f3efe8;
  font-family: 'Inter', sans-serif;
}

.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: var(--gold-bg-alt); }

.karat-label { font-weight: 600; color: var(--text-primary); }
.karat-purity { font-size: 11px; color: var(--text-muted); font-weight: 400; margin-left: 5px; }
.price-value { font-weight: 600; color: var(--gold-deep); font-variant-numeric: tabular-nums; }

.price-table-footer {
  padding: 10px 18px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--gold-bg-alt);
  text-align: center;
  border-top: 1px solid var(--border);
}

/* ── Chart ── */
.chart-section { margin-bottom: 40px; }

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}

.chart-tabs {
  display: flex;
  gap: 3px;
  background: var(--white);
  border-radius: 8px;
  padding: 3px;
  border: 1px solid var(--border);
}

.chart-tab {
  padding: 5px 14px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.chart-tab:hover { color: var(--gold-deep); }
.chart-tab.active { background: var(--gold-deep); color: var(--white); }

.chart-container {
  background: var(--white);
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  border: 1px solid var(--border);
}

.chart-canvas-wrap { position: relative; height: 280px; }

/* ── Disclaimer ── */
.disclaimer-section { margin-bottom: 40px; }

.disclaimer-card {
  background: var(--white);
  border-radius: 12px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,0,0,0.03);
}

.disclaimer-card h3 { font-size: 17px; margin-bottom: 10px; }
.disclaimer-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.8; }

/* ── Sidebar / Ad Slots (invisible placeholders) ── */
.ad-space {
  width: 160px;
  margin-bottom: 24px;
}

.ad-space-sticky {
  position: sticky;
  top: 80px;
}

/* ── Footer ── */
.site-footer {
  padding: 20px 0;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-inner a { color: var(--gold-deep); text-decoration: none; }
.footer-inner a:hover { text-decoration: underline; }

/* ── Karat Detail Page ── */
.breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
}

.breadcrumb a { color: var(--gold-deep); }
.breadcrumb .sep { margin: 0 6px; color: var(--border); }

.karat-page-title {
  font-size: 32px;
  margin-bottom: 6px;
}

.karat-page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.7;
}

.price-highlight {
  background: linear-gradient(135deg, var(--gold-light), #fce9a5);
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  border: 1px solid rgba(212,168,67,0.3);
}

.price-highlight-label { font-size: 14px; color: var(--text-secondary); font-weight: 500; }

.price-highlight-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--gold-deep);
  font-family: 'Inter', sans-serif;
}

.price-highlight-unit { font-size: 14px; color: var(--text-muted); font-weight: 400; }

/* Amounts table */
.amounts-section { margin-bottom: 36px; }

.amounts-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.amounts-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  background: var(--gold-bg-alt);
}

.amounts-table tbody td {
  padding: 11px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f3efe8;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.amounts-table tbody tr:last-child td { border-bottom: none; }
.amounts-table tbody tr:hover { background: var(--gold-bg-alt); }

.amounts-table .weight-label { font-weight: 600; color: var(--text-primary); }
.amounts-table .price-cell { color: var(--gold-deep); font-weight: 500; }

/* History table */
.history-section { margin-bottom: 36px; }

.history-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.history-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-family: 'Inter', sans-serif;
  background: var(--gold-bg-alt);
}

.history-table tbody td {
  padding: 11px 16px;
  font-size: 13.5px;
  border-bottom: 1px solid #f3efe8;
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.history-table tbody tr:last-child td { border-bottom: none; }
.history-table tbody tr:hover { background: var(--gold-bg-alt); }

.date-cell { font-weight: 500; color: var(--text-primary); }

/* FAQ */
.faq-section { margin-bottom: 36px; }

.faq-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 10px;
}

.faq-item h4 {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.faq-item p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* ── Responsive ── */
@media (max-width: 1400px) {
  .sidebar-left { display: none; }
  .main-content { max-width: none; }
}

@media (max-width: 1100px) {
  .page-layout { flex-direction: column; align-items: center; }
  .sidebar-right { display: none; }
}

@media (max-width: 900px) {
  .karat-grid { grid-template-columns: repeat(2, 1fr); }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .country-tabs {
    order: 3;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }

  .header-time { text-align: center; }
  .hero-title { font-size: 30px; }
}

@media (max-width: 600px) {
  .karat-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 24px; }
  .hero-subtitle { font-size: 13px; }

  .price-table thead th, .price-table tbody td { padding: 10px 10px; font-size: 12px; }
  .price-header-bar { flex-direction: column; gap: 6px; text-align: center; }
  .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
  .chart-header { flex-direction: column; align-items: flex-start; }

  .amounts-table thead th, .amounts-table tbody td,
  .history-table thead th, .history-table tbody td {
    padding: 8px 8px;
    font-size: 12px;
  }

  .price-highlight { flex-direction: column; text-align: center; }
  .price-highlight-value { font-size: 28px; }
  .karat-page-title { font-size: 24px; }
}

body.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { body.admin-bar .site-header { top: 46px; } }
