:root {
  --pdp-ink: #0d2942;
  --pdp-muted: #5f6f7b;
  --pdp-line: #d9e3e8;
  --pdp-soft: #f3f7f8;
  --pdp-teal: #007c64;
  --pdp-blue: #0d416f;
  --pdp-focus: #d9ef38;
}

/* Resilient server-rendered product layout.
   The catalog HTML remains usable and correctly sized before JavaScript runs,
   and also when the enhancement request is blocked or interrupted. */
body.catalog-product .catalog-main {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 0 64px;
}

body.catalog-product .catalog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .86fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: start;
}

body.catalog-product .catalog-media {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  min-height: 420px;
  padding: clamp(18px, 3vw, 36px);
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid #dbe4e8;
  border-radius: 12px;
  background: #f7f9fa;
}

body.catalog-product .catalog-media > img {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  max-height: 560px;
  object-fit: contain;
}

body.catalog-product .catalog-info {
  min-width: 0;
  padding-top: 4px;
}

body.catalog-product .catalog-info h1,
body.catalog-product .catalog-summary {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  body.catalog-product .catalog-main {
    width: min(100% - 24px, 680px);
    padding-top: 20px;
  }

  body.catalog-product .catalog-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  body.catalog-product .catalog-media {
    min-height: 300px;
    padding: 16px;
  }

  body.catalog-product .catalog-media > img {
    max-width: 100%;
    max-height: 420px;
  }
}

body.ex-pdp-page {
  background: #f6f8f9 !important;
  color: var(--pdp-ink);
}

body.ex-pdp-page .product-shell-content,
body.ex-pdp-page .catalog-main {
  width: min(1240px, calc(100% - 40px)) !important;
  max-width: 1240px !important;
  margin: 0 auto !important;
  padding: 30px 0 72px !important;
}

.ex-pdp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0 0 22px;
  color: #71808b;
  font-size: .82rem;
  line-height: 1.5;
  overflow: hidden;
}

.ex-pdp-breadcrumb a {
  color: var(--pdp-teal);
  text-decoration: none;
  white-space: nowrap;
}

.ex-pdp-breadcrumb span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ex-pdp-breadcrumb a:hover { text-decoration: underline; }

.ex-pdp-hero {
  display: grid;
  grid-template-columns: minmax(340px, .88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 4.5vw, 62px);
  align-items: start;
}

.ex-pdp-gallery {
  min-width: 0;
  width: min(100%, 560px);
  position: sticky;
  top: 18px;
}

.ex-pdp-stage {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 4 / 3;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 3vw, 36px);
  overflow: hidden;
  border: 1px solid var(--pdp-line);
  border-radius: 8px;
  background: #fff;
  cursor: zoom-in;
}

.ex-pdp-stage img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ex-pdp-zoom-label {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid #cad5da;
  border-radius: 6px;
  background: rgba(255,255,255,.94);
  color: var(--pdp-ink);
  font-size: .75rem;
  font-weight: 800;
  pointer-events: none;
}

