/* ==========================================================================
   OMNI — redesign
   Palette:  paper #F6F5F1 · ink #15161A · pine #223E36 · amber #D99A3D
   Type:     Space Grotesk (display) · Inter (body) · IBM Plex Mono (data)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root{
  --paper: #F6F5F1;
  --paper-2: #EEEBE3;
  --paper-3: #E7E3D9;
  --ink: #15161A;
  --ink-soft: #5B5C57;
  --ink-faint: #8B8C86;
  --line: #DCD8CD;
  --pine: #223E36;
  --pine-2: #2E5347;
  --pine-tint: #E2E9E4;
  --amber: #C9852F;
  --amber-tint: #F3E4C6;
  --white: #FFFFFF;
  --radius-s: 4px;
  --radius-m: 10px;
  --shadow-card: 0 1px 2px rgba(21,22,26,0.04), 0 8px 24px -12px rgba(21,22,26,0.12);
  --ease: cubic-bezier(.22,.61,.36,1);
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:'Inter',system-ui,sans-serif;
  font-size:16px;
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
input,select,textarea{ font-family:inherit; }

.container{
  max-width:1240px;
  margin:0 auto;
  padding:0 32px;
}

h1,h2,h3,h4{
  font-family:'Space Grotesk',sans-serif;
  font-weight:600;
  margin:0;
  letter-spacing:-0.01em;
}

.mono{ font-family:'IBM Plex Mono',monospace; }

.eyebrow{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
  letter-spacing:0.14em;
  text-transform:uppercase;
  color:var(--pine-2);
  display:flex;
  align-items:center;
  gap:10px;
}
.eyebrow::before{
  content:'';
  width:16px; height:1px;
  background:var(--pine-2);
  display:inline-block;
}

::selection{ background:var(--pine); color:var(--paper); }

:focus-visible{
  outline:2px solid var(--pine);
  outline-offset:2px;
}

/* ---------- Topbar ---------- */
.topbar{
  background:var(--ink);
  color:#C9CBC4;
  font-family:'IBM Plex Mono',monospace;
  font-size:12px;
}
.topbar .container{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:36px;
}
.topbar-links{ display:flex; gap:20px; }
.topbar-links a, .topbar-switch button{
  background:none; border:none; color:#9A9C93; padding:0;
  transition:color .15s var(--ease);
}
.topbar-links a:hover, .topbar-switch button:hover{ color:var(--paper); }
.topbar-switch{ display:flex; gap:16px; }
.topbar-switch .active{ color:var(--paper); }

/* ---------- Header ---------- */
.site-header{
  position:sticky; top:0; z-index:40;
  background:var(--paper);
  border-bottom:1px solid var(--line);
}
.site-header .container{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px !important;
  height:82px !important;
}
.logo{
  font-family:'Space Grotesk',sans-serif;
  font-weight:700;
  font-size:24px;
  letter-spacing:-0.02em;
  display:flex;
  align-items:center;
  gap:2px;
  flex-shrink:0;
}
.logo .dot{ color:var(--amber); }

.main-nav{ display:flex !important; gap:20px !important; align-items:center !important; flex-wrap:nowrap !important; }
.main-nav a{
  font-size:14.5px !important;
  font-weight:500 !important;
  color:var(--ink-soft) !important;
  padding:6px 0 !important;
  white-space:nowrap !important;
  position:relative !important;
  transition:color .15s var(--ease) !important;
}
.main-nav a::after{
  content:'';
  position:absolute; left:0; right:0; bottom:0;
  height:2px; background:var(--pine);
  transform:scaleX(0); transform-origin:left;
  transition:transform .2s var(--ease);
}
.main-nav a:hover{ color:var(--ink) !important; }
.main-nav a:hover::after, .main-nav a.active::after{ transform:scaleX(1); }
.main-nav a.active{ color:var(--ink) !important; font-weight:600 !important; }

