/*
 * Letonys product-page conversion upgrade
 * Designed for mobile-first US paid traffic.
 * Scoped to product templates so the rest of the Hero theme remains stable.
 */

body.template-product {
  --letonys-ink: #1a2b4c;
  --letonys-muted: #5b6472;
  --letonys-purple: #6b32a8;
  --letonys-purple-dark: #542383;
  --letonys-purple-soft: #f4eff9;
  --letonys-red: #d92d20;
  --letonys-line: #d9dee7;
  --letonys-soft: #f7f8fa;
  --letonys-success: #237a4b;
  background: #fff;
  color: var(--letonys-ink);
}

body.template-product .pd-container,
body.template-product .pd-info-body {
  background: #fff;
}

body.template-product #product-info-body,
body.template-product #product-info-body .type-title-font-family,
body.template-product #product-info-body .type-body-font-family {
  font-family: Arial, Helvetica, sans-serif !important;
}

body.template-product .pd-info-title {
  color: var(--letonys-ink);
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: clamp(22px, 2.1vw, 32px);
  font-weight: 700 !important;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

body.template-product .pd-info-subtitle,
body.template-product .color-body-70,
body.template-product .text-body-alpha-80 {
  color: var(--letonys-muted) !important;
}

body.template-product .product-info-sales-and-reviews {
  color: var(--letonys-muted);
  font-size: 14px;
}

body.template-product .pd-info-total,
body.template-product .pd-info-total .money,
body.template-product .color-price {
  color: var(--letonys-red) !important;
}

body.template-product .pd-info-price .pd-info-total {
  font-size: clamp(26px, 2.25vw, 34px);
  font-weight: 750 !important;
  letter-spacing: -0.02em;
}

body.template-product .pd-info-compare-at-price,
body.template-product .color-compare-price {
  color: #7a8493 !important;
}

body.template-product .pd-info-save,
body.template-product .product-info-badges > span,
body.template-product .plugin-discount-wrap [class*='discount'] {
  border: 0 !important;
  border-radius: 5px !important;
  background: #feeceb !important;
  color: var(--letonys-red) !important;
  font-weight: 700 !important;
}

body.template-product .pd-info-variants-title,
body.template-product .product-info__variants_title,
body.template-product .pd-info-qty-wrap > div {
  color: var(--letonys-ink) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.35;
  text-transform: none !important;
}

body.template-product .pd-variants-label {
  min-height: 48px;
  padding: 10px 14px;
  border: 1.5px solid var(--letonys-line);
  border-radius: 7px;
  background: #fff;
  color: var(--letonys-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

body.template-product .pd-info-variants-button-wrap input[type='radio']:checked + .pd-variants-label {
  border-color: var(--letonys-purple);
  background: var(--letonys-purple-soft);
  color: var(--letonys-purple-dark);
  box-shadow: inset 0 0 0 1px var(--letonys-purple);
}

body.template-product .pd-variants-dropdown-wrap select {
  min-height: 50px;
  border-color: var(--letonys-line);
  border-radius: 7px;
  color: var(--letonys-ink);
  font-size: 15px;
  font-weight: 600;
}

body.template-product .pd-sales-points {
  gap: 9px;
  color: var(--letonys-ink);
  font-size: 14px;
  line-height: 1.45;
}

body.template-product .pd-info-shipping-wrap,
body.template-product .pd-free-shipping-tip-wrap {
  border: 1px solid #e6e0ef;
  border-radius: 7px;
  background: var(--letonys-purple-soft);
  color: var(--letonys-ink);
}

body.template-product .pd-info-current-viewer,
body.template-product .product-info__current-inventory {
  color: var(--letonys-muted);
  font-size: 13px;
}

body.template-product .product-info-inventory-progress {
  height: 5px;
  border-radius: 999px;
  background: #eceff3;
}

body.template-product .product-info-inventory-progress-bar {
  border-radius: 999px;
  background: linear-gradient(90deg, #f3b43f, #ea4f57);
}

body.template-product .pd-info-qty-wrap spz-quantity {
  overflow: hidden;
  border-color: var(--letonys-line);
  border-radius: 7px;
}

body.template-product .pd-info-btn-wrap button {
  min-height: 52px;
  height: auto;
  border-radius: 7px;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: .005em;
  box-shadow: none;
  transition: background-color .18s ease, border-color .18s ease, transform .1s ease;
}

body.template-product .pd-info-btn-wrap button:active {
  transform: translateY(1px);
}

body.template-product .pd-info-btn-wrap button[role='addToCart'] {
  border: 1.5px solid var(--letonys-ink) !important;
  background: #fff !important;
  color: var(--letonys-ink) !important;
}

body.template-product .pd-info-btn-wrap button[role='buyNow'] {
  border: 1.5px solid var(--letonys-purple) !important;
  background: var(--letonys-purple) !important;
  color: #fff !important;
  box-shadow: 0 7px 18px rgba(107, 50, 168, .2);
}

body.template-product .pd-info-btn-wrap button[role='buyNow']:hover {
  border-color: var(--letonys-purple-dark) !important;
  background: var(--letonys-purple-dark) !important;
}

body.template-product .product-description,
body.template-product .product-description p,
body.template-product .product-description li {
  color: #313c4e;
  line-height: 1.7;
}

@media (min-width: 960px) {
  body.template-product #product-info-body {
    max-width: 540px;
  }

  body.template-product .pd-info-body {
    border: 1px solid #edf0f4;
    border-radius: 12px;
    box-shadow: 0 10px 34px rgba(26, 43, 76, .07);
  }

  body.template-product .pd-info-body-top,
  body.template-product .pd-info-body-bottom {
    padding-left: 24px;
    padding-right: 24px;
  }
}

@media (max-width: 959.98px) {
  body.template-product .main-content {
    background: #fff;
  }

  body.template-product .pd-container {
    background: #fff !important;
  }

  body.template-product #product-info-body {
    margin-top: 8px;
    padding: 0 12px;
  }

  body.template-product .pd-info-body {
    overflow: hidden;
    border: 1px solid #e8ebf0;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(26, 43, 76, .06);
  }

  body.template-product .pd-info-body .pd-info-body-top,
  body.template-product .pd-info-body .pd-info-body-bottom {
    padding: 14px 14px 12px;
  }

  body.template-product .pd-info-title {
    margin-top: 10px;
    font-size: 22px !important;
    line-height: 1.25;
  }

  body.template-product .pd-info-price {
    margin-top: 14px;
  }

  body.template-product .pd-info-price .pd-info-total {
    font-size: 27px !important;
  }

  body.template-product .pd-info-compare-at-price,
  body.template-product .color-compare-price {
    font-size: 14px !important;
  }

  body.template-product .pd-info-variants-button-wrap:not(:first-child) legend {
    margin-top: 14px;
  }

  body.template-product .pd-info-variants-button-wrap > .flex-wrap {
    gap: 8px;
  }

  body.template-product .pd-info-variants-button-wrap > .flex-wrap > .relative {
    margin: 0 !important;
  }

  body.template-product .pd-variants-label {
    min-height: 48px !important;
  }

  body.template-product .pd-info-btn-wrap {
    margin-top: 16px;
  }

  body.template-product .pd-info-btn-wrap button {
    min-height: 54px;
    font-size: 17px;
  }

  body.template-product .pd-info-btn-wrap button:last-child {
    margin-top: 10px;
  }

  body.template-product .pd-thumb {
    padding-top: 7px;
    background: #fff;
  }

  body.template-product .pd-thumb-image {
    overflow: hidden;
    border-radius: 6px;
  }

  body.template-product .pd-breadcrumbs,
  body.template-product .pd-breadcrumb {
    background: #fff !important;
    color: var(--letonys-muted);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.template-product .pd-variants-label,
  body.template-product .pd-info-btn-wrap button {
    transition: none;
  }
}

/* Seamless mobile product layout */
body.template-product .pd-info-body {
  border: none;
  border-radius: 0;
  box-shadow: none;
}

body.template-product .pd-info-btn-wrap button[role="buyNow"] {
  background: #050505 !important;
  border-color: #050505 !important;
  color: #ffffff !important;
  box-shadow: none;
}

body.template-product .pd-info-btn-wrap button[role="addToCart"] {
  background: #ffffff !important;
  border-color: #111111 !important;
  color: #111111 !important;
}

body.template-product .ec-button-container {
  width: 100%;
}

@media (max-width: 959px) {
  body.template-product #product-info-body {
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
  }

  body.template-product .pd-info-body {
    overflow: visible;
  }

  body.template-product .pd-info-body .pd-info-body-top {
    padding: 18px 20px 8px;
  }

  body.template-product .pd-info-body .pd-info-body-bottom {
    padding: 8px 20px 20px;
  }

  body.template-product .pd-variants-label {
    min-height: 54px !important;
    border-color: #151515;
    border-radius: 5px;
  }

  body.template-product .pd-info-btn-wrap button {
    min-height: 54px;
    border-radius: 5px;
  }
}

/* Compact discount spacing and readable stock status */
body.template-product .plugin-discount-wrap {
  min-height: 0 !important;
  margin-top: 5px !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.template-product .plugin-discount-wrap > * {
  margin-top: 0 !important;
  margin-bottom: 6px !important;
}

body.template-product .plugin-discount-wrap > *:last-child {
  margin-bottom: 0 !important;
}

body.template-product .pd-current-inventory,
body.template-product .pd-current-inventory .body-minus-2,
body.template-product .pd-current-inventory .break-words {
  color: #8f211b;
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.4 !important;
}

body.template-product .pd-current-inventory .color-price {
  color: #d92d20 !important;
  font-size: 14px !important;
  font-weight: 700;
}

body.template-product .product-info-inventory-progress {
  height: 5px;
  margin-top: 8px;
}

/* Pull the third-party discount block into the price rhythm */
body.template-product .plugin-discount-wrap:not(:empty) {
  position: relative;
  top: -16px;
  margin-bottom: -16px !important;
}

/* SHOPLINE-inspired color and type balance */
body.template-product .current__viewer-text {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 5px;
  background: #f1f4f8;
  color: #344258;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

body.template-product .pd-info-price .pd-info-total {
  font-size: 26px !important;
  font-weight: 700 !important;
}

body.template-product .pd-info-compare-at-price,
body.template-product .pd-info-compare-at-price .money {
  color: #778195 !important;
  font-size: 15px !important;
  font-weight: 500;
}

body.template-product .pd-info-save {
  padding: 5px 8px;
  border-radius: 4px !important;
  background: #e32620 !important;
  color: #ffffff !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

body.template-product .pd-info-save .money,
body.template-product .pd-info-save .color-price {
  color: #ffffff !important;
}

body.template-product .pd-sales-points {
  padding: 11px 12px;
  border: 1px solid #e4e8ef;
  border-radius: 6px;
  background: #f7f9fc;
  color: #1a2b4c;
  gap: 9px;
}

body.template-product .pd-sales-points div {
  font-size: 14px;
  font-weight: 600;
}

body.template-product .pd-current-inventory {
  padding: 10px 12px !important;
  border: 1px solid #f3c6c2;
  border-radius: 6px;
  background: #fff4f3;
  color: #8f211b;
  font-size: 13px;
  font-weight: 600;
}

body.template-product .product-info-inventory-progress {
  height: 5px;
  margin-top: 8px;
  background: #f1d7d5;
}

body.template-product .product-info-inventory-progress-bar {
  background: #e4544d;
}

body.template-product .pd-info-btn-wrap button[role="buyNow"] {
  background: #1a2b4c !important;
  border-color: #1a2b4c !important;
}

body.template-product .pd-info-variants-button-wrap input[type="radio"]:checked + .pd-variants-label {
  border-color: #1a2b4c;
  background: #eef2f7;
  color: #1a2b4c;
  box-shadow: inset 0 0 0 1px #1a2b4c;
}

/* Clean hierarchy without information boxes */
body.template-product .current__viewer-text {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #4e5868;
  font-size: 13px;
  font-weight: 500;
}

body.template-product .pd-sales-points {
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #1a2b4c;
  gap: 8px;
}

body.template-product .pd-sales-points div {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

body.template-product .pd-current-inventory {
  padding: 0 !important;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #8f211b;
  font-size: 13px;
  font-weight: 600;
}

body.template-product .pd-info-btn-wrap button[role="buyNow"] {
  background: #5e2d91 !important;
  border-color: #5e2d91 !important;
  color: #ffffff !important;
}

body.template-product .pd-info-btn-wrap button[role="addToCart"] {
  background: #ffffff !important;
  border-color: #5e2d91 !important;
  color: #5e2d91 !important;
}

body.template-product .pd-info-variants-button-wrap input[type="radio"]:checked + .pd-variants-label {
  border-color: #5e2d91;
  background: #f5f0fa;
  color: #5e2d91;
  box-shadow: inset 0 0 0 1px #5e2d91;
}

/* Sales-point icons: flame and green square check */
body.template-product .pd-sales-points > div > svg {
  display: none;
}

body.template-product .pd-sales-points > div::before {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  margin-right: 7px;
}

body.template-product .pd-sales-points > div:first-child::before {
  content: "🔥";
  width: 16px;
  height: 20px;
  font-size: 15px;
  line-height: 1;
}

body.template-product .pd-sales-points > div:nth-child(2)::before {
  content: "✓";
  width: 15px;
  height: 15px;
  margin-top: 2px;
  border-radius: 2px;
  background: #12b76a;
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 700;
  line-height: 15px;
}

body.template-product .pd-sales-points {
  margin-top: 7px !important;
  gap: 4px;
}

body.template-product .pd-sales-points > div > div {
  padding-left: 0 !important;
  line-height: 1.35;
}

body.template-product .letonys-rating-row {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.35;
}

body.template-product .letonys-rating-stars {
  color: #f5a000;
  font-size: 17px;
  letter-spacing: 1px;
}

body.template-product .letonys-rating-count {
  color: #5f6878;
  font-weight: 500;
}

body.template-product .pd-info-price {
  margin-top: 12px;
}

body.template-product .plugin-discount-wrap {
  margin-top: 12px;
  margin-bottom: 4px;
  color: #b42318;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

/* CSS-only final consistency layer */
html,
body,
button,
input,
select,
textarea,
.type-body-font-family,
.type-title-font-family,
.heading-base-global {
  font-family: Arial, Helvetica, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: Arial, Helvetica, sans-serif !important;
  line-height: 1.28;
}

.product-desc,
.product-desc .section-title,
.product-desc-content,
.product-desc-content * {
  font-family: Arial, Helvetica, sans-serif !important;
}

.product-desc-content,
.product-desc-content p,
.product-desc-content li {
  font-size: 15px;
  line-height: 1.6;
}

.product-desc-content p {
  margin-top: 0;
  margin-bottom: 12px;
}

.product-desc-content h1,
.product-desc-content h2,
.product-desc-content h3,
.product-desc-content h4 {
  margin-top: 22px;
  margin-bottom: 10px;
  font-family: Arial, Helvetica, sans-serif !important;
  font-weight: 700;
  line-height: 1.35;
}

body.template-product .pd-info-title {
  margin-top: 8px;
  margin-bottom: 0;
  line-height: 1.25;
}

body.template-product .pd-sales-points {
  margin-top: 9px !important;
  gap: 5px;
}

body.template-product .pd-info-price {
  margin-top: 14px !important;
}

body.template-product .letonys-rating-row {
  gap: 8px;
  margin-bottom: 7px;
  font-size: 14px;
  line-height: 1.3;
}

body.template-product .letonys-rating-stars {
  display: inline-block;
  background: linear-gradient(90deg, #f5a000 90%, #d9dee7 90%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 1px;
}

body.template-product .letonys-rating-count {
  color: #667085;
  font-size: 14px;
  font-weight: 500;
}

body.template-product .plugin-discount-wrap {
  margin-top: 12px !important;
  margin-bottom: 0 !important;
}

body.template-product .pd-info-variants-button-wrap,
body.template-product .pd-variants-dropdown-wrap {
  margin-top: 14px !important;
}

body.template-product .pd-info-variants-title-render {
  display: none !important;
}

body.template-product .pd-info-variants-span {
  font-size: 0 !important;
}

body.template-product .pd-info-variants-span::after {
  content: "Style";
  font-size: 15px;
  font-weight: 700;
}

body.template-product .pd-info-qty-wrap {
  margin-top: 16px !important;
}

body.template-product .pd-current-inventory {
  margin-top: 14px !important;
}

body.template-product .pd-info-btn-wrap {
  margin-top: 16px !important;
}

@media (max-width: 959px) {
  body.template-product .pd-info-body .pd-info-body-top {
    padding: 16px 20px 6px;
  }

  body.template-product .pd-info-body .pd-info-body-bottom {
    padding: 0 20px 20px;
  }

  .product-desc .section-title {
    padding: 14px 16px;
  }

  .product-desc-content {
    padding: 0 16px 18px;
  }
}
