/* variantsselect8 – front styles (GRID, no scroll) */

.vs8-center{
  padding:10px;
  border:1px solid #eee;
  border-radius:8px;
  margin:12px 0;
  background:#f9f9f9;
}

/* safe */
.vs8-center * { box-sizing: border-box; }

/* Labels / headers */
.vs8-center .vs8-header{font-weight:600;margin-bottom:8px}
.vs8-center .vs8-label{font-weight:600;margin:8px 0 6px}
.vs8-center .vs8-label + .vs8-label{margin-top:12px}

.vs8-center .vs8-selected-color{
  font-weight:700;
}

/* ---------------------- COLORS GRID ---------------------- */
.vs8-center .vs8-colors {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  padding:4px;
  overflow:visible;
  justify-content:flex-start;
}

/* default fallback: 4 columns */
.vs8-center .vs8-colors > * {
  flex: 0 0 calc(25% - 10px);
  max-width: calc(25% - 10px);
}

/* 1440+ -> 5 columns */
@media (min-width: 1440px) {
  .vs8-center .vs8-colors > * {
    flex: 0 0 calc(20% - 10px);
    max-width: calc(20% - 10px);
  }
}

/* Tablet -> 3 columns */
@media (min-width: 576px) and (max-width: 991px) {
  .vs8-center .vs8-colors > * {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
  }
}

/* Mobile -> 2 columns */
@media (max-width: 575px) {
  .vs8-center .vs8-colors > * {
    flex: 0 0 calc(50% - 10px);
    max-width: calc(50% - 10px);
  }
}

/* Tile */
.vs8-center .vs8-colors .vs8-color{
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  border:1px solid #ddd;
  border-radius:12px;
  background:#fff;
  padding:8px 10px;
  text-decoration:none;
  transition:box-shadow .2s ease, transform .2s ease;
}

.vs8-center .vs8-colors .vs8-color:hover{
  box-shadow:0 6px 14px rgba(0,0,0,.08);
  transform:translateY(-1px);
}

.vs8-center .vs8-colors .vs8-color:focus{
  outline:2px solid rgba(0,0,0,.15);
  outline-offset:2px;
}

/* Active tile */
.vs8-center .vs8-colors .vs8-color.active{
  border-color:#000000;
  box-shadow:0 6px 16px rgba(0,0,0,.10);
}

/* Miniatura (mniejsza) */
.vs8-center .vs8-colors .vs8-color img{
  width:72px;
  height:72px;
  object-fit:cover;
  border-radius:8px;
  display:block;
}

/* (zostawiamy kompatybilnie: jeśli gdzieś jeszcze jest label, to ukryj) */
.vs8-center .vs8-color-label{ display:none !important; }

/* remove any previous scrollbar styling if leftover */
.vs8-center .vs8-colors::-webkit-scrollbar{display:none}

/* ---------------------- BADGES ---------------------- */
.vs8-center .vs8-badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:12px;
  font-size:.85rem;
  line-height:1;
  color:#333;
}
.vs8-center .vs8-badge.green{background:#e8f6ee;border-color:#b7e3c4;color:#207a3a}
.vs8-center .vs8-badge.yellow{background:#fff8e1;border-color:#ffe08a;color:#7a5a00}
.vs8-center .vs8-badge.gray{background:#f1f1f1;border-color:#ddd;color:#555}

/* ensure badges keep colors inside dropdown & summary */
.vs8-center .vs8-dd-menu .vs8-badge.green,
.vs8-center .vs8-size-wrap .vs8-badge.green{background:#e8f6ee!important;border-color:#b7e3c4!important;color:#207a3a!important}
.vs8-center .vs8-dd-menu .vs8-badge.yellow,
.vs8-center .vs8-size-wrap .vs8-badge.yellow{background:#fff8e1!important;border-color:#ffe08a!important;color:#7a5a00!important}
.vs8-center .vs8-dd-menu .vs8-badge.gray,
.vs8-center .vs8-size-wrap .vs8-badge.gray{background:#f1f1f1!important;border-color:#ddd!important;color:#555!important}

/* ---------------------- SIZES / DROPDOWN ---------------------- */
.vs8-center .vs8-size-row{display:flex;align-items:center;gap:12px;width:100%;flex-wrap:wrap}
.vs8-center .vs8-size-wrap{width:100%;position:relative;display:flex;align-items:center}
.vs8-center .vs8-size-wrap .vs8-badge{margin:0}

.vs8-center details.vs8-dd{position:relative;display:inline-block;flex:1 1 auto;min-width:220px;margin:0}
.vs8-center .vs8-dd summary.vs8-dd-summary{
  list-style:none;cursor:pointer;padding:8px 12px;border-radius:6px;border:1px solid #e6e6e6;background:#fff;
  display:flex;align-items:center;gap:10px;min-height:38px
}
.vs8-center .vs8-dd[open] .vs8-dd-summary{border-bottom-left-radius:0;border-bottom-right-radius:0}
.vs8-center .vs8-dd .vs8-dd-menu{
  position:absolute;left:0;right:0;z-index:200;background:#fff;border:1px solid #e6e6e6;border-top:none;
  border-bottom-left-radius:6px;border-bottom-right-radius:6px;box-shadow:0 4px 14px rgba(0,0,0,.06)
}

/* Size item */
.vs8-center .vs8-dd-menu a.vs8-size-item{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  padding:10px 12px;text-decoration:none;color:#111;border-bottom:1px solid #f0f0f0
}
.vs8-center .vs8-dd-menu a.vs8-size-item:last-child{border-bottom:none}
.vs8-center .vs8-size-only{font-weight:600}
.vs8-center .vs8-b{margin-left:auto}

/* Badge dostępności wewnątrz podsumowania */
.vs8-center .vs8-summary-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

/* Strzałka dropdown */
.vs8-center .vs8-dd-summary::after {
  content: "▾";
  margin-left: 6px;
  font-size: 0.8rem;
  opacity: 0.7;
}
.vs8-center .vs8-dd[open] .vs8-dd-summary::after {
  transform: rotate(180deg);
}

/* Ukrywanie aktualnie wybranej opcji z dropdownu */
.vs8-dd-menu .vs8-size-item.active-size {
  display: none !important;
}
/* Single available frame size: same visual style without a dropdown arrow */
.vs8-center .vs8-single-size{display:flex;align-items:center;gap:10px;min-height:38px;padding:8px 12px;border:1px solid #e6e6e6;border-radius:6px;background:#fff;width:100%}
.vs8-center .vs8-single-size .vs8-summary-badge{margin-left:auto}
