/* Single product page */

.tm-product-main {
  padding: 0 var(--tm-content-px);
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tm-product-grid-60-40 {
  display: grid;
  grid-template-columns: 6fr 4fr;
  gap: 64px;
  padding: 32px 0 0;
  align-items: start;
}

/* === GALLERY === */
.tm-product-gallery {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
}

.tm-gallery-thumbs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tm-gallery-thumb {
  width: 88px;
  height: 88px;
  background: var(--wp--preset--color--bg-alt);
  border: 1px solid transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.tm-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tm-gallery-thumb.is-active {
  border-color: var(--wp--preset--color--text);
}

.tm-gallery-thumb-video .tm-gallery-video-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: rgba(0,0,0,0.4);
}

.tm-gallery-main {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--wp--preset--color--bg-alt);
  overflow: hidden;
}

.tm-gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tm-gallery-slide.is-active {
  opacity: 1;
  z-index: 2;
}

.tm-gallery-slide img,
.tm-gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-gallery-slide iframe,
.tm-gallery-slide video {
  width: 100%;
  height: 100%;
}

.tm-gallery-badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 3;
  padding: 6px 12px;
  background: var(--wp--preset--color--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* === PARITOLU BLOCK === */
.tm-paritolu-block {
  margin-top: 56px;
}

.tm-paritolu-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--wp--preset--color--text-muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.tm-paritolu-grid {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 32px;
  align-items: center;
}

.tm-paritolu-visual {
  height: 200px;
  background: var(--wp--preset--color--bg-alt);
  position: relative;
  overflow: hidden;
}

.tm-paritolu-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tm-paritolu-visual img.tm-paritolu-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tm-paritolu-name {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: 24px;
  font-weight: 500;
  color: var(--wp--preset--color--text);
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tm-paritolu-name img,
.tm-paritolu-name svg.flag {
  width: 20px;
  height: 14px;
  flex-shrink: 0;
}

.tm-paritolu-desc {
  font-size: 13.5px;
  color: var(--wp--preset--color--text-muted);
  line-height: 1.55;
  margin: 0 0 14px;
}

.tm-paritolu-link {
  font-size: 13px;
  color: var(--wp--preset--color--accent);
  text-decoration: none;
}

.tm-paritolu-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* === PRODUCT SUMMARY === */
.tm-product-summary {
  position: sticky;
  top: 108px;
}

.tm-eyebrow-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  align-items: center;
}

.tm-eyebrow {
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--text-muted);
  font-weight: 500;
}

.tm-eyebrow-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}

a.tm-eyebrow-item:hover {
  color: var(--wp--preset--color--accent);
}

.tm-eyebrow-sep {
  opacity: 0.4;
  font-size: 14px;
  letter-spacing: 0;
}

.tm-eyebrow-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tm-eyebrow-flag img,
.tm-eyebrow-flag svg,
.tm-eyebrow-country img,
.tm-eyebrow-country svg {
  width: 18px;
  height: auto;
  display: block;
}

.tm-product-h1 {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 500;
  color: var(--wp--preset--color--text);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.015em;
}

.tm-product-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  font-size: 14px;
  color: var(--wp--preset--color--text-body);
}

.tm-product-rating-num { color: var(--wp--preset--color--text-body); }
.tm-product-rating-count { color: var(--wp--preset--color--text-muted); }

.tm-meta-divider {
  width: 1px;
  height: 14px;
  background: var(--wp--preset--color--border);
}

.tm-product-sold {
  padding: 3px 10px;
  background: #F0EEE8;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--wp--preset--color--text-body);
}

.tm-product-price {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 20px;
}

.tm-product-price .woocommerce-Price-amount {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: clamp(36px, 9vw, 48px);
  font-weight: 600;
  color: var(--wp--preset--color--accent);
  line-height: 1;
  letter-spacing: -0.01em;
}

.tm-product-price del {
  text-decoration: line-through;
  opacity: 0.6;
}