.header-actions{ display:flex; align-items:center; gap:8px; flex-shrink:0; }
.header-actions .btn-small{ padding:6px 10px; font-size:12px; }
.icon-btn{
  width:36px; height:36px;
  display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line);
  border-radius:50%;
  color:var(--ink);
  position:relative;
  transition:border-color .15s var(--ease), background .15s var(--ease);
}
.icon-btn:hover{ border-color:var(--ink); background:var(--paper-2); }

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 20px;
  border-radius:999px;
  font-size:14px; font-weight:600;
  border:1px solid transparent;
  transition:transform .15s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
  white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--pine); color:var(--paper); }
.btn-primary:hover{ background:var(--pine-2); }
.btn-ghost{ border-color:var(--line); color:var(--ink); }
.btn-ghost:hover{ border-color:var(--ink); }
.btn-small{ padding:8px 16px; font-size:13px; }
.btn-block{ width:100%; }

/* ---------- Hero ---------- */
.hero{
  padding:72px 0 56px;
  border-bottom:1px solid var(--line);
}
.hero-grid{
  display:grid;
  grid-template-columns:1.1fr .9fr;
  gap:56px;
  align-items:end;
}
.hero h1{
  font-size:clamp(40px,5vw,64px);
  line-height:1.02;
  margin:18px 0 22px;
}
.hero h1 em{
  font-style:normal;
  color:var(--pine);
}
.hero p{
  font-size:17px;
  color:var(--ink-soft);
  max-width:46ch;
  margin:0 0 28px;
}
.hero-stats{
  display:flex;
  gap:36px;
  border-top:1px solid var(--line);
  padding-top:22px;
}
.hero-stats div b{
  font-family:'Space Grotesk',sans-serif;
  font-size:26px;
  display:block;
}
.hero-stats div span{
  font-size:12.5px; color:var(--ink-faint);
}

/* search */
.search-panel{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-m);
  padding:22px;
  box-shadow:var(--shadow-card);
}
.search-panel .eyebrow{ margin-bottom:14px; }
.search-row{
  display:flex;
  border:1px solid var(--line);
  border-radius:8px;
  overflow:hidden;
  background:var(--paper);
}
.search-row input{
  flex:1; border:none; background:none; padding:14px 16px; font-size:15px; color:var(--ink);
}
.search-row input:focus{ outline:none; }
.search-row button{
  background:var(--pine); color:var(--paper); border:none;
  padding:0 22px; font-weight:600; font-size:14px;
  transition:background .15s var(--ease);
}
.search-row button:hover{ background:var(--pine-2); }
.search-chips{ display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; max-height:76px; overflow:hidden; }
.chip{
  font-size:12.5px; font-family:'IBM Plex Mono',monospace;
  padding:6px 12px;
  border:1px dashed var(--ink-faint);
  border-radius:999px;
  color:var(--ink-soft);
  transition:border-color .15s var(--ease), color .15s var(--ease);
}
.chip:hover{ border-color:var(--pine); color:var(--pine); }

/* ---------- Section headers ---------- */
.section{ padding:64px 0; }
.section-head{
  display:flex; align-items:flex-end; justify-content:space-between;
  margin-bottom:32px;
  gap:24px;
}
.section-head h2{ font-size:30px; margin-top:10px; }
.section-head .see-all{
  font-size:13.5px; font-weight:600; color:var(--pine);
  display:flex; align-items:center; gap:6px;
  flex-shrink:0;
}
.section-head .see-all:hover{ text-decoration:underline; }

