/* ==========================================================================
   LUXURY DESIGN SYSTEM — Sure Holdings | Invest Into Wine
   Institutional-grade fine wine investment portal
   Loads after redesign.css — overrides and extends
   ========================================================================== */

/* --- 1. BRAND TOKENS --- */
:root {
  /* Backgrounds */
  --cream-antique: #FDFBF7;
  --cream-warm: #F8F5F0;
  --cream-card: #FAF8F4;
  --obsidian: #111827;
  --obsidian-soft: #1F2937;

  /* Primary Accents */
  --sovereign-gold: #D4AF37;
  --sovereign-gold-light: #E8D48B;
  --sovereign-gold-dark: #B8962A;
  --vineyard-burgundy: #4A0E17;
  --vineyard-burgundy-light: #6B1D2A;

  /* Heritage Palette */
  --parchment: #EDE7D9;
  --seal-wax: #8B1C1C;
  --trophy-brass: #A68B3C;
  --cellar-grey: #78716C;
  --marble-white: #F9F7F4;

  /* Financial States */
  --ask-green: #065F46;
  --bid-red: #991B1B;
  --spotlight: rgba(212, 175, 55, 0.08);
  --gold-border: rgba(212, 175, 55, 0.25);
}

/* --- 2. GLOBAL LAYOUT OVERRIDES --- */
/* GHOST SIDEBAR FIX: Force no horizontal overflow */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--cream-antique);
  color: var(--obsidian);
}

/* Page wrapper — cream canvas */
.page-wrapper {
  background-color: var(--cream-antique);
}

/* Main content area — subtle cream warmth */
.page-main {
  background-color: var(--cream-antique);
}

/* Column main — card-like content zone */
.column.main {
  background-color: var(--cream-card);
  border-radius: 16px;
  padding: 2.4rem;
  border: 1px solid var(--parchment);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* --- 3. TYPOGRAPHY REFINEMENTS --- */
/* Editorial headings — Playfair Display with gold accent */
h1.page-title,
.cms-page-view .page-title-wrapper h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 3.6rem;
  letter-spacing: -0.02em;
  color: var(--obsidian);
  position: relative;
  padding-bottom: 1.2rem;
  margin-bottom: 2.4rem;
}

h1.page-title::after,
.cms-page-view .page-title-wrapper h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, var(--sovereign-gold), rgba(212, 175, 55, 0.1));
  border-radius: 2px;
}

/* Data & financial numbers — Inter with tabular numbers */
.financial-data,
.price,
.amount,
.currency-value,
.metric-value,
.holdings-value {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Section headings — editorial serif */
h2.section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: 2.8rem;
  color: var(--obsidian);
  margin-bottom: 0.8rem;
}

h2.section-title .gold-accent {
  color: var(--sovereign-gold);
}

.section-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 1.4rem;
  color: var(--cellar-grey);
  margin-bottom: 3.2rem;
}

/* Small caps for metadata */
.meta-label,
.prov-label,
.asset-label {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cellar-grey);
}

/* --- 4. DASHBOARD LAYOUT --- */
.luxury-dashboard {
  max-width: 1280px;
  margin: 0 auto;
}

/* Dashboard tab navigation */
.dashboard-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--parchment);
  margin-bottom: 3.2rem;
  background: var(--cream-card);
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.dashboard-tab {
  flex: 1;
  text-align: center;
  padding: 1.6rem 2.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 1.3rem;
  color: var(--cellar-grey);
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  background: transparent;
  position: relative;
  text-decoration: none;
}

.dashboard-tab:hover {
  color: var(--obsidian);
  background: var(--spotlight);
}

.dashboard-tab.active {
  color: var(--vineyard-burgundy);
  font-weight: 600;
}

.dashboard-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: var(--sovereign-gold);
  border-radius: 2px;
}

.dashboard-tab .tab-icon {
  display: block;
  font-size: 2rem;
  margin-bottom: 0.4rem;
  color: var(--sovereign-gold);
}

.dashboard-tab .tab-label {
  display: block;
}

/* --- 5. INVESTOR DASHBOARD --- */
.investor-dashboard {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
}

.investor-portfolio-summary {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--obsidian), var(--obsidian-soft));
  border-radius: 16px;
  padding: 3.2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.investor-portfolio-summary::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08), transparent 70%);
  border-radius: 50%;
}

.portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2.4rem;
}

.portfolio-header h2 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 2rem;
  color: #fff;
  margin: 0;
}

.portfolio-total-value {
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
}

.portfolio-total-value .value-label {
  font-size: 1.2rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

.portfolio-total-value .value-amount {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--sovereign-gold);
  letter-spacing: -0.02em;
}

