/*
Theme Name: CardTradeIOM
Theme URI: https://cardtradeiom.com/
Author: CardTradeIOM
Description: Tema WooCommerce mobile-first per CardTradeIOM.
Version: 0.8.1
Text Domain: cardtradeiom
*/

:root {
  --ct-bg: #0b0d12;
  --ct-surface: #151922;
  --ct-surface-2: #1d2330;
  --ct-text: #f7f8fb;
  --ct-muted: #9da6b7;
  --ct-line: rgba(255,255,255,.09);
  --ct-blue: #4d8dff;
  --ct-purple: #7b4dff;
  --ct-green: #34d399;
  --ct-radius: 18px;
  --ct-shadow: 0 18px 45px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ct-bg);
  color: var(--ct-text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
.ct-container { width: min(1180px, calc(100% - 32px)); margin-inline: auto; }
.ct-main { min-height: 70vh; padding-bottom: 96px; }

.ct-header {
  position: sticky;
  z-index: 50;
  top: 0;
  border-bottom: 1px solid var(--ct-line);
  background: rgba(11,13,18,.88);
  backdrop-filter: blur(16px);
}
.ct-header-inner {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.ct-brand { display: flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.03em; }
.ct-brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ct-blue), var(--ct-purple));
  box-shadow: 0 8px 24px rgba(77,141,255,.28);
}
.ct-brand span:last-child { font-size: 1.05rem; }
.ct-header-actions { display: flex; align-items: center; gap: 10px; }
.ct-icon-link {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--ct-line); border-radius: 13px; background: var(--ct-surface);
}

