/* ===================================================
   3D PUBLIC DOMAIN – CLEAN THEME (NO SIDEBAR)
   Purple / Blue modern storefront layout
=================================================== */

/* ===== THEME ===== */
:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 10px 26px rgba(17,24,39,.08);
  --shadow-soft: 0 4px 14px rgba(17,24,39,.06);
  --radius: 14px;

  --accent: #6d28d9;   /* purple */
  --accent-2: #2563eb; /* blue */
  --accent-soft: rgba(109,40,217,.10);
}

*{ box-sizing:border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background-color: #f7f8fb;

  background-image:
    radial-gradient(600px 600px at 15% 15%, rgba(37,99,235,0.12), transparent 60%),
    radial-gradient(500px 500px at 85% 25%, rgba(109,40,217,0.10), transparent 55%),
    radial-gradient(400px 400px at 50% 80%, rgba(0,200,255,0.08), transparent 60%),
    linear-gradient(180deg, #f7f8fb 0%, #eef0f6 100%);

  background-repeat: no-repeat;
  background-attachment: fixed;
  background-size: cover;
}

img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }

/* ===================================================
   HEADER
=================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.site-header.transparent {
  background: rgba(255, 255, 255, 0.85);
}

.header-row{
  max-width:1400px;
  margin:auto;
  padding:6px 18px;
}

/* ===== row 1: brand ===== */
.header-top {
  display: block;
  padding-top: 10px;
  padding-bottom: 8px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}

.brand-logo{
  height:60px;
  width:auto;
  flex: 0 0 auto;
}

.brand-text {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
}

.brand-title {
  display: block;
  font-size: 20px;
  font-weight: 500;
  color: #111827;
  line-height: 1.45;
}

.brand-subtitle{
  font-size:13px;
  color:var(--muted);
  margin-top:3px;
}

/* ===== row 2: auth ===== */
.header-auth {
  display: flex;
  justify-content: center;
  padding-top: 6px;
  padding-bottom: 10px;
}

.authbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  text-align: center;
}

.authuser {
  white-space: normal;
}

.token-badge {
  background:#111;
  color:#fff;
  padding:5px 10px;
  border-radius:20px;
  font-size:13px;
  font-weight:600;
  display:inline-block;
}

/* ===== row 3: nav ===== */
.header-nav{
  padding-top:6px;
  padding-bottom:8px;
}

.nav{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:8px;
}

.nav-link{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:#fff;
  font-size:13px;
  transition:.15s;
}

.nav-link:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-soft);
  border-color:var(--accent);
}

.nav-link.active{
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
  font-weight:700;
}

/* ===== row 4: info strip ===== */
.header-info{
  text-align:center;
  font-size:13px;
  color:var(--muted);
  padding-bottom:12px;
}

/* ===================================================
   LAYOUT (FULL WIDTH – NO SIDEBAR)
=================================================== */

.layout{
  max-width:1400px;
  margin:auto;
  padding:20px;
}

.content header{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  gap:10px;
}

.content h1{
  margin:0;
  font-size:40px;
  letter-spacing:-.5px;
}

/* search */
#search{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
}

#count{
  color:var(--muted);
  font-size:13px;
}

/* ===================================================
   SUBCATEGORY CHIPS
=================================================== */

.chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:6px;
}

.chip{
  border:1px solid var(--border);
  padding:7px 12px;
  border-radius:999px;
  background:#fff;
  cursor:pointer;
  font-size:13px;
  transition:.15s;
}

.chip:hover{
  border-color:var(--accent);
  transform: translateY(-1px);
}

.chip.active{
  background:var(--accent-soft);
  border-color:var(--accent);
  color:var(--accent);
  font-weight:700;
}

/* ===================================================
   FORMAT MODE SWITCH
=================================================== */

.format-toggle{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:0;
  margin:10px auto 14px;
  border-radius:999px;
  background:#fff;
  border:2px solid var(--border);
  box-shadow: var(--shadow);
  overflow:hidden;
  width:fit-content;
}

.format-toggle a{
  padding:10px 22px;
  font-size:14px;
  font-weight:700;
  text-decoration:none;
  color:var(--text);
  background:#f3f4f6;
  border-right:1px solid var(--border);
  transition:.15s;
}

.format-toggle a:last-child{
  border-right:none;
}

.format-toggle a:hover{
  background:#e5e7eb;
}

.format-toggle a.active{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;
}

/* ===================================================
   GRID – 4 COLUMNS
=================================================== */

.grid{
  margin-top:18px;
  display:grid;
  gap:18px;
  grid-template-columns:repeat(4,1fr);
}

@media(max-width:1200px){
  .grid{ grid-template-columns:repeat(3,1fr); }
}

@media(max-width:800px){
  .grid{ grid-template-columns:repeat(2,1fr); }
}

@media(max-width:520px){
  .grid{ grid-template-columns:1fr; }
}

/* ===================================================
   CARDS
=================================================== */

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  box-shadow:var(--shadow-soft);
  transition:.15s;
}

.card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow);
}

.thumb {
  width: 100%;
  background: #f2f2f2;
  overflow: hidden;
}

.thumb img {
  width: 100%;
  height: auto;
  display: block;
}

.card .content{
  padding:12px 14px;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.title{ font-weight:900; }
.desc{ font-size:14px; color:#374151; }
.meta{ font-size:12px; color:var(--muted); }

.actions{
  margin-top:8px;
  display:flex;
  gap:8px;
}

.btn{
  padding:8px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  font-size:13px;
}

.btn.primary{
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  color:#fff;
  border:none;
  font-weight:700;
}

/* ===================================================
   INSERT (FULL WIDTH PROMO ROW)
=================================================== */

.insert{
  grid-column:1 / -1;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}

.insert-inner{
  display:grid;
  grid-template-columns:260px 1fr;
  gap:16px;
}

@media(max-width:700px){
  .insert-inner{ grid-template-columns:1fr; }
}

.insert-banner{
  width:100%;
  height:100%;
  object-fit:cover;
}

.insert-copy{
  padding:16px;
}

.insert-title{
  font-weight:900;
  font-size:18px;
  margin-bottom:6px;
}

.insert-body{
  font-size:14px;
  color:#374151;
  margin-bottom:8px;
}

/* ===================================================
   FOOTER
=================================================== */

.site-footer {
  width: 100%;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 4px rgba(0,0,0,0.04);
  padding: 16px 0;
}

.site-footer .footer-inner {
  max-width: 1400px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0 24px;
  color: var(--muted);
  font-size: 13px;
}

.site-footer .footer-links a {
  margin-left: 12px;
  color: var(--muted);
  text-decoration: none;
  transition: 0.15s;
}

.site-footer .footer-links a:hover {
  color: var(--accent);
}

@media(max-width:700px) {
  .brand-link {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .brand-text {
    width: 100%;
  }

  .brand-title {
    font-size: 18px;
  }
}

@media(max-width:520px) {
  .site-footer .footer-inner {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .site-footer .footer-links a {
    margin-left: 6px;
    margin-right: 6px;
  }
  

}