.tm-product-price del .woocommerce-Price-amount {
  font-size: clamp(18px, 4vw, 24px);
  color: var(--wp--preset--color--text-light);
}

.tm-product-price ins {
  background: none;
  text-decoration: none;
}

.tm-product-weight {
  font-size: 14px;
  color: var(--wp--preset--color--text-muted);
}

.tm-product-stock {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-size: 13.5px;
}

.tm-stock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tm-product-stock.in-stock .tm-stock-dot {
  background: var(--wp--preset--color--success);
}

.tm-product-stock.out-of-stock .tm-stock-dot {
  background: #c1272d;
}

.tm-product-stock .tm-stock-label {
  color: var(--wp--preset--color--text);
  font-weight: 500;
}

.tm-product-stock .tm-stock-note {
  color: var(--wp--preset--color--text-muted);
}

.tm-product-cta-row {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.tm-product-summary .tm-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--wp--preset--color--text);
  height: 56px;
}

.tm-product-summary .tm-qty-stepper button {
  width: 48px;
  height: 54px;
  background: none;
  border: none;
  font-size: 18px;
  color: var(--wp--preset--color--text);
  cursor: pointer;
}

.tm-product-summary .tm-qty-stepper input {
  width: 48px;
  height: 54px;
  text-align: center;
  border: none;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
  font-size: 14px;
  background: transparent;
}

.tm-product-summary .tm-qty-stepper input::-webkit-outer-spin-button,
.tm-product-summary .tm-qty-stepper input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.tm-product-add-to-cart {
  flex: 1;
  height: 56px;
  letter-spacing: 0.06em;
}

/* === SHIPPING TABS === */
.tm-product-shipping {
  border-top: 1px solid var(--wp--preset--color--border);
  padding-top: 20px;
  margin-top: 20px;
}

.tm-product-shipping__title {
  font-family: var(--wp--preset--font-family--cormorant, 'Cormorant Garamond', serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--wp--preset--color--text);
}

.tm-shipping-tabs__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.tm-shipping-tabs__triggers {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 0 8px;
  margin-bottom: 16px;
  scrollbar-width: none;
}

.tm-shipping-tabs__triggers::-webkit-scrollbar { display: none; }

.tm-shipping-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  color: var(--wp--preset--color--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, color 0.15s;
}

.tm-shipping-tab:hover {
  color: var(--wp--preset--color--text);
}

.tm-shipping-tab__flag {
  font-size: 16px;
  line-height: 1;
}

.tm-shipping-tabs__input--ee:checked ~ .tm-shipping-tabs__triggers [data-country="ee"],
.tm-shipping-tabs__input--lv:checked ~ .tm-shipping-tabs__triggers [data-country="lv"],
.tm-shipping-tabs__input--lt:checked ~ .tm-shipping-tabs__triggers [data-country="lt"],
.tm-shipping-tabs__input--fi:checked ~ .tm-shipping-tabs__triggers [data-country="fi"] {
  background: transparent;
  border-color: var(--wp--preset--color--text);
  color: var(--wp--preset--color--text);
  font-weight: 600;
}

.tm-shipping-panel {
  display: none;
}

.tm-shipping-tabs__input--ee:checked ~ .tm-shipping-panels [data-country="ee"],
.tm-shipping-tabs__input--lv:checked ~ .tm-shipping-panels [data-country="lv"],
.tm-shipping-tabs__input--lt:checked ~ .tm-shipping-panels [data-country="lt"],
.tm-shipping-tabs__input--fi:checked ~ .tm-shipping-panels [data-country="fi"] {
  display: block;
}

.tm-shipping-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--wp--preset--color--border);
  font-size: 14px;
}

.tm-shipping-row:first-child { border-top: 0; }

.tm-shipping-row__label {
  flex: 1;
  line-height: 1.4;
}

