

:root{
  color-scheme: dark;

  --bg: #0B1220;          
  --surface: #0F172A;     
  --surface-2: #111C33;   
  --surface-3: #0D1528;   

  --text: #E5E7EB;
  --muted: rgba(229,231,235,.68);

  --border: rgba(255,255,255,.08);
  --border-2: rgba(255,255,255,.12);

  --accent: #3B82F6;
  --accent-2: #2563EB;
  --danger: #EF4444;
  --warning: #FBBF24;

  --radius: 16px;
  --radius-sm: 12px;

  --shadow-sm: 0 10px 24px rgba(0,0,0,.35);
  --shadow: 0 18px 45px rgba(0,0,0,.50);

  --ring: 0 0 0 4px rgba(59,130,246,.28);

  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial;
}

*{ box-sizing: border-box; }
img{ max-width: 100%; height: auto; display: block; }

.cat{
  font-family: var(--font);
  color: var(--text);
}


.cat-container{
  width: min(85vw, 92vw);
  margin: 0 auto;
  padding: 0 12px;
}


.cat-hero{
  background: transparent;
  border-bottom: 1px solid var(--border);
  padding: clamp(1.1rem, 3.5vw, 2rem) 0;
}

.cat-hero__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.cat-hero__title{
  margin: 0;
  font-weight: 950;
  letter-spacing: -0.02em;
  font-size: clamp(1.35rem, 1.8vw + 1rem, 2.2rem);
}

.cat-hero__query{ color: var(--accent); }

.cat-hero__meta{
  margin: .45rem 0 0;
  color: var(--muted);
}


.cat-layout{
  padding: 1.15rem 0 3rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 992px){
  .cat-layout{
    grid-template-columns: 300px 1fr;
    gap: 1.4rem;
  }
}
@media (min-width: 1200px){
  .cat-layout{ grid-template-columns: 320px 1fr; }
}


.cat-only-mobile{ display: block; }
.cat-only-desktop{ display: none; }
@media (min-width: 992px){
  .cat-only-mobile{ display: none; }
  .cat-only-desktop{ display: block; }
}


.cat-side{
  align-self: start;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  padding-right: 6px;
}


.cat-panel{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.cat-panel__title{
  margin: 0 0 10px;
  font-weight: 950;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
}


.cat-cats{ display: grid; gap: 8px; }

.cat-cat{
  display: block;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  text-decoration: none;
  color: rgba(229,231,235,.92);
  font-weight: 850;
  transition: background .16s ease, border-color .16s ease, transform .10s ease;
}

.cat-cat:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border-2);
}
.cat-cat:active{ transform: scale(.99); }

.cat-cat.is-active{
  background: rgba(59,130,246,.16);
  border-color: rgba(59,130,246,.45);
  color: #fff;
}


.cat-chips-wrap{ margin-bottom: 12px; }

.cat-chips{
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cat-chip{
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(229,231,235,.92);
  text-decoration: none;
  font-weight: 850;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease;
}

.cat-chip:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border-2);
}

.cat-chip.is-active{
  background: rgba(59,130,246,.16);
  border-color: rgba(59,130,246,.45);
  color: #fff;
}


.cat-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
}

@media (min-width: 420px){
  .cat-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px){
  .cat-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 1024px){
  .cat-grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
}
@media (min-width: 1280px){
  .cat-grid{ grid-template-columns: repeat(5, minmax(0, 1fr)); }
}


.cat .product-card{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.cat .product-card:hover{
  transform: translateY(-5px);
  border-color: var(--border-2);
  box-shadow: var(--shadow);
}


.cat .product-media{
  position: relative;
  height: 170px;
  padding: 16px;
  background: var(--surface-3);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: grid;
  place-items: center;
  text-decoration: none;
}

@media (max-width: 420px){
  .cat .product-media{ height: 150px; padding: 14px; }
}

.cat .product-image{
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.35));
}


.cat .discount-strip{
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 950;
  font-size: 0.85rem;
  color: #fff;
  background: var(--danger);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 10px 20px rgba(239,68,68,.18);
  z-index: 2;
}


