/* ===== OPOOS SIZE GRID v4 — CSS ===== */

.p-variants-block .variant-list {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
}

.p-variants-block .detail-parameters > label[for="parameter-id-5"],
.p-variants-block .variant-label {
  display: none !important;
}

.opoos-sg-wrap {
  margin: 12px 0 20px;
  font-family: inherit;
}

.opoos-sg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.opoos-sg-label {
  font-size: 14px;
  font-weight: 700;
  color: #1a1a1a;
}

.opoos-sg-label .selected-val {
  font-weight: 400;
  color: #666;
}

.opoos-sg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.opoos-sg-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px 9px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  min-height: 62px;
}

.opoos-sg-btn:active {
  transform: scale(0.96);
}

.opoos-sg-btn:hover {
  border-color: #999;
}

.opoos-sg-btn.is-active {
  border-color: #1a1a1a;
  background: #1a1a1a;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}

.opoos-sg-btn.is-active:hover {
  border-color: #1a1a1a;
}

.opoos-sg-btn.is-disabled {
  background: #f5f5f5;
  border-color: #eee;
  color: #ccc;
  cursor: not-allowed;
}

.opoos-sg-btn.is-disabled .sg-num {
  text-decoration: line-through;
}

.opoos-sg-btn.is-disabled:hover {
  border-color: #eee;
}

.opoos-sg-btn.is-disabled:active {
  transform: none;
}

.opoos-sg-btn .sg-num {
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
}

/* Cena — zvetseny font, cerna barva */
.opoos-sg-btn .sg-price {
  font-size: 12px;
  font-weight: 500;
  color: #444;
  margin-top: 4px;
  line-height: 1;
  white-space: nowrap;
}

.opoos-sg-btn.is-active .sg-price {
  color: rgba(255,255,255,0.7);
}

.opoos-sg-btn.is-disabled .sg-price {
  color: #ccc;
}

/* Stock indikator */
.opoos-sg-btn .sg-stock {
  font-size: 9px;
  font-weight: 600;
  color: #e65100;
  margin-top: 2px;
  line-height: 1;
  text-decoration: none !important;
}

.opoos-sg-btn.is-active .sg-stock {
  color: rgba(255,255,255,0.6);
}

@media (max-width: 360px) {
  .opoos-sg-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 576px) {
  .opoos-sg-grid { grid-template-columns: repeat(5, 1fr); }
}
@media (min-width: 768px) {
  .opoos-sg-grid { grid-template-columns: repeat(6, 1fr); }
}