.tm-shipping-row__sub {
  display: block;
  font-size: 12px;
  color: var(--wp--preset--color--text-muted);
  margin-top: 2px;
  font-weight: 400;
}

.tm-shipping-row__price {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.tm-shipping-row__price--free {
  color: #2a8c4a;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.04em;
}

.tm-check-icon {
  flex-shrink: 0;
  color: var(--wp--preset--color--accent);
}

/* === TABS === */
.tm-tabs-wrap {
  padding-top: 88px;
}

.tm-tabs-nav {
  display: flex;
  gap: 32px;
  border-bottom: 1px solid var(--wp--preset--color--border);
}

.tm-tab-trigger {
  background: none;
  border: none;
  padding: 0 0 14px;
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: 22px;
  font-weight: 500;
  color: var(--wp--preset--color--text-light);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tm-tab-trigger:hover {
  color: var(--wp--preset--color--text);
}

.tm-tab-trigger.is-active {
  color: var(--wp--preset--color--text);
  border-bottom-color: var(--wp--preset--color--accent);
}

.tm-tab-panel {
  display: none;
}

.tm-tab-panel.is-active {
  display: block;
}

.tm-tab-content {
  padding: 40px 0;
  max-width: 720px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--wp--preset--color--text-body);
}

.tm-tab-content p:first-child { margin-top: 0; }
.tm-tab-content p { margin: 18px 0 0; }
.tm-tab-content ul { padding-left: 20px; margin: 18px 0 0; }
.tm-tab-content li { margin: 6px 0; }

.tm-accordion-trigger {
  display: none;
}

.tm-brewing-grid {
  display: grid;
  grid-template-columns: 180px 1fr;
  row-gap: 12px;
  column-gap: 16px;
}

.tm-brewing-key { color: var(--wp--preset--color--text-muted); }
.tm-brewing-val { color: var(--wp--preset--color--text); }

.tm-brewing-content ul {
  padding-left: 20px;
  margin: 0;
}

.tm-brewing-content li {
  margin: 8px 0;
  line-height: 1.6;
}

.tm-origin-content h3 {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: 22px;
  font-weight: 500;
  margin: 28px 0 10px;
  color: var(--wp--preset--color--text);
}

.tm-origin-content h3:first-child { margin-top: 0; }

/* === PROPERTIES === */
.tm-product-properties {
  padding-top: 64px;
}

.tm-section-h2 {
  font-family: var(--wp--preset--font-family--cormorant);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  color: var(--wp--preset--color--text);
  margin: 0 0 24px;
  letter-spacing: -0.01em;
}

.tm-properties-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 64px;
  max-width: 900px;
}

.tm-property-row {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--wp--preset--color--border);
  font-size: 14px;
}

.tm-property-key { color: var(--wp--preset--color--text-muted); }

.tm-property-val {
  color: var(--wp--preset--color--text);
  font-weight: 500;
}

/* === RELATED SCROLLER === */
.tm-product-related {
  margin-top: 48px;
  position: relative;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.tm-product-related__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding: 0 14px;
}

.tm-product-related__title {
  font-family: var(--wp--preset--font-family--cormorant, 'Cormorant Garamond', serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: var(--wp--preset--color--text);
}

.tm-product-related__track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-left: 14px;
  -webkit-overflow-scrolling: touch;
  padding: 4px 14px 24px;
  scrollbar-width: none;
}

.tm-product-related__track::-webkit-scrollbar { display: none; }

.tm-product-related__item {
  flex: 0 0 auto;
  width: 180px;
  scroll-snap-align: start;
}

.tm-product-related__nav { display: none; }

