/* Vaikų krautuvė: WordPress-only additions for the product page (woocommerce/single-product.php).
   The design's product.css / extras.css stay unchanged; this file only covers states the static design
   does not show: more colour terms, hidden "was" price, bundles with other item counts, ready-made sets,
   real reviews and the review form. Uses the design tokens from styles.css. */

/* Colour swatches for every pa_spalva term (design defines sand / graphite / olive; red / white / black live in extras.css) */
.swatch--red { background: #C8423A; }
.swatch--white { background: #F4F1EC; }
.swatch--black { background: #2A2D33; }
.swatch--pink { background: #EFA3B4; }
.swatch--blue { background: #4A78C2; }
.swatch--green { background: #5E9C6E; }
.swatch--yellow { background: #F4C443; }
.swatch--wood { background: #C9A27A; }
.swatch.swatch--gloss { background-image: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .75) 0 14%, rgba(255, 255, 255, 0) 42%); }
.swatch--orange { background: #EE8A3A; }
.swatch--purple { background: #8B5FB8; }
.swatch--grey { background: #9A9DA3; }
.swatch--silver { background: linear-gradient(135deg, #E4E6E9, #A9ADB3); }
.swatch--gold { background: linear-gradient(135deg, #F2D27A, #C79A2E); }
.swatch--brown { background: #8A5A3B; }
.swatch--khaki { background: #A79B6A; }
.swatch--turquoise { background: #3FB8B0; }
.swatch--mint { background: #A6DCC3; }
.swatch--burgundy { background: #7D2337; }
.swatch--cream { background: #F3E9D2; }
.swatch--multi { background: conic-gradient(#D9483B, #F4C443, #5E9C6E, #4A78C2, #EFA3B4, #D9483B); }

/* Print swatches (pa_rastas, Esello models): each dot is that print's photo; models with many prints scroll */
.swatch--photo { width: 48px; height: 48px; background: var(--c-cream) center / cover no-repeat; }
.swatches--photo .swatches__list { flex-wrap: wrap; max-height: 236px; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.swatches--photo .swatch--photo { flex: 0 0 48px; } /* 60+ prints: rows of photos, never squeezed into slivers */

/* Price: the "was" span is always printed (variations may go on sale), hidden when there is no saving */
.price__was[hidden] { display: none; }
/* Selected colour not in stock (variable product page): CTA disabled */
.buy__cta:disabled, .buybar .btn:disabled { opacity: .5; cursor: not-allowed; }

/* Bundle / set with 2 or 4 items (design shows 3) */
.bundle__items[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bundle__items[data-count="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.bundle__items[data-count="5"] { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px; }

/* Ready-made set: items are links to their own pages (no checkbox) */
a.bitem { color: inherit; }
a.bitem:hover { box-shadow: inset 0 0 0 1.5px var(--c-navy); }
.bundle--set .bitem { box-shadow: inset 0 0 0 1.5px var(--c-line); }

/* Reviews list (design shows only the empty state) */
.reviews { display: grid; gap: 12px; }
.review { display: flex; flex-direction: column; gap: 6px; padding: 20px 22px; border-radius: var(--radius); background: var(--c-white); box-shadow: inset 0 0 0 1px var(--c-line); }
.review__stars { color: var(--t-sun-ink); font-size: 17px; letter-spacing: .08em; }
.review__who { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 15px; }
.review__text { display: flex; flex-direction: column; gap: 8px; color: var(--c-navy-soft); font-size: 16px; }
.reviews__cta { margin-top: 16px; }

/* Review form (opens from "Parašyti atsiliepimą") */
.review-form { margin-top: 20px; padding: 28px 32px 32px; border-radius: var(--radius-l); background: var(--c-white); box-shadow: inset 0 0 0 1px var(--c-line); }
.review-form[hidden] { display: none; }
.review-form__title { margin-bottom: 18px; font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.review-form__title small { display: block; margin-top: 6px; font-size: 14px; font-weight: 600; }
.review-form__form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; max-width: 760px; }
.review-form__field { display: flex; flex-direction: column; gap: 8px; margin: 0; font-size: 15px; font-weight: 650; }
.review-form__field--full, .review-form .form-submit { grid-column: 1 / -1; }
.review-form .input { width: 100%; }
.review-form textarea.input { height: auto; min-height: 132px; padding: 14px 16px; line-height: 1.5; resize: vertical; }
.review-form .form-submit { margin: 4px 0 0; }
/* Star picker */
.rating-pick { padding: 0; border: 0; min-width: 0; }
.rating-pick legend { padding: 0; margin-bottom: 8px; }
.rating-pick__stars { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rating-pick__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.rating-pick__star { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--c-line-strong); cursor: pointer; transition: color .15s var(--ease), transform .15s var(--ease); }
.rating-pick__star svg { width: 32px; height: 32px; fill: currentColor; }
.rating-pick__star:hover { transform: scale(1.08); }
.rating-pick__input:checked ~ .rating-pick__star,
.rating-pick__stars:hover .rating-pick__star:hover,
.rating-pick__stars:hover .rating-pick__star:hover ~ .rating-pick__star { color: var(--c-sun); }
.rating-pick__input:focus-visible + .rating-pick__star { outline: 2px solid var(--c-tomato); outline-offset: 2px; }

@media (max-width: 760px) {
  .bundle__items[data-count] { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  a.bitem { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; gap: 14px; padding: 10px 14px 10px 10px; }
  .review-form { padding: 20px 18px 22px; }
  .review-form__form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}

/* ---------- Ready-made set pages (parts/product-set-summary.php in the buy box, parts/product-set.php below) ---------- */
.setsum { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; padding: 16px 18px; border-radius: var(--radius); background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line); }
.setsum__save { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--c-line); font-size: 15px; color: var(--c-muted); }
.setsum__save strong { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--c-tomato-tint); color: var(--c-tomato-dark); font-weight: 800; }
.setsum__label { margin: 0; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-navy-soft); }
.setsum__items { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.setsum__items li { display: flex; align-items: center; gap: 12px; }
.setsum__img { flex: none; width: 48px; height: 48px; overflow: hidden; border-radius: 12px; background: var(--c-sand); }
.setsum__img img { width: 100%; height: 100%; object-fit: cover; }
.setsum__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--c-navy); }
.setsum__name:hover { color: var(--c-tomato-dark); }
.setsum__price { flex: none; font-weight: 700; color: var(--c-navy-soft); white-space: nowrap; }
.setsum__perks { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 4px 0 0; padding: 10px 0 0; list-style: none; border-top: 1px dashed var(--c-line); font-size: 14px; font-weight: 600; color: var(--c-sage); }
.setsum__perks li { display: inline-flex; align-items: center; gap: 6px; }

.setx { padding-block: 24px 72px; }
.setx__head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.setx__head p:last-child { margin: 0; color: var(--c-navy-soft); }
.setx__items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.setx__item { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-l); background: var(--c-white); box-shadow: 0 0 0 1px var(--c-line), var(--shadow); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.setx__item:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--c-line), var(--shadow-lift); }
.setx__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c-sand); }
.setx__media img { width: 100%; height: 100%; object-fit: cover; }
.setx__num { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; background: var(--c-navy); color: var(--c-white); font-size: 13px; font-weight: 800; }
.setx__body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 20px; }
.setx__name { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--c-navy); }
.setx__name::after { content: ""; position: absolute; inset: 0; z-index: 1; } /* whole card opens the item */
.setx__item:hover .setx__name { color: var(--c-tomato-dark); }
.setx__text { font-size: 14.5px; line-height: 1.55; color: var(--c-navy-soft); }
.setx__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--c-line); }
.setx__price { font-size: 18px; font-weight: 800; color: var(--c-navy); }
.setx__more { font-size: 14px; }
.setx__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; padding: 18px 24px; border-radius: var(--radius-l); background: var(--c-navy); color: var(--c-white); }
.setx__calc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 22px; margin: 0; font-size: 16px; }
.setx__calc s { opacity: .7; }
.setx__now strong { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.setx__save { padding: 4px 12px; border-radius: 999px; background: var(--c-tomato); font-weight: 800; }
@media (max-width: 1100px) { .setx__items { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .setsum { padding: 14px; }
  .setx__items { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .setx__item { flex-direction: row; }
  .setx__media { flex: none; width: 116px; aspect-ratio: auto; }
  .setx__body { padding: 12px 14px; gap: 6px; }
  .setx__name { font-size: 15px; }
  .setx__text { font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .setx__more { display: none; }
  .setx__bar { padding: 16px; }
  .setx__bar .btn { width: 100%; }
}
