/*
 * Single product page (bead ttepavac-305.8): breadcrumbs row, the stage with
 * its views, the panel with the option chips, "O fotografiji" with the facts,
 * related prints. Reference: the .crumbs, .prod, .gal, .stage, .thumbs, .panel,
 * .pricebox, .group, .opts, .sws, .buy, .about and .facts rules of
 * design/shop/Proizvod.dc.html.
 */

/* --- WoodMart's wrappers become the two-column layout ----------------------- */
.single-product .wd-content-layout {
  padding: 0;
}

.single-product .single-product-content > .container,
.single-product .container:has(> .tt-crumbs) {
  max-width: none;
  padding: 0;
}

/* .prod: the gutter on the band, the container inside it (as .crumbs and .about). */
.single-product .product-image-summary-wrap {
  padding: clamp(28px, 3.5vw, 48px) var(--tt-section-x) var(--tt-section-y-sub);
}

.single-product .product-image-summary {
  max-width: var(--tt-container);
  margin-inline: auto;
}

.single-product .product-image-summary-inner {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  align-items: flex-start;
}

.single-product .product-image-summary-inner > .product-images {
  flex: 1 1 560px;
  min-width: 0;
  width: auto;
  max-width: none;
}

.single-product .product-image-summary-inner > .summary {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 540px;
  width: auto;
}

/* --- Breadcrumbs ------------------------------------------------------------- */
.tt-crumbs {
  padding: 22px var(--tt-section-x) 0;
}

.tt-crumbs__in {
  max-width: var(--tt-container);
  margin-inline: auto;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-chip);
  letter-spacing: var(--tt-tracking-caption);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  font-weight: 400;
}

.tt-crumbs__in a {
  color: var(--tt-ink-3);
  text-decoration: none;
}

.tt-crumbs__in a:hover,
.tt-crumbs__in a:focus-visible {
  color: var(--tt-ink);
}

.tt-crumbs__item:last-child {
  color: var(--tt-ink);
}

.single-product .summary .woocommerce-breadcrumb,
.single-product .summary .wd-products-nav {
  display: none;
}

/* --- Gallery: the stage and its views ------------------------------------------ */
.tt-gallery {
  --tt-frame: var(--tt-frame-black);
}

.tt-gallery[data-frame="white"] {
  --tt-frame: var(--tt-frame-white);
}

.tt-gallery[data-frame="natural"] {
  --tt-frame: var(--tt-frame-natural);
}

.tt-gallery[data-frame="gold"] {
  --tt-frame: var(--tt-frame-gold);
}

.tt-stage {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--tt-cream-alt);
  border: var(--tt-hairline) solid var(--tt-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  overflow: hidden;
}

.tt-stage__print {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--tt-print-shadow-stage);
  transition: transform var(--tt-motion-zoom) var(--tt-ease);
}

.tt-gallery[data-view="detail"] .tt-stage,
.tt-gallery[data-view="room"] .tt-stage,
.tt-gallery[data-view="scene"] .tt-stage {
  padding: 0;
}

.tt-gallery[data-view="detail"] .tt-stage__print {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  box-shadow: none;
  transform: scale(2.2);
  transform-origin: 40% 45%;
}

.tt-gallery[data-view="frame"] .tt-stage__print {
  border: 16px solid var(--tt-frame);
  box-shadow: var(--tt-print-shadow-frame);
}

.tt-gallery[data-view="room"] .tt-stage {
  background: var(--tt-wall);
}

.tt-gallery[data-view="room"] .tt-stage__print {
  width: 42%;
  max-height: none;
  margin-bottom: 10%;
}

/* The room scenes tt-prints composites are photographs: shown whole, no shadow. */
.tt-stage__scene {
  display: none;
}

.tt-gallery[data-view="scene"] .tt-stage__print {
  display: none;
}

.tt-gallery[data-view="scene"] .tt-stage__scene.is-active {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tt-stage__tag {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-chip);
  letter-spacing: var(--tt-tracking-caption);
  text-transform: uppercase;
  color: var(--tt-ink-2);
  font-weight: 400;
  background: var(--tt-tag-fill);
  padding: 6px 12px;
  border-radius: var(--tt-radius-pill);
}

.tt-stage__tag:empty {
  display: none;
}

/* The whole stage opens the lightbox: an empty button over it, so it is
   reachable from the keyboard without changing the design. */