.portfolio-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;
  margin-top: 2.4rem;
}

.metric-card {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 1.6rem;
  border: 1px solid rgba(255,255,255,0.08);
}

.metric-card .metric-label {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.6rem;
}

.metric-card .metric-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

.metric-card .metric-change.positive {
  color: #34D399;
  font-size: 1.2rem;
  font-weight: 500;
}

.metric-card .metric-change.negative {
  color: #F87171;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Holdings table */
.holdings-table {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--parchment);
  overflow: hidden;
}

.holdings-table-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 1fr 1fr;
  padding: 1.6rem 2.4rem;
  background: var(--cream-warm);
  border-bottom: 1px solid var(--parchment);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cellar-grey);
}

.holdings-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 1fr 1fr;
  padding: 1.4rem 2.4rem;
  border-bottom: 1px solid var(--parchment);
  font-size: 1.3rem;
  transition: background 0.2s;
  align-items: center;
}

.holdings-row:hover {
  background: var(--spotlight);
}

.holdings-row:last-child {
  border-bottom: none;
}

.holdings-row .wine-name {
  font-weight: 500;
  color: var(--obsidian);
}

.holdings-row .wine-vintage {
  color: var(--cellar-grey);
}

.holdings-row .holdings-gain.positive {
  color: var(--ask-green);
}

.holdings-row .holdings-gain.negative {
  color: var(--bid-red);
}

/* Performance chart area placeholder */
.performance-chart {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--parchment);
  padding: 2.4rem;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
}

.performance-chart .chart-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--obsidian);
  margin-bottom: 0.8rem;
}

.performance-chart .chart-placeholder {
  width: 100%;
  height: 200px;
  background: linear-gradient(180deg, var(--cream-warm) 0%, var(--cream-antique) 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cellar-grey);
  font-size: 1.2rem;
  border: 1px dashed var(--parchment);
}

/* --- 6. MERCHANT/BUYER PANEL --- */
.merchant-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.4rem;
}

.order-book {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--parchment);
  overflow: hidden;
}

.order-book-header {
  padding: 1.6rem 2.4rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.4rem;
  border-bottom: 1px solid var(--parchment);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-book-header .book-type {
  padding: 0.3rem 1rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.order-book-header .book-type.bids {
  background: rgba(153, 27, 27, 0.08);
  color: var(--bid-red);
}

.order-book-header .book-type.asks {
  background: rgba(6, 95, 70, 0.08);
  color: var(--ask-green);
}

.bid-ask-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  padding: 1.2rem 2.4rem;
  border-bottom: 1px solid var(--parchment);
  font-size: 1.3rem;
  align-items: center;
}

.bid-ask-row:hover {
  background: var(--spotlight);
}

.bid-ask-row .price-cell {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.bid-ask-row .price-cell.bid {
  color: var(--bid-red);
}

.bid-ask-row .price-cell.ask {
  color: var(--ask-green);
}

.trade-execution-panel {
  grid-column: 1 / -1;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--parchment);
  padding: 2.4rem;
}

.trade-execution-panel h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 1.6rem;
}

.trade-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 1.6rem;
  align-items: end;
}

.trade-form-group label {
  display: block;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cellar-grey);
  margin-bottom: 0.6rem;
}

.trade-form-group input,
.trade-form-group select {
  width: 100%;
  padding: 1rem 1.2rem;
  border: 1px solid var(--parchment);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1.3rem;
  color: var(--obsidian);
  background: var(--marble-white);
  transition: border-color 0.2s;
}

.trade-form-group input:focus,
.trade-form-group select:focus {
  outline: none;
  border-color: var(--sovereign-gold);
  box-shadow: 0 0 0 3px var(--spotlight);
}

/* --- 7. SUPPLIER INTERFACE --- */
.supplier-interface {
  max-width: 800px;
  margin: 0 auto;
}

.supplier-interface .supplier-header {
  text-align: center;
  margin-bottom: 3.2rem;
}

.supplier-interface .supplier-header h2 {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
}

.inventory-verification-form {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--parchment);
  padding: 3.2rem;
}

.inventory-verification-form .form-section {
  margin-bottom: 2.4rem;
  padding-bottom: 2.4rem;
  border-bottom: 1px solid var(--parchment);
}

.inventory-verification-form .form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.inventory-verification-form .form-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1.6rem;
  color: var(--obsidian);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.6rem;
  margin-bottom: 1.6rem;
}

.form-row.full {
  grid-template-columns: 1fr;
}

.form-row.triple {
  grid-template-columns: 1fr 1fr 1fr;
}

