/* MeshCave 6.0.2 — modern catalog skin + persistent themes */
:root{
  --mc-bg:#070b18;
  --mc-bg-2:#0a1020;
  --mc-surface:#0d1324;
  --mc-surface-2:#11182a;
  --mc-surface-hover:#151d31;
  --mc-text:#f6f7fb;
  --mc-soft:#b0b5c6;
  --mc-muted:#777f95;
  --mc-border:#293252;
  --mc-border-soft:#202943;
  --mc-accent:#6f4cff;
  --mc-accent-2:#8a6bff;
  --mc-pink:#ff1764;
  --mc-header:rgba(6,10,22,.94);
  --mc-shadow:0 18px 45px rgba(0,0,0,.28);
}
html[data-theme="dark"]{
  --bg:var(--mc-bg);--surface:var(--mc-surface);--ink:var(--mc-text);--ink-soft:var(--mc-soft);--muted:var(--mc-muted);--border:var(--mc-border);--accent:var(--mc-accent);--accent-dark:#5934e8;--accent-soft:#1b1640;--shadow:0 8px 24px rgba(0,0,0,.22);--shadow-lg:var(--mc-shadow);
  color-scheme:dark;
}
html[data-theme="light"]{
  --bg:#f5f6fb;--surface:#fff;--ink:#171925;--ink-soft:#54596b;--muted:#85899a;--border:#e2e5ef;--accent:#6847ee;--accent-dark:#5436cf;--accent-soft:#efebff;--shadow:0 8px 24px rgba(28,34,54,.08);--shadow-lg:0 18px 46px rgba(28,34,54,.14);
  color-scheme:light;
}
html[data-theme="dark"] body{background:radial-gradient(circle at 65% -10%,rgba(61,47,125,.19),transparent 34%),linear-gradient(180deg,#080c18 0%,#070b15 100%);color:var(--ink);min-height:100vh}
html[data-theme="light"] body{background:linear-gradient(180deg,#fafbfe,#f4f5fa);color:var(--ink)}
body{transition:background-color .18s ease,color .18s ease}

/* header */
.site-header{background:var(--mc-header);border-bottom:1px solid rgba(137,111,255,.18);backdrop-filter:blur(18px);box-shadow:0 6px 30px rgba(0,0,0,.12)}
html[data-theme="light"] .site-header{background:rgba(255,255,255,.92);color:#191b27;border-bottom-color:#e4e6ef}
.header-inner{height:76px;gap:26px;max-width:1380px}
.logo{font-size:22px;letter-spacing:-.025em}.logo-cube{font-size:24px;text-shadow:0 0 18px rgba(111,76,255,.75)}
html[data-theme="light"] .logo{color:#171925}
.header-search{max-width:560px;position:relative}
.header-search input{height:44px;border:1px solid rgba(124,112,177,.28);border-radius:12px 0 0 12px;background:rgba(255,255,255,.045);padding-left:16px;font-size:14px;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.header-search input:focus{background:rgba(255,255,255,.07);border-color:rgba(111,76,255,.72);box-shadow:0 0 0 3px rgba(111,76,255,.13)}
.header-search button{height:44px;border-radius:0 12px 12px 0;padding:0 22px;background:linear-gradient(135deg,#5c35e6,#321ab6)}
html[data-theme="light"] .header-search input{background:#f5f6fa;color:#171925;border-color:#e1e4ed}
.header-nav{gap:15px;font-size:15px}.header-nav>a{color:#e4e2ef}.header-nav>a:hover{color:#fff}
html[data-theme="light"] .header-nav>a{color:#45495c}.header-icon-link{width:42px;height:42px;display:grid;place-items:center;border-radius:11px;color:#d9dbe6!important;transition:.15s ease}
.header-icon-link:hover{background:rgba(255,255,255,.07);color:#fff!important}.header-icon-link svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.header-favorite:hover svg{stroke:var(--mc-pink)}
.account-menu>summary{gap:9px}.account-menu>summary>span:not(.user-chip):not(.cart-badge){font-weight:650}
.theme-toggle{width:42px;height:42px;border-radius:11px;border:1px solid rgba(130,111,214,.26);background:rgba(255,255,255,.045);color:#e9e8f1;display:grid;place-items:center;cursor:pointer;padding:0;transition:.16s ease}
.theme-toggle:hover{background:rgba(111,76,255,.16);border-color:rgba(111,76,255,.72);transform:translateY(-1px)}
.theme-icon{grid-area:1/1;width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:opacity .16s ease,transform .16s ease}
html[data-theme="dark"] .theme-icon-moon{opacity:0;transform:scale(.65) rotate(-25deg)}html[data-theme="dark"] .theme-icon-sun{opacity:1}
html[data-theme="light"] .theme-icon-moon{opacity:1}html[data-theme="light"] .theme-icon-sun{opacity:0;transform:scale(.65) rotate(25deg)}
html[data-theme="light"] .theme-toggle{background:#f3f4f8;color:#34394b;border-color:#dfe2ec}

/* notification popover theme */
html[data-theme="dark"] .notification-popover,html[data-theme="dark"] .search-suggestions{background:#101726;border-color:#293252;color:#f5f6fb;box-shadow:0 22px 65px rgba(0,0,0,.48)}
html[data-theme="dark"] .notification-tabs button{background:#171f31;color:#c7cad6}html[data-theme="dark"] .notification-mini>button{color:#f4f5fa;border-bottom-color:#222b42}html[data-theme="dark"] .notification-mini>button:hover,html[data-theme="dark"] .search-suggestions a:hover{background:#172036}

/* catalog */
.container{max-width:1320px}.page-head{padding:48px 0 12px}.page-head h1{font-size:31px;letter-spacing:-.035em}
.catalog-layout{grid-template-columns:270px minmax(0,1fr);gap:34px;padding-top:28px}
.filters{border-radius:17px;padding:22px;background:linear-gradient(180deg,rgba(15,21,37,.96),rgba(10,15,27,.96));border-color:#293252;box-shadow:0 18px 45px rgba(0,0,0,.14)}
html[data-theme="light"] .filters{background:#fff;border-color:#e1e4ee}
.filters h3{font-size:15px;margin-bottom:16px}.filter-cat-list{gap:7px}.filter-cat-list a{padding:9px 11px;border-radius:8px;color:var(--ink-soft)}
.filter-cat-list a.active,.filter-cat-list a:hover{background:linear-gradient(90deg,rgba(83,54,198,.62),rgba(48,33,112,.65));color:#bcaeff}
html[data-theme="light"] .filter-cat-list a.active,html[data-theme="light"] .filter-cat-list a:hover{background:#eee9ff;color:#5b3bd3}
.filter-group label{color:var(--ink-soft)}.price-row input,.filter-group select,.catalog-toolbar select{background:#11182a;color:#f2f3f7;border:1px solid #313b5d;border-radius:9px;height:40px}
html[data-theme="light"] .price-row input,html[data-theme="light"] .filter-group select,html[data-theme="light"] .catalog-toolbar select{background:#fff;color:#202331;border-color:#dce0ea}
.filters .btn-secondary{height:44px;background:linear-gradient(135deg,#744dff,#522bdd);color:#fff;border:0;box-shadow:0 8px 22px rgba(83,43,221,.24)}
.catalog-reset{color:#9f8aff;font-weight:650;margin-top:13px}.catalog-toolbar{margin-bottom:20px;min-height:42px}.catalog-toolbar select{min-width:185px;padding:0 14px}.result-count{font-size:14px;color:#aaaec0}

/* cards */
.product-grid{gap:20px}.product-card-shell{position:relative;min-width:0}.product-card{height:100%;background:linear-gradient(180deg,#111827,#0c1220);border-color:#2b3557;border-radius:16px;box-shadow:0 8px 25px rgba(0,0,0,.12);overflow:hidden;transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease}
html[data-theme="light"] .product-card{background:#fff;border-color:#dfe3ed}
.product-card:hover{transform:translateY(-4px);border-color:#4c5d94;box-shadow:0 18px 42px rgba(0,0,0,.3)}
.product-card-media{position:relative;overflow:hidden}.product-thumb{aspect-ratio:1.3/1;transition:transform .28s ease}.product-card:hover .product-thumb{transform:scale(1.025)}
.product-card-body{padding:14px 16px 17px;gap:7px}.product-title{font-size:16px;color:var(--ink);font-weight:760}.product-seller{font-size:13px;color:#9298aa}.product-price{font-size:18px;color:var(--ink)}
.card-format{position:absolute;top:10px;left:10px;z-index:2;background:rgba(19,14,46,.87);color:#a98dff;border:1px solid rgba(143,113,255,.24);backdrop-filter:blur(7px);padding:3px 8px;border-radius:7px}
.product-card-body>.product-format{display:none}
.card-favorite-form{position:absolute;right:10px;top:10px;z-index:5;margin:0}.card-favorite{position:absolute;right:10px;top:10px;z-index:5;width:36px;height:36px;border-radius:50%;display:grid;place-items:center;border:1px solid rgba(255,255,255,.34);background:rgba(8,10,18,.48);color:#fff;cursor:pointer;backdrop-filter:blur(8px);transition:.15s ease;padding:0}
.card-favorite-form .card-favorite{position:static}.card-favorite:hover{transform:scale(1.06);background:rgba(10,12,22,.68);border-color:#fff}.card-favorite svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:2;stroke-linejoin:round}.card-favorite.active{background:rgba(255,23,100,.94);border-color:rgba(255,255,255,.5);box-shadow:0 5px 18px rgba(255,23,100,.34)}.card-favorite.active svg{fill:#fff;stroke:#fff}
.rating-line{font-size:13px}.old-price{color:#8c91a0}.pagination a,.pagination .cur{border-radius:8px}

/* forms/cards across dark theme */
html[data-theme="dark"] .form-card,html[data-theme="dark"] .summary-card,html[data-theme="dark"] .cart-item,html[data-theme="dark"] .stat-card,html[data-theme="dark"] .review,html[data-theme="dark"] .pd-seller,html[data-theme="dark"] .table{background:#0d1423;border-color:#293252;color:var(--ink)}
html[data-theme="dark"] .field input,html[data-theme="dark"] .field textarea,html[data-theme="dark"] .field select{background:#11182a;color:#f4f5f8;border-color:#313b5d}
html[data-theme="dark"] .table th{background:#121a2b;color:#aeb4c5}
.site-footer{background:#060914;border-top:1px solid #202843;margin-top:70px}
html[data-theme="light"] .site-footer{background:#171925}

@media(max-width:1080px){.header-nav{gap:10px}.catalog-layout{grid-template-columns:230px 1fr}.product-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.header-inner{height:auto;min-height:68px;padding-top:10px;padding-bottom:10px}.theme-toggle{width:38px;height:38px}.catalog-layout{grid-template-columns:1fr}.filters{order:0}.product-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:460px){.product-grid{gap:12px}.product-card-body{padding:11px 12px 13px}.product-title{font-size:14px}.product-price{font-size:15px}.card-favorite{width:32px;height:32px}.card-favorite svg{width:18px;height:18px}}

/* MeshCave 6.4.3 hotfix: stable circular favorite controls */
.card-favorite-form{
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  max-width:36px!important;
  max-height:36px!important;
  flex:0 0 36px!important;
}
.card-favorite,
.card-favorite-form .card-favorite{
  box-sizing:border-box!important;
  inline-size:36px!important;
  block-size:36px!important;
  min-inline-size:36px!important;
  min-block-size:36px!important;
  max-inline-size:36px!important;
  max-block-size:36px!important;
  aspect-ratio:1 / 1!important;
  flex:0 0 36px!important;
  padding:0!important;
  border-radius:50%!important;
  line-height:1!important;
  overflow:hidden!important;
}
.card-favorite svg{
  inline-size:21px!important;
  block-size:21px!important;
  min-inline-size:21px!important;
  min-block-size:21px!important;
  max-inline-size:21px!important;
  max-block-size:21px!important;
  aspect-ratio:1 / 1!important;
  flex:none!important;
  transform:none!important;
}
@media(max-width:460px){
  .card-favorite-form{width:32px!important;height:32px!important;min-width:32px!important;min-height:32px!important;max-width:32px!important;max-height:32px!important;flex-basis:32px!important}
  .card-favorite,.card-favorite-form .card-favorite{inline-size:32px!important;block-size:32px!important;min-inline-size:32px!important;min-block-size:32px!important;max-inline-size:32px!important;max-block-size:32px!important;flex-basis:32px!important}
  .card-favorite svg{inline-size:18px!important;block-size:18px!important;min-inline-size:18px!important;min-block-size:18px!important;max-inline-size:18px!important;max-block-size:18px!important}
}