.tt-stage__zoom {
  position: absolute;
  inset: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.tt-stage__zoom:hover {
  background: none;
}

.tt-stage__zoom:focus-visible {
  outline: 2px solid var(--tt-royal);
  outline-offset: -2px;
}

.tt-thumbs {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.tt-thumb {
  width: var(--tt-thumb);
  height: var(--tt-thumb);
  border: var(--tt-hairline) solid var(--tt-border);
  background: var(--tt-cream-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  cursor: pointer;
  overflow: hidden;
  border-radius: 0;
  transition: border-color var(--tt-motion-chip) var(--tt-ease), box-shadow var(--tt-motion-chip) var(--tt-ease);
}

.tt-thumb img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--tt-print-shadow-thumb);
}

.tt-thumb.is-active {
  border-color: var(--tt-ink);
  box-shadow: inset 0 0 0 1px var(--tt-ink);
}

.tt-thumb:focus-visible {
  outline: 2px solid var(--tt-royal);
  outline-offset: 2px;
}

.tt-thumb--detail,
.tt-thumb--scene {
  padding: 0;
}

.tt-thumb--detail img,
.tt-thumb--scene img {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: cover;
  box-shadow: none;
}

.tt-thumb--detail img {
  transform: scale(2.2);
  transform-origin: 40% 45%;
}

.tt-thumb--frame img {
  border: 4px solid var(--tt-frame);
}

.tt-thumb--room {
  background: var(--tt-wall);
}

.tt-thumb--room img {
  width: 50%;
  margin-bottom: 10%;
}

/* --- Panel ---------------------------------------------------------------------- */
.single-product .summary-inner > * {
  margin-bottom: 0;
}

.tt-panel__title {
  font-size: var(--tt-size-title);
  line-height: var(--tt-lh-tight);
  letter-spacing: var(--tt-tracking-display);
  margin: 16px 0 0;
}

.tt-panel__title em {
  color: var(--tt-royal);
}

.tt-meta {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-caption);
  letter-spacing: var(--tt-tracking-caption);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  font-weight: 400;
  margin: 16px 0 0;
}

.tt-pricebox {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
  margin: 28px 0 0;
  padding-top: 28px;
  border-top: var(--tt-hairline) solid var(--tt-rule);
}

.tt-price,
.tt-price .woocommerce-Price-amount,
.tt-price bdi {
  font-family: var(--tt-display);
  font-size: var(--tt-size-numeral-price);
  line-height: 1;
  color: var(--tt-royal);
  font-weight: 400;
}

.tt-pricebox .tt-caption {
  font-size: var(--tt-size-chip);
}

/* --- WooCommerce's add-to-cart form ------------------------------------------------ */
.single-product form.cart {
  margin: 0;
}

/* The variations table is a column of chip groups, Podloga first whatever the
 * attribute order; the selects stay for add-to-cart-variation.js, hidden. */
.single-product form.variations_form table.variations,
.single-product form.variations_form table.variations tbody {
  display: flex;
  flex-direction: column;
  margin: 0;
  border: 0;
}

.single-product form.variations_form table.variations tr {
  display: block;
  margin: 0;
}

.single-product form.variations_form table.variations tr:has(.tt-group[data-lead]) {
  order: -1;
}

.single-product form.variations_form table.variations th,
.single-product form.variations_form td.value:has(.tt-group) select,
.single-product form.variations_form .wd-reset-var {
  display: none;
}

.single-product form.variations_form table.variations td {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
}

.tt-group {
  margin-top: 28px;
}

.tt-group[hidden] {
  display: none;
}

.tt-group__h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-caption);
  letter-spacing: var(--tt-tracking-label);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  font-weight: 400;
  margin: 0 0 12px;
}

.tt-group__h b {
  font-weight: 400;
  color: var(--tt-ink);
}

.tt-group__h a {
  color: var(--tt-royal);
  text-decoration: none;
  border-bottom: var(--tt-hairline) solid transparent;
  transition: border-color var(--tt-motion-chip) var(--tt-ease);
}

.tt-group__h a:hover,
.tt-group__h a:focus-visible {
  border-color: var(--tt-royal);
}