.cat .cat-oos{
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: .85rem;
  color: rgba(255,255,255,.92);
  background: rgba(0,0,0,.38);
  border: 1px solid rgba(255,255,255,.14);
}


.cat .product-info{
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.cat .product-title{
  margin: 0;
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.25;
}

.cat .product-title__link{
  color: var(--text);
  text-decoration: none;
}
.cat .product-title__link:hover{ text-decoration: underline; }

.cat .product-desc{
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.35;

  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(.9rem * 1.35 * 3);
}


.cat .price-row{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-top: 4px;
}

.cat .price{
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}

.cat .price-new{
  font-size: 1.2rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  color: var(--text);
}

.cat .price-old{
  font-size: 1rem;
  color: rgba(229,231,235,.55);
  text-decoration: line-through;
}


.cat .rating{
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
}

.cat .stars{
  position: relative;
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  color: rgba(255,255,255,.18);
}
.cat .stars::before{ content:"★★★★★"; }

.cat .stars-fill{
  position: absolute;
  top: 0; left: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--warning);
}
.cat .stars-fill::before{ content:"★★★★★"; }

.cat .rating-number{
  font-weight: 900;
  color: rgba(229,231,235,.92);
}
.cat .review-count{
  color: rgba(229,231,235,.55);
  font-size: .80rem;
}


.cat .product-actions form{ margin: 0; }


.cat .product-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: auto;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  text-decoration: none;

  background: var(--accent);
  color: #fff !important;
  font-weight: 950;

  box-shadow: 0 12px 24px rgba(59,130,246,.18);
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
}

.cat .product-btn:hover{
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(59,130,246,.22);
}

.cat .product-btn[disabled],
.cat button.product-btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}


.cat-pagination{
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-pages{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.cat-page{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.03);
  color: rgba(229,231,235,.9);
  text-decoration: none;
  font-weight: 900;
  transition: background .16s ease, border-color .16s ease;
}

.cat-page:hover{
  background: rgba(255,255,255,.06);
  border-color: var(--border-2);
}

.cat-page.is-active{
  background: rgba(59,130,246,.16);
  border-color: rgba(59,130,246,.45);
  color: #fff;
}

.cat-page.is-disabled{
  opacity: .5;
  pointer-events: none;
}

.cat-empty{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 34px 16px;
  text-align: center;
}

.cat-empty__title{
  margin: 0 0 6px;
  font-weight: 950;
  letter-spacing: -0.02em;
}

.cat-empty__text{
  margin: 0 0 14px;
  color: var(--muted);
}


.cat-btn.cat-btn--primary{
  background: var(--accent);
  color: #fff;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 950;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cat-btn.cat-btn--primary:hover{ background: var(--accent-2); }


.cat-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 50;
}
.cat-overlay[hidden]{ display: none; }

.cat-filters{
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.cat-filters--mobile{
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(360px, 90vw);
  z-index: 60;
  transform: translateX(-110%);
  transition: transform .22s ease;
  border-radius: 0;
}

.cat-filters--mobile.is-open{ transform: translateX(0); }

.cat-filters__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.cat-filters__title{
  margin: 0;
  font-weight: 950;
}

.cat-iconbtn{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: pointer;
}
.cat-iconbtn:hover{ background: rgba(255,255,255,.07); }


:where(.cat a, .cat button, .cat input):focus-visible{
  outline: none;
  box-shadow: var(--ring);
  border-radius: 12px;
}


@media (prefers-reduced-motion: reduce){
  .cat .product-card,
  .cat .product-btn,
  .cat-filters--mobile{
    transition: none !important;
  }
}

@media (max-width: 991.98px){

  
  .cat-side{
    position: static;
    top: auto;
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  
  .cat-panel{
    box-shadow: var(--shadow-sm);
  }

  
  .cat-cats{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .cat-cat{
    text-align: center;
    padding: 12px 10px;
    border-radius: 14px;
  }
}

@media (max-width: 420px){
  .cat-cats{
    grid-template-columns: 1fr; 
  }
}

.cat-grid{
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;              
}


@media (min-width: 768px){
  .cat-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}


@media (min-width: 1024px){
  .cat-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}


@media (min-width: 1280px){
  .cat-grid{
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
