/* =========================================================
   EPHARO COMMODITIES MODULE
   AWS-ready frontend module
   Source: /ai/commodities.json

   Controls only:
   - commodities homepage card
   - commodities detail dashboard
   - commodities data switcher
   - commodities dashboard rows

   Global Xenyra AI card styling is NOT here.
   Required global component:
   /epharo-assets/components/xenyra-ai-card/xenyra-ai-card.css

   Do NOT put .epharo-xai-card internal styling here.
   Do NOT depend on news CSS classes.
   ========================================================= */

:root{
  --epharo-ink:#173b2a;
  --epharo-muted:#5f6d63;
  --epharo-muted-2:#7b857d;

  --epharo-green:#165c34;
  --epharo-green-dark:#104726;
  --epharo-green-soft:#eaf4eb;

  --epharo-soft:#f4f8f3;
  --epharo-soft-2:#edf5eb;
  --epharo-white:#ffffff;
  --epharo-line:rgba(23,59,42,.08);

  --epharo-shadow:0 18px 48px rgba(23,59,42,.09);
  --epharo-shadow-soft:0 12px 30px rgba(23,59,42,.06);
  --epharo-shadow-strong:0 28px 80px rgba(23,59,42,.12);

  --epharo-radius-card:28px;
  --epharo-radius-hero:34px;
  --epharo-radius-row:18px;
  --epharo-radius-btn:999px;
}

/* =========================================================
   SHARED BASE
   ========================================================= */

.ephc-kicker{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-bottom:12px;
  color:#6f9275;
  font-size:12px;
  font-weight:850;
  letter-spacing:.10em;
  text-transform:uppercase;
}

.ephc-kicker::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(135deg,#4f9f5d,#b7e6a8);
  box-shadow:0 0 0 5px rgba(79,159,93,.12);
}

.ephc-state{
  padding:18px;
  border:1px solid var(--epharo-line);
  border-radius:20px;
  background:var(--epharo-white);
  color:var(--epharo-ink);
  box-shadow:var(--epharo-shadow-soft);
  font-size:14px;
  line-height:1.6;
}

.ephc-is-loading{
  opacity:.62;
  pointer-events:none;
}

/* =========================================================
   HOME CARD
   ========================================================= */

.ephc-home-box{
  position:relative;
  overflow:hidden;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-sizing:border-box;
  height:100%;
  padding:24px;
  border:1px solid rgba(23,59,42,.075);
  border-radius:var(--epharo-radius-card);
  background:
    radial-gradient(circle at 8% 0%, rgba(183,230,168,.34), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(101,139,255,.07), transparent 28%),
    linear-gradient(180deg,#ffffff 0%,#fbfdfb 100%);
  box-shadow:var(--epharo-shadow);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.ephc-home-box::after{
  content:"";
  position:absolute;
  right:-74px;
  top:-74px;
  width:178px;
  height:178px;
  border-radius:999px;
  background:rgba(47,107,61,.055);
  pointer-events:none;
}

.ephc-home-box:hover{
  transform:translateY(-2px);
  border-color:rgba(47,107,61,.15);
  box-shadow:0 22px 56px rgba(23,59,42,.12);
}

.ephc-home-title{
  margin:0 0 10px;
  color:var(--epharo-ink);
  font-size:clamp(25px,2.15vw,34px);
  line-height:1.02;
  font-weight:900;
  letter-spacing:-.04em;
}

.ephc-home-subtitle{
  max-width:460px;
  margin:0 0 18px;
  color:var(--epharo-muted);
  font-size:13px;
  line-height:1.58;
}

.ephc-home-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.ephc-home-row{
  display:grid;
  grid-template-columns:minmax(120px,1.15fr) minmax(105px,.8fr) minmax(72px,.42fr);
  gap:12px;
  align-items:center;
  padding:12px 13px;
  border:1px solid rgba(23,59,42,.055);
  border-radius:var(--epharo-radius-row);
  background:rgba(244,248,243,.92);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
}

.ephc-home-row:hover,
.ephc-home-row.active{
  transform:translateX(3px);
  border-color:rgba(47,107,61,.12);
  background:var(--epharo-soft-2);
  box-shadow:0 9px 20px rgba(47,107,61,.09);
}

.ephc-home-name{
  margin-bottom:3px;
  color:var(--epharo-ink);
  font-size:14px;
  line-height:1.16;
  font-weight:900;
}

.ephc-home-market{
  color:#7b857d;
  font-size:12px;
  line-height:1.35;
}

.ephc-home-price{
  color:var(--epharo-ink);
  font-size:15px;
  font-weight:900;
  text-align:right;
  white-space:nowrap;
}

.ephc-home-change{
  font-size:13px;
  font-weight:850;
  white-space:nowrap;
  text-align:right;
}

.ephc-home-updated{
  margin-top:12px;
  color:#7b857d;
  font-size:12px;
  line-height:1.4;
}

.ephc-home-actions{
  margin-top:16px;
}

/* =========================================================
   HOME BUTTON
   ========================================================= */

.ephc-button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:12px 20px;
  border-radius:var(--epharo-radius-btn);
  background:var(--epharo-green);
  color:#ffffff;
  text-decoration:none;
  font-size:14px;
  line-height:1;
  font-weight:850;
  box-shadow:0 10px 22px rgba(47,107,61,.20);
  transition:transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.ephc-button:hover{
  transform:translateY(-1px);
  background:var(--epharo-green-dark);
  color:#ffffff;
  box-shadow:0 12px 26px rgba(47,107,61,.24);
}

/* =========================================================
   DETAIL PAGE
   ========================================================= */

#epharo-commodities-page,
#epharo-commodities-detail{
  width:100%;
  max-width:1320px;
  margin:0 auto;
  padding:20px 20px 72px;
  font-family:inherit;
}

.ephc-page-shell{
  width:100%;
  max-width:1320px;
  margin:0 auto;
  padding:24px 0 60px;
}

.ephc-dashboard-shell{
  width:100%;
}

.ephc-back{
  margin:0 0 18px;
}

.ephc-back a{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--epharo-ink);
  text-decoration:none;
  font-size:18px;
  font-weight:850;
}