.ex-pdp-zoom-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.ex-pdp-thumbnails {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.ex-pdp-thumb {
  position: relative;
  display: flex;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--pdp-line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.ex-pdp-thumb[aria-current="true"] {
  border-color: var(--pdp-teal);
  box-shadow: inset 0 0 0 2px var(--pdp-teal);
}

.ex-pdp-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ex-pdp-image-count {
  margin: 10px 0 0;
  color: #74828c;
  font-size: .74rem;
  font-weight: 700;
}

.ex-pdp-info { min-width: 0; padding-top: 4px; }

.ex-pdp-kicker {
  margin: 0 0 9px;
  color: var(--pdp-teal);
  font-size: .76rem;
  font-weight: 850;
  line-height: 1.4;
  text-transform: uppercase;
}

.ex-pdp-info h1 {
  margin: 0;
  color: var(--pdp-ink);
  font-size: clamp(1.8rem, 3.1vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.ex-pdp-subline {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
  margin: 14px 0 0;
  color: #687681;
  font-size: .84rem;
}

.ex-pdp-subline strong { color: #304657; }

.ex-pdp-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: 14px;
  color: #354b5b;
  font-size: .84rem;
  font-weight: 750;
}

.ex-pdp-rating b { color: #9a6500; font-size: 1rem; }

.ex-pdp-short {
  margin: 22px 0 0;
  padding: 18px 20px;
  border: 1px solid #d4e3df;
  border-left: 4px solid var(--pdp-teal);
  border-radius: 6px;
  background: #fff;
}

.ex-pdp-short h2 {
  margin: 0 0 7px;
  color: var(--pdp-ink);
  font-size: .78rem;
  line-height: 1.4;
  text-transform: uppercase;
}

.ex-pdp-short p {
  margin: 0;
  color: #495d6b;
  font-size: .96rem;
  line-height: 1.7;
}

.ex-pdp-price-wrap {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--pdp-line);
}

.ex-pdp-price-label {
  display: block;
  margin-bottom: 3px;
  color: #72808a;
  font-size: .7rem;
  font-weight: 750;
  text-transform: uppercase;
}

.ex-pdp-price {
  color: var(--pdp-teal);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 850;
  line-height: 1.2;
}

.ex-pdp-stock {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #28644f;
  font-size: .78rem;
  font-weight: 800;
}

.ex-pdp-stock::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2aa66d;
  content: '';
}

.ex-pdp-info .catalog-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.ex-pdp-info .catalog-button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(13, 41, 66, .08);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease, color .18s ease;
}

.ex-pdp-info .catalog-button:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(13, 41, 66, .14); }
.ex-pdp-info .commerce-add-product { border-color: #0d416f; background: #0d416f; color: #fff; }
.ex-pdp-info .commerce-add-product:hover { border-color: #092f52; background: #092f52; }
.ex-pdp-info .commerce-buy-product { border-color: #00856c; background: #00856c; color: #fff; }
.ex-pdp-info .commerce-buy-product:hover { border-color: #006d59; background: #006d59; color: #fff; }
.ex-pdp-info .commerce-quote-product { border-color: #d79a22; background: #fff8e8; color: #704800; }
.ex-pdp-info .commerce-quote-product:hover { border-color: #b87900; background: #ffefc6; color: #553700; }
.ex-pdp-info .commerce-whatsapp-product { border-color: #188c62; background: #e9f8f1; color: #126745; }
.ex-pdp-info .commerce-whatsapp-product:hover { border-color: #13744f; background: #d4f2e4; color: #0d583a; }
.ex-pdp-info .catalog-button.primary:not(.commerce-add-product) { background: var(--pdp-blue); color: #fff; }
.ex-pdp-info .catalog-button.secondary:not(.commerce-buy-product):not(.commerce-quote-product):not(.commerce-whatsapp-product) { border-color: #becbd1; background: #fff; color: var(--pdp-ink); }

.ex-pdp-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin: 24px 0 0;
  border-top: 1px solid var(--pdp-line);
}

.ex-pdp-meta div { min-width: 0; padding: 13px 0; border-bottom: 1px solid var(--pdp-line); }
.ex-pdp-meta dt { margin: 0 0 3px; color: #7a8790; font-size: .68rem; font-weight: 750; text-transform: uppercase; }
.ex-pdp-meta dd { margin: 0; color: #2d4353; font-size: .88rem; font-weight: 750; overflow-wrap: anywhere; }

.ex-pdp-detail,
.ex-pdp-reviews {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 80px);
  margin-top: 64px;
  padding-top: 38px;
  border-top: 1px solid var(--pdp-line);
}

.ex-pdp-section-heading p {
  margin: 0 0 7px;
  color: var(--pdp-teal);
  font-size: .72rem;
  font-weight: 850;
  text-transform: uppercase;
}

.ex-pdp-section-heading h2 {
  margin: 0;
  color: var(--pdp-ink);
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  line-height: 1.16;
  letter-spacing: 0;
}

.ex-pdp-description { min-width: 0; color: #405563; font-size: .98rem; line-height: 1.78; }
.ex-pdp-description > :first-child { margin-top: 0; }
.ex-pdp-description > :last-child { margin-bottom: 0; }
.ex-pdp-description p { margin: 0 0 18px; }
.ex-pdp-description h2,
.ex-pdp-description h3,
.ex-pdp-description h4 { margin: 30px 0 12px; color: var(--pdp-ink); letter-spacing: 0; }
.ex-pdp-description h2 { font-size: 1.45rem; }
.ex-pdp-description h3 { font-size: 1.15rem; }
.ex-pdp-description h4 { font-size: 1rem; }
.ex-pdp-description ul,
.ex-pdp-description ol { display: grid; gap: 8px; margin: 0 0 22px; padding-left: 22px; }
.ex-pdp-description li::marker { color: var(--pdp-teal); font-weight: 800; }
.ex-pdp-description blockquote { margin: 22px 0; padding: 14px 18px; border-left: 3px solid var(--pdp-teal); background: #edf6f3; }
.ex-pdp-description table { width: 100%; margin: 18px 0 24px; border-collapse: collapse; font-size: .9rem; }
.ex-pdp-description th,
.ex-pdp-description td { padding: 11px 12px; border: 1px solid var(--pdp-line); text-align: left; vertical-align: top; }
.ex-pdp-description th { background: #edf3f5; color: var(--pdp-ink); }

.ex-pdp-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 4px 0 24px; border-top: 1px solid var(--pdp-line); }
.ex-pdp-specs div { display: grid; grid-template-columns: minmax(90px, .75fr) minmax(0, 1fr); gap: 14px; padding: 11px 12px; border-bottom: 1px solid var(--pdp-line); }
.ex-pdp-specs div:nth-child(odd) { border-right: 1px solid var(--pdp-line); }
.ex-pdp-specs dt { color: #70808b; font-size: .78rem; font-weight: 750; }
.ex-pdp-specs dd { margin: 0; color: #263e50; font-size: .84rem; font-weight: 750; overflow-wrap: anywhere; }

.ex-pdp-review-summary { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; }
.ex-pdp-review-summary strong { color: var(--pdp-ink); font-size: 2rem; }
.ex-pdp-review-summary span { color: #6a7a85; font-size: .85rem; }
.ex-pdp-review-card { padding: 18px 0; border-top: 1px solid var(--pdp-line); }
.ex-pdp-review-card:first-of-type { border-top: 0; }
.ex-pdp-review-card header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.ex-pdp-review-card h3 { margin: 0; color: var(--pdp-ink); font-size: .95rem; }
.ex-pdp-review-card time { color: #74838d; font-size: .76rem; }
.ex-pdp-review-card p { margin: 10px 0 0; color: #4a5e6b; line-height: 1.7; }

.ex-pdp-lightbox {
  width: min(1040px, calc(100% - 32px));
  max-width: 1040px;
  height: min(820px, calc(100vh - 32px));
  max-height: 820px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(6, 28, 45, .28);
}

.ex-pdp-lightbox::backdrop { background: rgba(5, 20, 32, .76); }
.ex-pdp-lightbox-frame { display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; width: 100%; height: 100%; align-items: center; }
.ex-pdp-lightbox-image { display: block; width: 100%; height: 100%; max-height: calc(100vh - 70px); padding: 34px; object-fit: contain; box-sizing: border-box; }
.ex-pdp-lightbox button { display: inline-flex; width: 44px; height: 44px; align-items: center; justify-content: center; border: 1px solid var(--pdp-line); border-radius: 50%; background: #fff; color: var(--pdp-ink); cursor: pointer; }
.ex-pdp-lightbox-close { position: absolute; top: 12px; right: 12px; z-index: 2; }
.ex-pdp-lightbox button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.ex-pdp-stage:focus-visible,
.ex-pdp-thumb:focus-visible,
.ex-pdp-lightbox button:focus-visible,
.ex-pdp-info .catalog-button:focus-visible {
  outline: 3px solid var(--pdp-focus);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  .ex-pdp-hero { grid-template-columns: minmax(320px, .9fr) minmax(0, 1.1fr); gap: 30px; }
  .ex-pdp-thumbnails { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  body.ex-pdp-page .product-shell-content,
  body.ex-pdp-page .catalog-main { width: min(100% - 28px, 680px) !important; padding: 20px 0 54px !important; }
  .ex-pdp-breadcrumb { margin-bottom: 14px; }
  .ex-pdp-hero { grid-template-columns: minmax(0, 1fr); gap: 26px; }
  .ex-pdp-gallery { width: 100%; position: static; }
  .ex-pdp-stage { aspect-ratio: 1.12; padding: 18px; }
  .ex-pdp-thumbnails { display: flex; gap: 8px; margin-right: -14px; padding-right: 14px; overflow-x: auto; scrollbar-width: thin; }
  .ex-pdp-thumb { flex: 0 0 72px; width: 72px; height: 72px; aspect-ratio: auto; }
  .ex-pdp-info h1 { font-size: clamp(1.65rem, 8vw, 2.25rem); }
  .ex-pdp-price-wrap { align-items: flex-start; flex-direction: column; gap: 8px; }
  .ex-pdp-info .catalog-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .ex-pdp-detail,
  .ex-pdp-reviews { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 48px; padding-top: 30px; }
  .ex-pdp-specs { grid-template-columns: minmax(0, 1fr); }
  .ex-pdp-specs div:nth-child(odd) { border-right: 0; }
  .ex-pdp-lightbox-frame { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .ex-pdp-lightbox-image { padding: 20px 4px; }
}

@media (max-width: 430px) {
  .ex-pdp-meta { grid-template-columns: minmax(0, 1fr); }
  .ex-pdp-short { padding: 16px; }
  .ex-pdp-specs div { grid-template-columns: minmax(82px, .72fr) minmax(0, 1fr); gap: 10px; padding-inline: 6px; }
}

@media (max-width: 340px) {
  .ex-pdp-info .catalog-actions { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .ex-pdp-stage,
  .ex-pdp-thumb,
  .ex-pdp-info .catalog-button { scroll-behavior: auto; transition: none; }
  .ex-pdp-info .catalog-button:hover { transform: none; }
}
