/* ══════════════════════════════════════════════════════════
   Shiyos Technologies  –  Web Store  (store.css)
   ══════════════════════════════════════════════════════════ */

/* ── Reset / Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:        #2463eb;
  --primary-light:  #eff4ff;
  --primary-dark:   #1a4fc4;
  --bg-light:       #f6f6f8;
  --bg-white:       #ffffff;
  --text-dark:      #0f172a;
  --text-mid:       #475569;
  --text-muted:     #94a3b8;
  --border:         #e2e8f0;
  --radius-card:    1.25rem;
  --radius-btn:     0.75rem;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-lg:      0 10px 40px rgba(36,99,235,.12);
  --transition:     0.25s ease;
  --font:           'Inter', sans-serif;
}

html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font);
  background: var(--bg-light);
  color: var(--text-dark);
  -webkit-font-smoothing: antialiased;
  padding-top: 88px; /* fixed nav header */
}

/* ── Shared‑nav placeholder (injected via JS) ─────────────── */
#shared-header { position: fixed; top: 0; left: 0; width: 100%; z-index: 999; }

/* ── Utility ──────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* gradient text */
.grad-text {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Page Hero ────────────────────────────────────────────── */
.store-hero {
  background: var(--bg-white);
  padding: 3.5rem 1.5rem 3rem;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.store-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  margin-bottom: 1.25rem;
}
.store-hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.store-hero__sub {
  font-size: 1.05rem;
  color: var(--text-mid);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ── Filters Row ───────────────────────────────────────────── */
.store-filters-row {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
@media (min-width: 900px) {
  .store-filters-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ── Category Tabs ────────────────────────────────────────── */
.store-tabs {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
}
.store-tabs__inner {
  display: flex;
  align-items: center;
  gap: .25rem;
  padding: .35rem;
  margin: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.store-tabs__inner::-webkit-scrollbar { display: none; }

.tab-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: transparent;
  color: var(--text-mid);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
}
.tab-btn:hover { background: var(--primary-light); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(36,99,235,.3); }

/* Tab icon sizing */
.tab-icon { font-size: 1rem; line-height: 1; flex-shrink: 0; }

/* Per-category icon colors (inactive state) */
.tab-icon--all  { color: #2463eb; }
.tab-icon--ext  { color: #7c3aed; }
.tab-icon--app  { color: #059669; }
.tab-icon--saas { color: #ea580c; }

/* Active tab — icon turns white to match button text */
.tab-btn.active .tab-icon { color: #fff; }

/* ── Search Bar ───────────────────────────────────────────── */
.store-search__box {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
  min-width: 320px;
}
.store-search__box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(36,99,235,.12);
}
.store-search__icon { color: var(--text-muted); font-size: 1.25rem; flex-shrink: 0; }
.store-search__input {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: .9rem;
  color: var(--text-dark);
  background: transparent;
}
.store-search__input::placeholder { color: var(--text-muted); }
#search-count {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Products Grid ────────────────────────────────────────── */
.store-grid-section { padding: 2rem 0 3rem; }
.store-grid-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.store-grid-section__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
}
.store-grid-section__count {
  font-size: .8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* ── Product Card ─────────────────────────────────────────── */
.product-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: #bfdbfe;
}

/* card thumbnail */
.card-thumb {
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.card-thumb__icon {
  font-size: 3.5rem;
  opacity: .75;
  transition: transform .35s ease;
  /* Material Symbols filled */
  font-variation-settings: 'FILL' 0, 'wght' 300;
}
.product-card:hover .card-thumb__icon {
  transform: scale(1.12);
  font-variation-settings: 'FILL' 1, 'wght' 400;
}

/* colored category thumbs */
.thumb--blue   { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.thumb--purple { background: linear-gradient(135deg, #f5f3ff, #ede9fe); }
.thumb--orange { background: linear-gradient(135deg, #fff7ed, #fed7aa); }
.thumb--green  { background: linear-gradient(135deg, #f0fdf4, #bbf7d0); }
.thumb--red    { background: linear-gradient(135deg, #fff1f2, #fecdd3); }
.thumb--teal   { background: linear-gradient(135deg, #f0fdfa, #99f6e4); }
.thumb--yellow { background: linear-gradient(135deg, #fefce8, #fef08a); }
.thumb--pink   { background: linear-gradient(135deg, #fdf2f8, #fbcfe8); }
.thumb--indigo { background: linear-gradient(135deg, #eef2ff, #c7d2fe); }

.thumb--blue   .card-thumb__icon { color: #2463eb; }
.thumb--purple .card-thumb__icon { color: #7c3aed; }
.thumb--orange .card-thumb__icon { color: #ea580c; }
.thumb--green  .card-thumb__icon { color: #16a34a; }
.thumb--red    .card-thumb__icon { color: #dc2626; }
.thumb--teal   .card-thumb__icon { color: #0d9488; }
.thumb--yellow .card-thumb__icon { color: #ca8a04; }
.thumb--pink   .card-thumb__icon { color: #db2777; }
.thumb--indigo .card-thumb__icon { color: #4338ca; }

/* badge: Free / Pro / New */
.card-badge {
  position: absolute;
  top: .75rem;
  right: .75rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.badge--bestseller { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.badge--pro   { background: var(--primary); color: #fff; }
.badge--new   { background: #fef9c3; color: #92400e; }
.badge--beta  { background: #ede9fe; color: #6d28d9; }

/* card body */
.card-body { padding: 1.1rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-tag {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--primary);
  margin-bottom: .4rem;
}
.card-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: .4rem;
  transition: color var(--transition);
}
.product-card:hover .card-name { color: var(--primary); }
.card-brand {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.card-desc {
  font-size: .82rem;
  color: var(--text-mid);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 1rem;
}

/* stars */
.card-stars { display: flex; align-items: center; gap: .15rem; margin-bottom: .9rem; }
.card-stars .star { font-size: .85rem; color: #fbbf24; font-variation-settings: 'FILL' 1; }
.card-stars span { font-size: .7rem; color: var(--text-muted); margin-left: .25rem; font-weight: 600; }

/* CTA button */
.card-btn {
  width: 100%;
  padding: .65rem;
  border-radius: var(--radius-btn);
  border: none;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}
.btn--install {
  background: var(--bg-light);
  color: var(--text-dark);
}
.btn--install:hover { background: var(--primary); color: #fff; }

.btn--primary {
  background: var(--primary);
  color: #fff;
}
.btn--primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

.btn--outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-mid);
}
.btn--outline:hover { border-color: var(--primary); color: var(--primary); }

/* ── No results ───────────────────────────────────────────── */
.no-results {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}
.no-results .material-symbols-outlined { font-size: 3rem; display: block; margin-bottom: .75rem; }
.no-results p { font-size: .9rem; }

/* ── Custom AI Order Section ──────────────────────────────── */
.ai-order-section {
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.ai-order-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #1e1b4b 100%);
  z-index: 0;
}
/* animated grid overlay */
.ai-order-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(36,99,235,.15) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(36,99,235,.15) 1px, transparent 1px);
  background-size: 48px 48px;
  z-index: 0;
}

.ai-order__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 900px) {
  .ai-order__inner { grid-template-columns: 1fr 1fr; }
}

.ai-order__tag {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(36,99,235,.25);
  border: 1px solid rgba(99,155,255,.3);
  color: #93c5fd;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  margin-bottom: 1.25rem;
}
.ai-order__title {
  font-size: clamp(1.7rem, 4vw, 2.8rem);
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 1rem;
}
.ai-order__title span { color: #60a5fa; }
.ai-order__desc {
  color: rgba(255,255,255,.68);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}

/* Feature pills */
.ai-features {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-bottom: 2rem;
}
.ai-feature-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: .35rem .9rem;
  color: rgba(255,255,255,.8);
  font-size: .75rem;
  font-weight: 600;
}
.ai-feature-pill .material-symbols-outlined { font-size: .9rem; color: #60a5fa; }

/* CTA row */
.ai-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
}
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.75rem;
  border-radius: var(--radius-card);
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
}
.ai-btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 8px 24px rgba(36,99,235,.4);
}
.ai-btn--primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 12px 30px rgba(36,99,235,.5); }
.ai-btn--ghost {
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.18);
}
.ai-btn--ghost:hover { background: rgba(255,255,255,.14); transform: translateY(-2px); }

/* Right side – order card */
.ai-order__card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 1.5rem;
  backdrop-filter: blur(20px);
  padding: 2rem;
}
.ai-order__card-title {
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.9);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.ai-order__card-title .material-symbols-outlined { color: #60a5fa; font-size: 1.1rem; }

/* Form styles (inside dark card) */
.ai-form { display: flex; flex-direction: column; gap: .85rem; }
.ai-form label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: .3rem;
}
.ai-form input,
.ai-form textarea,
.ai-form select {
  width: 100%;
  padding: .75rem 1rem;
  background: rgba(255,255,255,.07);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: var(--radius-btn);
  color: #fff;
  font-family: var(--font);
  font-size: .85rem;
  outline: none;
  transition: border-color .2s;
}
.ai-form input::placeholder,
.ai-form textarea::placeholder { color: rgba(255,255,255,.3); }
.ai-form input:focus,
.ai-form textarea:focus,
.ai-form select:focus { border-color: #60a5fa; }
.ai-form select { appearance: none; cursor: pointer; }
.ai-form select option { background: #1e3a8a; color: #fff; }
.ai-form textarea { resize: vertical; min-height: 90px; }
.ai-form__submit {
  width: 100%;
  padding: .9rem;
  background: linear-gradient(135deg, var(--primary), #6d28d9);
  color: #fff;
  font-family: var(--font);
  font-size: .88rem;
  font-weight: 800;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  transition: opacity var(--transition), transform var(--transition);
}
.ai-form__submit:hover { opacity: .92; transform: translateY(-1px); }

/* ── Toast ────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  background: #1e293b;
  color: #fff;
  padding: .9rem 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 8px 30px rgba(0,0,0,.3);
  font-size: .85rem;
  font-weight: 600;
  transform: translateY(120%);
  transition: transform .35s ease;
  max-width: 360px;
}
#toast.show { transform: translateY(0); }

/* ── Footer ───────────────────────────────────────────────── */
.store-footer {
  background: #0f172a;
  color: rgba(255,255,255,.45);
  text-align: center;
  padding: 1.5rem;
  font-size: .78rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.store-footer a { color: var(--primary); text-decoration: none; }
.store-footer a:hover { text-decoration: underline; }

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .5s ease both; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .store-hero { padding: 2.5rem 1rem 2rem; }
  .products-grid { grid-template-columns: 1fr 1fr; gap: .9rem; }
  .card-body { padding: .85rem 1rem 1rem; }
  .card-name { font-size: .9rem; }
  .ai-order__card { padding: 1.25rem; }
}
@media (max-width: 420px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ── Dark scrollbar ───────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-light); }
::-webkit-scrollbar-thumb { background: #bfdbfe; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }
