/* ══════════════════════════════════════
   ANEXUS — Blue Theme
   ══════════════════════════════════════ */
:root {
  --bg:     #050d1a;
  --bg2:    #091629;
  --bg3:    #0d1f3c;
  --bg4:    #122448;
  --border: #1a3157;
  --border2:#1e3d6a;
  --text:   #ddeeff;
  --t2:     #6fa3c8;
  --t3:     #2d5278;
  --accent: #3b82f6;
  --accent2:#60a5fa;
  --accent3:#1d4ed8;
  --glow:   rgba(59,130,246,.15);
  --glow2:  rgba(59,130,246,.07);
  --green:  #34d399;
  --yellow: #fbbf24;
  --red:    #f87171;
  --mono:   'Space Mono', monospace;
  --ar:     'Cairo', sans-serif;
  --r:      12px;
  --nav-h:  62px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ar);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: var(--ar); }
input, textarea, select { font-family: var(--ar); }

/* ── BACKGROUND CANVAS ── */
#bgCanvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.mesh-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(59,130,246,.08) 0%, transparent 70%),
    radial-gradient(ellipse 50% 60% at 10% 70%, rgba(29,78,216,.07) 0%, transparent 60%);
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 20px;
  background: rgba(5,13,26,.9);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

/* LOGO */
.nav-brand { flex-shrink: 0; }
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  position: relative;
}
.logo-wrap:active { cursor: grabbing; }
.logo-svg {
  width: 38px;
  height: 38px;
  transition: transform .3s, filter .3s;
  filter: drop-shadow(0 0 8px rgba(59,130,246,.4));
}
.logo-wrap:hover .logo-svg {
  transform: rotate(8deg) scale(1.08);
  filter: drop-shadow(0 0 14px rgba(96,165,250,.7));
}
.logo-wrap.admin-active .logo-svg {
  filter: drop-shadow(0 0 18px rgba(52,211,153,.8));
}
.logo-text {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--text);
  opacity: .9;
}

/* NAV CENTER TABS */
.nav-center {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 4px;
}
.nav-tab {
  background: none;
  border: none;
  color: var(--t2);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 18px;
  border-radius: 7px;
  transition: all .2s;
}
.nav-tab.active {
  background: var(--accent);
  color: #fff;
}
.nav-tab:hover:not(.active) {
  color: var(--text);
  background: var(--bg3);
}

/* NAV RIGHT */
.nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.user-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 5px 12px;
  font-family: var(--mono);
  font-size: 11px;
}
.upulse {
  width: 5px; height: 5px;
  background: var(--green);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.3} }

.cart-btn {
  position: relative;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 7px 11px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all .2s;
}
.cart-btn:hover { border-color: var(--accent); color: var(--accent2); }
.cart-badge {
  background: var(--accent);
  color: #fff;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

/* ── PAGES ── */
.page {
  display: none;
  min-height: 100vh;
  padding-top: var(--nav-h);
  position: relative;
  z-index: 1;
}
.page-active { display: block; animation: pageIn .35s ease; }
@keyframes pageIn { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

/* ── HERO ── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 24px;
  position: relative;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--border2), transparent);
}
.hero-badge {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 3px;
  margin-bottom: 20px;
  opacity: .8;
  animation: fadeUp .6s ease .1s both;
}
.hero-title {
  font-size: clamp(56px, 11vw, 110px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -3px;
  margin-bottom: 16px;
  animation: fadeUp .6s ease .2s both;
}
.title-line {
  display: block;
  background: linear-gradient(135deg, #fff 0%, #93c5fd 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-sub {
  display: block;
  font-size: .36em;
  letter-spacing: 8px;
  color: var(--accent2);
  -webkit-text-fill-color: var(--accent2);
  opacity: .7;
  margin-top: 8px;
}
.hero-desc {
  font-size: 15px;
  color: var(--t2);
  max-width: 460px;
  line-height: 1.8;
  margin-bottom: 36px;
  animation: fadeUp .6s ease .3s both;
}
@keyframes fadeUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }

/* STATS */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-bottom: 40px;
  animation: fadeUp .6s ease .4s both;
}
.hstat { text-align: center; }
.hstat-num {
  display: block;
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1;
}
.hstat-lbl {
  display: block;
  font-size: 11px;
  color: var(--t3);
  letter-spacing: 1px;
  margin-top: 4px;
}
.hstat-sep { width: 1px; height: 44px; background: var(--border2); }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp .6s ease .5s both;
}

/* ── BUTTONS ── */
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(59,130,246,.3);
}
.btn-primary:hover {
  background: var(--accent2);
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(59,130,246,.45);
}
.btn-primary.full { width: 100%; justify-content: center; }
.btn-ghost {
  background: transparent;
  color: var(--t2);
  border: 1px solid var(--border2);
  padding: 12px 26px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent2); }
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-danger { background: var(--red); color: #fff; border: none; padding: 7px 14px; border-radius: 8px; font-size: 12px; transition: all .2s; }
.btn-danger:hover { opacity: .85; }
.btn-outline { background: transparent; border: 1px solid var(--border2); color: var(--t2); padding: 7px 14px; border-radius: 8px; font-size: 12px; transition: all .2s; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent2); }
.center-btn { display: block; margin: 32px auto 0; }

/* ── SECTIONS ── */
.section-label {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent2);
  letter-spacing: 3px;
  margin-bottom: 10px;
  opacity: .7;
}
.section-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 10px;
  color: var(--text);
}
.section-desc {
  font-size: 14px;
  color: var(--t2);
  line-height: 1.7;
  margin-bottom: 28px;
}

/* ── SHOWCASE ── */
.showcase-section {
  padding: 80px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

/* ── FREE TOOLS (landing) ── */
.freetools-section {
  padding: 60px 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.freetools-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}
.ftool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all .22s;
}
.ftool-card:hover {
  border-color: var(--accent);
  background: var(--bg3);
  transform: translateX(-4px);
  box-shadow: 0 4px 20px rgba(59,130,246,.12);
}
.ftool-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent2);
  flex-shrink: 0;
}
.ftool-body { flex: 1; }
.ftool-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.ftool-desc { font-size: 12px; color: var(--t2); line-height: 1.5; }
.ftool-arrow { font-size: 18px; color: var(--t3); transition: all .2s; }
.ftool-card:hover .ftool-arrow { color: var(--accent); transform: translateX(-4px); }

/* ── FAQ ── */
.faq-section {
  padding: 60px 24px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-list { margin-top: 24px; }
.faq-item {
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color .2s;
}
.faq-q:hover { color: var(--accent2); }
.faq-arrow { color: var(--t3); font-size: 11px; transition: transform .3s; }
.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  font-size: 13px;
  color: var(--t2);
  line-height: 1.8;
  transition: max-height .35s ease, padding .35s ease;
}
.faq-item.open .faq-a { max-height: 200px; padding-bottom: 18px; }

/* ── ABOUT STRIP ── */
.about-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 48px 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.astrip-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
}
.astrip-icon { font-size: 24px; }
.astrip-body { text-align: right; }
.astrip-body strong { display: block; font-size: 14px; font-weight: 700; }
.astrip-body span { font-size: 12px; color: var(--t2); }
.astrip-sep { width: 1px; height: 48px; background: var(--border); }

/* ── SHOP PAGE ── */
.offers-banner {
  padding: 24px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.offers-inner { max-width: 1100px; margin: 0 auto; }
.offers-scroll {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.offer-chip {
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 1px solid var(--border2);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent2);
  white-space: nowrap;
}

/* SEARCH + CATS */
.shop-controls {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 0;
}
.search-bar {
  position: relative;
  margin-bottom: 16px;
}
.search-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 11px 40px 11px 36px;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border .2s;
}
.search-bar input:focus { border-color: var(--accent); }
.search-bar input::placeholder { color: var(--t3); }
.search-clear {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  cursor: pointer;
  font-size: 12px;
  display: none;
}
.search-clear.show { display: block; }
.cats-wrap { overflow-x: auto; padding-bottom: 4px; }
.cats { display: flex; gap: 8px; flex-wrap: nowrap; min-width: max-content; }
.cat-btn {
  background: var(--bg2);
  border: 1px solid var(--border2);
  color: var(--t2);
  padding: 7px 18px;
  border-radius: 24px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .2s;
}
.cat-btn:hover { border-color: var(--accent); color: var(--accent2); }
.cat-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ── PRODUCTS ── */
.products-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 24px 60px;
}
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 14px;
}
.loading-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  grid-column: 1/-1;
}
.loading-dots.center-dots { grid-column: 1/-1; }
.loading-dots span {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  animation: ldot .9s ease-in-out infinite;
}
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes ldot { 0%,100%{opacity:.2;transform:scale(.7)} 50%{opacity:1;transform:scale(1)} }
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 0;
  color: var(--t3);
  font-family: var(--mono);
  font-size: 13px;
}

