/* ── COA Table – Frontend Styles ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600;700&family=Barlow:wght@400;500;600&display=swap');

:root {
  --coa-bg:         #111111;
  --coa-surface:    #1a1a1a;
  --coa-border:     #2a2a2a;
  --coa-highlight:  #222222;
  --coa-orange:     #E79A34;
  --coa-orange-dk:  #DF5643;
  --coa-orange-lt:  #f0aa50;
  --coa-gold:       #E79A34;
  --coa-text:       #e8e8e8;
  --coa-text-muted: #888888;
  --coa-accent-row: rgba(231, 154, 52, 0.08);
  --coa-gradient:   linear-gradient(180deg, rgba(231, 154, 52, 1) 0%, rgba(223, 86, 67, 1) 100%);
  --coa-radius:     4px;
  --coa-font-head:  'Rajdhani', sans-serif;
  --coa-font-body:  'Barlow', sans-serif;
}

/* Wrapper */
.coa-wrap {
  font-family: var(--coa-font-body);
  background: var(--coa-bg);
  padding: 0;
  margin: 0 auto;
  max-width: 1100px;
}

/* Scrollable container on mobile */
.coa-table-container {
  overflow-x: auto;
  border-radius: var(--coa-radius);
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
}

/* ── TABLE ── */
.coa-table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--coa-surface);
  font-size: 0.9rem;
}

/* ── HEADER ── */
.coa-table thead tr {
  background: var(--coa-gradient);
}

.coa-table thead th {
  font-family: var(--coa-font-head);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  padding: 14px 18px;
  text-align: left;
  border: none;
  white-space: nowrap;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

.coa-table thead th:first-child { padding-left: 22px; }
.coa-table thead th:last-child  { text-align: center; }

/* ── BODY ROWS ── */
.coa-table tbody tr.coa-row {
  border-bottom: 1px solid var(--coa-border);
  transition: background 0.2s ease;
}

.coa-table tbody tr.coa-row:hover {
  background: var(--coa-accent-row);
}

/* Highlighted / selected row (mimics the blue glow in the design) */
.coa-table tbody tr.coa-row.is-selected {
  background: rgba(30, 130, 220, 0.06);
  box-shadow: inset 3px 0 0 #1e82dc;
}

.coa-table tbody td {
  font-family: var(--coa-font-body);
  font-size: 0.88rem;
  color: var(--coa-text);
  padding: 13px 18px;
  vertical-align: middle;
  white-space: nowrap;
}

.coa-table tbody td:first-child { padding-left: 22px; }
.coa-table tbody td:last-child  { text-align: center; }

/* ── PRODUCT CELL ── */
.coa-product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.coa-product-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  flex-shrink: 0;
  display: block;
}

/* Placeholder icon when no image set */
.coa-product-img-placeholder {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(231, 154, 52, 0.1);
  border-radius: 4px;
  color: var(--coa-orange);
  flex-shrink: 0;
}

.coa-product-name {
  white-space: nowrap;
}

/* ── PURITY VALUE ── */
.col-purity {
  font-weight: 600;
  color: #fff;
}

/* ── DOWNLOAD BUTTON ── */
.coa-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: var(--coa-gradient);
  color: #fff !important;
  font-family: var(--coa-font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border-radius: var(--coa-radius);
  border: 1px solid rgba(255,255,255,0.12);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(223, 86, 67, 0.35);
}

.coa-btn:hover {
  background: linear-gradient(180deg, rgba(240, 170, 70, 1) 0%, rgba(231, 100, 80, 1) 100%);
  box-shadow: 0 4px 16px rgba(223, 86, 67, 0.55);
  transform: translateY(-1px);
}

.coa-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(232, 125, 43, 0.3);
}

.coa-btn-disabled {
  background: linear-gradient(135deg, #5a3010 0%, #3d200a 100%);
  box-shadow: none;
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.coa-btn-icon {
  font-size: 0.9em;
}

/* ── LOAD MORE BUTTON ── */
.coa-load-more-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 0 16px;
}

.coa-load-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 36px;
  background: transparent;
  color: var(--coa-text);
  font-family: var(--coa-font-head);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.coa-load-more:hover {
  border-color: var(--coa-orange);
  color: var(--coa-orange);
  background: rgba(231, 154, 52, 0.06);
}

.coa-load-more:disabled {
  opacity: 0.4;
  cursor: default;
}

.coa-arrow {
  font-size: 1.1em;
}

/* ── ROW ANIMATION ── */
.coa-row-enter {
  animation: coaFadeIn 0.35s ease forwards;
}

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

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .coa-table thead th,
  .coa-table tbody td {
    padding: 10px 10px;
    font-size: 0.8rem;
  }

  .coa-btn {
    padding: 6px 10px;
    font-size: 0.7rem;
  }

  .col-lab { display: none; }
}