.ct-hero { padding: 48px 0 30px; }
.ct-hero-card {
  overflow: hidden;
  position: relative;
  padding: clamp(28px, 7vw, 70px);
  border: 1px solid var(--ct-line);
  border-radius: 28px;
  background:
    radial-gradient(circle at 85% 10%, rgba(123,77,255,.35), transparent 32%),
    radial-gradient(circle at 10% 95%, rgba(77,141,255,.25), transparent 34%),
    var(--ct-surface);
  box-shadow: var(--ct-shadow);
}
.ct-eyebrow { margin: 0 0 10px; color: #9cc0ff; font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.ct-hero h1 { max-width: 740px; margin: 0; font-size: clamp(2rem, 8vw, 4.8rem); line-height: .98; letter-spacing: -.06em; }
.ct-hero-copy { max-width: 630px; margin: 18px 0 26px; color: var(--ct-muted); font-size: clamp(1rem, 2vw, 1.18rem); }
.ct-search {
  display: flex; position: relative; max-width: 760px; padding: 7px; gap: 8px;
  border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: rgba(5,7,11,.72);
}
.ct-search select {
  width: 74px; padding: 0 8px; border: 0; border-right: 1px solid var(--ct-line);
  outline: 0; color: var(--ct-text); background: #10141d; border-radius: 10px 0 0 10px;
}
.ct-search input {
  min-width: 0; flex: 1; padding: 12px 14px; color: var(--ct-text);
  border: 0; outline: 0; background: transparent;
}
.ct-suggestions {
  position: absolute; z-index: 60; top: calc(100% + 7px); right: 0; left: 0;
  overflow: hidden; display: none; max-height: 330px; overflow-y: auto;
  border: 1px solid var(--ct-line); border-radius: 14px; background: #151922;
  box-shadow: var(--ct-shadow);
}
.ct-suggestions.is-open { display: block; }
.ct-suggestion {
  display: block; width: 100%; padding: 12px 14px; border: 0;
  border-bottom: 1px solid var(--ct-line); color: var(--ct-text);
  background: transparent; cursor: pointer; text-align: left;
}
.ct-suggestion:last-child { border-bottom: 0; }
.ct-suggestion:hover, .ct-suggestion.is-active { background: var(--ct-surface-2); }
.ct-suggestion small { display: block; margin-top: 2px; color: var(--ct-muted); }
.ct-search button, .ct-primary {
  border: 0; border-radius: 12px; padding: 12px 18px;
  color: white; font-weight: 800; cursor: pointer;
  background: linear-gradient(135deg, var(--ct-blue), var(--ct-purple));
}
.ct-offer-seller { margin-top: 5px; color: var(--ct-muted); font-size: .82rem; }
.ct-offer-seller a { color: #9cc0ff; font-weight: 800; }
.ct-hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.ct-scan-button {
  display: inline-flex; align-items: center; gap: 10px; padding: 13px 18px;
  border: 1px solid rgba(52,211,153,.35); border-radius: 13px;
  color: #b6ffe4; background: rgba(52,211,153,.1); font-weight: 800;
}
.ct-note { color: var(--ct-muted); font-size: .85rem; }

.ct-section { padding: 28px 0; }
.ct-section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.ct-section h2 { margin: 0; font-size: clamp(1.4rem, 4vw, 2rem); letter-spacing: -.035em; }
.ct-section-head p { margin: 4px 0 0; color: var(--ct-muted); }
.ct-see-all { color: #9cc0ff; font-size: .9rem; font-weight: 750; white-space: nowrap; }

.ct-category-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.ct-category {
  min-height: 125px; padding: 18px; display: flex; flex-direction: column; justify-content: end;
  border: 1px solid var(--ct-line); border-radius: var(--ct-radius);
  background: linear-gradient(145deg, var(--ct-surface-2), var(--ct-surface));
  transition: transform .2s ease, border-color .2s ease;
}
.ct-category:hover { transform: translateY(-3px); border-color: rgba(77,141,255,.5); }
.ct-category-icon { font-size: 1.65rem; margin-bottom: 14px; }
.ct-category strong { display: block; }
.ct-category small { margin-top: 2px; color: var(--ct-muted); }

.ct-products { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 13px; }
.ct-product {
  overflow: hidden; border: 1px solid var(--ct-line); border-radius: var(--ct-radius);
  background: var(--ct-surface);
}
.ct-product-image { aspect-ratio: 3 / 4; overflow: hidden; background: #10141d; }
.ct-product-image img { width: 100%; height: 100%; object-fit: contain; transition: transform .25s ease; }
.ct-product:hover img { transform: scale(1.035); }
.ct-product-body { padding: 13px; }
.ct-product-meta { color: var(--ct-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.ct-product h3 { min-height: 2.7em; margin: 5px 0 11px; font-size: .9rem; line-height: 1.35; }
.ct-product-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ct-price { font-weight: 900; }
.ct-stock { color: var(--ct-green); font-size: .75rem; font-weight: 700; }
.ct-empty { padding: 28px; border: 1px dashed var(--ct-line); border-radius: var(--ct-radius); color: var(--ct-muted); }
.ct-archive-tools {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0;
}
.ct-set-search {
  position: relative; margin: 22px 0 8px;
}
.ct-set-search input {
  width: 100%; min-height: 50px; padding: 12px 46px 12px 15px;
  border: 1px solid var(--ct-line); border-radius: 14px;
  outline: 0; color: var(--ct-text); background: var(--ct-surface);
}
.ct-set-search input:focus { border-color: rgba(77,141,255,.65); }
.ct-set-search span {
  position: absolute; top: 50%; right: 16px; color: var(--ct-muted);
  transform: translateY(-50%); pointer-events: none;
}
.ct-set-empty { display: none; margin-top: 18px; }
.ct-set-empty.is-visible { display: block; }
.ct-archive-tools select, .ct-archive-tools input {
  min-height: 44px; padding: 9px 12px; border: 1px solid var(--ct-line);
  border-radius: 11px; color: var(--ct-text); background: var(--ct-surface);
}
.ct-set-list { display: grid; grid-template-columns: repeat(1,minmax(0,1fr)); gap: 10px; }
.ct-set-link {
  display: flex; justify-content: space-between; gap: 12px; align-items: center;
  padding: 15px 17px; border: 1px solid var(--ct-line); border-radius: 13px;
  background: var(--ct-surface); font-weight: 750;
}
.ct-set-link:hover { border-color: rgba(77,141,255,.55); }
.ct-set-link[hidden], .ct-archive-group[hidden] { display: none !important; }
.ct-set-link time { color: var(--ct-muted); font-size: .75rem; font-weight: 650; white-space: nowrap; }
.ct-archive-group { margin-top: 34px; }
.ct-archive-group:first-of-type { margin-top: 20px; }
.ct-archive-group h2 { margin: 0 0 5px; }
.ct-archive-group > p { margin: 0 0 15px; color: var(--ct-muted); }
.ct-checklist { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.ct-card-entry {
  overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--ct-line);
  border-radius: var(--ct-radius); background: var(--ct-surface);
}
.ct-card-entry.is-available { border-color: rgba(52,211,153,.42); }
.ct-card-entry img { width: 100%; aspect-ratio: 3/4; object-fit: contain; background: #10141d; }
.ct-card-entry-body { display: flex; flex: 1; flex-direction: column; padding: 13px; }
.ct-card-code { color: #9cc0ff; font-size: .76rem; font-weight: 850; letter-spacing: .06em; }
.ct-card-entry h3 { margin: 5px 0 1px; font-size: .92rem; line-height: 1.3; }
.ct-card-english { margin-bottom: 10px; color: var(--ct-muted); font-size: .76rem; }
.ct-card-rarity {
  align-self: flex-start; margin: 3px 0 12px; padding: 4px 8px;
  border: 1px solid rgba(123,77,255,.28); border-radius: 999px;
  color: #d5ccff; background: rgba(123,77,255,.11);
  font-size: .68rem; font-weight: 850; letter-spacing: .045em; text-transform: uppercase;
}
.ct-card-action {
  margin-top: auto; padding: 10px; border-radius: 10px; text-align: center;
  color: #c8baff; background: rgba(123,77,255,.13); font-size: .8rem; font-weight: 850;
}
.ct-card-entry.is-available .ct-card-action { color: #b6ffe4; background: rgba(52,211,153,.12); }
.ct-card-entry > a { display: block; }
.ct-card-detail { display: grid; gap: 24px; }
.ct-card-detail-image {
  overflow: hidden; max-width: 420px; margin-inline: auto;
  border: 1px solid var(--ct-line); border-radius: 22px; background: #10141d;
}
.ct-card-detail-image img { width: 100%; }
.ct-card-detail h1 { margin: 5px 0; }
.ct-card-detail-subtitle { margin: 0 0 18px; color: var(--ct-muted); }
.ct-filter-group { margin: 18px 0; }
.ct-filter-group > strong { display: block; margin-bottom: 8px; font-size: .82rem; }
.ct-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-filter-chip {
  padding: 8px 11px; border: 1px solid var(--ct-line); border-radius: 10px;
  color: var(--ct-muted); background: var(--ct-surface); cursor: pointer;
  font-size: .78rem; font-weight: 800;
}
.ct-filter-chip.is-active { border-color: var(--ct-blue); color: white; background: rgba(77,141,255,.18); }
.ct-offer-summary {
  display: flex; justify-content: space-between; gap: 15px; align-items: center;
  margin: 22px 0 12px; padding: 15px; border: 1px solid var(--ct-line);
  border-radius: 14px; background: var(--ct-surface);
}
.ct-offer-summary strong { font-size: 1.15rem; }
.ct-offers { display: grid; gap: 10px; }
.ct-offer {
  display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center;
  padding: 14px; border: 1px solid var(--ct-line); border-radius: 14px;
  background: var(--ct-surface);
}
.ct-offer[hidden] { display: none !important; }
.ct-offer-meta { color: var(--ct-muted); font-size: .78rem; }
.ct-offer-price { font-size: 1.12rem; font-weight: 900; }
.ct-offer-button {
  display: inline-flex; justify-content: center; margin-top: 7px; padding: 8px 11px;
  border-radius: 9px; color: white; background: linear-gradient(135deg,var(--ct-blue),var(--ct-purple));
  font-size: .76rem; font-weight: 850;
}

.ct-bottom-nav {
  position: fixed; z-index: 70; right: 12px; bottom: 12px; left: 12px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
  padding: 8px 7px calc(8px + env(safe-area-inset-bottom));
  border: 1px solid var(--ct-line); border-radius: 20px;
  background: rgba(21,25,34,.94); box-shadow: var(--ct-shadow); backdrop-filter: blur(18px);
}
.ct-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ct-muted); font-size: .66rem; }
.ct-nav-icon { font-size: 1.15rem; }
.ct-nav-scan { transform: translateY(-14px); color: white; }
.ct-nav-scan .ct-nav-icon {
  display: grid; place-items: center; width: 54px; height: 54px;
  border: 5px solid var(--ct-bg); border-radius: 50%;
  background: linear-gradient(135deg, var(--ct-blue), var(--ct-purple));
  box-shadow: 0 10px 25px rgba(77,141,255,.35);
}
.ct-footer { padding: 34px 0 120px; border-top: 1px solid var(--ct-line); color: var(--ct-muted); font-size: .85rem; }

.woocommerce .woocommerce-breadcrumb { color: var(--ct-muted); }
.woocommerce div.product, .woocommerce-cart-form, .woocommerce-checkout { color: var(--ct-text); }
.ct-market-box {
  clear: both; margin: 22px 0; padding: 18px;
  border: 1px solid var(--ct-line); border-radius: var(--ct-radius);
  background: var(--ct-surface);
}
.ct-market-price { margin: 0 0 4px; font-size: 1.05rem; }
.ct-market-price strong { color: #b9d2ff; font-size: 1.25rem; }
.ct-market-note { margin: 0 0 14px; color: var(--ct-muted); font-size: .78rem; }

@media (min-width: 720px) {
  .ct-category-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .ct-products { grid-template-columns: repeat(4, minmax(0,1fr)); gap: 18px; }
  .ct-product h3 { font-size: 1rem; }
  .ct-set-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ct-checklist { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
  .ct-card-detail { grid-template-columns: minmax(280px,420px) 1fr; align-items: start; }
}
@media (max-width: 520px) {
  .ct-search { flex-wrap: wrap; }
  .ct-search select { width: 78px; min-height: 44px; }
  .ct-search button { width: 100%; }
}
@media (min-width: 960px) {
  .ct-main { padding-bottom: 30px; }
  .ct-bottom-nav { display: none; }
  .ct-footer { padding-bottom: 34px; }
}