/* --- 8. PDP — FINE WINE ASSET SNAPSHOT --- */
.wine-asset-snapshot {
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--parchment);
  overflow: hidden;
  margin-bottom: 2.4rem;
}

.asset-snapshot-header {
  background: linear-gradient(135deg, var(--obsidian), var(--obsidian-soft));
  padding: 2rem 2.4rem;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.asset-snapshot-header h3 {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.6rem;
  margin: 0;
  color: var(--sovereign-gold);
}

.asset-snapshot-header .asset-badge {
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(212, 175, 55, 0.15);
  color: var(--sovereign-gold-light);
  border: 1px solid var(--gold-border);
}

.asset-scores {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--parchment);
}

.score-cell {
  text-align: center;
  padding: 1.6rem 1.2rem;
  border-right: 1px solid var(--parchment);
}

.score-cell:last-child {
  border-right: none;
}

.score-cell .score-value {
  font-family: 'Inter', sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--obsidian);
  line-height: 1.2;
}

.score-cell .score-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cellar-grey);
  margin-top: 0.4rem;
}

.asset-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.asset-detail-cell {
  padding: 1.6rem 2.4rem;
  border-bottom: 1px solid var(--parchment);
  border-right: 1px solid var(--parchment);
}

.asset-detail-cell:nth-child(even) {
  border-right: none;
}

.asset-detail-cell:nth-last-child(-n+2) {
  border-bottom: none;
}

.asset-detail-cell .detail-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--cellar-grey);
  margin-bottom: 0.4rem;
}

.asset-detail-cell .detail-value {
  font-family: 'Inter', sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--obsidian);
}

.asset-detail-cell .detail-value .verified-icon {
  color: var(--ask-green);
  margin-left: 0.5rem;
}

/* Storage validation indicator */
.storage-validation {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.4rem;
  background: rgba(6, 95, 70, 0.04);
  border-top: 1px solid var(--parchment);
  font-size: 1.2rem;
  color: var(--ask-green);
}

.storage-validation .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ask-green);
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- 9. 27-YEAR HERITAGE BAR --- */
.heritage-bar {
  background: linear-gradient(135deg, var(--vineyard-burgundy), #3A0A12);
  border-radius: 12px;
  padding: 2rem 2.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.4rem;
  position: relative;
  overflow: hidden;
}

.heritage-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 40px,
    rgba(212, 175, 55, 0.03) 40px,
    rgba(212, 175, 55, 0.03) 80px
  );
  pointer-events: none;
}

.heritage-bar .heritage-icon {
  font-size: 3.2rem;
  margin-right: 1.6rem;
  flex-shrink: 0;
}

.heritage-bar .heritage-content {
  flex: 1;
}

.heritage-bar .heritage-title {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--sovereign-gold);
  margin-bottom: 0.4rem;
}

.heritage-bar .heritage-text {
  font-family: 'Inter', sans-serif;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.6;
  max-width: 600px;
}

.heritage-bar .heritage-seal {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sovereign-gold-light);
  border: 1px solid var(--gold-border);
  padding: 0.6rem 1.6rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- 10. PROVENANCE SECTION (Updated) --- */
.provenance-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--parchment);
  overflow: hidden;
  margin-bottom: 2.4rem;
}

.provenance-card .prov-header {
  padding: 1.6rem 2.4rem;
  border-bottom: 1px solid var(--parchment);
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--obsidian);
}

.provenance-card .prov-header .prov-icon {
  color: var(--sovereign-gold);
  margin-right: 0.8rem;
}

.provenance-timeline {
  padding: 2.4rem;
}

.prov-timeline-item {
  display: flex;
  gap: 1.6rem;
  padding-bottom: 2rem;
  position: relative;
  padding-left: 3.2rem;
}

.prov-timeline-item::before {
  content: '';
  position: absolute;
  left: 0.4rem;
  top: 0.8rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--sovereign-gold);
  border: 2px solid var(--cream-antique);
  z-index: 1;
}

.prov-timeline-item::after {
  content: '';
  position: absolute;
  left: 0.9rem;
  top: 2.4rem;
  bottom: 0;
  width: 1px;
  background: var(--parchment);
}

.prov-timeline-item:last-child::after {
  display: none;
}

.prov-timeline-item .prov-step-label {
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sovereign-gold-dark);
  min-width: 80px;
}

.prov-timeline-item .prov-step-detail {
  font-size: 1.3rem;
  color: var(--obsidian);
}

