/* AI Tools Store — premium mobile-first storefront.
   Navy #0b1e3b, gold #d9a441. Designed at 360px first. */
:root {
  --navy: #0b1e3b;
  --navy-2: #12294d;
  --navy-3: #1b3a68;
  --gold: #d9a441;
  --gold-soft: #f6e8c8;
  --bg: #f5f6f9;
  --card: #ffffff;
  --ink: #17233a;
  --muted: #5d6c86;
  --faint: #8b97ad;
  --line: #e6e9f0;
  --green: #0f7a4d;
  --green-bg: #e3f4ea;
  --amber: #9a6200;
  --amber-bg: #fdf0d3;
  --red: #c0392b;
  --red-bg: #fdecea;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(11, 30, 59, 0.08);
  --shadow-sm: 0 4px 14px rgba(11, 30, 59, 0.07);
  --tap: 48px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}
/* Sticky footer: on short pages the main content absorbs free space so the
   footer sits at the bottom of the screen instead of floating mid-page. */
main { flex: 1 0 auto; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.02em; margin: 0 0 0.6em; }
h1 { font-size: 26px; }
h2 { font-size: 21px; }
h3 { font-size: 17px; }
p { margin: 0 0 1em; }
a { color: var(--navy-3); }
img { max-width: 100%; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11, 30, 59, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #fff;
}
.header-in { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 38px;
  background: linear-gradient(135deg, var(--gold), #b97f1f);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: var(--navy);
}
.brand-name { font-weight: 700; font-size: 16px; line-height: 1.2; }
.brand-sub { display: block; font-size: 11px; font-weight: 500; color: #b9c4d8; }
.nav { display: none; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  min-width: var(--tap); min-height: var(--tap);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06); color: #fff; text-decoration: none;
  font-size: 15px; font-weight: 600; padding: 0 14px; position: relative;
}
.cart-count {
  position: absolute; top: 4px; right: 4px;
  background: var(--gold); color: var(--navy);
  font-size: 11px; font-weight: 800; min-width: 20px; height: 20px;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.btn-login {
  min-height: var(--tap); display: inline-flex; align-items: center;
  background: var(--gold); color: var(--navy); font-weight: 700;
  border-radius: 14px; padding: 0 16px; text-decoration: none; font-size: 15px;
}
.menu-btn { font-size: 20px; }
.mobile-nav {
  display: none; background: var(--navy-2); padding: 8px 16px 16px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: flex; align-items: center; min-height: var(--tap);
  color: #fff; text-decoration: none; font-weight: 600; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(120% 130% at 50% 0%, var(--navy-3) 0%, var(--navy) 60%, #071426 100%);
  color: #fff; padding: 44px 0 40px; overflow: hidden;
}
.hero-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}
.hero h1 { font-size: 31px; margin-bottom: 12px; }
.hero h1 .gold { color: var(--gold); }
.hero p.lead { color: #c3cede; font-size: 16.5px; max-width: 34em; margin-bottom: 22px; }
.hero-search { display: flex; gap: 8px; max-width: 520px; }
.hero-search input {
  flex: 1; min-height: 54px; border-radius: 16px; border: 1.5px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: #fff; font-size: 16px; padding: 0 18px;
}
.hero-search input::placeholder { color: #93a1ba; }
.hero-search input:focus { outline: none; border-color: var(--gold); background: rgba(255,255,255,0.12); }
.trust-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.trust-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: #dbe3f2;
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.12);
  padding: 9px 14px; border-radius: 999px;
}

/* ---------- Sections ---------- */
.section { padding: 30px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-link { font-size: 14.5px; font-weight: 700; color: var(--navy-3); text-decoration: none; white-space: nowrap; }

/* Category chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; min-height: 44px; display: inline-flex; align-items: center;
  padding: 0 18px; border-radius: 999px; font-size: 14.5px; font-weight: 600;
  background: var(--card); border: 1.5px solid var(--line); color: var(--ink);
  text-decoration: none;
}
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pcard {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid rgba(11,30,59,0.05);
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
}
.pcard-tile {
  aspect-ratio: 16 / 10; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  font-size: 46px; position: relative;
}
.pcard-tile .tile-badge { position: absolute; top: 8px; left: 8px; }
.pcard-body { padding: 12px 12px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pcard-name {
  font-size: 14.5px; font-weight: 700; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.pcard-price { font-size: 18px; font-weight: 800; color: var(--navy); }
.pcard-price small { font-size: 12px; font-weight: 600; color: var(--faint); }
.pcard-stock { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.pcard-stock.low { color: var(--red); }
.pcard-cta {
  margin-top: auto; min-height: 44px; display: flex; align-items: center; justify-content: center;
  background: var(--navy); color: #fff; font-weight: 700; font-size: 14.5px;
  border-radius: var(--radius-sm); text-decoration: none;
}
.pcard-cta:active { background: var(--navy-3); }

/* Warranty badges — integrated, elegant */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; line-height: 1; white-space: nowrap;
}
.badge svg { width: 12px; height: 12px; flex: 0 0 12px; }
.badge-fw { background: var(--green-bg); color: var(--green); }
.badge-nw { background: var(--amber-bg); color: var(--amber); }

/* Brand badges — colored initial tiles so shoppers spot tools at a glance */
.brand-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 24%; color: #fff; font-weight: 800; letter-spacing: 0.02em;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.20), 0 8px 18px rgba(11,30,59,0.28);
  user-select: none;
}
.pcard-tile .brand-badge { width: 78px; height: 78px; font-size: 30px; }
.pdp-tile .brand-badge { width: 112px; height: 112px; font-size: 44px; }
/* Real brand logos */
.brand-logo { object-fit: contain; filter: drop-shadow(0 8px 18px rgba(11,30,59,0.30)); }
.pcard-tile .brand-logo { width: 84px; height: 84px; }
.pdp-tile .brand-logo { width: 120px; height: 120px; }

