/* productvariants — product page */

.pv-variants {
  --pv-accent: #3aa13a;
  --pv-accent-soft: #eaf6ea;
  --pv-border: #e1e4e6;
  --pv-muted: #6c757d;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid var(--pv-border);
  border-radius: 8px;
  background: #fff;
}

.pv-title {
  margin: 0 0 10px;
  font-weight: 700;
}

.pv-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 10px;
}

.pv-row-name {
  min-width: 90px;
  color: var(--pv-muted);
}

.pv-row-current {
  font-weight: 600;
  min-width: 70px;
}

.pv-filters .pv-row-name {
  min-width: 90px;
}

.pv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pv-chip {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid var(--pv-border);
  border-radius: 16px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.9em;
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s, background 0.15s;
}

a.pv-chip:hover,
button.pv-chip:hover:not([disabled]) {
  border-color: var(--pv-accent);
  background: var(--pv-accent-soft);
  color: inherit;
  text-decoration: none;
}

.pv-chip-active {
  border-color: var(--pv-accent);
  background: var(--pv-accent);
  color: #fff;
  cursor: default;
}

button.pv-chip-active:hover {
  background: var(--pv-accent);
  color: #fff;
}

/* reachable only together with other changes — dashed */
.pv-chip-other {
  border-style: dashed;
  color: var(--pv-muted);
}

.pv-chip[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.pv-chip small {
  opacity: 0.75;
}

.pv-multi {
  margin-top: 6px;
  border-top: 1px solid var(--pv-border);
  padding-top: 10px;
}

.pv-multi summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--pv-accent);
}

.pv-multi[open] summary {
  margin-bottom: 12px;
}

.pv-list-count {
  margin: 4px 0 8px;
  color: var(--pv-muted);
  font-size: 0.9em;
}

/* fixed height (set by front.js from the full list), scrolls inside — the page below does not move */
.pv-list-box {
  max-height: 340px;
  padding-right: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-bottom: 1px solid var(--pv-border);
  scrollbar-width: thin;
}

.pv-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pv-list-empty {
  margin: 8px 0 0;
  color: var(--pv-muted);
}

.pv-item {
  padding: 10px 0;
  border-top: 1px solid var(--pv-border);
}

.pv-item:first-child {
  border-top: 0;
}

.pv-item-current {
  margin: 0 -6px;
  padding: 10px 6px;
  border-radius: 6px;
  background: var(--pv-accent-soft);
}

.pv-item-head {
  margin-bottom: 6px;
  line-height: 1.3;
}

.pv-item-name {
  font-weight: 600;
  color: inherit;
}

.pv-item-badge {
  display: inline-block;
  padding: 0 8px;
  border-radius: 10px;
  background: var(--pv-accent);
  color: #fff;
  font-size: 0.75em;
  vertical-align: middle;
}

/* under the name: [image] [features …] [price / stock] [quantity + cart] */
.pv-item-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pv-item-image {
  display: block;
  flex: 0 0 56px;
  width: 56px;
  height: 56px;
}

.pv-item-image img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.pv-item-image.pv-no-image {
  border-radius: 4px;
  background: #f2f4f5;
}

.pv-item-values {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  font-size: 0.85em;
  line-height: 1.35;
}

.pv-item-value span {
  color: var(--pv-muted);
}

.pv-item-price-box {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.pv-item-price {
  font-weight: 700;
  white-space: nowrap;
}

.pv-stock {
  font-size: 0.8em;
  font-weight: 600;
}

.pv-stock-in {
  color: #2e7d32;
}

.pv-stock-order {
  color: #b25a00;
}

.pv-stock-out {
  color: #c0392b;
}

/* quantity: the theme's product page widget (.product-quantity .qty + TouchSpin) next to an icon button */
.pv-item-cart {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.pv-item-cart .qty {
  flex: 0 0 80px;
  width: 80px;
  margin: 0;
}

/* the theme stretches the product page quantity to full width on phones — not in the list */
.pv-item-cart .qty .bootstrap-touchspin {
  width: 80px;
  max-width: 80px;
}

.pv-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
}

.pv-icon {
  width: 22px;
  height: 22px;
}

/* confirmation bubble next to the cart button (front.js bubble(), position: fixed) */
.pv-bubble {
  position: fixed;
  z-index: 2000;
  max-width: 260px;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.3;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.pv-bubble::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: -6px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: inherit;
}

.pv-bubble-ok {
  background: #2e7d32;
  border-color: #2e7d32;
}

.pv-bubble-error {
  background: #c0392b;
  border-color: #c0392b;
}

.pv-bubble-on {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 575px) {
  .pv-item-row {
    flex-wrap: wrap;
  }

  .pv-item-values {
    flex-basis: calc(100% - 66px);
  }

  .pv-item-price-box {
    align-items: flex-start;
    margin-right: auto;
    text-align: left;
  }
}

/* ---- placements: list under the product images (left column) / under the description */

.pv-part-list {
  margin-top: 16px;
  text-align: left;
}

.after-cover-tumbnails .pv-part-list .pv-row,
.after-cover-tumbnails .pv-part-list .pv-chips {
  justify-content: flex-start;
}

.pv-part-list .pv-list-box {
  max-height: 460px;
}

.pv-title small {
  color: var(--pv-muted);
  font-weight: normal;
}

/* list placed elsewhere, list-only mode: link in the right column */
.pv-anchor {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--pv-accent);
}

.pv-part-main:has(> .pv-anchor:only-child) {
  padding: 10px 16px;
}

/* right column: compact filters — one row of dropdowns */
.pv-filters-compact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.pv-select {
  display: flex;
  flex: 1 1 120px;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  font-size: 0.85em;
  color: var(--pv-muted);
}

.pv-select select {
  /* the theme draws its own arrow — hide the native one */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 34px;
  padding: 4px 8px;
  font-size: 0.95em;
  color: inherit;
}

/* count + "Filtry" toggle in one line */
.pv-list-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 2px 0 8px;
}

.pv-list-tools .pv-list-count {
  margin: 0;
}

.pv-filters-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid var(--pv-border);
  border-radius: 14px;
  background: #fff;
  color: inherit;
  font: inherit;
  font-size: 0.85em;
  cursor: pointer;
}

.pv-filters-toggle:hover,
.pv-filters-active {
  border-color: var(--pv-accent);
}

.pv-filters-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--pv-accent);
  color: #fff;
  font-size: 0.85em;
  text-align: center;
}