/* PRODUCT CARD */
.pcard {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  overflow: hidden;
  cursor: pointer;
  transition: all .25s;
  opacity: 0;
  animation: fadeUp .4s ease forwards;
}
.pcard:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(59,130,246,.15);
}
.pcard-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  background: var(--bg3);
}
.pcard-img-placeholder {
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t3);
  font-family: var(--mono);
  font-size: 11px;
}
.pcard-body { padding: 16px; }
.pcard-cat {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent2);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 7px;
  opacity: .7;
}
.pcard-name { font-size: 15px; font-weight: 700; margin-bottom: 6px; line-height: 1.3; }
.pcard-desc {
  font-size: 12px;
  color: var(--t2);
  line-height: 1.6;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pcard-foot { display: flex; align-items: center; justify-content: space-between; }
.pcard-price {
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
  color: var(--accent2);
}
.pcard-stars { display: flex; gap: 2px; font-size: 11px; margin-top: 2px; color: var(--yellow); }
.pcard-actions { display: flex; gap: 6px; }

/* ── SERVICES SECTION (shop page) ── */
.services-section {
  padding: 60px 24px 80px;
  max-width: 1100px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.service-card {
  position: relative;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  cursor: pointer;
  overflow: hidden;
  transition: all .25s;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.service-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 10px 40px rgba(59,130,246,.15);
}
.service-card:hover .sc-glow { opacity: 1; }
.sc-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(59,130,246,.08), transparent 65%);
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
}
.sc-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.sc-content { flex: 1; }
.sc-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.sc-desc { font-size: 13px; color: var(--t2); line-height: 1.6; margin-bottom: 12px; }
.sc-cta { font-size: 13px; font-weight: 700; color: var(--accent2); transition: letter-spacing .2s; }
.service-card:hover .sc-cta { letter-spacing: 1px; }

/* ── SWIPE HINT ── */
.swipe-hint {
  position: fixed;
  top: calc(var(--nav-h) + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  z-index: 99;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
}
.swipe-hint.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.swipe-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 12px;
  color: var(--t2);
  box-shadow: 0 4px 20px rgba(0,0,0,.4);
}

/* ── PULL INDICATOR ── */
.admin-pull {
  position: fixed;
  top: var(--nav-h);
  left: 50%;
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
  width: 60px;
  height: 4px;
  background: var(--accent);
  border-radius: 0 0 4px 4px;
  z-index: 101;
  transition: transform .3s, height .3s;
}
.admin-pull.active {
  height: 6px;
  transform: translateX(-50%) scaleY(1);
  box-shadow: 0 0 16px var(--accent);
}

/* ── MODALS ── */
.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity .3s;
  backdrop-filter: blur(4px);
}
.overlay.open { opacity: 1; pointer-events: all; }

.modal-wrap {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(6px);
}
.modal-wrap.open { display: flex; animation: modalIn .25s ease; }
@keyframes modalIn { from{opacity:0;transform:scale(.96)} to{opacity:1;transform:scale(1)} }

.modal {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t3);
  position: sticky; top: 0;
  background: var(--bg2);
  z-index: 1;
}
.modal-head button {
  background: none; border: none;
  color: var(--t3); font-size: 16px;
  transition: color .2s;
}
.modal-head button:hover { color: var(--text); }
.modal-body { padding: 20px; }

/* ADMIN MODAL */
.admin-modal { max-width: 700px; }
.admin-tabs {
  display: flex;
  gap: 4px;
  padding: 12px 20px 0;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.atab {
  background: none; border: none;
  color: var(--t3);
  font-size: 13px;
  padding: 8px 14px;
  border-radius: 6px 6px 0 0;
  border-bottom: 2px solid transparent;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--ar);
}
.atab.active { color: var(--accent2); border-bottom-color: var(--accent); }
.atab-pane { display: none; padding: 20px; }
.atab-pane.active { display: block; }

/* PIN MODAL */
.pin-modal { max-width: 380px; }
.pin-body { padding: 28px; text-align: center; }
.pin-logo {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  border: 1px solid var(--border2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.pin-hint { font-size: 13px; color: var(--t2); margin-bottom: 20px; line-height: 1.6; }
.pin-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 14px;
  border-radius: 10px;
  font-size: 20px;
  text-align: center;
  letter-spacing: 8px;
  outline: none;
  transition: border .2s;
  font-family: var(--mono);
}
.pin-input:focus { border-color: var(--accent); }
.pin-err { color: var(--red); font-size: 12px; margin-top: 8px; min-height: 16px; font-family: var(--mono); }

/* FORM */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--t2); margin-bottom: 5px; font-family: var(--mono); }
.field input, .field textarea, .field select {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 9px;
  font-size: 13px;
  outline: none;
  transition: border .2s;
  font-family: var(--ar);
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 80px; }
.field select option { background: var(--bg3); }

