/*
 * Custom styles for the Mahawar Jewellers Cordova app.
 *
 * The colour palette draws inspiration from the supplied design
 * assets. A warm gold gradient forms the basis of most UI
 * elements, whilst whites and muted greens provide contrast.
 *
 * This file is intentionally concise; repetitive rules have been
 * consolidated and modern CSS variables are used to simplify
 * maintenance.
 */

:root {
  /* primary gold tones pulled from the design images */
  --gold-dark: #a56d19;
  --gold-light: #c0882a;
  /* accent colour for highlights and ribbons */
  --accent-green: #3d5927;
  /* background and text colours */
  --bg-light: #fafafa;
  --text-dark: #31190b;
  /* dynamic theme variables that can be changed by the user */
  --dynamic-font-size: 1rem;
  --dynamic-text-color: var(--text-dark);
}

body {
  margin: 0;
  background-color: var(--bg-light);
  color: var(--dynamic-text-color);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-size: var(--dynamic-font-size);
  min-height: 100vh;
  padding-bottom: 60px; /* leave space for the fixed footer */
}

/* Header containing the logo */
.app-header {
  background-color: #ffffff;
  text-align: center;
  padding: 1rem 0 0.5rem;
  border-bottom: 1px solid var(--gold-dark);
}

.app-header img {
  max-width: 200px;
  height: auto;
}

/* Reusable rate box used for GOLD, SILVER and INR widgets */
.rate-box {
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  background-color: #ffffff;
}

/* Keep rate boxes in a single row across all viewports */
.rate-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.rate-row > div {
  flex: 1;
}

/* Keep future cards in a single row */
.future-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
}
.future-row > div {
  flex: 1;
}

/* 3D shadow boxes for About and Contact sections */
.shadow-box {
  background-color: #ffffff;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rate-box .title {
  background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
  color: #ffffff;
  padding: 0.25rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  text-align: center;
}

.rate-box .value {
  font-size: 1.4rem;
  font-weight: 700;
  padding: 0.6rem;
  text-align: center;
  border-top: 1px solid var(--gold-dark);
  border-bottom: 1px solid var(--gold-dark);
  background-color: #eef7e5; /* light green background for emphasis */
  color: #21571d;
}

.rate-box .low-high {
  font-size: 0.7rem;
  padding: 0.4rem 0.2rem;
  display: flex;
  justify-content: space-between;
}

/* Section headings (e.g. PRODUCTS, SELL) */
.section-heading {
  background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
  color: #ffffff;
  font-weight: 600;
  padding: 0.4rem;
  border-radius: 8px;
  margin: 0.5rem 0;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

/* Card representing each product or coin row */
.data-card {
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 0.6rem;
  background-color: #ffffff;
  position: relative;
}

.data-card .name {
  font-weight: 600;
  font-size: 1rem;
}

.data-card .sell-value {
  font-weight: 700;
  font-size: 1.2rem;
  text-align: right;
}

.data-card .small-text {
  font-size: 0.75rem;
  color: #444;
}

/* Buy ribbon displayed on product cards */
.buy-ribbon {
  position: absolute;
  top: -5px;
  right: -40px;
  background-color: var(--accent-green);
  color: #ffffff;
  padding: 0.2rem 1.5rem;
  font-size: 0.75rem;
  transform: rotate(45deg);
  transform-origin: top right;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Future cards at the bottom of live rates page */
.future-card {
  border: 1px solid var(--gold-dark);
  border-radius: 8px;
  background-color: #ffffff;
  margin-bottom: 0.6rem;
  overflow: hidden;
}

.future-card .title {
  background: linear-gradient(to bottom, var(--gold-light), var(--gold-dark));
  color: #ffffff;
  padding: 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
}

.future-card .value {
  font-size: 1.2rem;
  font-weight: 700;
  padding: 0.4rem 0;
  text-align: center;
}

.future-card .sub {
  font-size: 0.75rem;
  padding-bottom: 0.4rem;
  text-align: center;
}

/* Highlight backgrounds for rate changes */
.bg-up {
  background-color: rgba(0, 128, 0, 0.2);
}

.bg-down {
  background-color: rgba(255, 0, 0, 0.2);
}

/* Bottom navigation bar */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #ffffff;
  border-top: 1px solid var(--gold-dark);
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 55px;
  z-index: 999;
}

.bottom-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 0.65rem;
  padding-top: 4px;
}

.bottom-nav a.active {
  color: var(--gold-dark);
}

.bottom-nav img {
  width: 18px;
  height: 18px;
  margin-bottom: 3px;
}

/* Generic container for page content with bottom padding */
.page-content {
  padding: 0 0.8rem 4rem;
}

/* Styles specific to About and Contact pages */
h2.section-title {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--gold-dark);
}

p {
  font-size: 0.9rem;
  line-height: 1.5;
}

a {
  color: var(--gold-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}