/* =========================================================
   Themely — Template Marketplace (ThemeForest-style)
   Rebrand via the variables below.
   ========================================================= */
:root {
  --green:   #20bf6b;   /* primary accent (Envato-like) */
  --green-d: #16a35a;
  --navy:    #10182a;   /* dark header / footer */
  --navy-2:  #1b2742;
  --ink:     #11161f;
  --body:    #5a6273;
  --muted:   #939bac;
  --bg:      #ffffff;
  --bg-alt:  #f4f6f9;
  --line:    #e6e9ef;
  --star:    #ffb400;
  --radius:  12px;
  --shadow:  0 14px 40px -18px rgba(20,30,60,.25);
  --maxw:    1240px;
  --font:    'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--body); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1,h2,h3,h4 { font-family: var(--font); color: var(--ink); line-height: 1.2; letter-spacing: -.01em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font); font-weight: 600; font-size: 15px; padding: 12px 22px; border-radius: 9px; cursor: pointer; border: 1px solid transparent; transition: transform .15s, background .2s, border-color .2s, color .2s; }
.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-d); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-2); }
.btn-out { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-out:hover { border-color: var(--green); color: var(--green-d); }

/* ===== Top header ===== */
.top { background: var(--navy); color: #fff; }
.top-inner { display: flex; align-items: center; gap: 22px; height: 68px; }
.brand { font-family: var(--font); font-weight: 800; font-size: 22px; color: #fff; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand b { color: var(--green); }
.search { flex: 1; display: flex; align-items: center; background: #fff; border-radius: 9px; overflow: hidden; max-width: 620px; }
.search input { flex: 1; border: 0; padding: 12px 16px; font-family: var(--font-body); font-size: 15px; color: var(--ink); outline: none; }
.search button { border: 0; background: var(--green); color: #fff; padding: 0 20px; align-self: stretch; cursor: pointer; font-size: 16px; }
.search button:hover { background: var(--green-d); }
.top-links { display: flex; align-items: center; gap: 18px; white-space: nowrap; }
.top-links a { font-family: var(--font); font-weight: 500; font-size: 14px; color: #cfd6e6; }
.top-links a:hover { color: #fff; }
.cart-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--navy-2); padding: 8px 14px; border-radius: 8px; }
.menu-btn { display: none; background: none; border: 0; color: #fff; font-size: 22px; cursor: pointer; }

/* category bar */
.catbar { background: var(--navy-2); }
.catbar-inner { display: flex; gap: 8px; height: 50px; align-items: center; overflow-x: auto; }
.catbar a { font-family: var(--font); font-weight: 500; font-size: 14px; color: #cdd4e4; padding: 7px 14px; border-radius: 7px; white-space: nowrap; transition: background .2s, color .2s; }
.catbar a:hover, .catbar a.active { background: rgba(255,255,255,.1); color: #fff; }

/* ===== Hero ===== */
.hero { background: linear-gradient(120deg,#10182a,#1b2742 60%,#143524); color: #fff; padding: 64px 0 70px; text-align: center; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; bottom: -120px; left: 50%; transform: translateX(-50%); width: 700px; height: 360px; background: radial-gradient(circle, rgba(32,191,107,.3), transparent 65%); }
.hero h1 { color: #fff; font-size: clamp(30px,5vw,50px); font-weight: 800; margin-bottom: 14px; position: relative; }
.hero h1 span { color: var(--green); }
.hero p { color: #c4ccdd; font-size: 18px; max-width: 580px; margin: 0 auto 28px; position: relative; }
.hero-search { display: flex; max-width: 600px; margin: 0 auto; background: #fff; border-radius: 11px; overflow: hidden; box-shadow: var(--shadow); position: relative; }
.hero-search input { flex: 1; border: 0; padding: 16px 20px; font-size: 16px; color: var(--ink); outline: none; }
.hero-search button { border: 0; background: var(--green); color: #fff; font-family: var(--font); font-weight: 700; padding: 0 28px; cursor: pointer; }
.hero-search button:hover { background: var(--green-d); }
.hero-tags { margin-top: 18px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; position: relative; }
.hero-tags span { font-size: 13px; color: #aab3c6; }
.hero-tags a { font-size: 13px; color: #fff; border: 1px solid rgba(255,255,255,.2); padding: 4px 12px; border-radius: 999px; }
.hero-tags a:hover { background: rgba(255,255,255,.12); }

/* stat strip */
.statstrip { background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.statstrip-inner { display: flex; justify-content: center; gap: 60px; padding: 22px 0; flex-wrap: wrap; }
.statstrip b { font-family: var(--font); color: var(--ink); font-size: 20px; }
.statstrip span { color: var(--muted); font-size: 14px; }

/* ===== Section ===== */
.section { padding: 56px 0; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 16px; flex-wrap: wrap; }
.sec-head h2 { font-size: 26px; font-weight: 800; }
.sec-head p { font-size: 15px; color: var(--muted); margin-top: 4px; }
.sec-head a { font-family: var(--font); font-weight: 600; font-size: 14px; color: var(--green-d); }

/* ===== Item grid + cards ===== */
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: transparent; }
.thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #eef1f6; display: block; }
.thumb iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: top left; pointer-events: none; }
.thumb .ribbon { position: absolute; top: 12px; left: 12px; z-index: 2; background: var(--green); color: #fff; font-family: var(--font); font-weight: 700; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 6px; }
.thumb .ribbon.hot { background: #f0506e; }
.thumb .preview-hint { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; opacity: 0; background: rgba(16,24,42,.55); transition: opacity .2s; }
.thumb:hover .preview-hint { opacity: 1; }
.thumb .preview-hint span { background: #fff; color: var(--ink); font-family: var(--font); font-weight: 700; font-size: 14px; padding: 10px 18px; border-radius: 8px; }
.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card-cat { font-family: var(--font); font-weight: 600; font-size: 12px; color: var(--green-d); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.card-title { font-size: 17px; font-weight: 700; margin-bottom: 6px; }
.card-author { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.card-author b { color: var(--body); font-weight: 600; }
.card-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
.rating { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.stars { color: var(--star); letter-spacing: 1px; }
.price { font-family: var(--font); font-weight: 800; color: var(--ink); font-size: 18px; }
.price small { font-weight: 500; font-size: 12px; color: var(--muted); }

/* ===== Item detail page ===== */
.crumb { padding: 18px 0; font-size: 14px; color: var(--muted); }
.crumb a:hover { color: var(--green-d); }
.crumb span { color: var(--ink); }
.item-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 8px 0 30px; }
.item-head h1 { font-size: clamp(26px,3.5vw,38px); font-weight: 800; margin-bottom: 10px; }
.item-head .meta { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.item-head .meta b { color: var(--body); }

.item-wrap { display: grid; grid-template-columns: 1fr 340px; gap: 34px; padding: 36px 0 70px; align-items: start; }
.browser { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; background: #f1f3f7; border-bottom: 1px solid var(--line); }
.browser-bar i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.browser-bar i:nth-child(1){background:#ff5f57}.browser-bar i:nth-child(2){background:#febc2e}.browser-bar i:nth-child(3){background:#28c840}
.browser-bar .url { flex: 1; margin-left: 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; color: var(--muted); padding: 5px 12px; }
.preview { position: relative; aspect-ratio: 16/10; overflow: hidden; background: #eef1f6; }
.preview iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; border: 0; transform-origin: top left; pointer-events: none; }

.tabs { margin-top: 36px; }
.tab-btns { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tab-btns button { font-family: var(--font); font-weight: 600; font-size: 15px; color: var(--muted); background: none; border: 0; border-bottom: 2px solid transparent; padding: 12px 16px; cursor: pointer; margin-bottom: -1px; }
.tab-btns button.active { color: var(--ink); border-color: var(--green); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
.tab-panel h3 { font-size: 20px; margin: 24px 0 12px; }
.tab-panel p { margin-bottom: 14px; }
.feat-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0 8px; }
.feat-list li { position: relative; padding-left: 28px; color: var(--ink); }
.feat-list li::before { content: "✓"; position: absolute; left: 0; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; color: #fff; background: var(--green); }

/* sidebar buy box */
.buybox { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.buybox .pricetop { background: var(--navy); color: #fff; padding: 22px; text-align: center; }
.buybox .pricetop .amt { font-family: var(--font); font-weight: 800; font-size: 38px; }
.buybox .pricetop .lic { font-size: 13px; color: #aab3c6; }
.buybox-body { padding: 20px; }
.buybox-body .btn { margin-bottom: 10px; }
.buybox .incl { list-style: none; margin-top: 16px; display: grid; gap: 10px; }
.buybox .incl li { position: relative; padding-left: 26px; font-size: 14px; }
.buybox .incl li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.buybox .specs { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: grid; gap: 9px; font-size: 14px; }
.buybox .specs div { display: flex; justify-content: space-between; }
.buybox .specs span:last-child { color: var(--ink); font-weight: 600; }

.author-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 18px; margin-top: 18px; }
.author-card .ava { width: 54px; height: 54px; border-radius: 50%; background: linear-gradient(135deg,var(--green),#0e9488); flex: none; }
.author-card b { font-family: var(--font); color: var(--ink); }
.author-card span { font-size: 13px; color: var(--muted); }

/* ===== Footer ===== */
.foot { background: var(--navy); color: #aeb6c8; padding: 56px 0 26px; margin-top: 30px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 40px; }
.foot .brand { margin-bottom: 14px; }
.foot-tag { font-size: 15px; max-width: 280px; }
.foot-col h4 { color: #fff; font-size: 15px; margin-bottom: 14px; }
.foot-col a { display: block; padding: 5px 0; font-size: 14px; }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: 14px; color: #6f7790; flex-wrap: wrap; gap: 8px; }

/* reveal */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* responsive */
@media (max-width: 980px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .item-wrap { grid-template-columns: 1fr; }
  .buybox { position: static; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .search, .top-links { display: none; }
  .menu-btn { display: block; }
  .grid { grid-template-columns: 1fr; }
  .feat-list { grid-template-columns: 1fr; }
  .statstrip-inner { gap: 30px; }
  .foot-grid { grid-template-columns: 1fr; }
}