.ephc-back a:hover{
  text-decoration:underline;
  text-underline-offset:4px;
}

.ephc-page-updated{
  margin-top:18px;
  color:#7b857d;
  font-size:14px;
}

/* =========================================================
   DETAIL DASHBOARD HERO
   ========================================================= */

.ephc-dashboard-hero{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(300px,360px);
  gap:42px;
  align-items:center;
  margin-bottom:34px;
  padding:52px 44px;
  border:1px solid rgba(23,59,42,.08);
  border-radius:var(--epharo-radius-hero);
  background:
    radial-gradient(circle at 5% 0%, rgba(183,230,168,.28), transparent 34%),
    radial-gradient(circle at 94% 0%, rgba(92,130,255,.12), transparent 32%),
    linear-gradient(135deg,#f8fcf9 0%,#eef7f0 52%,#f4f8ff 100%);
  box-shadow:var(--epharo-shadow-strong);
}

.ephc-dashboard-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,rgba(255,255,255,.28),transparent 38%),
    radial-gradient(circle at 12% 20%,rgba(255,255,255,.55),transparent 22%);
  pointer-events:none;
}

.ephc-dashboard-hero-main,
.ephc-dashboard-hero .epharo-xai-card{
  position:relative;
  z-index:1;
}

.ephc-dashboard-hero .epharo-xai-card{
  justify-self:end;
  align-self:center;
  width:100%;
  max-width:360px;
}

.ephc-dashboard-title{
  margin:0 0 18px;
  color:var(--epharo-ink);
  font-size:clamp(48px,6vw,82px);
  line-height:.92;
  letter-spacing:-.07em;
  font-weight:950;
}

.ephc-dashboard-subtitle{
  max-width:760px;
  margin:0;
  color:var(--epharo-muted);
  font-size:clamp(18px,1.6vw,23px);
  line-height:1.45;
}

/* =========================================================
   COMMODITIES DATA SWITCHER
   ========================================================= */

.epharo-commodities-data-select{
  position:relative;
  z-index:20;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  max-width:1120px;
  margin:0 auto 34px;
  text-align:center;
}

.epharo-commodities-data-dropdown{
  position:relative;
  display:inline-flex;
  flex-direction:column;
  align-items:center;
}

#epharo-commodities-page .epharo-commodities-data-btn,
#epharo-commodities-detail .epharo-commodities-data-btn{
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:9px !important;
  min-height:52px !important;
  padding:13px 22px !important;
  border:1px solid rgba(47,107,61,.16) !important;
  border-radius:16px !important;
  background:#ffffff !important;
  color:var(--epharo-ink) !important;
  box-shadow:0 12px 28px rgba(23,59,42,.08) !important;
  font-size:15px !important;
  line-height:1 !important;
  font-weight:850 !important;
  cursor:pointer !important;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease !important;
}

#epharo-commodities-page .epharo-commodities-data-btn:hover,
#epharo-commodities-detail .epharo-commodities-data-btn:hover{
  transform:translateY(-1px) !important;
  background:#f7fbf7 !important;
  border-color:rgba(47,107,61,.24) !important;
  box-shadow:0 16px 34px rgba(23,59,42,.11) !important;
}

.epharo-commodities-data-dropdown.is-open .epharo-commodities-data-btn{
  background:#ffffff !important;
  border-color:rgba(47,107,61,.26) !important;
}

.epharo-commodities-data-label{
  color:#6c7d71 !important;
  font-weight:750 !important;
}