.tt-opts,
.tt-sws {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tt-sws {
  gap: 14px;
}

.single-product .tt-opt {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: var(--tt-opt-height);
  padding: var(--tt-opt-padding);
  border: var(--tt-hairline) solid var(--tt-chip-outline);
  border-radius: var(--tt-radius-input);
  background: var(--tt-input);
  color: var(--tt-ink-2);
  font-family: var(--tt-sans);
  font-size: var(--tt-size-caption);
  letter-spacing: var(--tt-tracking-opt);
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.2;
  text-align: left;
  box-shadow: none;
  cursor: pointer;
  transition: background-color var(--tt-motion-chip) var(--tt-ease), color var(--tt-motion-chip) var(--tt-ease), border-color var(--tt-motion-chip) var(--tt-ease);
}

.tt-opt__sub {
  font-size: var(--tt-size-chip);
  letter-spacing: var(--tt-tracking-opt-sub);
  text-transform: none;
  font-weight: 300;
  color: var(--tt-ink-3);
}

.single-product .tt-opt:hover {
  border-color: var(--tt-ink-2);
  background: var(--tt-input);
  color: var(--tt-ink-2);
}

.single-product .tt-opt.is-active {
  background: var(--tt-forest-1);
  border-color: var(--tt-forest-1);
  color: var(--tt-cream);
}

.tt-opt.is-active .tt-opt__sub {
  color: var(--tt-sage-2);
}

.single-product .tt-opt.is-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.single-product .tt-opt.is-disabled:hover {
  border-color: var(--tt-chip-outline);
}

.single-product .tt-sw {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  font-family: var(--tt-sans);
}

.tt-sw__dot {
  display: block;
  width: var(--tt-tap-target);
  height: var(--tt-tap-target);
  border-radius: var(--tt-radius-input);
  border: var(--tt-hairline) solid var(--tt-border);
  background: var(--tt-frame-black);
  transition: box-shadow var(--tt-motion-chip) var(--tt-ease);
}

.tt-sw--white .tt-sw__dot {
  background: var(--tt-frame-white);
}

.tt-sw--natural .tt-sw__dot {
  background: var(--tt-frame-natural);
}

.tt-sw--gold .tt-sw__dot {
  background: var(--tt-frame-gold);
}

.tt-sw.is-active .tt-sw__dot {
  box-shadow: var(--tt-swatch-ring);
}

.tt-sw__l {
  font-size: var(--tt-size-chip);
  letter-spacing: var(--tt-tracking-button);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  font-weight: 400;
}

.tt-sw.is-active .tt-sw__l {
  color: var(--tt-ink);
}

.tt-opt:focus-visible,
.tt-sw:focus-visible {
  outline: 2px solid var(--tt-royal);
  outline-offset: 2px;
}

.single-product .woocommerce-variation-price,
.single-product .woocommerce-variation-availability:empty {
  display: none;
}

/* .buy: the quantity pill and the forest pill with the live total. */
.single-product form.cart .quantity,
.single-product form.cart .wd-quantity {
  display: inline-flex;
  align-items: center;
  border: var(--tt-hairline) solid var(--tt-btn-outline);
  border-radius: var(--tt-radius-pill);
  height: var(--tt-buy-height);
  background: var(--tt-input);
  overflow: hidden;
  margin: 0;
}

.single-product form.cart .quantity .minus,
.single-product form.cart .quantity .plus {
  width: 46px;
  height: 50px;
  border: 0;
  background: transparent;
  color: var(--tt-ink-2);
  font-size: var(--tt-size-value);
  border-radius: 0;
}

.single-product form.cart .quantity input.qty {
  width: 40px;
  height: 50px;
  border: 0;
  background: transparent;
  text-align: center;
  font-family: var(--tt-sans);
  font-size: var(--tt-size-input);
  font-weight: 400;
  color: var(--tt-ink);
  padding: 0;
}

.single-product form.cart .single_add_to_cart_button {
  flex: 1 1 220px;
  min-height: var(--tt-buy-height);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 28px;
  margin: 0;
}

.single-product form.cart .single_add_to_cart_button b {
  font-weight: 500;
}

.single-product form.cart .single_add_to_cart_button .woocommerce-Price-amount {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

.single-product form.cart .woocommerce-variation-add-to-cart,
.single-product form.cart:not(.variations_form) {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  flex-wrap: wrap;
  align-items: center;
}

.single-product form.cart .wd-sticky-btn-wrapper {
  display: none;
}

.tt-block--dostava-napomene .tt-notes {
  margin-top: 28px;
}

/* --- About + facts ----------------------------------------------------------------- */
.tt-about {
  padding: var(--tt-section-y-sub) var(--tt-section-x);
}

.tt-about__in {
  max-width: var(--tt-container);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(40px, 6vw, 90px);
}

.tt-about__text {
  flex: 1 1 420px;
  min-width: 0;
  max-width: var(--tt-measure);
}

.tt-about__title {
  font-size: var(--tt-size-title-s);
  line-height: 1.05;
  margin: 18px 0 0;
}

.tt-about__title em {
  color: var(--tt-royal);
}

.tt-about__text p {
  font-family: var(--tt-sans);
  font-weight: 300;
  font-size: var(--tt-size-body);
  line-height: var(--tt-lh-body);
  color: var(--tt-ink-2);
  margin: 18px 0 0;
}

.tt-facts {
  flex: 1 1 340px;
  min-width: 0;
  list-style: none;
  align-self: center;
  margin: 0;
  padding: 0;
}

.tt-facts li {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-bottom: var(--tt-hairline) solid var(--tt-rule);
  margin: 0;
}

.tt-facts li:first-child {
  border-top: var(--tt-hairline) solid var(--tt-rule);
}

.tt-facts__k {
  font-family: var(--tt-sans);
  font-size: var(--tt-size-chip);
  letter-spacing: var(--tt-tracking-caption);
  text-transform: uppercase;
  color: var(--tt-ink-3);
  font-weight: 400;
  flex: none;
  padding-top: 3px;
}

.tt-facts__v {
  font-family: var(--tt-sans);
  font-weight: 300;
  font-size: var(--tt-size-value);
  color: var(--tt-ink);
  text-align: right;
}

/* --- Related: three cards from the collection ------------------------------------- */
.tt-related .wd-products.wd-grid-g {
  margin-top: var(--tt-head-gap);
}

.single-product .related-and-upsells,
.single-product .product-tabs-wrapper {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .tt-stage__print,
  .tt-thumb,
  .tt-opt,
  .tt-sw__dot {
    transition: none;
  }
}
