/* ===================================== */
/* FORCE REAL BACKGROUND IMAGE TO SHOW   */
/* ===================================== */

/* Kill the global theme skin layer */
body::before {
  content: none !important;
  background: none !important;
}

/* Force core shell transparent so global BG (or brand BG) shows */
.app-shell,
.app-shell-inner,
#main,
.main-content {
  background: transparent !important;
}

/* ===================================== */
/* GLOBAL MOBILE OVERFLOW GUARDS         */
/* ===================================== */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video {
  max-width: 100%;
}

/* Prevent “one long row” from pushing page wider */
.brand-card,
.activity-line,
.rank-row,
.special-card,
.registry-wrap,
.product-card,
.product-grid,
.brand-data-wrap,
.drop-top,
.drop-grid-section {
  max-width: 100%;
}

/* ===================================== */
/* SECTION BACKGROUND UTILITIES          */
/* (used by brand.js for patterns/video) */
/* ===================================== */

.section-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Ensure sections that can host video are stacking contexts */
.hero,
.drop-top,
.drop-grid-section {
  position: relative;
  overflow: hidden;
}

/* Example pattern classes (used when type = "pattern") */
.bg-pattern-diagonal-soft {
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0,
    rgba(255, 255, 255, 0.04) 2px,
    transparent 2px,
    transparent 6px
  );
}

.bg-pattern-grid-soft {
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ========================= */
/* NAV LOGO (brand page only) */
/* ========================= */

.app-logo-img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
}

/* ========================= */
/* BASE + HERO               */
/* ========================= */

.hero {
  width: 100%;
  aspect-ratio: 1536 / 700;

  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;

  position: relative;
  overflow: hidden;

  height: auto;
  max-height: none;
  min-height: 0;
}

/* REMOVED: overlay filter – hero image shows raw */
.hero-overlay {
  display: none;
}

/* HERO BRAND LOGO BADGE (restored) */
.brand-hero-logo {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 90px;
  height: 90px;
  border-radius: 100%;
  border: 3px solid #fff;
  background: #fff;
  object-fit: cover;
  z-index: 5;
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 16px 18px 18px;
  z-index: 10; /* above bg video / bg image */

  background: linear-gradient(
    to top,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0) 100%
  );
}

#brandName {
  font-size: 32px;
  margin: 0 0 6px;
  color: #111;
}

.brand-headline {
  font-size: 15px;
  color: #444;
  margin: 0 0 4px;
}

.brand-bio {
  font-size: 14px;
  color: #555;
  max-width: 600px;
}

