:root{
  --bg:#0a0a0b;
  --bg2:#0f0f10;
  --card:#141414;
  --card2:#111;
  --line:#1f1f1f;
  --line2:#222;
  --txt:#fff;
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.56);
  --gold:#ffd700;
  --gold2:#ff8a00;
  --green:#00ffa3;
  --shadow:0 12px 34px rgba(0,0,0,.45);
  --r12:12px;
  --r14:14px;
  --r16:16px;
  --max:1400px;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Poppins",sans-serif;
  background:var(--bg);
  color:var(--txt);
}

/* ===== Header ===== */
header{
  position:sticky;
  top:0;
  z-index:50;
  padding:12px 18px;
  background:rgba(15,15,16,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.head-wrap{
  max-width:var(--max);
  margin:0 auto;
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}
.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:210px;
}
.brand .logo{
  margin:0;
  font-size:20px;
  letter-spacing:.6px;
  background:linear-gradient(90deg,var(--gold),var(--gold2));
  -webkit-background-clip:text;
  color:transparent;
  font-weight:800;
}
.brand .tag{
  font-size:11px;
  padding:6px 10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  color:rgba(255,255,255,.78);
  background:rgba(0,0,0,.25);
}

.top-search{
  flex:1;
  min-width:220px;
  display:flex;
  align-items:center;
  gap:10px;
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
  border-radius:999px;
  padding:10px 12px;
}
.top-search input{
  width:100%;
  background:transparent;
  border:none;
  outline:none;
  color:#fff;
  font-size:14px;
}
.top-search .pill{
  font-size:12px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:rgba(255,255,255,.78);
  background:rgba(0,0,0,.22);
  cursor:pointer;
}

.top-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:10px;
}

