/* =========================================
   Scherer 3D Druck – Shop Styles Modern
   ========================================= */

:root{
  --shop-bg-glass: linear-gradient(180deg, rgba(14,18,28,.92), rgba(8,12,20,.92));
  --shop-border-soft: rgba(255,255,255,.08);
  --shop-border-strong: rgba(115,92,214,.32);
  --shop-hover: rgba(115,92,214,.12);
  --shop-hover-strong: rgba(115,92,214,.22);
  --shop-accent-2: rgba(37,180,255,.95);
  --shop-shadow-lg: 0 18px 50px rgba(0,0,0,.34);
  --shop-shadow-md: 0 10px 28px rgba(0,0,0,.24);
  --shop-radius-lg: 20px;
  --shop-radius-md: 16px;
  --shop-radius-sm: 12px;
}

/* Page rhythm */
.page > h1{
  margin: 8px 0 14px;
  font-size: clamp(1.6rem, 2.2vw, 2.25rem);
  line-height: 1.1;
}

/* Shop intro */
.shop-intro-card{
  margin-top: 10px;
}

.shop-intro-card .muted{
  margin: 0;
  line-height: 1.55;
}

.shop-intro-actions{
  margin-top: 12px;
  gap: 8px;
  flex-wrap: wrap;
}

/* Shop layout */
.layout-shop{
  display:grid;
  grid-template-columns: 290px minmax(0,1fr);
  gap: 24px;
  align-items:start;
  margin-top: 8px;
}

@media (max-width: 980px){
  .layout-shop{
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Main category bar */
.main-cat-bar{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 20px 0 22px;
}

/* Category bar buttons */
.main-cat-bar .btn{
  border-radius: 999px;
  min-height: 42px;
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: .01em;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
  backdrop-filter: blur(8px);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

.main-cat-bar .btn:hover{
  transform: translateY(-1px);
  border-color: rgba(115,92,214,.40);
  background: rgba(115,92,214,.10);
  box-shadow: 0 10px 20px rgba(0,0,0,.18);
}

.main-cat-bar .btn.primary{
  background: linear-gradient(135deg, rgba(115,92,214,.98), rgba(37,180,255,.92));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 24px rgba(68,108,255,.22);
}

/* Sidebar */
.category-sidebar{
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  align-self: start;
  background: var(--shop-bg-glass);
  border-radius: var(--shop-radius-lg);
  border: 1px solid var(--shop-border-soft);
  box-shadow: var(--shop-shadow-lg);
  padding: 18px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.category-sidebar::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(115,92,214,0), rgba(115,92,214,.55), rgba(37,180,255,.45), rgba(115,92,214,0));
  opacity:.9;
}

@media (max-width: 980px){
  .category-sidebar{
    position: static;
    top:auto;
  }
}

.category-sidebar h2{
  font-size: 1rem;
  margin: 0 0 14px;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Sidebar groups */
.subcat-group{
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--shop-radius-md);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.015));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}

.subcat-group:last-child{
  margin-bottom: 0;
}

.subcat-group__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.subcat-group__title{
  font-weight: 800;
  font-size: .98rem;
  color: #fff;
  text-decoration: none;
  letter-spacing: .01em;
}

.subcat-group__title:hover{
  color: #a9d7ff;
}

.subcat-group__all{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration:none;
  font-size: .82rem;
  font-weight: 700;
  color: #d8dfeb;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  transition: transform .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
}

.subcat-group__all:hover{
  transform: translateY(-1px);
  background: rgba(115,92,214,.16);
  border-color: rgba(115,92,214,.42);
  color: #fff;
}

/* Subcat links */
.subcat-list{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.subcat-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:44px;
  padding:10px 12px;
  border-radius: 14px;
  text-decoration:none;
  color:#e9eef7;
  background: rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.05);
  transition:
    background .18s ease,
    border-color .18s ease,
    color .18s ease,
    transform .18s ease,
    box-shadow .18s ease;
}

.subcat-link:hover{
  transform: translateY(-1px);
  background: var(--shop-hover);
  border-color: rgba(115,92,214,.36);
  color:#fff;
  box-shadow: 0 10px 20px rgba(0,0,0,.16);
}

.subcat-link.active{
  background: linear-gradient(135deg, rgba(115,92,214,.98), rgba(37,180,255,.88));
  border-color: transparent;
  color:#fff;
  box-shadow: 0 14px 26px rgba(68,108,255,.24);
}

.subcat-link__label{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  font-weight:600;
}

.subcat-link__icon{
  width:24px;
  height:24px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.08);
  font-size:.78rem;
  flex:0 0 auto;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
}