.epharo-commodities-data-btn strong{
  color:var(--epharo-ink) !important;
  font-weight:950 !important;
  white-space:nowrap;
}

.epharo-commodities-data-flag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.epharo-commodities-data-caret{
  color:#6c7d71 !important;
  opacity:.72;
  font-size:13px;
  transition:transform .18s ease;
}

.epharo-commodities-data-dropdown.is-open .epharo-commodities-data-caret{
  transform:rotate(180deg);
}

.epharo-commodities-data-note{
  max-width:760px;
  margin:0;
  color:#7b857d;
  font-size:13px;
  line-height:1.5;
}

/* Dropdown menu */

.epharo-commodities-data-menu{
  position:absolute;
  left:50%;
  top:calc(100% + 14px);
  z-index:90;
  width:280px;
  max-height:310px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:10px;
  border:1px solid rgba(23,59,42,.10);
  border-radius:20px;
  background:rgba(255,255,255,.98);
  box-shadow:0 24px 64px rgba(23,59,42,.16);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateX(-50%) translateY(-8px);
  transition:opacity .18s ease, visibility .18s ease, transform .18s ease;
}

.epharo-commodities-data-menu.is-open,
.epharo-commodities-data-dropdown.is-open .epharo-commodities-data-menu{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateX(-50%) translateY(0);
}

.epharo-commodities-data-menu::-webkit-scrollbar{
  width:8px;
}

.epharo-commodities-data-menu::-webkit-scrollbar-track{
  background:rgba(23,59,42,.04);
  border-radius:999px;
}

.epharo-commodities-data-menu::-webkit-scrollbar-thumb{
  background:rgba(22,92,52,.22);
  border-radius:999px;
}

/* Country pills */

.epharo-commodities-tabs{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:10px;
  width:100%;
  max-width:1120px;
}

#epharo-commodities-page .epharo-commodities-filter,
#epharo-commodities-detail .epharo-commodities-filter{
  appearance:none !important;
  -webkit-appearance:none !important;
  box-sizing:border-box !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  min-height:44px !important;
  padding:11px 17px !important;
  border:1px solid rgba(47,107,61,.14) !important;
  border-radius:14px !important;
  background:#eef6ef !important;
  color:var(--epharo-ink) !important;
  font-size:14px !important;
  line-height:1 !important;
  font-weight:850 !important;
  box-shadow:0 8px 20px rgba(23,59,42,.055) !important;
  cursor:pointer !important;
  text-decoration:none !important;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease !important;
}

#epharo-commodities-page .epharo-commodities-filter span,
#epharo-commodities-detail .epharo-commodities-filter span{
  color:inherit !important;
  opacity:1 !important;
}

#epharo-commodities-page .epharo-commodities-filter:hover,
#epharo-commodities-detail .epharo-commodities-filter:hover{
  transform:translateY(-1px) !important;
  background:#e4f1e7 !important;
  color:var(--epharo-ink) !important;
  border-color:rgba(47,107,61,.24) !important;
  box-shadow:0 12px 26px rgba(23,59,42,.09) !important;
}

#epharo-commodities-page .epharo-commodities-filter.is-active,
#epharo-commodities-detail .epharo-commodities-filter.is-active{
  background:var(--epharo-green) !important;
  border-color:var(--epharo-green) !important;
  color:#ffffff !important;
  box-shadow:0 12px 28px rgba(47,107,61,.20) !important;
}

#epharo-commodities-page .epharo-commodities-filter.is-active span,
#epharo-commodities-detail .epharo-commodities-filter.is-active span{
  color:#ffffff !important;
}

/* Dropdown menu item variant */

#epharo-commodities-page .epharo-commodities-data-menu .epharo-commodities-filter,
#epharo-commodities-detail .epharo-commodities-data-menu .epharo-commodities-filter{
  width:100% !important;
  justify-content:flex-start !important;
  min-height:44px !important;
  padding:11px 14px !important;
  border:0 !important;
  border-radius:14px !important;
  background:transparent !important;
  color:var(--epharo-ink) !important;
  box-shadow:none !important;
  text-align:left !important;
}

#epharo-commodities-page .epharo-commodities-data-menu .epharo-commodities-filter:hover,
#epharo-commodities-detail .epharo-commodities-data-menu .epharo-commodities-filter:hover{
  transform:none !important;
  background:rgba(47,107,61,.06) !important;
  box-shadow:none !important;
}

#epharo-commodities-page .epharo-commodities-data-menu .epharo-commodities-filter.is-active,
#epharo-commodities-detail .epharo-commodities-data-menu .epharo-commodities-filter.is-active{
  background:var(--epharo-green) !important;
  color:#ffffff !important;
}

#epharo-commodities-page .epharo-commodities-data-menu .epharo-commodities-filter.is-active span,
#epharo-commodities-detail .epharo-commodities-data-menu .epharo-commodities-filter.is-active span{
  color:#ffffff !important;
}

