/* Fanatiko B2B portal — brand look & feel matching thefanatikobrand.com */
:root {
  --ink: #272727;
  --ink-2: #3d3d3d;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f7f9fc;
  --card: #ffffff;
  --brand: #3c619e;        /* Fanatiko blue */
  --brand-dark: #2e4c7e;
  --brand-light: #7cc9f5;
  --brand-tint: #eaf1fb;
  --grad: linear-gradient(46deg, #3d62ac 13%, #7cc9f5 48%, #3d62ac 83.81%);
  --green: #0f9d58;
  --amber: #b45309;
  --red: #c0392b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(46, 76, 126, .06), 0 4px 18px rgba(46, 76, 126, .08);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg); color: var(--ink);
  font-size: 14.5px; line-height: 1.6;
  display: flex; flex-direction: column; min-height: 100vh;
}
h1, h2, h3 { font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--brand); letter-spacing: -.01em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- announcement bar + header ---- */
.announce {
  background: var(--grad); color: #fff; text-align: center;
  font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 14px;
}
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner {
  max-width: 1120px; margin: 0 auto; padding: 0 20px; height: 66px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px; text-decoration: none !important;
  color: var(--brand); font-weight: 700; font-size: 20px; letter-spacing: .04em;
}
.brand img { height: 38px; width: auto; display: block; }
.brand-tag {
  font-size: 9.5px; letter-spacing: .3em; color: #fff; font-weight: 700;
  background: var(--brand); border-radius: 99px; padding: 3px 9px 2px; margin-left: 2px;
}
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav a { color: var(--brand); font-weight: 600; font-size: 13.5px; text-decoration: none; }
.nav a:hover { color: var(--brand-dark); }
.nav-muted { opacity: .55; }
.cart-link { position: relative; }
.cart-badge {
  background: var(--brand); color: #fff; border-radius: 99px; font-size: 11px;
  font-weight: 700; padding: 1px 7px; margin-left: 5px;
}
.footer { background: var(--brand); color: #dce7f5; font-size: 13px; margin-top: 48px; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px; }
.footer a { color: #fff; font-weight: 600; }

/* ---- layout ---- */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 28px 20px; flex: 1; }

/* ---- buttons & forms ---- */
.btn {
  display: inline-block; border: none; cursor: pointer; border-radius: 46px;
  font-family: 'Montserrat', sans-serif; font-weight: 700; font-size: 14px;
  padding: 11px 22px; background: var(--brand); color: #fff !important;
  text-decoration: none !important; transition: background .15s, transform .1s;
}
.btn:hover { background: var(--brand-dark); }
.btn:active { transform: scale(.98); }
.btn-accent { background: var(--brand); }
.btn-accent:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: var(--brand) !important; border: 2px solid var(--brand); padding: 9px 20px; }
.btn-ghost:hover { background: var(--brand-tint); }
.btn-sm { padding: 7px 16px; font-size: 12.5px; }
.btn-danger { background: var(--red); }
.btn-danger:hover { background: #a03024; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 4px; color: var(--ink-2); }
input, select, textarea {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 12px;
  font: inherit; font-size: 14px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(60, 97, 158, .3); border-color: var(--brand); }
.field { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.hint { font-size: 12px; color: var(--muted); margin-top: 3px; font-weight: 400; }

/* ---- cards & panels ---- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.panel { max-width: 520px; margin: 40px auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { font-size: 26px; }
.subtle { color: var(--muted); font-size: 13.5px; }

.alert { border-radius: 12px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f5c6c0; }
.alert-ok { background: #e8f5ee; color: var(--green); border: 1px solid #bfe3cf; }
.alert-info { background: var(--brand-tint); color: var(--brand-dark); border: 1px solid #c9dbf7; }

/* ---- badges ---- */
.badge { display: inline-block; border-radius: 99px; font-size: 11.5px; font-weight: 700; padding: 2px 11px; white-space: nowrap; }
.badge-in { background: #e8f5ee; color: var(--green); }
.badge-low { background: #fdf3e3; color: var(--amber); }
.badge-out { background: #f1f2f4; color: var(--muted); }
.badge-pre { background: var(--brand-tint); color: var(--brand); }
.st-pending { background: #fdf3e3; color: var(--amber); }
.st-paid { background: #e8f5ee; color: var(--green); }
.st-fulfil { background: var(--brand-tint); color: var(--brand); }
.st-shipped { background: #ede9fe; color: #6d28d9; }
.st-cancel { background: #f1f2f4; color: var(--muted); }
.vies-valid { background: #e8f5ee; color: var(--green); }
.vies-invalid { background: #fdecea; color: var(--red); }
.vies-pending, .vies-unavailable { background: #fdf3e3; color: var(--amber); }
.vies-na { background: #f1f2f4; color: var(--muted); }

/* ---- catalog ---- */
.catalog-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.catalog-toolbar form { display: flex; gap: 8px; flex: 1; min-width: 220px; }
.chip {
  display: inline-block; padding: 7px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 700;
  background: #fff; border: 1.5px solid var(--line); color: var(--brand); text-decoration: none !important;
}
.chip:hover { border-color: var(--brand); }
.chip-active { background: var(--brand); color: #fff; border-color: var(--brand); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pcard {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden; transition: transform .12s, box-shadow .12s;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 4px 24px rgba(46, 76, 126, .14); }
.pcard-img { aspect-ratio: 4/3; background: #fff; display: flex; align-items: center; justify-content: center; padding: 10px; }
.pcard-img img { width: 100%; height: 100%; object-fit: contain; }
.pcard-img img.ph { width: auto; height: 58%; opacity: .18; object-fit: contain; }
.thumb { width: 46px; height: 46px; object-fit: contain; background: #fff; border: 1px solid var(--line); border-radius: 8px; flex: none; }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-name { font-weight: 700; font-size: 14px; line-height: 1.35; }
.pcard-name a { color: var(--ink); }
.pcard-ref { font-size: 11.5px; color: var(--muted); }
.pcard-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 700; font-size: 16px; color: var(--brand); }
.price small { font-weight: 500; color: var(--muted); font-size: 11px; }

/* ---- tables ---- */
.table-wrap { overflow-x: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); padding: 12px 14px; border-bottom: 2px solid var(--line); white-space: nowrap; font-weight: 700; }
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr.rowlink:hover { background: #f7fafd; }
td.num, th.num { text-align: right; }
.qty-input { width: 74px; text-align: center; }

/* ---- order matrix (product page) ---- */
.matrix { font-size: 15px; }
.matrix th { font-size: 12px; padding: 14px 16px; }
.matrix td { padding: 14px 16px; }
.matrix td:first-child { min-width: 210px; }
.matrix .mono { white-space: nowrap; }
.matrix .th-sub { font-weight: 500; color: var(--muted); text-transform: none; letter-spacing: 0; }
.matrix .qty-input { width: 84px; padding: 10px 8px; font-size: 15px; font-weight: 700; }
.sticky-right {
  position: sticky; right: 0; background: #fff; z-index: 2;
  box-shadow: -8px 0 10px -8px rgba(46, 76, 126, .25);
}
.matrix tr:hover .sticky-right { background: #fff; }
th.sticky-right { background: #fff; }

/* ---- cart / totals ---- */
.split { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.totals-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 14px; }
.totals-row.big { font-size: 18px; font-weight: 700; border-top: 2px solid var(--line); margin-top: 8px; padding-top: 12px; color: var(--brand); }
.progress { background: #e7edf6; border-radius: 99px; height: 8px; overflow: hidden; margin: 6px 0 4px; }
.progress > div { height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; }
.progress.ok > div { background: var(--green); }

/* ---- landing ---- */
.hero { text-align: center; padding: 56px 16px 40px; }
.hero h1 { font-size: 42px; line-height: 1.12; color: var(--brand); }
.hero h1 span { color: var(--brand-light); }
.hero p { max-width: 640px; margin: 18px auto 28px; color: var(--ink-2); font-size: 16.5px; font-weight: 500; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 40px; }
.feature { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; text-align: left; }
.feature h3 { font-size: 15px; margin-bottom: 6px; color: var(--ink); }
.feature p { font-size: 13px; color: var(--muted); }
.feature .ico { font-size: 24px; margin-bottom: 10px; display: block; }

/* ---- admin ---- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--brand); }
.stat .l { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.section-title { font-size: 16px; margin: 26px 0 10px; color: var(--ink); }
.inline-form { display: inline; }
.actions-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 4px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.tier-grid { display: grid; grid-template-columns: 130px 160px; gap: 8px 12px; align-items: center; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }

/* ---- shipment timeline ---- */
.timeline { display: flex; flex-direction: column; gap: 2px; }
.tl-item { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.tl-item:last-child { border-bottom: none; }
.tl-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--brand); margin-top: 5px; flex: none; }
.tl-date { font-size: 11.5px; color: var(--muted); font-weight: 600; }