/* --- 11. LUXURY BUTTONS --- */
.luxury-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.2rem 2.4rem;
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.luxury-btn-primary {
  background: linear-gradient(135deg, var(--sovereign-gold), var(--sovereign-gold-dark));
  color: var(--obsidian);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.luxury-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.luxury-btn-secondary {
  background: var(--obsidian);
  color: #fff;
}

.luxury-btn-secondary:hover {
  background: var(--obsidian-soft);
  transform: translateY(-1px);
}

.luxury-btn-outline {
  background: transparent;
  color: var(--obsidian);
  border: 1px solid var(--parchment);
}

.luxury-btn-outline:hover {
  border-color: var(--sovereign-gold);
  color: var(--sovereign-gold-dark);
  background: var(--spotlight);
}

/* --- 12. MOBILE HAMBURGER MENU --- */
@media (max-width: 767px) {
  /* Show hamburger icon */
  .menu-open {
    display: block !important;
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    cursor: pointer;
    color: var(--obsidian, #111827);
    font-size: 2.4rem;
    text-align: center;
    line-height: 44px;
    text-decoration: none;
    background: rgba(255,255,255,0.9);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  }

  /* Mobile menu open state - slide-in overlay */
  .menu-main {
    position: fixed !important;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh !important;
    background: var(--cream-antique, #FDFBF7);
    z-index: 99999 !important;
    transition: right 0.3s ease;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    overflow-y: auto;
    padding: 24px;
    display: block !important;
  }

  .menu-main.open {
    right: 0 !important;
  }

  /* Menu list styling */
  .menu-main__list {
    flex-direction: column !important;
    gap: 0 !important;
    list-style: none;
    padding: 0;
    margin: 48px 0 0;
  }

  .menu-main__item {
    border-bottom: 1px solid var(--parchment, #EDE7D9);
  }

  .menu-main__item a,
  .menu-main__link {
    display: block !important;
    padding: 14px 16px !important;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--obsidian, #111827) !important;
    text-decoration: none !important;
  }

  .menu-main__item a:hover,
  .menu-main__link:hover {
    background: rgba(212, 175, 55, 0.08);
  }

  /* Dark overlay behind menu */
  body.open-menu::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99998;
  }

  /* Ensure main header is positioned for absolute children */
  .page-header .header.content {
    position: relative;
  }
}

/* --- 13. HERO TYPOGRAPHY CLIP FIX --- */
.home-hero-content h1 {
  padding-left: 4px;
  /* Negative letter-spacing on overflow:hidden container clips leading chars;
     small padding-left gives the initial 'I' breathing room */
}

@media (max-width: 768px) {
  .home-hero-content h1 {
    font-size: 2.8rem;
    padding: 0 8px;
    word-break: break-word;
  }
  .home-hero {
    overflow: hidden; /* keep overflow hidden but content has padding */
  }
}

/* --- 14. RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
  .investor-dashboard {
    grid-template-columns: 1fr;
  }

  .portfolio-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .merchant-panel {
    grid-template-columns: 1fr;
  }

  .asset-scores {
    grid-template-columns: repeat(2, 1fr);
  }

  .asset-details-grid {
    grid-template-columns: 1fr;
  }

  .asset-detail-cell:nth-child(even) {
    border-right: 1px solid var(--parchment);
  }

  .heritage-bar {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }

  .heritage-bar .heritage-text {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .dashboard-tabs {
    flex-direction: column;
    border-radius: 12px;
  }

  .dashboard-tab.active::after {
    width: 40%;
    left: 30%;
  }

  .holdings-table-header,
  .holdings-row {
    grid-template-columns: 2fr 1fr 1fr;
  }

  .trade-form-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .form-row.triple {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 480px) {
  .portfolio-total-value .value-amount {
    font-size: 2.4rem;
  }

  .portfolio-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .holdings-table-header,
  .holdings-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* --- 13. TRANSITION HELPER --- */
.fade-in {
  animation: fadeIn 0.4s ease;
}

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

/* --- 15. BRUTE-FORCE MOBILE OVERFLOW & LAYOUT LOCK --- */
/* Override any hidden desktop extensions causing horizontal drift */
@media (max-width: 767px) {
  html, body, .page-wrapper, #maincontent {
    max-width: 100vw !important;
    width: 100vw !important;
    overflow-x: hidden !important;
    position: relative !important;
  }

  /* ---- 15a. LOGO FIX — maintain aspect ratio ---- */
  .header.content .logo {
    height: auto !important;
    max-height: 48px !important;
    margin: 8px 0 !important;
    flex: 0 0 auto;
  }
  .header.content .logo img {
    height: auto !important;
    max-height: 48px !important;
    width: auto !important;
    object-fit: contain !important;
  }

  /* ---- 15b. HEADER GRID — logo left, hamburger right ---- */
  .header.content {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    gap: 8px;
  }

  /* Hamburger: far right */
  .menu-open {
    order: 10 !important;
    position: static !important;
    transform: none !important;
    flex: 0 0 44px;
    margin-left: auto;
  }

  /* Push search icon after logo but before hamburger */
  .header.content .block-search {
    order: 5;
    margin: 0 !important;
    flex: 0 0 auto;
  }
  .header.content .block-search input {
    display: none;
  }
  .header.content .block-search .action.search {
    position: static !important;
    display: block !important;
  }
  .header.content .block-search .action.search:before {
    color: #fff;
    font-size: 1.8rem;
  }

  /* Hide stray GBP text & header links clutter */
  .header.content .switcher-currency,
  .header.content .header.links li:not(.authorization-link),
  .header.content .greet.welcome {
    display: none !important;
  }
  .header.content .header.links {
    gap: 6px !important;
  }
  .header.content .header.links .authorization-link a {
    font-size: 1rem !important;
    padding: 4px 12px !important;
  }
  /* Cart & minicart size */
  .minicart-wrapper {
    margin-left: 4px !important;
  }
  .minicart-wrapper .action.showcart {
    font-size: 1.8rem !important;
  }

  /* ---- 15c. HIDE SOCIAL BAR & CLEAN UP HEADER PANEL ON MOBILE ---- */
  .panel.header .social-icons-list,
  .panel.header .social-icons,
  .header.panel .social-icons-list {
    display: none !important;
  }
  /* Hide currency switcher & welcome text in panel */
  .panel.header .switcher-currency,
  .panel.header .greet.welcome {
    display: none !important;
  }
  /* Keep only essential header links (sign in/account) visible */
  .panel.header .header.links li:not(.authorization-link) {
    display: none !important;
  }
  .panel.header {
    justify-content: flex-end !important;
    min-height: 28px !important;
    height: auto !important;
    padding: 2px 12px !important;
    gap: 4px !important;
  }
  .panel.header .header.links {
    gap: 6px !important;
  }
  .panel.header .header.links a {
    font-size: 1rem !important;
  }
  .panel.header .authorization-link a {
    padding: 2px 10px !important;
    font-size: 0.9rem !important;
  }

  /* ---- 15d. PREMIUM BUTTON SYMMETRY ---- */
  .home-hero-content .hero-ctas .btn-primary,
  .home-hero-content .hero-ctas .btn-secondary {
    font-size: 1.2rem;
    padding: 12px 28px;
    min-width: 160px;
    text-align: center;
  }
  .home-hero-content .hero-ctas .btn-secondary {
    border-width: 2.5px !important;
    background: rgba(255,255,255,0.08) !important;
    backdrop-filter: blur(2px);
    transition: all 0.3s ease;
  }
  .home-hero-content .hero-ctas .btn-secondary:hover {
    background: rgba(255,255,255,0.2) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  }

  /* ---- 15e. BECOME-A-CLIENT FORM OVERFLOW FIX ---- */
  .cms-page-view form input,
  .cms-page-view form select,
  .cms-page-view form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .cms-page-view form label {
    display: block !important;
    margin-bottom: 4px;
    font-weight: 600;
  }
  .cms-page-view form .field {
    margin-bottom: 1.2rem;
  }

  /* ---- 15f. WINE STORAGE FEE TABLE RESPONSIVE ---- */
  .cms-page-view table,
  .cms-page-view .fee-table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .cms-page-view table tbody,
  .cms-page-view table tr,
  .cms-page-view table td,
  .cms-page-view table th {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
  }
  .cms-page-view table tr {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--parchment, #EDE7D9);
  }
  .cms-page-view table td {
    padding: 0.4rem 0;
    border: none !important;
    text-align: left !important;
  }
  .cms-page-view table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--cellar-grey, #78716C);
    margin-bottom: 2px;
  }
  .cms-page-view table thead {
    display: none !important;
  }

  /* ---- 15g. INVESTOR DOSSIER MOBILE STACKING ---- */
  .investor-dossier .dossier-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  .investor-dossier .dossier-primary,
  .investor-dossier .dossier-sidebar {
    padding: 0 !important;
  }
  .investor-dossier .report-card {
    padding: 1.5rem !important;
  }
  .investor-dossier .report-list > div {
    padding: 1.2rem 1.5rem !important;
    flex-wrap: wrap;
  }
  .investor-dossier .report-list > div a.luxury-btn {
    margin-left: 0 !important;
    width: 100%;
    justify-content: center;
  }
  .investor-dossier .dossier-sidebar > div {
    margin-bottom: 1.5rem;
  }
  .investor-dossier .heritage-bar {
    margin-top: 2rem;
  }
}