/* ---------- Category grid ---------- */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:1px;
  background:var(--line);
  border:1px solid var(--line);
}
.cat-card{
  background:var(--paper);
  padding:28px 24px;
  min-height:150px;
  display:flex; flex-direction:column; justify-content:space-between;
  transition:background .18s var(--ease);
  position:relative;
}
.cat-card:hover{ background:var(--white); }
.cat-card .num{ font-family:'IBM Plex Mono',monospace; font-size:12px; color:var(--ink-faint); }
.cat-card-top{ display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding-right:36px; }
.cat-parent-badge{
  font-size:8.5px; font-weight:500; text-transform:uppercase; letter-spacing:0.3px;
  color:#475569; background:#f1f5f9; border:1px solid #e2e8f0;
  padding:1px 6px; border-radius:3px; line-height:1.2;
}
.cat-card h3{ font-size:19px; margin-top:20px; }
.cat-card .arrow{
  position:absolute; top:24px; right:24px;
  width:30px; height:30px; border-radius:50%;
  border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center;
  font-size:14px;
  transition:transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.cat-card:hover .arrow{ transform:rotate(45deg); border-color:var(--pine); background:var(--pine); color:var(--paper); }

/* ---------- Listing grid & card ---------- */
.listing-grid{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:24px;
}
.listing-grid.cols-3{ grid-template-columns:repeat(3,1fr); }

.card{
  background:var(--white);
  border:1px solid var(--line);
  border-radius:var(--radius-m);
  overflow:hidden;
  transition:transform .2s var(--ease), box-shadow .2s var(--ease);
  display:flex; flex-direction:column;
}
.card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-card); }

.card-media{
  position:relative;
  aspect-ratio:4/3;
  background:var(--paper-3);
  overflow:hidden;
}
.card-media img{ width:100%; height:100%; object-fit:cover; }

.tag{
  position:absolute;
  top:12px; left:-6px;
  background:var(--ink);
  color:var(--paper);
  font-family:'IBM Plex Mono',monospace;
  font-size:13px; font-weight:500;
  padding:6px 14px 6px 18px;
  transform:rotate(-3deg);
  box-shadow:0 4px 10px rgba(0,0,0,.18);
}
.tag::before{
  content:'';
  position:absolute; left:6px; top:50%;
  width:5px; height:5px; border-radius:50%;
  background:var(--paper);
  transform:translateY(-50%);
}
.tag::after{
  content:'';
  position:absolute; right:-5px; top:0; bottom:0;
  width:10px;
  background:
    radial-gradient(circle at 0 3px, transparent 3px, var(--ink) 3.5px) top left/10px 6px repeat-y;
}
.tag.amber{ background:var(--amber); color:var(--ink); }
.tag.amber::before{ background:var(--ink); opacity:.35; }
.tag.amber::after{ background: radial-gradient(circle at 0 3px, transparent 3px, var(--amber) 3.5px) top left/10px 6px repeat-y; }

.badge-type{
  position:absolute; bottom:12px; right:12px;
  font-size:11px; font-weight:600; letter-spacing:.03em;
  background:rgba(21,22,26,.72);
  color:var(--paper);
  padding:4px 10px;
  border-radius:999px;
  backdrop-filter:blur(2px);
}

.card-body{ padding:16px 18px 18px; display:flex; flex-direction:column; gap:8px; flex:1; }
.card-body .cat{ font-size:11.5px; color:var(--ink-faint); font-family:'IBM Plex Mono',monospace; text-transform:uppercase; letter-spacing:.06em; }
.card-body h3{ font-size:16.5px; font-weight:600; line-height:1.3; }
.card-meta{
  margin-top:auto;
  display:flex; align-items:center; justify-content:space-between;
  padding-top:10px; border-top:1px solid var(--line);
  font-size:12px; color:var(--ink-faint);
}
.card-meta .seller{ display:flex; align-items:center; gap:6px; }
.avatar-dot{
  width:20px; height:20px; border-radius:50%;
  background:var(--pine-tint); color:var(--pine);
  display:flex; align-items:center; justify-content:center;
  font-size:10px; font-weight:700; font-family:'Space Grotesk',sans-serif;
}