@media (min-width: 1024px) {
  .tm-product-summary {
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .tm-product-related {
    padding: 0 var(--tm-content-px);
  }

  .tm-product-related__head {
    padding: 0;
  }

  .tm-product-related__track {
    padding: 4px 0 24px;
    gap: 16px;
    scroll-padding-left: 0;
  }

  .tm-product-related__item {
    width: 240px;
  }

  .tm-product-related__nav {
    display: flex;
    gap: 8px;
  }

  .tm-related-arrow {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--wp--preset--color--text);
    border-radius: 0;
    color: var(--wp--preset--color--text);
    cursor: pointer;
    padding: 0;
    transition: background 0.15s, color 0.15s;
  }

  .tm-related-arrow:hover {
    background: var(--wp--preset--color--text);
    color: #fff;
  }

  .tm-related-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
    pointer-events: none;
  }
}

.tm-section-head-2col {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 32px;
}

.tm-section-link-accent {
  color: var(--wp--preset--color--accent);
  text-decoration: none;
  font-size: 14px;
}

.tm-section-link-accent:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* === MOBILE STICKY CTA === */
.tm-product-mobile-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 12px 24px;
  background: var(--wp--preset--color--bg);
  border-top: 1px solid var(--wp--preset--color--border);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.04);
}

.tm-mcta-price {
  font-size: 20px;
  font-weight: 500;
  color: var(--wp--preset--color--accent);
  font-variant-numeric: tabular-nums;
}

.tm-mcta-price del {
  font-size: 13px;
  color: var(--wp--preset--color--text-light);
  margin-left: 6px;
}

.tm-mcta-btn {
  height: 48px;
  padding: 0 24px;
  flex-shrink: 0;
}

/* === MOBILE === */
@media (max-width: 768px) {
  .tm-product-main {
    padding: 0 14px;
  }

  .tm-product-grid-60-40 {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
    padding: 16px 0 0;
  }

  .tm-product-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .tm-gallery-thumbs {
    flex-direction: row;
    order: 2;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .tm-gallery-thumbs::-webkit-scrollbar {
    display: none;
  }

  .tm-gallery-thumb {
    flex-shrink: 0;
  }

  .tm-gallery-main {
    order: 1;
  }

  .tm-paritolu-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .tm-product-summary {
    position: static;
  }

  .tm-product-left       { display: contents; }
  .tm-product-gallery    { order: 1; }
  .tm-product-summary    { order: 2; }
  .tm-paritolu-block     { order: 3; }
  .tm-tabs-wrap          { order: 4; }
  .tm-product-properties { order: 5; display: none; }

  .tm-paritolu-block { margin-top: 0; }
  .tm-tabs-wrap      { padding-top: 0; }

  .tm-product-h1 {
    font-size: clamp(28px, 7vw, 36px);
  }

  .tm-product-price .woocommerce-Price-amount {
    font-size: clamp(32px, 8vw, 36px);
  }

  .tm-tabs-nav {
    display: none;
  }

  .tm-tab-panel {
    display: block !important;
    border-bottom: 1px solid var(--wp--preset--color--border);
  }

  .tm-accordion-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--wp--preset--font-family--cormorant);
    font-size: 22px;
    font-weight: 500;
    color: var(--wp--preset--color--text);
    text-align: left;
  }

  .tm-accordion-icon {
    font-size: 24px;
    color: var(--wp--preset--color--text-muted);
    line-height: 1;
    flex-shrink: 0;
  }

  .tm-tab-content {
    display: none;
    padding: 0 0 24px;
  }

  .tm-tab-panel.is-open .tm-tab-content {
    display: block;
  }

  .tm-tab-panel.is-open .tm-accordion-icon {
    transform: rotate(45deg);
  }

  .tm-properties-grid {
    grid-template-columns: 1fr;
  }

  .tm-section-head-2col {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tm-product-mobile-cta {
    display: flex;
  }

  body.tm-is-product-page main {
    padding-bottom: 96px;
  }

  .tm-product-cta-row {
    display: none;
  }

  body.tm-is-product-page .cky-btn-revisit-wrapper,
  body.tm-is-product-page .cky-revisit-bottom-left {
    display: none !important;
  }

  body.tm-drawer-open .tm-product-mobile-cta {
    display: none;
  }
}