.btn-cta, .iconbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:10px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
  border:1px solid rgba(255,255,255,.10);
  user-select:none;
}
.btn-cta.primary{ background:var(--gold); color:#000; }
.btn-cta.ghost{ background:rgba(0,0,0,.22); color:#fff; }
.btn-cta:hover{transform:translateY(-1px)}
.iconbtn{ background:rgba(0,0,0,.22); color:#fff; }
.iconbtn:hover{transform:translateY(-1px)}

/* ===== Language flags ===== */
.langbar{
  display:flex;
  align-items:center;
  gap:6px;
  padding:6px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
}
.langbtn{
  appearance:none;
  border:none;
  background:transparent;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  padding:4px;
  border-radius:8px;
  opacity:.75;
  transform:translateY(0);
}
.langbtn:hover{ opacity:1; transform:translateY(-1px); }
.langbtn.active{
  opacity:1;
  outline:2px solid rgba(255,215,0,.18);
  background:rgba(255,215,0,.10);
}

/* Mobile subnav */
.subnav{
  max-width:var(--max);
  margin:10px auto 0;
  display:none;
  gap:10px;
  align-items:center;
}
.chips{
  flex:1;
  display:flex;
  gap:8px;
  overflow:auto;
  padding-bottom:4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width:none;
}
.chips::-webkit-scrollbar{display:none}
.chipbtn{
  white-space:nowrap;
  border-radius:999px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.86);
  font-weight:900;
  font-size:12px;
  cursor:pointer;
}
.chipbtn strong{
  color:#000;
  background:linear-gradient(90deg,var(--gold),#ffb300);
  padding:2px 8px;
  border-radius:999px;
  margin-right:6px;
  font-size:11px;
}
.chipbtn.active{
  border-color:rgba(255,215,0,.26);
  outline:2px solid rgba(255,215,0,.18);
  background:linear-gradient(180deg, rgba(255,215,0,.12), rgba(0,0,0,.20));
}
.chipfilter{
  flex:0 0 auto;
  padding:8px 12px;
  font-size:12px;
  border-radius:12px;
  font-weight:1000;
  background:rgba(0,0,0,.25);
  color:#fff;
  border:1px solid rgba(255,255,255,.10);
}

/* ===== Hero ===== */
.hero{
  text-align:center;
  padding:84px 18px 56px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,215,0,0.14), transparent 60%),
    linear-gradient(180deg,#0a0a0b,#070707);
  border-bottom:1px solid rgba(255,255,255,.08);
}
.hero-inner{ max-width:980px; margin:0 auto; }
.hero h2{
  font-size:44px;
  line-height:1.08;
  margin:0 0 10px;
  font-weight:800;
  background:linear-gradient(90deg,var(--gold),var(--gold2));
  -webkit-background-clip:text;
  color:transparent;
}
.hero p{
  margin:0 auto 18px;
  font-size:16px;
  color:var(--muted);
  max-width:760px;
}
.hero-row{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin-top:16px;
}
.hero-row a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:12px;
  text-decoration:none;
  font-weight:800;
  border:1px solid rgba(255,255,255,.10);
}
.hero-row .a-primary{ background:var(--gold); color:#000; }
.hero-row .a-ghost{ background:rgba(0,0,0,.22); color:#fff; }
.hero-bullets{
  margin-top:12px;
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
  color:rgba(255,255,255,.62);
  font-size:12px;
}
.dot{opacity:.9}

/* Layout */
.container{ max-width:var(--max); margin:0 auto; padding:0 18px; }
.market{ padding:34px 0 22px; }
.market-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-bottom:16px;
}
.market-title h3{ margin:0; font-size:22px; font-weight:800; }
.market-title p{ margin:6px 0 0; color:var(--muted2); font-size:13px; }
.market-tools{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.market-tools select,
.market-tools button{
  background:rgba(0,0,0,.25);
  border:1px solid rgba(255,255,255,.10);
  color:#fff;
  padding:10px 12px;
  border-radius:12px;
  outline:none;
  font-weight:700;
  cursor:pointer;
}
.market-tools button{ display:none; }

.market-shell{
  display:grid;
  grid-template-columns:340px 1fr;
  gap:16px;
  align-items:start;
}

.sidebar{
  position:sticky;
  top:78px;
  display:flex;
  flex-direction:column;
  gap:12px;
}
.sidecard{
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px;
}
.sidecard-top{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.sidecard h4{
  margin:0 0 10px;
  font-size:13px;
  color:rgba(255,255,255,.74);
  font-weight:800;
  letter-spacing:.25px;
}
.catlist{ display:flex; flex-direction:column; gap:8px; }
.catbtn{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  background:rgba(20,20,20,.65);
  border:1px solid rgba(255,255,255,.06);
  color:#fff;
  font-weight:800;
  cursor:pointer;
  text-align:left;
}
.catbtn small{
  font-weight:800;
  color:rgba(0,0,0,.85);
  background:linear-gradient(90deg,var(--gold),#ffb300);
  padding:5px 10px;
  border-radius:999px;
}
.catbtn.active{
  outline:2px solid rgba(255,215,0,.25);
  border-color:rgba(255,215,0,.25);
  background:linear-gradient(180deg, rgba(255,215,0,.12), rgba(20,20,20,.62));
}

/* Filters */
.filters-row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.filters-row.mtop10{ margin-top:10px; }
.filters-row label{
  display:block;
  font-size:12px;
  color:rgba(255,255,255,.7);
  margin-bottom:6px;
  font-weight:800;
}
.filters-row select, .filters-row input{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25);
  color:#fff;
  outline:none;
  font-weight:700;
}
.range-wrap{ margin-top:12px; }
.range-wrap .row{ display:flex; gap:10px; align-items:center; }
.range-wrap input[type=range]{ width:100% }
.range-title{
  display:block;
  font-size:12px;
  font-weight:900;
  color:rgba(255,255,255,.7);
  margin:0 0 6px;
}
.range-meta{
  display:flex;
  justify-content:space-between;
  font-size:12px;
  color:rgba(255,255,255,.6);
  margin-top:6px;
}
.clearbtn{
  width:100%;
  margin-top:12px;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25);
  color:#fff;
  font-weight:900;
  cursor:pointer;
}
.tip{ font-size:12px; color:rgba(255,255,255,.65); line-height:1.4; }

.results{
  background:rgba(0,0,0,.12);
  border:1px solid rgba(255,255,255,.06);
  border-radius:16px;
  padding:16px;
}
.results-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
}
.results-top .ttl{ display:flex; flex-direction:column; gap:3px; }
.results-top .ttl strong{ font-size:18px; font-weight:900; }
.results-top .ttl span{ font-size:12px; color:rgba(255,255,255,.65); }
.badge-live{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.22);
  color:rgba(255,255,255,.76);
  font-size:12px;
  font-weight:900;
}
.badge-live i{
  width:8px; height:8px; border-radius:50%;
  background:var(--green);
  box-shadow:0 0 18px rgba(0,255,163,.35);
  display:inline-block;
}

.results-search-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:12px;
}
.results-search-row input{
  flex:1;
  min-width:240px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.25);
  color:#fff;
  font-weight:700;
  outline:none;
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(280px,1fr));
  gap:14px;
  padding-bottom:10px;
}
.card{
  background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.15));
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:14px;
  transition:.18s;
  display:flex;
  flex-direction:column;
  min-height:240px;
}
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow); border-color:rgba(255,215,0,.20); }
.card h3{ margin:0 0 8px; font-size:16px; font-weight:900; letter-spacing:.15px; }
.meta{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.pill{
  font-size:11px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(0,0,0,.20);
  color:rgba(255,255,255,.78);
  font-weight:800;
}
.pill.gold{
  background:linear-gradient(90deg,var(--gold),#ffb300);
  border-color:rgba(255,215,0,.25);
  color:#000;
}
.kv{ display:grid; grid-template-columns:1fr; gap:8px; margin-top:4px; }
.kv p{ margin:0; font-size:13px; color:rgba(255,255,255,.78); }
.kv strong{ color:rgba(255,255,255,.92); }

.price{
  margin-top:auto;
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:10px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.06);
}
.price .val{
  font-weight:1000;
  font-size:18px;
  background:linear-gradient(90deg,var(--gold),var(--gold2));
  -webkit-background-clip:text;
  color:transparent;
}
.btn{
  background:var(--gold);
  color:#000;
  padding:10px 12px;
  border-radius:12px;
  font-weight:1000;
  text-align:center;
  cursor:pointer;
  border:none;
}
.btn:hover{ filter:brightness(1.02) }

.section{ display:none; }
.section.active{ display:block; }

/* Skeleton */
.skel{ position:relative; overflow:hidden; }
.skel::after{
  content:"";
  position:absolute;
  inset:0;
  transform:translateX(-120%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation:shimmer 1.2s infinite;
}
@keyframes shimmer{ 100%{ transform:translateX(120%); } }
.skel .line{
  height:12px;
  background:rgba(255,255,255,.06);
  border-radius:999px;
  margin-bottom:10px;
}
.skel .line.big{ height:18px; width:72%; }
.skel .line.mid{ width:54%; }
.skel .line.sm{ width:36%; margin-bottom:0; }

/* Calculator */
.calc-box{
  background:rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.08);
  border-radius:16px;
  padding:22px 18px;
  max-width:var(--max);
  margin:34px auto 18px auto;
}
.calc-title{
  text-align:center;
  font-size:22px;
  margin:0 0 12px 0;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  -webkit-background-clip: text;
  color: transparent;
  font-weight: 900;
}
.calc-row{ margin-bottom:16px; }
.calc-row label{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
  font-weight:800;
  color:rgba(255,255,255,.78);
  font-size:12px;
}
.calc-row input[type=range]{ width:100%; }
.calc-val{ text-align:right; font-size:12px; color:rgba(255,255,255,.65); margin-top:6px; }
.calc-results{
  margin-top: 14px;
  padding: 14px;
  background:rgba(255,255,255,.03);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
}
.calc-results span{ color: var(--green); font-weight:1000; }

/* Footer */
footer{ text-align:center; padding:40px 0; color:rgba(255,255,255,.55); }

/* Modal (classes nuevas) */
.obm-modal{
  display:none;
  position:fixed;
  top:0;left:0;
  width:100%;
  height:100%;
  background:rgba(0,0,0,0.7);
  backdrop-filter:blur(5px);
  justify-content:center;
  align-items:center;
  z-index:9999;
}
.obm-modal-box{
  background:#111;
  padding:30px;
  border-radius:12px;
  width:90%;
  max-width:420px;
  border:1px solid rgba(255,255,255,.10);
}
.obm-modal-title{
  text-align:center;
  color:#ffd700;
  margin-top:0;
}
.obm-modal-sub{ text-align:center; opacity:0.7; }
.obm-input{
  width:100%;
  margin-bottom:12px;
  padding:12px;
  border-radius:10px;
  background:#222;
  border:1px solid #333;
  color:#fff;
}
.obm-label{ font-size:14px; opacity:.8; }
.obm-row{ display:flex; gap:10px; }
.obm-prefix{ width:110px; }
.obm-mt12{ margin-top:12px; margin-bottom:20px; }
.obm-send{
  width:100%;
  padding:12px;
  background:#ffd700;
  border:none;
  border-radius:10px;
  font-weight:900;
  color:#000;
  cursor:pointer;
}
.obm-cancel{
  width:100%;
  margin-top:10px;
  padding:12px;
  border:none;
  border-radius:10px;
  background:#333;
  color:#fff;
  font-weight:900;
  cursor:pointer;
}

/* Mobile */
@media(max-width: 1060px){
  .btn-cta{ padding:8px 10px; font-size:12px; border-radius:10px; }
  .brand{ min-width:auto }
  .brand .logo{ font-size:18px; }
  .brand .tag{ display:none; }
  .top-actions .btn-cta.ghost{ display:none; }
  .iconbtn{ display:inline-flex; }

  .subnav{ display:flex; }

  .market-shell{ grid-template-columns:1fr; }
  .sidebar{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.78);
    backdrop-filter: blur(10px);
    z-index:80;
    padding:14px;
    transform:translateX(-105%);
    transition:.18s;
    top:0;
    overflow:auto;
  }
  .sidebar.open{ transform:translateX(0); }
  .market-tools button{ display:inline-flex; }
}
@media(max-width: 560px){
  .hero h2{ font-size:34px; }
  .top-search{ display:none; }
  .chips{ padding-bottom:0; }
  .langbar{ padding:6px 6px; }
  .langbtn{ font-size:17px; }
}