/* TABLES */
.admin-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.admin-table th {
  text-align: right;
  padding: 8px 10px;
  color: var(--t3);
  font-family: var(--mono);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
.admin-table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:last-child td { border: none; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 10px; font-family: var(--mono); }
.badge-green { background: rgba(52,211,153,.15); color: var(--green); }
.badge-red { background: rgba(248,113,113,.15); color: var(--red); }
.badge-yellow { background: rgba(251,191,36,.15); color: var(--yellow); }

/* REVIEWS */
.review-card { background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.review-stars { color: var(--yellow); font-size: 13px; margin-bottom: 6px; }
.review-text { font-size: 13px; color: var(--t2); margin-bottom: 8px; line-height: 1.5; }
.review-meta { font-size: 11px; color: var(--t3); font-family: var(--mono); display: flex; justify-content: space-between; margin-bottom: 8px; }
.review-reply { background: var(--bg2); border: 1px solid var(--border2); border-radius: 8px; padding: 10px; margin-top: 8px; font-size: 12px; color: var(--t2); }
.review-reply-label { font-size: 10px; color: var(--accent2); font-family: var(--mono); margin-bottom: 4px; }
.hidden-review { opacity: .5; filter: blur(2px); }

/* PRODUCT DETAIL */
.pdetail-img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 16px; }
.pdetail-cat { font-family: var(--mono); font-size: 10px; color: var(--t3); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.pdetail-name { font-size: 22px; font-weight: 900; margin-bottom: 8px; }
.pdetail-price { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--accent2); margin-bottom: 16px; }
.pdetail-desc { font-size: 14px; color: var(--t2); line-height: 1.7; margin-bottom: 24px; }
.pdetail-actions { display: flex; gap: 10px; }
.pdetail-actions .btn-primary, .pdetail-actions .btn-ghost { flex: 1; justify-content: center; }

/* DRAWER */
.drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 340px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.drawer.open { transform: translateX(0); }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--t3);
}
.drawer-head button { background: none; border: none; color: var(--t3); font-size: 16px; transition: color .2s; }
.drawer-head button:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px 18px; }
.drawer-foot { padding: 16px 18px; border-top: 1px solid var(--border); }
.total-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 14px; }
.total-val { font-family: var(--mono); font-size: 20px; color: var(--accent2); font-weight: 700; }
.cart-item { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); gap: 10px; }
.ci-name { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.ci-price { font-family: var(--mono); font-size: 12px; color: var(--accent2); }
.ci-rm { background: none; border: none; color: var(--t3); font-size: 13px; transition: color .2s; }
.ci-rm:hover { color: var(--red); }
.cart-empty { text-align: center; padding: 48px 0; color: var(--t3); font-family: var(--mono); font-size: 12px; }

/* FREE SERVICE MODAL */
.fservice-wrap { padding: 20px; }
.fservice-desc { font-size: 13px; color: var(--t2); line-height: 1.7; margin-bottom: 18px; }
.fservice-result {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 10px;
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent2);
  max-height: 220px;
  overflow-y: auto;
  white-space: pre;
  display: none;
  margin: 14px 0 10px;
  line-height: 1.6;
}
.fservice-result.show { display: block; }

/* TOAST */
.toast {
  position: fixed;
  bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--bg3);
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  z-index: 500;
  opacity: 0;
  transition: all .3s;
  pointer-events: none;
  white-space: nowrap;
  box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── SPINNER ── */
.spinner {
  width: 28px; height: 28px;
  border: 2px solid var(--border2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--t3); }

/* ══════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .astrip-sep { display: none; }
  .about-strip { gap: 8px; }
  .astrip-item { padding: 12px 20px; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  nav { padding: 0 14px; gap: 8px; }
  .logo-text { display: none; }
  .nav-center { gap: 2px; padding: 3px; }
  .nav-tab { font-size: 12px; padding: 5px 12px; }
  .user-pill { display: none; }

  .hero { padding: 40px 16px; }
  .hero-stats { gap: 16px; }
  .hstat-num { font-size: 24px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn-primary, .hero-cta .btn-ghost { width: 100%; justify-content: center; max-width: 280px; }

  .showcase-section,
  .freetools-section,
  .faq-section { padding: 48px 16px; }

  .services-section { padding: 48px 16px 60px; }
  .services-grid { grid-template-columns: 1fr; }

  .products-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

  .showcase-grid { grid-template-columns: 1fr 1fr; }

  .about-strip { flex-direction: column; align-items: flex-start; padding: 40px 20px; }
  .astrip-sep { display: none; }

  .drawer { width: 100%; }

  .admin-modal { max-width: 100% !important; }

  .offers-banner { padding: 16px; }
  .shop-controls { padding: 16px 16px 0; }
  .products-section { padding: 16px 16px 48px; }
}

/* Large screen */
@media (min-width: 1200px) {
  .showcase-grid { grid-template-columns: repeat(4, 1fr); }
}