/* ---------- Footer ---------- */
.site-footer{
  background:var(--ink);
  color:#B9BBB4;
  margin-top:64px;
}
.footer-top{
  padding:56px 0 40px;
  display:grid;
  grid-template-columns:1.4fr repeat(3,1fr);
  gap:40px;
  border-bottom:1px solid #2A2B2E;
}
.footer-brand .logo{ color:var(--paper); }
.footer-brand p{ color:#8C8E87; font-size:14px; max-width:32ch; margin-top:16px; }
.footer-col h4{
  font-family:'IBM Plex Mono',monospace;
  font-size:12px; letter-spacing:.1em; text-transform:uppercase;
  color:#8C8E87; margin-bottom:16px; font-weight:500;
}
.footer-col ul{ display:flex; flex-direction:column; gap:10px; }
.footer-col a{ font-size:14px; color:#C9CBC4; transition:color .15s var(--ease); }
.footer-col a:hover{ color:var(--amber); }
.footer-bottom{
  padding:22px 0;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12.5px; color:#6E706A;
}
.footer-bottom .socials{ display:flex; gap:14px; }

/* ---------- Breadcrumb ---------- */
.breadcrumb{
  font-family:'IBM Plex Mono',monospace;
  font-size:12.5px; color:var(--ink-faint);
  display:flex; align-items:center; gap:8px;
  padding:20px 0;
}
.breadcrumb a:hover{ color:var(--pine); }
.breadcrumb .sep{ opacity:.5; }
.breadcrumb .current{ color:var(--ink); }

/* ---------- Page header (category/listing pages) ---------- */
.page-head{ padding-bottom:32px; border-bottom:1px solid var(--line); margin-bottom:32px; }
.page-head h1{ font-size:38px; }
.page-head .count{ color:var(--ink-faint); font-size:14px; margin-top:8px; }

/* ---------- Layout with sidebar ---------- */
@media (min-width: 992px) {
  .layout{ display:grid; grid-template-columns:270px 1fr; gap:40px; padding-bottom:80px; }
}
.sidebar{ position:relative; }
.sidebar-block{ margin-bottom:32px; }
.sidebar-block h4{
  font-family:'IBM Plex Mono',monospace; font-size:12px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--ink-faint); margin-bottom:14px; font-weight:500;
}
.tree{ display:flex; flex-direction:column; }
.tree a{
  display:flex; align-items:center; justify-content:space-between;
  padding:9px 0; font-size:14.5px; color:var(--ink-soft);
  border-bottom:1px solid var(--line);
  transition:color .15s var(--ease), padding-left .15s var(--ease);
}
.tree a:hover{ color:var(--pine); padding-left:6px; }
.tree a.active{ color:var(--pine); font-weight:600; }
.tree a span{ font-family:'IBM Plex Mono',monospace; font-size:11.5px; color:var(--ink-faint); }
.tree.sub{ padding-left:16px; }
.tree.sub a{ font-size:13.5px; }

.filter-tabs{ display:flex; gap:10px; margin-bottom:24px; }
.filter-tabs button, .filter-tabs a{
  padding:9px 18px; border-radius:999px; border:1px solid var(--line);
  background:none; font-size:13.5px; font-weight:600; color:var(--ink-soft);
  transition:all .15s var(--ease); display:inline-block;
}
.filter-tabs button.active, .filter-tabs a.active{ background:var(--ink); border-color:var(--ink); color:var(--paper); }
.filter-tabs button:hover:not(.active), .filter-tabs a:hover:not(.active){ border-color:var(--ink); color:var(--ink); }

.sort-row{ display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.sort-row select{
  border:1px solid var(--line); border-radius:8px; padding:8px 14px; font-size:13.5px; background:var(--white);
}

.pagination{ display:flex; gap:8px; justify-content:center; margin-top:48px; }
.pagination a{
  width:38px; height:38px; display:flex; align-items:center; justify-content:center;
  border:1px solid var(--line); border-radius:8px; font-size:13.5px; font-family:'IBM Plex Mono',monospace;
  transition:all .15s var(--ease);
}
.pagination a.active{ background:var(--pine); border-color:var(--pine); color:var(--paper); }
.pagination a:hover:not(.active){ border-color:var(--ink); }

/* ---------- Listing detail ---------- */
@media (min-width: 992px) {
  .detail-grid {
    display: grid !important;
    grid-template-columns: 1.3fr .9fr !important;
    gap: 40px 56px !important;
    padding-bottom: 80px !important;
    align-items: start !important;
  }

  .detail-main-info {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .buy-box {
    grid-column: 2 !important;
    grid-row: 1 !important;
    position: sticky !important;
    top: 20px !important;
  }

  .detail-full-width {
    grid-column: 1 / span 2 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .detail-related-block {
    grid-column: 1 / span 2 !important;
    margin-top: 32px !important;
  }
}
.detail-full-width {
  width: 100%;
  max-width: 100%;
}
.gallery-main{
  aspect-ratio:4/3; border-radius:var(--radius-m); overflow:hidden;
  background:var(--paper-3); position:relative; border:1px solid var(--line);
}
.gallery-main img{ width:100%; height:100%; object-fit:cover; }
.gallery-thumbs{ display:flex; gap:10px; margin-top:12px; }
.gallery-thumbs div{
  width:76px; height:60px; border-radius:6px; overflow:hidden; border:2px solid transparent; cursor:pointer;
  opacity:.6; transition:all .15s var(--ease);
}
.gallery-thumbs div.active, .gallery-thumbs div:hover{ opacity:1; border-color:var(--pine); }
.gallery-thumbs img{ width:100%; height:100%; object-fit:cover; }

.detail-desc{ margin-top:40px; }
.detail-desc h2{ font-size:20px; margin-bottom:14px; }
.detail-desc p{ color:var(--ink-soft); font-size:15px; line-height:1.7; max-width:100% !important; }

.buy-box{
  border:1px solid var(--line); border-radius:var(--radius-m); padding:26px;
  background:var(--white); box-shadow:var(--shadow-card); height:fit-content; position:sticky; top:104px;
}
.buy-box .type-pill{
  display:inline-block; font-size:11.5px; font-weight:600; padding:5px 12px; border-radius:999px;
  background:var(--pine-tint); color:var(--pine); margin-bottom:14px;
}
.buy-box h1{ font-size:26px; margin-bottom:14px; line-height:1.25; }
.price-block{
  font-family:'IBM Plex Mono',monospace; font-size:34px; font-weight:600; color:var(--ink);
  padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); margin-bottom:20px;
}
.price-block span{ font-size:14px; color:var(--ink-faint); font-weight:400; display:block; margin-top:4px; }
.seller-row{ display:flex; align-items:center; gap:12px; margin-bottom:20px; }
.seller-avatar{
  width:44px; height:44px; border-radius:50%; background:var(--pine); color:var(--paper);
  display:flex; align-items:center; justify-content:center; font-family:'Space Grotesk',sans-serif; font-weight:700;
}
.seller-name{ font-weight:600; font-size:14.5px; }
.seller-role{ font-size:12.5px; color:var(--ink-faint); }
.meta-list{ display:flex; flex-direction:column; gap:10px; font-size:13.5px; color:var(--ink-soft); margin-top:18px; }
.meta-list div{ display:flex; justify-content:space-between; }
.meta-list b{ color:var(--ink); font-family:'IBM Plex Mono',monospace; font-weight:500; }

.related-head{ margin:56px 0 24px; }

/* ---------- Login / Auth page ---------- */
.auth-wrap{ min-height:100vh !important; display:grid; grid-template-columns:1fr 1fr; }
.auth-side{
  background:var(--ink); color:var(--paper); padding:64px; display:flex; flex-direction:column; justify-content:space-between;
  position:relative; overflow:hidden;
}
.auth-side::after{
  content:''; position:absolute; width:520px; height:520px; border-radius:50%;
  border:1px solid #2A2B2E; right:-180px; bottom:-220px;
}
.auth-side::before{
  content:''; position:absolute; width:380px; height:380px; border-radius:50%;
  border:1px dashed #33352F; right:-100px; bottom:-140px;
}
.auth-side h2{ font-size:36px; color:var(--paper); max-width:14ch; line-height:1.15; z-index:1; }
.auth-quote{ font-size:14px; color:#9A9C93; max-width:36ch; z-index:1; }
.auth-quote b{ color:var(--amber); font-weight:600; }
.auth-form{ display:flex; align-items:center; justify-content:center; padding:64px; background:var(--paper); }
.auth-box{ width:100%; max-width:380px; }
.auth-tabs{ display:flex; gap:24px; margin-bottom:32px; border-bottom:1px solid var(--line); }
.auth-tabs button, .auth-tabs a{
  background:none; border:none; padding:0 0 14px; font-size:16px; font-weight:600; color:var(--ink-faint);
  border-bottom:2px solid transparent; margin-bottom:-1px; cursor:pointer;
}
.auth-tabs button.active, .auth-tabs a.active{ color:var(--ink); border-color:var(--pine); }
.field{ margin-bottom:18px; }
.field label{ display:block; font-size:13px; font-weight:600; margin-bottom:7px; color:var(--ink-soft); }
.field input{
  width:100%; border:1px solid var(--line); border-radius:8px; padding:12px 14px; font-size:14.5px;
  background:var(--paper); transition:border-color .15s var(--ease);
}
.field input:focus{ outline:none; border-color:var(--pine); background:var(--white); }
.field-row{ display:flex; justify-content:space-between; align-items:center; font-size:13px; margin-bottom:22px; }
.field-row a{ color:var(--pine); font-weight:600; }
.check-row{ display:flex; align-items:center; gap:8px; color:var(--ink-soft); cursor:pointer; user-select:none; }
.check-row input[type="checkbox"]{ cursor:pointer; width:16px; height:16px; accent-color:var(--pine,#223E36); margin:0; }
.divider-or{ display:flex; align-items:center; gap:14px; margin:24px 0; color:var(--ink-faint); font-size:12.5px; }
.divider-or::before, .divider-or::after{ content:''; flex:1; height:1px; background:var(--line); }
.social-row{ display:flex; gap:12px; }
.social-row button{
  flex:1; padding:11px; border:1px solid var(--line); border-radius:8px; background:var(--white); font-size:13.5px; font-weight:600;
}
.social-row button:hover{ border-color:var(--ink); }
.auth-foot{ margin-top:26px; text-align:center; font-size:13.5px; color:var(--ink-soft); }
.auth-foot a{ color:var(--pine); font-weight:600; }

/* ---------- Profile page ---------- */
.profile-hero{ padding:56px 0 0; }
.profile-top{ display:flex; gap:28px; align-items:flex-end; padding-bottom:36px; border-bottom:1px solid var(--line); }
.profile-avatar{
  width:104px; height:104px; border-radius:24px; background:var(--pine); color:var(--paper);
  display:flex; align-items:center; justify-content:center; font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:38px;
  flex-shrink:0;
}
.profile-name{ font-size:32px; }
.profile-role{ display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(--pine); background:var(--pine-tint); padding:5px 12px; border-radius:999px; margin-top:10px; }
.profile-stats{ display:flex; gap:32px; margin-left:auto; }
.profile-stats div b{ font-family:'Space Grotesk',sans-serif; font-size:24px; display:block; }
.profile-stats div span{ font-size:12px; color:var(--ink-faint); }
.profile-tabs{ display:flex; gap:28px; margin:28px 0 32px; border-bottom:1px solid var(--line); }
.profile-tabs button, .profile-tabs a{ background:none; border:none; padding:0 0 14px; font-size:14.5px; font-weight:600; color:var(--ink-faint); border-bottom:2px solid transparent; margin-bottom:-1px; }
.profile-tabs button.active, .profile-tabs a.active{ color:var(--ink); border-color:var(--pine); }
.profile-about{ display:grid; grid-template-columns:2fr 1fr; gap:48px; padding:8px 0 56px; }
.profile-about p{ color:var(--ink-soft); font-size:15px; line-height:1.75; max-width:64ch; }
.info-card{ border:1px solid var(--line); border-radius:var(--radius-m); padding:22px; background:var(--white); }
.info-card h4{ font-family:'IBM Plex Mono',monospace; font-size:12px; text-transform:uppercase; letter-spacing:.08em; color:var(--ink-faint); margin-bottom:14px; font-weight:500; }
.info-card div{ display:flex; justify-content:space-between; font-size:13.5px; padding:8px 0; border-bottom:1px solid var(--line); }
.info-card div:last-child{ border-bottom:none; }

/* ---------- Responsive & Layout Grid Fixes ---------- */
@media (min-width: 992px) {
  .layout {
    display: grid !important;
    grid-template-columns: 270px 1fr !important;
    gap: 40px !important;
    padding-bottom: 80px !important;
  }

  .listing-grid.cols-3 {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 24px !important;
  }
}

.layout .sidebar, .sidebar, .sidebar-block, .tree {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 1 !important;
  box-shadow: none !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  overflow-y: visible !important;
  background: transparent !important;
  display: block !important;
  visibility: visible !important;
  transform: none !important;
  float: none !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
}

@media (max-width: 991px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  .hero, .section, main {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }
}

/* Mobile Burger Menu & Off-Canvas Drawer */
.mobile-menu-burger {
  display: none;
  background: var(--paper-2, #f5f5f7);
  border: 1px solid var(--line, #e0e0e0);
  font-size: 20px;
  font-weight: bold;
  color: var(--ink, #15161a);
  width: 38px;
  height: 38px;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.mobile-menu-burger:hover {
  background: var(--paper-3, #e5e5ea);
}

.mobile-drawer-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(3px);
  z-index: 9998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-drawer-overlay.active {
  display: block;
  opacity: 1;
}

.mobile-menu-drawer {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #ffffff;
  z-index: 9999;
  box-shadow: -5px 0 25px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
  overflow-y: auto;
}

.mobile-menu-drawer.active {
  right: 0;
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.mobile-drawer-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
}

.mobile-drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.mobile-switch-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: #f8f9fa;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.mobile-lang-switch a, .mobile-curr-switch a {
  margin-right: 10px;
  color: #6c757d;
  text-decoration: none;
}

.mobile-lang-switch a.active, .mobile-curr-switch a.active {
  color: #1b3b36;
  font-weight: 700;
  border-bottom: 2px solid #1b3b36;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-links a {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: 10px;
  color: #2b2b2b;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.mobile-nav-links a.active, .mobile-nav-links a:hover {
  background: #f0f4f3;
  color: #1b3b36;
  font-weight: 600;
}

.mobile-nav-links a i {
  width: 24px;
  font-size: 18px;
  color: #1b3b36;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-drawer-footer a.btn[style*="1b3b36"],
.mobile-drawer-footer a.btn[style*="1b3b36"] *,
.mobile-drawer-footer a.btn.text-white,
.mobile-drawer-footer a.btn.text-white * {
  color: #ffffff !important;
}

/* Collapsible Categories Sidebar on Mobile */
.mobile-sidebar-toggle {
  display: none;
  background: var(--white, #ffffff);
  border: 1px solid var(--line, #dcd8cd);
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink, #15161a);
  cursor: pointer;
  width: 100%;
  margin-bottom: 16px;
  box-shadow: var(--shadow-card, 0 1px 3px rgba(0,0,0,0.05));
  transition: all 0.2s ease;
}

.toggle-icon {
  transition: transform 0.3s ease;
}

.toggle-icon.rotate {
  transform: rotate(180deg);
}

@media (max-width: 991px) {
  .mobile-sidebar-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  .sidebar-content-body {
    display: none;
    margin-bottom: 24px;
    background: var(--white, #ffffff);
    border: 1px solid var(--line, #dcd8cd);
    border-radius: 12px;
    padding: 16px;
    box-shadow: var(--shadow-card, 0 2px 8px rgba(0,0,0,0.06));
  }

  .sidebar-content-body.open {
    display: block !important;
  }

  .topbar {
    display: none !important;
  }
  
  .site-header .main-nav {
    display: none !important;
  }

  .header-actions .btn,
  .header-actions .btn-ghost,
  .header-actions a:not(.icon-btn) {
    display: none !important;
  }

  .mobile-menu-burger {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
  }

  .site-header .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .hero-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    align-items: stretch !important;
  }

  .hero h1 {
    font-size: 30px !important;
    margin: 12px 0 16px !important;
  }

  .hero p {
    font-size: 15px !important;
    max-width: 100% !important;
    margin-bottom: 20px !important;
  }

  .hero-stats {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    padding-top: 16px !important;
  }

  .search-panel {
    width: 100% !important;
    margin-top: 8px !important;
    box-sizing: border-box !important;
  }

  .search-row {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  .search-row input[type="text"],
  .search-row input {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .search-row button[type="submit"],
  .search-row button {
    flex-shrink: 0 !important;
    padding: 10px 16px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
  }

  aside.sidebar,
  .layout > aside.sidebar,
  .layout .sidebar {
    position: relative !important;
    transform: none !important;
    top: auto !important;
    left: auto !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 16px 0 !important;
    display: block !important;
    visibility: visible !important;
    z-index: 1 !important;
    box-shadow: none !important;
  }

  .layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .layout > section,
  .layout section {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
    display: block !important;
    float: none !important;
    clear: both !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .detail-grid {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 24px !important;
    padding-bottom: 40px !important;
  }

  .detail-main-info {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .buy-box {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    top: auto !important;
    box-sizing: border-box !important;
  }

  .detail-related-block {
    order: 3 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .cat-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .listing-grid,
  .listing-grid.cols-3 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .footer-top {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 24px !important;
  }

  .profile-top {
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 16px !important;
  }

  .profile-stats {
    margin-left: 0 !important;
    width: 100% !important;
    justify-content: flex-start !important;
    gap: 24px !important;
  }

  .profile-tabs {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px 12px !important;
    margin: 20px 0 24px !important;
    border-bottom: none !important;
    width: 100% !important;
  }

  .profile-tabs a,
  .profile-tabs button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    font-size: 13.5px !important;
    padding: 8px 4px !important;
    border-bottom: 2px solid var(--line) !important;
    white-space: normal !important;
    word-break: break-word !important;
    margin-bottom: 0 !important;
  }

  .profile-tabs a.active,
  .profile-tabs button.active {
    border-bottom-color: var(--pine) !important;
    color: var(--ink) !important;
    font-weight: 700 !important;
  }

  .profile-about {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  /* Auth / Login mobile styles */
  .auth-wrap {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    width: 100% !important;
  }

  .auth-side {
    display: none !important;
  }

  .auth-form {
    padding: 32px 20px !important;
    width: 100% !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .auth-box {
    width: 100% !important;
    max-width: 420px !important;
  }

  .field-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
}

@media (max-width: 576px) {
  .cat-grid {
    grid-template-columns: 1fr !important;
  }

  .listing-grid,
  .listing-grid.cols-3 {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  .footer-top {
    grid-template-columns: 1fr !important;
  }
}

@media (prefers-reduced-motion: reduce){
  *{ animation:none !important; transition:none !important; }
}