.brand-links {
  margin-top: 10px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip {
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 13px;
  color: #333;
  border: 1px solid #e2e8f0;
}

/* ========================= */
/* LIVE DROP (TOP SECTION)   */
/* ========================= */

.drop-top {
  width: min(1100px, 92vw);
  margin: 40px auto 20px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.drop-left {
  background: transparent;
  border-radius: 12px;
  padding: 20px;
  flex: 1.6;
  box-shadow: 0 6px 25px rgba(0,0,0,0.05);
  border: 1px solid #e2e8f0;
  position: relative;
  z-index: 5;
  min-width: 0;
}

.drop-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  color: #1e293b;
}

.drop-subtitle {
  margin: 0 0 18px;
  font-size: 14px;
  color: #475569;
}

.drop-stats {
  display: flex;
  gap: 30px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.drop-stat-label {
  font-size: 12px;
  color: #64748b;
}

.drop-stat-value {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
}

.drop-stat-remaining {
  color: #dc2626;
}

/* BRAND EXP */
.brand-exp {
  margin: 14px 0 14px;
  padding: 12px 12px;
  background: rgba(255,255,255,0.75);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  backdrop-filter: blur(6px);
}

.brand-exp-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.brand-exp-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 800;
  color: #0f172a;
}

.brand-exp-level {
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

.brand-exp-bar {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.brand-exp-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e, #3b82f6, #a855f7);
}

.brand-exp-text {
  margin-top: 6px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.live-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fef2f2;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.pulse-dot {
  width: 9px;
  height: 9px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse 1.3s infinite;
}

@keyframes pulse {
  0% { transform: scale(.8); opacity: .7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(.8); opacity: .7; }
}

.live-text {
  font-size: 13px;
  color: #b91c1c;
}

/* ========================= */
/* SHOP / GRID SECTION       */
/* ========================= */

.drop-grid-section {
  width: min(1100px, 92vw);
  margin: 18px auto 10px;
}

.section-header h2 {
  font-size: 20px;
  margin: 0 0 10px;
  color: #0f172a;
}

/* Desktop default: grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 22px;
}

/* Product cards */
.product-card {
  background: transparent;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  padding: 14px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 5;
  min-width: 0;
}

.product-image-wrapper {
  position: relative;
  width: 100%;
  height: 330px;
  border-radius: 12px;
  overflow: hidden;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image {
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
}

.edition-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  letter-spacing: 0.12em;
  color: #1e293b;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

.edition-royalty { background: #facc15; }
.edition-investor { background: #a855f7; color: #fff; }
.edition-founder { background: #3b82f6; color: #fff; }

.product-header {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  gap: 10px;
  min-width: 0;
}

.product-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #0f172a;
}

.product-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
}

.product-tagline {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #64748b;
  white-space: nowrap;
}

.quantity-strip {
  margin-top: 12px;
  padding: 8px 10px;
  background: #f8fafc;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.quantity-flash-soft { animation: qSoft 2.5s infinite; }
.quantity-flash-urgent { animation: qUrgent 2s infinite; }
.quantity-critical { animation: qCritical 1.5s infinite; }

@keyframes qSoft { 50% { background: #f1f5ff; } }
@keyframes qUrgent { 50% { background: #fff8e1; } }
@keyframes qCritical { 50% { background: #fee2e2; } }

.quantity-label {
  font-size: 10px;
  color: #475569;
}

.quantity-count {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.stock-bar {
  width: 100%;
  height: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  margin-top: 10px;
  overflow: hidden;
}

.stock-bar-fill {
  height: 100%;
  background: linear-gradient(90deg,#22c55e,#eab308,#ef4444);
  transform-origin: left;
}

.product-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  gap: 10px;
}

.product-price {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.view-item-btn {
  padding: 6px 12px;
  font-size: 12px;
  text-transform: uppercase;
  background: #3b82f6;
  border-radius: 999px;
  color: #fff;
  border: none;
  cursor: pointer;
}

/* ========================= */
/* BRAND DATA SECTIONS       */
/* ========================= */

.brand-data-wrap {
  width: min(1100px, 92vw);
  margin: 18px auto 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.brand-card {
  background: rgba(255,255,255,0.90);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 6px 25px rgba(0,0,0,0.05);
  padding: 16px;
  min-width: 0;
  overflow: hidden;
}

.brand-card-head {
  margin-bottom: 12px;
}

.brand-card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.brand-card-sub {
  margin-top: 4px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

/* Activity */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(248,250,252,0.75);
  min-width: 0;
}

.activity-left {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.activity-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex: 0 0 auto;
}

.activity-text {
  min-width: 0;
}

.activity-title {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-meta {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.empty-state {
  padding: 12px;
  font-size: 13px;
  color: #64748b;
  font-weight: 700;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: rgba(248,250,252,0.65);
}

/* Ranks */
.ranks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-width: 0;
}

.rank-col-title {
  font-size: 11px;
  letter-spacing: 0.14em;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 8px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rank-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: rgba(248,250,252,0.75);
  min-width: 0;
}

.rank-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}

.rank-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex: 0 0 auto;
}

.rank-meta {
  min-width: 0;
}

.rank-name {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.rank-handle {
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-right {
  font-size: 12px;
  color: #0f172a;
  font-weight: 900;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Special Owners */
.special-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  min-width: 0;
}

.special-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: rgba(248,250,252,0.75);
  padding: 12px;
  min-width: 0;
}

.special-top {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.special-avatar {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid #e2e8f0;
  flex: 0 0 auto;
}

.special-meta {
  min-width: 0;
}

.special-who {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.special-item {
  margin-top: 2px;
  font-size: 11px;
  color: #475569;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.special-badges {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.12em;
  color: #0f172a;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  max-width: 100%;
}

.pill-ghost {
  background: transparent;
}

/* Registry */
.registry-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.registry-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px; /* keeps columns readable, scrolls on phone */
}

.registry-table th,
.registry-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.registry-table th {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: #0f172a;
  background: rgba(248,250,252,0.75);
}

.empty-td {
  padding: 14px 10px;
  color: #64748b;
  font-weight: 800;
}

/* ========================= */
/* RESPONSIVE                */
/* ========================= */

@media (max-width: 900px) {
  .ranks-grid {
    grid-template-columns: 1fr;
  }
  .special-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile: make SHOP a carousel, show 2 cards, and add scroll cue */
@media (max-width: 640px) {
  .drop-top,
  .drop-grid-section,
  .brand-data-wrap {
    width: 100%;
    margin: 24px auto 16px;
    padding: 0 12px;
  }

  .drop-left {
    padding: 16px;
  }

  .drop-title {
    font-size: 18px;
  }

  /* Activity lines stack instead of forcing wide rows */
  .activity-line {
    flex-direction: column;
    align-items: flex-start;
  }

  .activity-title {
    white-space: normal;
  }

  /* Ranks rows: allow right side to wrap if needed */
  .rank-name {
    max-width: 55vw;
  }

  .rank-right {
    white-space: normal;
    text-align: right;
  }

  /* Header: add a swipe hint pill */
  .drop-grid-section .section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .drop-grid-section .section-header::after {
    content: "Swipe →";
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #0f172a;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid #e2e8f0;
  }

  /* SHOP: carousel (2 cards visible) + fade edges to show scrollability */
  .product-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    padding: 4px 0 14px;
    position: relative;

    -webkit-mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 24px,
      #000 calc(100% - 24px),
      transparent 100%
    );
    mask-image: linear-gradient(
      to right,
      transparent 0,
      #000 24px,
      #000 calc(100% - 24px),
      transparent 100%
    );
  }

  .product-grid::after {
    content: "";
    flex: 0 0 8px;
  }

  .product-card {
    flex: 0 0 46vw; /* 2 cards on screen */
    scroll-snap-align: start;
    padding: 12px;
  }

  .product-image-wrapper {
    height: 210px;
  }

  /* Slightly smaller text so cards feel clean at 2-up */
  .product-title { font-size: 13px; }
  .product-price { font-size: 14px; }
  .product-tagline { font-size: 9px; }
}

/* Hide the plain black brand name text in the hero only */
.hero #brandName {
  display: none;
}

/* ===================================== */
/* HEADER NAV: BUBBLE BUTTONS + CONTRAST */
/* ===================================== */

.app-nav-links .app-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;

  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;

  padding: 8px 16px;
  line-height: 1;

  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);

  text-decoration: none;
  cursor: pointer;

  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.app-nav-links .app-nav-link:hover {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 255, 255, 0.50);
  transform: translateY(-1px);
}

.app-nav-links .app-nav-link:active {
  transform: translateY(0px);
}

.app-nav-links .app-nav-link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 2px;
}


/* ====================== */
/* SHOW MORE TOGGLES      */
/* ====================== */

.show-more-btn{
  margin-top: 12px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.8);
  cursor: pointer;
  font-weight: 700;
}
.show-more-btn:hover{ filter: brightness(0.98); }
.show-more-btn:active{ transform: translateY(1px); }

/* Default: show only first 7 entries */
.activity-list.collapsed .activity-line:nth-child(n+8){ display:none; }
.rank-list.collapsed .rank-row:nth-child(n+8){ display:none; }
.special-grid.collapsed .special-card:nth-child(n+8){ display:none; }
#ownersRegistryBody.collapsed tr:nth-child(n+8){ display:none; }