/* iPad portrait */
@media (min-width: 641px) and (max-width: 1024px) {
  .showcase-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ═══════════════════════════════════════════
   NEW FEATURES CSS
═══════════════════════════════════════════ */

/* ─── ANIMATED LOGO PLACEHOLDER ─────────── */
.pcard-img { display: block; }
.pcard-logo-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 140px;
  background: linear-gradient(135deg, rgba(29,78,216,.08) 0%, rgba(59,130,246,.04) 100%);
  border-bottom: 1px solid var(--border);
  gap: 8px;
  position: relative;
  overflow: hidden;
}
/* Show placeholder when no image */
.pcard:not(:has(img.pcard-img[src])) .pcard-logo-placeholder,
.pcard img.pcard-img[style*="display:none"] + .pcard-logo-placeholder {
  display: flex;
}
/* Always show placeholder in showcase if no image set */
.pcard-logo-placeholder {
  display: flex; /* default show, img will hide it */
}
.pcard:has(img.pcard-img) .pcard-logo-placeholder {
  display: none;
}
.logo-anim-svg {
  animation: logoFloat 3s ease-in-out infinite, logoGlow 3s ease-in-out infinite;
  width: 52px; height: 52px;
  filter: drop-shadow(0 0 8px rgba(59,130,246,0.35));
}
@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes logoGlow {
  0%,100% { filter: drop-shadow(0 0 6px rgba(59,130,246,0.3)); }
  50% { filter: drop-shadow(0 0 14px rgba(59,130,246,0.65)); }
}
.logo-placeholder-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--t3);
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: .7;
}

/* ─── STOCK BADGE ────────────────────────── */
.pcard-stock { font-size: 10px; font-family: var(--mono); margin-top: 3px; }
.stock-low { color: #fbbf24; }
.stock-empty { color: #f87171; }
.stock-ok { display: none; }
.out-of-stock { opacity: .5; pointer-events: none; }

/* ─── CURRENCY GRID ──────────────────────── */
.curr-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}
.curr-grid::-webkit-scrollbar { width: 4px; }
.curr-grid::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 4px; }
.curr-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.curr-option:hover { border-color: var(--accent); background: rgba(59,130,246,.06); }
.curr-option.active { border-color: var(--accent); background: rgba(59,130,246,.1); }
.curr-icon { font-size: 18px; min-width: 22px; text-align: center; }
.curr-info { flex: 1; }
.curr-name { font-size: 12px; font-weight: 600; }
.curr-net { font-size: 10px; color: var(--t3); font-family: var(--mono); }
.curr-check { color: var(--accent); font-size: 13px; }

/* ─── COUPON ROW ─────────────────────────── */
.coupon-row {
  display: flex;
  gap: 8px;
  margin-bottom: 4px;
}
.coupon-row input { font-family: var(--mono); letter-spacing: 1px; }

/* ─── ADMIN STATS STRIP ──────────────────── */
.admin-stats-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.ast-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 8px;
  text-align: center;
}
.ast-num { font-family: var(--mono); font-size: 18px; font-weight: 700; color: var(--accent2); }
.ast-lbl { font-size: 10px; color: var(--t3); margin-top: 2px; }

/* ─── ORDER CARD (user dashboard) ───────── */
.order-card {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 10px;
  transition: border-color .2s;
}
.order-card:hover { border-color: var(--border2); }
.order-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.badge-red { background: rgba(248,113,113,.12); color: #f87171; border: 1px solid rgba(248,113,113,.25); }

/* ─── USER PILL (clickable) ─────────────── */
#userPill { cursor: pointer; }
#userPill:hover { background: rgba(59,130,246,.15); border-color: var(--accent); }

/* ─── PDETAIL IMAGE WITH FALLBACK ────────── */
.pdetail-img + .pcard-logo-placeholder {
  height: 180px;
  border-radius: 10px;
  margin-bottom: 16px;
}

/* ─── API TAB ────────────────────────────── */
#tab-api .admin-table td:nth-child(2) { font-size: 10px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