.epharo-commodities-flag{
  line-height:1;
}

/* =========================================================
   AI COMMODITY CALCULATOR
   Premium practical price interpretation block
   ========================================================= */

.ephc-ai-calc{
  position:relative;
  overflow:visible;
  max-width:1120px;
  margin:0 auto 24px;
  padding:24px 26px;
  border:1px solid rgba(23,59,42,.075);
  border-radius:30px;
  background:
    radial-gradient(circle at 0% 0%, rgba(183,230,168,.20), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(92,130,255,.10), transparent 34%),
    linear-gradient(135deg,rgba(255,255,255,.98),rgba(247,252,248,.96));
  box-shadow:
    0 22px 58px rgba(23,59,42,.08),
    inset 0 1px 0 rgba(255,255,255,.88);
}

.ephc-ai-calc-glow{
  position:absolute;
  right:-90px;
  top:-90px;
  width:220px;
  height:220px;
  border-radius:999px;
  background:rgba(22,92,52,.07);
  pointer-events:none;
}

.ephc-ai-calc-head{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:22px;
  align-items:start;
  margin-bottom:18px;
}

.ephc-ai-calc-kicker{
  display:inline-flex;
  margin-bottom:8px;
  color:#6f9275;
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ephc-ai-calc h2{
  margin:0 0 8px;
  color:var(--epharo-ink);
  font-size:clamp(25px,2.35vw,36px);
  line-height:1.03;
  font-weight:950;
  letter-spacing:-.045em;
}

.ephc-ai-calc p{
  max-width:760px;
  margin:0;
  color:var(--epharo-muted);
  font-size:15px;
  line-height:1.5;
}

.ephc-ai-calc-market{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:5px;
  min-width:210px;
  padding:14px 16px;
  border:1px solid rgba(23,59,42,.07);
  border-radius:20px;
  background:rgba(255,255,255,.76);
  box-shadow:
    0 12px 28px rgba(23,59,42,.055),
    inset 0 1px 0 rgba(255,255,255,.82);
}

.ephc-ai-calc-market span{
  color:#75827a;
  font-size:11px;
  line-height:1;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ephc-ai-calc-market strong{
  color:var(--epharo-ink);
  font-size:16px;
  line-height:1.2;
  font-weight:950;
  text-align:right;
}

.ephc-ai-calc-grid{
  position:relative;
  z-index:1;
  display:grid;
  grid-template-columns:minmax(240px,1fr) minmax(180px,.55fr) minmax(230px,.75fr);
  gap:14px;
  align-items:stretch;
}

.ephc-ai-calc-field,
.ephc-ai-calc-result{
  position:relative;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:8px;
  min-height:92px;
  padding:14px 16px;
  border:1px solid rgba(23,59,42,.075);
  border-radius:22px;
  background:rgba(255,255,255,.86);
  box-shadow:
    0 12px 28px rgba(23,59,42,.045),
    inset 0 1px 0 rgba(255,255,255,.88);
}

.ephc-ai-calc-field > span,
.ephc-ai-calc-result > span{
  color:#6f9275;
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.ephc-ai-calc-search-field{
  position:relative;
  display:block;
  width:100%;
}

.ephc-ai-calc-select,
.ephc-ai-calc-input{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:44px;
  border:0;
  background:transparent;
  color:var(--epharo-ink);
  font-size:20px;
  line-height:1.1;
  font-weight:950;
  outline:none;
}

.ephc-ai-calc-select{
  padding-right:44px;
}

.ephc-ai-calc-input{
  padding-right:4px;
}

.ephc-ai-calc-arrow{
  appearance:none;
  -webkit-appearance:none;
  position:absolute;
  right:0;
  top:50%;
  transform:translateY(-50%);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:rgba(23,59,42,.72);
  font-size:19px;
  line-height:1;
  font-weight:950;
  cursor:pointer;
  box-shadow:none;
}

.ephc-ai-calc-arrow:hover{
  background:rgba(23,59,42,.055);
  color:var(--epharo-ink);
  border-color:transparent;
  box-shadow:none;
}

.ephc-ai-calc-search-field.is-open .ephc-ai-calc-arrow{
  transform:translateY(-50%) rotate(180deg);
}

.ephc-ai-calc-suggestions{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 10px);
  z-index:120;
  display:none;
  max-height:280px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:10px;
  border:1px solid rgba(23,59,42,.09);
  border-radius:20px;
  background:rgba(250,253,251,.98);
  box-shadow:
    0 24px 54px rgba(23,59,42,.13),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.ephc-ai-calc-search-field.is-open .ephc-ai-calc-suggestions{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar{
  width:8px;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar-track{
  background:rgba(23,59,42,.04);
  border-radius:999px;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar-thumb{
  background:rgba(22,92,52,.18);
  border-radius:999px;
}

.ephc-ai-calc-suggestion{
  appearance:none;
  -webkit-appearance:none;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  width:100%;
  min-height:38px;
  padding:9px 12px;
  border:0;
  border-radius:13px;
  background:transparent;
  color:var(--epharo-ink);
  font-size:14px;
  line-height:1.2;
  font-weight:800;
  text-align:left;
  cursor:pointer;
}

.ephc-ai-calc-suggestion:hover{
  background:rgba(234,244,235,.92);
}

.ephc-ai-calc-result strong{
  color:var(--epharo-ink);
  font-size:clamp(26px,3vw,42px);
  line-height:1;
  font-weight:950;
  letter-spacing:-.045em;
}

.ephc-ai-calc-result small{
  color:#75827a;
  font-size:13px;
  line-height:1.35;
  font-weight:850;
}

.ephc-ai-calc-note{
  position:relative;
  z-index:1;
  margin-top:14px;
  padding:13px 15px;
  border:1px solid rgba(196,123,53,.14);
  border-radius:18px;
  background:rgba(255,248,237,.70);
  color:#75501e;
  font-size:13px;
  line-height:1.55;
}

.ephc-ai-calc-note strong{
  color:#6b4618;
}

@media (max-width:980px){
  .ephc-ai-calc-head,
  .ephc-ai-calc-grid{
    grid-template-columns:1fr;
  }

  .ephc-ai-calc-market{
    align-items:flex-start;
  }

  .ephc-ai-calc-market strong{
    text-align:left;
  }
}

@media (max-width:480px){
  .ephc-ai-calc{
    padding:20px;
    border-radius:24px;
  }

  .ephc-ai-calc-select,
  .ephc-ai-calc-input{
    font-size:18px;
  }
}

/* Calculator dropdown refinement - final clean version */

.ephc-ai-calc-grid{
  position:relative;
  z-index:20;
  overflow:visible;
}

.ephc-ai-calc-commodity-field{
  position:relative;
  z-index:50;
}

.ephc-ai-calc-search-field{
  position:relative;
  z-index:80;
  display:block;
  width:100%;
}

.ephc-ai-calc-search-field .ephc-ai-calc-select{
  padding-right:86px;
}

.ephc-ai-calc-select::placeholder{
  color:rgba(23,59,42,.30);
  font-size:18px;
  font-weight:750;
}

.ephc-ai-calc-clear,
.ephc-ai-calc-arrow{
  appearance:none !important;
  -webkit-appearance:none !important;
  position:absolute !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  margin:0 !important;
  padding:0 !important;
  border:0 !important;
  border-radius:999px !important;
  background:transparent !important;
  color:rgba(23,59,42,.72) !important;
  box-shadow:none !important;
  outline:none !important;
  line-height:1 !important;
  font-weight:900 !important;
  cursor:pointer !important;
}

.ephc-ai-calc-clear{
  right:42px !important;
  font-size:25px !important;
}

.ephc-ai-calc-arrow{
  right:2px !important;
  font-size:24px !important;
}

.ephc-ai-calc-clear:hover,
.ephc-ai-calc-arrow:hover,
.ephc-ai-calc-clear:focus,
.ephc-ai-calc-arrow:focus{
  background:rgba(23,59,42,.055) !important;
  color:var(--epharo-ink) !important;
  box-shadow:none !important;
  outline:none !important;
}

.ephc-ai-calc-search-field.is-open .ephc-ai-calc-arrow{
  transform:translateY(-50%) rotate(180deg) !important;
  color:var(--epharo-ink) !important;
}

.ephc-ai-calc-suggestions{
  position:absolute !important;
  left:0 !important;
  right:0 !important;
  top:calc(100% + 12px) !important;
  z-index:99999 !important;
  display:none !important;
  max-height:270px !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  padding:8px !important;
  border:1px solid rgba(23,59,42,.10) !important;
  border-radius:20px !important;
  background:rgba(255,255,255,.985) !important;
  box-shadow:
    0 28px 70px rgba(23,59,42,.16),
    inset 0 1px 0 rgba(255,255,255,.96) !important;
}

.ephc-ai-calc-search-field.is-open .ephc-ai-calc-suggestions{
  display:flex !important;
  flex-direction:column !important;
  gap:4px !important;
}

.ephc-ai-calc-suggestion{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:40px !important;
  margin:0 !important;
  padding:10px 13px !important;
  border:0 !important;
  border-radius:13px !important;
  background:transparent !important;
  color:var(--epharo-ink) !important;
  box-shadow:none !important;
  outline:none !important;
  font-size:15px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  text-align:left !important;
  cursor:pointer !important;
}

.ephc-ai-calc-suggestion span{
  color:var(--epharo-ink) !important;
  font:inherit !important;
}

.ephc-ai-calc-suggestion:hover,
.ephc-ai-calc-suggestion:focus{
  background:rgba(23,59,42,.055) !important;
  color:var(--epharo-ink) !important;
  box-shadow:none !important;
  outline:none !important;
}

.ephc-ai-calc-suggestion[style*="none"]{
  display:none !important;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar{
  width:8px !important;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar-track{
  background:rgba(23,59,42,.04) !important;
  border-radius:999px !important;
}

.ephc-ai-calc-suggestions::-webkit-scrollbar-thumb{
  background:rgba(22,92,52,.18) !important;
  border-radius:999px !important;
}

.ephc-ai-calc-note{
  position:relative !important;
  z-index:0 !important;
}

/* =========================================================
   LOCAL NOTICE
   ========================================================= */

.ephc-local-notice{
  max-width:980px;
  margin:0 auto 24px;
  padding:14px 18px;
  border:1px solid rgba(196,123,53,.18);
  border-radius:18px;
  background:rgba(255,248,237,.86);
  color:#75501e;
  font-size:14px;
  line-height:1.55;
  text-align:center;
  box-shadow:0 10px 24px rgba(196,123,53,.045);
}

/* =========================================================
   COMMODITY SEARCH / DISPLAY CONTROL
   Clean AWS-ready filter/search bar
   ========================================================= */

.ephc-commodity-tools{
  display:grid;
  grid-template-columns:minmax(320px,1fr) auto auto;
  gap:16px;
  align-items:center;
  max-width:1120px;
  margin:0 auto 24px;
  padding:16px 18px;
  border:1px solid rgba(23,59,42,.07);
  border-radius:26px;
  background:
    radial-gradient(circle at 0% 0%, rgba(183,230,168,.12), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(92,130,255,.075), transparent 34%),
    rgba(255,255,255,.94);
  box-shadow:
    0 18px 44px rgba(23,59,42,.065),
    inset 0 1px 0 rgba(255,255,255,.78);
}

.ephc-commodity-search-wrap{
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0;
}

.ephc-commodity-search-label{
  color:#6f9275;
  font-size:11px;
  line-height:1;
  font-weight:950;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ephc-commodity-search-field{
  position:relative;
  display:block;
  width:100%;
  border-radius:18px;
}

.ephc-commodity-search{
  appearance:none !important;
  -webkit-appearance:none !important;
  width:100% !important;
  min-height:54px !important;
  padding:14px 104px 14px 18px !important;
  border:1px solid rgba(23,59,42,.10) !important;
  border-radius:18px !important;
  background:
    linear-gradient(180deg,rgba(255,255,255,.96),rgba(250,253,251,.94)) !important;
  color:var(--epharo-ink) !important;
  box-shadow:
    0 10px 24px rgba(23,59,42,.045),
    inset 0 1px 0 rgba(255,255,255,.90) !important;
  font-size:16px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  outline:none !important;
}

.ephc-commodity-search::placeholder{
  color:rgba(23,59,42,.34);
  font-weight:800;
}

.ephc-commodity-search:hover{
  border-color:rgba(23,59,42,.14) !important;
  background:#ffffff !important;
}

.ephc-commodity-search:focus{
  border-color:rgba(22,92,52,.22) !important;
  background:#ffffff !important;
  box-shadow:
    0 14px 32px rgba(23,59,42,.065),
    0 0 0 4px rgba(22,92,52,.055),
    inset 0 1px 0 rgba(255,255,255,.94) !important;
}

.ephc-commodity-clear,
.ephc-commodity-arrow{
  appearance:none !important;
  -webkit-appearance:none !important;
  position:absolute !important;
  top:50% !important;
  transform:translateY(-50%) !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  width:34px !important;
  height:34px !important;
  border:1px solid rgba(23,59,42,.06) !important;
  border-radius:999px !important;
  background:rgba(244,248,243,.82) !important;
  color:rgba(23,59,42,.72) !important;
  line-height:1 !important;
  font-weight:750 !important;
  cursor:pointer !important;
  box-shadow:
    0 8px 18px rgba(23,59,42,.045),
    inset 0 1px 0 rgba(255,255,255,.78) !important;
  transition:
    transform .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease !important;
}

.ephc-commodity-clear{
  right:54px !important;
  font-size:22px !important;
}

.ephc-commodity-arrow{
  right:12px !important;
  font-size:18px !important;
}

.ephc-commodity-clear:hover,
.ephc-commodity-arrow:hover{
  transform:translateY(-50%) scale(1.04) !important;
  background:#ffffff !important;
  border-color:rgba(22,92,52,.16) !important;
  color:var(--epharo-ink) !important;
  box-shadow:
    0 12px 26px rgba(23,59,42,.08),
    0 0 0 7px rgba(22,92,52,.045),
    inset 0 1px 0 rgba(255,255,255,.92) !important;
}

.ephc-commodity-clear:active,
.ephc-commodity-arrow:active{
  transform:translateY(-50%) scale(.98) !important;
}

/* Custom dropdown - controlled inside field, not native browser menu */
.ephc-commodity-suggestions{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 10px);
  z-index:60;
  display:none;
  max-height:280px;
  overflow-y:auto;
  overscroll-behavior:contain;
  padding:10px;
  border:1px solid rgba(23,59,42,.09);
  border-radius:20px;
  background:rgba(250,253,251,.98);
  box-shadow:
    0 24px 54px rgba(23,59,42,.13),
    inset 0 1px 0 rgba(255,255,255,.9);
}

.ephc-commodity-search-field.is-open .ephc-commodity-suggestions{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.ephc-commodity-suggestions::-webkit-scrollbar{
  width:8px;
}

.ephc-commodity-suggestions::-webkit-scrollbar-track{
  background:rgba(23,59,42,.04);
  border-radius:999px;
}

.ephc-commodity-suggestions::-webkit-scrollbar-thumb{
  background:rgba(22,92,52,.18);
  border-radius:999px;
}

.ephc-commodity-suggestion{
  appearance:none !important;
  -webkit-appearance:none !important;
  display:flex !important;
  align-items:center !important;
  justify-content:flex-start !important;
  width:100% !important;
  min-height:38px !important;
  padding:9px 12px !important;
  border:0 !important;
  border-radius:13px !important;
  background:transparent !important;
  color:var(--epharo-ink) !important;
  font-size:14px !important;
  line-height:1.2 !important;
  font-weight:800 !important;
  text-align:left !important;
  cursor:pointer !important;
}

.ephc-commodity-suggestion:hover{
  background:rgba(234,244,235,.92) !important;
}

.ephc-commodity-limit-wrap{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:48px;
  padding:5px;
  border:1px solid rgba(23,59,42,.075);
  border-radius:999px;
  background:rgba(255,255,255,.88);
  box-shadow:
    0 10px 24px rgba(23,59,42,.045),
    inset 0 1px 0 rgba(255,255,255,.86);
  white-space:nowrap;
}

.ephc-commodity-limit-wrap span{
  padding:0 8px 0 10px;
  color:#75827a;
  font-size:13px;
  line-height:1;
  font-weight:850;
}

.ephc-commodity-limit{
  appearance:none !important;
  -webkit-appearance:none !important;
  min-height:36px !important;
  padding:9px 15px !important;
  border:1px solid rgba(23,59,42,.07) !important;
  border-radius:999px !important;
  background:rgba(244,248,243,.86) !important;
  color:var(--epharo-ink) !important;
  font-size:13px !important;
  line-height:1 !important;
  font-weight:900 !important;
  cursor:pointer !important;
  box-shadow:none !important;
  transition:
    transform .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease !important;
}

.ephc-commodity-limit:hover{
  transform:translateY(-1px) !important;
  background:#ffffff !important;
  border-color:rgba(23,59,42,.12) !important;
  color:var(--epharo-ink) !important;
  box-shadow:0 8px 18px rgba(23,59,42,.06) !important;
}

.ephc-commodity-limit.is-active{
  background:var(--epharo-ink) !important;
  border-color:var(--epharo-ink) !important;
  color:#ffffff !important;
  box-shadow:
    0 10px 22px rgba(23,59,42,.18),
    inset 0 1px 0 rgba(255,255,255,.12) !important;
}

.ephc-commodity-count{
  display:inline-flex;
  align-items:center;
  justify-content:flex-end;
  min-height:48px;
  color:#75827a;
  font-size:13px;
  line-height:1.25;
  font-weight:900;
  white-space:nowrap;
}

@media (max-width:980px){
  .ephc-commodity-tools{
    grid-template-columns:1fr;
    align-items:stretch;
  }

  .ephc-commodity-limit-wrap{
    justify-content:flex-start;
    flex-wrap:wrap;
    border-radius:22px;
  }

  .ephc-commodity-count{
    justify-content:flex-start;
  }

  .ephc-commodity-suggestions{
    max-height:240px;
  }
}

@media (max-width:480px){
  .ephc-commodity-tools{
    padding:16px;
    border-radius:22px;
  }

  .ephc-commodity-limit{
    flex:1 1 auto;
  }
}

/* =========================================================
   DASHBOARD ROWS
   ========================================================= */

.ephc-dashboard-grid{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.ephc-dashboard-card{
  display:grid;
  grid-template-columns:minmax(180px,1.1fr) minmax(150px,.75fr) minmax(150px,.75fr) minmax(120px,.55fr) minmax(110px,.45fr);
  gap:14px;
  align-items:center;
  padding:16px 18px;
  border:1px solid rgba(23,59,42,.07);
  border-radius:22px;
  background:
    radial-gradient(circle at 0% 0%,rgba(183,230,168,.14),transparent 30%),
    rgba(255,255,255,.94);
  box-shadow:0 12px 30px rgba(23,59,42,.055);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.ephc-dashboard-card:hover{
  transform:translateY(-1px);
  border-color:rgba(47,107,61,.15);
  background:
    radial-gradient(circle at 0% 0%,rgba(183,230,168,.20),transparent 32%),
    rgba(255,255,255,.98);
  box-shadow:0 16px 36px rgba(23,59,42,.09);
}

.ephc-dashboard-name h3{
  margin:0 0 4px;
  color:var(--epharo-ink);
  font-size:18px;
  line-height:1.1;
  font-weight:950;
}

.ephc-dashboard-name p{
  margin:0;
  color:#7b857d;
  font-size:12px;
  line-height:1.35;
}

.ephc-dashboard-metric,
.ephc-dashboard-change{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.ephc-dashboard-metric span,
.ephc-dashboard-change span{
  color:#7b857d;
  font-size:11px;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:850;
}

.ephc-dashboard-metric strong,
.ephc-dashboard-change strong{
  color:var(--epharo-ink);
  font-size:16px;
  line-height:1.2;
  font-weight:950;
}

.ephc-dashboard-change.is-up strong{
  color:#4f8f58;
}

.ephc-dashboard-change.is-down strong{
  color:#3f79a8;
}

.ephc-dashboard-change.is-flat strong{
  color:#c47b35;
}

.ephc-page-source{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:8px 14px;
  border-radius:999px;
  background:var(--epharo-green-soft);
  color:var(--epharo-ink);
  text-decoration:none;
  font-size:13px;
  font-weight:850;
  white-space:nowrap;
  transition:background .18s ease, transform .18s ease, box-shadow .18s ease;
}

.ephc-page-source:hover{
  transform:translateY(-1px);
  background:#dfeedd;
  color:var(--epharo-ink);
  box-shadow:0 10px 22px rgba(23,59,42,.06);
}

.ephc-page-note{
  margin-top:22px;
  padding:16px 18px;
  border:1px solid rgba(23,59,42,.06);
  border-radius:18px;
  background:#ffffff;
  color:var(--epharo-muted);
  font-size:13px;
  line-height:1.65;
  box-shadow:var(--epharo-shadow-soft);
}

.ephc-page-note strong{
  color:var(--epharo-ink);
}

/* =========================================================
   TREND COLORS
   ========================================================= */

.is-up{
  color:#4f8f58;
}

.is-down{
  color:#3f79a8;
}

.is-flat{
  color:#c47b35;
}

/* =========================================================
   ACCESSIBILITY / MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce){
  .ephc-home-box,
  .ephc-home-row,
  .ephc-button,
  .epharo-commodities-filter,
  .epharo-commodities-data-btn,
  .epharo-commodities-data-menu,
  .ephc-dashboard-card,
  .ephc-page-source{
    transition:none !important;
  }
}

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

@media (max-width:1100px){
  .ephc-dashboard-hero{
    grid-template-columns:1fr;
  }

  .ephc-dashboard-hero .epharo-xai-card{
    justify-self:start;
  }

  .ephc-dashboard-card{
    grid-template-columns:1fr 1fr;
  }
}

@media (max-width:980px){
  .ephc-home-row{
    grid-template-columns:1fr;
  }

  .ephc-home-price,
  .ephc-home-change{
    text-align:left;
  }
}

@media (max-width:767px){
  #epharo-commodities-page,
  #epharo-commodities-detail{
    padding:14px 16px 56px;
  }

  .ephc-page-shell{
    padding:18px 0 48px;
  }

  .ephc-home-box{
    padding:18px;
    border-radius:22px;
  }

  .ephc-home-title{
    font-size:28px;
  }

  .ephc-dashboard-hero{
    padding:28px 20px;
    border-radius:26px;
  }

  .ephc-dashboard-title{
    font-size:44px;
  }

  .epharo-commodities-tabs{
    justify-content:center;
    width:100%;
  }

  #epharo-commodities-page .epharo-commodities-filter,
  #epharo-commodities-detail .epharo-commodities-filter{
    flex:0 1 auto;
    min-height:40px !important;
    padding:10px 13px !important;
    font-size:13px !important;
    border-radius:12px !important;
  }

  #epharo-commodities-page .epharo-commodities-data-btn,
  #epharo-commodities-detail .epharo-commodities-data-btn{
    min-height:46px !important;
    padding:12px 16px !important;
    font-size:14px !important;
  }

  .epharo-commodities-data-menu{
    width:min(92vw,300px);
    max-height:300px;
  }

  .ephc-dashboard-card{
    grid-template-columns:1fr;
  }

  .ephc-page-source{
    justify-self:start;
  }
}

@media (max-width:480px){
  .epharo-commodities-data-dropdown,
  .epharo-commodities-data-btn{
    width:100%;
  }

  .epharo-commodities-tabs .epharo-commodities-filter{
    flex:1 1 calc(50% - 10px);
  }
}