/* ---------- Product page ---------- */
.pdp-tile {
  border-radius: 22px; background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  aspect-ratio: 16 / 9; display: flex; align-items: center; justify-content: center;
  font-size: 84px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.pdp-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pdp-title { font-size: 24px; margin-bottom: 6px; }
.pdp-cat { font-size: 13.5px; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.pdp-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.pdp-price { font-size: 30px; font-weight: 800; color: var(--navy); }
.pdp-was { font-size: 15px; color: var(--faint); }
.pdp-stock { font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 16px; }
.pdp-stock.low { color: var(--red); }
.terms-box {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px; margin: 16px 0; font-size: 14.5px;
}
.terms-box h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 8px; }
.warn-callout {
  background: var(--amber-bg); border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 13px 15px; font-size: 14.5px; font-weight: 600; color: #6b4a00; margin: 14px 0;
}
.redeem-steps { background: #fff; border-radius: var(--radius-sm); border: 1.5px solid var(--line); padding: 16px; margin: 16px 0; }
.redeem-steps h3 { margin-bottom: 10px; }
.redeem-steps ol { margin: 0; padding-left: 20px; font-size: 15px; }
.redeem-steps li { margin-bottom: 8px; }
.buy-bar {
  position: sticky; bottom: 0; z-index: 40;
  background: rgba(255,255,255,0.97); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; margin: 22px -16px -30px;
}
.buy-bar .price { font-size: 22px; font-weight: 800; color: var(--navy); }
.buy-bar .price small { display: block; font-size: 12px; color: var(--faint); font-weight: 600; }
.qty-stepper { display: flex; align-items: center; gap: 2px; border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.qty-stepper button {
  width: 48px; height: 52px; border: 0; background: #fff; font-size: 22px; font-weight: 700; color: var(--navy);
}
.qty-stepper span { min-width: 36px; text-align: center; font-weight: 800; font-size: 17px; }

/* ---------- Buttons & forms ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 14px; border: 0;
  font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  background: var(--navy); color: #fff; width: 100%;
}
.btn:active { transform: translateY(1px); }
.btn-gold { background: linear-gradient(135deg, var(--gold), #c08c2a); color: var(--navy); }
.btn-outline { background: #fff; color: var(--navy); border: 1.5px solid var(--navy); }
.btn-danger { background: var(--red); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 14.5px; width: auto; }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px;
}
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"],
.field input[type="number"], .field input[type="password"], .field select, .field textarea {
  width: 100%; min-height: 52px; font-size: 16px; padding: 0 16px;
  border: 1.5px solid #cfd6e2; border-radius: 14px; background: #fff; color: var(--ink);
  font-family: inherit;
}
.field textarea { padding: 14px 16px; min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217,164,65,0.25);
}
.field .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.checkline {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--amber-bg); border: 1.5px solid #ecd9a0; border-radius: var(--radius-sm);
  padding: 15px; font-size: 14.5px; margin: 16px 0;
}
.checkline input { width: 26px; height: 26px; flex: 0 0 26px; margin-top: 1px; accent-color: var(--navy); }

/* ---------- Cart ---------- */
.cart-line {
  display: flex; gap: 12px; background: #fff; border-radius: var(--radius);
  padding: 14px; margin-bottom: 12px; box-shadow: var(--shadow-sm); align-items: center;
}
.cart-tile {
  width: 62px; height: 62px; flex: 0 0 62px; border-radius: 14px; font-size: 30px;
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3));
  display: flex; align-items: center; justify-content: center;
}
.cart-info { flex: 1; min-width: 0; }
.cart-name { font-weight: 700; font-size: 14.5px; line-height: 1.35; }
.cart-unit { font-size: 13.5px; color: var(--muted); }
.cart-remove { color: var(--red); font-size: 13.5px; font-weight: 700; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.totals { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); margin: 16px 0; }
.totals .row { display: flex; justify-content: space-between; font-size: 15px; margin-bottom: 8px; }
.totals .grand { font-size: 20px; font-weight: 800; color: var(--navy); border-top: 1.5px solid var(--line); padding-top: 12px; margin-top: 8px; }

/* ---------- Dashboard / orders ---------- */
.order-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.order-head { padding: 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.order-ref { font-weight: 800; font-size: 15px; }
.order-date { font-size: 13px; color: var(--muted); }
.pill { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; padding: 6px 12px; border-radius: 999px; }
.pill-paid { background: var(--green-bg); color: var(--green); }
.pill-pending { background: #e8edf5; color: var(--muted); }
.pill-failed, .pill-partial { background: var(--red-bg); color: var(--red); }
.pill-refunded { background: var(--amber-bg); color: var(--amber); }
.order-body { border-top: 1px solid var(--line); padding: 16px; }
.code-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--navy); color: #fff; border-radius: var(--radius-sm);
  padding: 13px 14px; margin-bottom: 10px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 14.5px; word-break: break-all;
}
.code-box .code { flex: 1; }
.copy-btn {
  flex: 0 0 auto; min-height: 44px; padding: 0 16px; border-radius: 10px; border: 0;
  background: var(--gold); color: var(--navy); font-weight: 800; font-size: 14px;
}
.link-row { display: flex; align-items: center; gap: 10px; background: #eef4ff; border-radius: var(--radius-sm); padding: 13px 14px; margin-bottom: 10px; font-size: 14.5px; word-break: break-all; }
.credit-card {
  background: linear-gradient(135deg, var(--navy-2), var(--navy-3)); color: #fff;
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.credit-card .label { font-size: 13px; color: #b9c4d8; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.credit-card .amount { font-size: 34px; font-weight: 800; color: var(--gold); }

/* ---------- Static pages ---------- */
.prose { background: #fff; border-radius: var(--radius); padding: 22px 18px; box-shadow: var(--shadow-sm); font-size: 15.5px; }
.prose h2 { font-size: 19px; margin-top: 1.4em; }
.prose h2:first-child { margin-top: 0; }
.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-q { font-weight: 800; font-size: 16px; margin-bottom: 6px; }
.faq-a { color: var(--muted); font-size: 15px; }

/* ---------- Flash / empty ---------- */
.flash { border-radius: var(--radius-sm); padding: 14px 16px; margin: 14px 0; font-size: 15px; font-weight: 600; }
.flash-ok { background: var(--green-bg); color: var(--green); }
.flash-err { background: var(--red-bg); color: var(--red); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .big { font-size: 52px; margin-bottom: 10px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c3cede; margin-top: 44px; padding: 36px 0 30px; }
.site-footer h4 { color: #fff; font-size: 15px; margin-bottom: 12px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 24px; }
.site-footer a { color: #c3cede; text-decoration: none; font-size: 14.5px; display: block; padding: 6px 0; }
.foot-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 18px; font-size: 13px; color: #8b97ad; }
.wa-float {
  display: inline-flex; align-items: center; gap: 10px; background: #1faa53; color: #fff !important;
  font-weight: 700; padding: 13px 22px !important; border-radius: 999px; margin-top: 12px;
}

/* ---------- Admin ---------- */
.admin-wrap { max-width: 1120px; margin: 0 auto; padding: 20px 16px 60px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-sm); }
.stat .v { font-size: 24px; font-weight: 800; color: var(--navy); }
.stat .l { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tbl-wrap { overflow-x: auto; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; padding: 13px 14px; background: var(--navy); color: #fff; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.05em; }
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.alert-strip { background: var(--red-bg); border: 1.5px solid #f3c1bb; color: var(--red); border-radius: var(--radius-sm); padding: 14px 16px; font-weight: 700; margin-bottom: 16px; font-size: 15px; }
.alert-strip.amber { background: var(--amber-bg); border-color: #ecd9a0; color: #6b4a00; }
.admin-bar { background: var(--navy); color: #fff; padding: 12px 16px; display: flex; align-items: center; gap: 10px; font-weight: 700; position: sticky; top: 0; z-index: 60; }
.admin-bar a { color: #c3cede; text-decoration: none; font-size: 14px; font-weight: 600; margin-left: 12px; }
.admin-bar .spacer { flex: 1; }

/* ---------- Larger screens ---------- */
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .hero h1 { font-size: 44px; }
  .nav { display: flex; gap: 4px; margin-left: 18px; }
  .nav a { color: #dbe3f2; text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 14px; border-radius: 10px; }
  .nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .menu-btn { display: none; }
  .mobile-nav { display: none !important; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .btn { width: auto; }
  .buy-bar { margin: 26px 0 -30px; border-radius: var(--radius); border: 1px solid var(--line); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}