.subcat-link.active .subcat-link__icon{
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.18);
}

.subcat-link__text{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.subcat-link__arrow{
  opacity:.78;
  font-size:.95rem;
  flex:0 0 auto;
}

/* Sidebar empty */
.category-sidebar-empty{
  margin:0;
  padding:12px;
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  border:1px dashed rgba(255,255,255,.08);
  color: var(--text-muted);
}

/* Filters */
.filters-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:0 0 18px;
  align-items:center;
  padding:12px;
  background: var(--shop-bg-glass);
  border:1px solid var(--shop-border-soft);
  border-radius: 18px;
  box-shadow: var(--shop-shadow-md);
  backdrop-filter: blur(10px);
}

.filters-row input[type="search"],
.filters-row select{
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.filters-row input[type="search"]{
  flex:1;
  min-width: 220px;
}

.filters-row input[type="search"]::placeholder{
  color: var(--text-muted);
}

.filters-row input[type="search"]:focus,
.filters-row select:focus{
  outline: none;
  border-color: rgba(115,92,214,.45);
  box-shadow: 0 0 0 3px rgba(115,92,214,.12);
}

/* Product grid */
.grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 18px;
}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(18,22,30,.96), rgba(12,16,24,.96));
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 14px;
  box-shadow: var(--shop-shadow-md);
  display:flex;
  flex-direction:column;
  gap:10px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow:hidden;
}

.card:hover{
  transform: translateY(-3px);
  border-color: rgba(115,92,214,.28);
  box-shadow: 0 18px 34px rgba(0,0,0,.28);
}

.card-img-product{
  width:100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  background: linear-gradient(180deg, #ffffff, #f4f6fb);
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.08);
  padding: 8px;
}

.card h3{
  margin: 8px 0 4px;
  font-size: 1.04rem;
  line-height: 1.25;
}

.card .desc{
  margin:0;
  color: var(--text-muted);
  line-height:1.42;
  min-height: 3.9em;
}

/* Modern product card */
.product-card{
  padding: 12px;
  gap: 12px;
}

.product-card__image-wrap{
  display:block;
  text-decoration:none;
  border-radius: 18px;
  overflow:hidden;
}

.product-card__image-wrap .card-img-product{
  transition: transform .22s ease, box-shadow .22s ease;
}

.product-card:hover .card-img-product{
  transform: scale(1.02);
}

.product-card__body{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.product-card__title{
  margin: 2px 0 0;
  font-size: 1.02rem;
  line-height: 1.28;
}

.product-card__title a{
  color: inherit;
  text-decoration: none;
}

.product-card__title a:hover{
  color: #b7dcff;
}

.product-card__footer{
  margin-top: auto;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.product-card__price-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.product-card__price{
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: .01em;
  white-space: nowrap;
}

.product-card__buy{
  display:flex;
}

.product-card__buy .btn{
  width:100%;
}

/* Badge */
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:fit-content;
  min-height:30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .01em;
  color:#dce8ff;
  background: rgba(115,92,214,.14);
  border:1px solid rgba(115,92,214,.26);
}

/* Generic row between */
.row.between{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.row.between strong{
  font-size: 1.02rem;
}

/* Buttons in cards */
.card .btn{
  min-height: 42px;
  border-radius: 12px;
  font-weight: 700;
}

.card form .btn{
  width: 100%;
  margin-top: 4px;
}

/* SEO block */
.seo-block{
  background: linear-gradient(180deg, rgba(17,21,31,.96), rgba(11,15,24,.96));
  border:1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  box-shadow: var(--shop-shadow-md);
  padding: 20px;
}

.seo-block h2{
  margin-top:0;
}

/* Popular products area */
section > h2{
  margin-bottom: 14px;
}

/* Mobile tuning */
@media (max-width: 720px){
  .filters-row{
    padding:10px;
  }

  .filters-row input[type="search"],
  .filters-row select,
  .filters-row .btn{
    width:100%;
  }

  .row.between,
  .product-card__price-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .row.between .btn,
  .product-card__price-row .btn{
    width:100%;
  }

  .shop-intro-actions .btn{
    width:100%;
  }
}

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

  .card{
    padding:10px;
    border-radius: 16px;
  }

  .card h3,
  .product-card__title{
    font-size: .96rem;
  }

  .card .desc{
    font-size: .88rem;
    min-height: auto;
  }

  .subcat-group__head{
    flex-direction:column;
    align-items:flex-start;
  }

  .subcat-group__all{
    width:100%;
    justify-content:center;
  }

  .product-card__price{
    font-size: 1rem;
  }
}