/* ============================================
   ALTIN PINARI KUYUMCULUK - STYLE
   Premium Dark Gold Theme
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: #161616;
  --bg-table-row: #1a1a1a;
  --bg-table-row-alt: #141414;
  --bg-table-hover: #222222;

  --gold-dark: #8b6914;
  --gold: #d4a843;
  --gold-light: #f0d78c;
  --gold-glow: rgba(212, 168, 67, 0.15);
  --gold-glow-strong: rgba(212, 168, 67, 0.3);

  --text-primary: #f5f0e8;
  --text-secondary: #b0a48e;
  --text-muted: #6b6358;

  --green: #4ade80;
  --green-bg: rgba(74, 222, 128, 0.08);
  --red: #f87171;
  --red-bg: rgba(248, 113, 113, 0.08);

  --border-color: rgba(212, 168, 67, 0.12);
  --border-color-strong: rgba(212, 168, 67, 0.25);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-gold: 0 0 30px rgba(212, 168, 67, 0.08);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ---- Background Aesthetic ---- */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 50% 0%, rgba(212, 168, 67, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 0% 50%, rgba(212, 168, 67, 0.03) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 100% 80%, rgba(212, 168, 67, 0.03) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ---- Loading Screen ---- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  animation: pulse-gold 1.5s ease-in-out infinite;
  margin-bottom: 24px;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold);
  letter-spacing: 2px;
}

.loading-bar {
  width: 200px;
  height: 2px;
  background: var(--bg-card);
  border-radius: 2px;
  margin-top: 16px;
  overflow: hidden;
}

.loading-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold-light), var(--gold-dark));
  border-radius: 2px;
  animation: loading-slide 1.2s ease-in-out infinite;
}

@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes pulse-gold {
  0%, 100% { 
    box-shadow: 0 0 20px rgba(212, 168, 67, 0.2); 
    transform: scale(1);
  }
  50% { 
    box-shadow: 0 0 40px rgba(212, 168, 67, 0.4); 
    transform: scale(1.05);
  }
}

/* ---- Container ---- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

/* ---- Header ---- */
.header {
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

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

.header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  box-shadow: 0 0 20px rgba(212, 168, 67, 0.2);
  transition: var(--transition-normal);
}

.header-logo:hover {
  box-shadow: 0 0 30px rgba(212, 168, 67, 0.4);
  transform: scale(1.05);
}

.header-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.header-subtitle {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 2px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.live-clock {
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}

.live-date {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.update-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.update-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: blink 2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---- Marquee / Ticker ---- */
.ticker-bar {
  background: linear-gradient(90deg, var(--bg-secondary), var(--bg-card), var(--bg-secondary));
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  overflow: hidden;
  position: relative;
}

.ticker-content {
  display: flex;
  align-items: center;
  gap: 32px;
  animation: ticker-scroll 40s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.ticker-item .label {
  color: var(--gold);
  font-weight: 600;
}

.ticker-item .value {
  color: var(--text-primary);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.ticker-divider {
  color: var(--text-muted);
  opacity: 0.3;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ---- Section ---- */
.section {
  margin: 24px 0;
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.section:nth-child(2) { animation-delay: 0.1s; }
.section:nth-child(3) { animation-delay: 0.2s; }
.section:nth-child(4) { animation-delay: 0.3s; }
.section:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.section-icon {
  font-size: 1.2rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold-light);
  letter-spacing: 0.5px;
}

.section-badge {
  margin-left: auto;
  font-size: 0.65rem;
  color: var(--text-muted);
  background: var(--bg-table-row);
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

/* ---- Price Table ---- */
.price-table-wrapper {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  position: relative;
}

.price-table-wrapper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0.4;
}

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

.price-table thead th {
  background: linear-gradient(180deg, var(--bg-table-row) 0%, var(--bg-card) 100%);
  padding: 14px 16px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border-color-strong);
  position: sticky;
  top: 0;
  z-index: 2;
}

.price-table thead th:nth-child(1) {
  width: 45%;
}

.price-table thead th:nth-child(2),
.price-table thead th:nth-child(3) {
  width: 27.5%;
  text-align: right;
}

.price-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  transition: background var(--transition-fast);
}

.price-table tbody tr:nth-child(even) {
  background: var(--bg-table-row-alt);
}

.price-table tbody tr:hover {
  background: var(--bg-table-hover);
}

.price-table tbody td {
  padding: 13px 16px;
  font-size: 0.92rem;
  vertical-align: middle;
}

.price-table tbody td:first-child {
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.product-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  background: var(--gold-glow);
  border: 1px solid var(--border-color);
}

.product-name {
  line-height: 1.3;
}

.product-code {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: 1px;
}

.price-table tbody td:nth-child(2),
.price-table tbody td:nth-child(3) {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-size: 0.95rem;
  letter-spacing: 0.3px;
}

.price-table tbody td:nth-child(2) {
  color: var(--green);
}

.price-table tbody td:nth-child(3) {
  color: var(--red);
}

/* Price update animation */
.price-flash {
  animation: flash-gold 0.6s ease;
}

@keyframes flash-gold {
  0% { background-color: var(--gold-glow); }
  100% { background-color: transparent; }
}

/* ---- Footer ---- */
.footer {
  margin-top: 32px;
  padding: 28px 0;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 12px;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-contact-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.footer-contact-item .icon {
  font-size: 0.9rem;
}

.footer-divider {
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 16px auto;
  opacity: 0.4;
}

.footer-source {
  font-size: 0.68rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-copyright {
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 8px;
  opacity: 0.6;
}

/* ---- Error State ---- */
.error-banner {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--red-bg);
  border: 1px solid rgba(248, 113, 113, 0.2);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  margin: 16px 0;
  font-size: 0.8rem;
  color: var(--red);
}

.error-banner.visible {
  display: flex;
}

/* ---- Shimmer / Skeleton ---- */
.skeleton {
  background: linear-gradient(90deg, var(--bg-table-row) 25%, var(--bg-table-hover) 50%, var(--bg-table-row) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
  height: 18px;
  width: 80px;
  display: inline-block;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .header-brand {
    flex-direction: column;
    gap: 8px;
  }

  .header-title {
    font-size: 1.3rem;
  }

  .header-right {
    align-items: center;
  }

  .live-clock {
    font-size: 1.2rem;
  }

  .price-table thead th {
    padding: 10px 10px;
    font-size: 0.65rem;
  }

  .price-table tbody td {
    padding: 10px 10px;
    font-size: 0.82rem;
  }

  .price-table tbody td:nth-child(2),
  .price-table tbody td:nth-child(3) {
    font-size: 0.85rem;
  }

  .product-icon {
    width: 24px;
    height: 24px;
    font-size: 0.7rem;
  }

  .product-code {
    display: none;
  }

  .footer-contact {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .section {
    margin: 16px 0;
  }

  .ticker-content {
    gap: 20px;
  }

  .ticker-item {
    font-size: 0.7rem;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .container {
    max-width: 720px;
  }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--gold-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gold);
}

/* ---- Selection ---- */
::selection {
  background: var(--gold);
  color: var(--bg-primary);
}
