/* =========================================================
   Embroidery China — Product detail template (Journal-style grid)
   English B2B storefront. Injected via Nginx sub_filter, loaded site-wide
   but every selector is scoped to the product detail article or .su-pd-*,
   so home / category / i18n pages are untouched.

   Original code, written for this store. The layout convention of a
   two-column gallery + info panel + tab bar is reproduced; no third-party
   theme CSS or assets are copied.
   ========================================================= */

/* ---------- breadcrumb ---------- */
.su-pd-crumb {
  max-width: var(--su-width, 1280px);
  margin: 26px auto 18px;
  padding: 0 24px;
  font-size: 13px;
  letter-spacing: .02em;
  color: #7a6f5c;
}
.su-pd-crumb a { color: #7a6f5c; text-decoration: none; border-bottom: 1px solid transparent; }
.su-pd-crumb a:hover { color: var(--su-red, #7a2e26); border-bottom-color: var(--su-red, #7a2e26); }
.su-pd-crumb .su-pd-sep { margin: 0 10px; color: #b7a98d; }
.su-pd-crumb .su-pd-here { color: var(--su-ink, #2f2a22); }

/* ---------- two column product card ---------- */
body.mt-theme article.mt-product-detail {
  box-sizing: border-box !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr) !important;
  grid-template-rows: auto auto !important;
  gap: 22px 44px !important;
  align-items: start !important;
  max-width: var(--su-width, 1280px) !important;
  margin: 0 auto 8px !important;
  padding: 30px 34px 34px !important;
  background: var(--su-paper-light, #fbf7ee) !important;
  border: 1px solid var(--su-line, #d8c9ac) !important;
  border-radius: 4px !important;
  box-shadow: 0 10px 34px rgba(47, 42, 34, .07) !important;
}

/* main photo — the React node is never moved, only styled */
body.mt-theme article.mt-product-detail > img {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-height: 700px !important;
  aspect-ratio: 640 / 820 !important;
  object-fit: contain !important;
  object-position: 50% 50%;
  background: #fff !important;
  border: 1px solid #e3d8c1 !important;
  border-radius: 3px !important;
  padding: 14px !important;
  box-sizing: border-box !important;
  transform-origin: center center;
  transition: transform .35s ease, object-position .35s ease !important;
  cursor: zoom-in;
}

/* four real detail views of the same photograph (no fake extra photos) */
html.su-pd-view-2 article.mt-product-detail > img { object-position: 50% 12% !important; transform: scale(1.55) !important; }
html.su-pd-view-3 article.mt-product-detail > img { object-position: 50% 50% !important; transform: scale(2.1) !important; }
html.su-pd-view-4 article.mt-product-detail > img { object-position: 50% 88% !important; transform: scale(1.55) !important; }

body.mt-theme article.mt-product-detail > .su-pd-gallery {
  grid-column: 1 !important;
  grid-row: 2 !important;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.su-pd-thumbs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.su-pd-thumbs button {
  width: 74px; height: 74px; padding: 0;
  border: 1px solid #d8c9ac; border-radius: 3px;
  background: #fff; overflow: hidden; cursor: pointer;
  opacity: .72; transition: opacity .18s, border-color .18s, transform .18s;
}
.su-pd-thumbs button:hover { opacity: 1; transform: translateY(-2px); }
.su-pd-thumbs button[aria-pressed="true"] { opacity: 1; border: 2px solid var(--su-red, #7a2e26); }
.su-pd-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.su-pd-thumbs .su-thumb-2 img { object-position: 50% 12%; transform: scale(1.55); }
.su-pd-thumbs .su-thumb-3 img { object-position: 50% 50%; transform: scale(2.1); }
.su-pd-thumbs .su-thumb-4 img { object-position: 50% 88%; transform: scale(1.55); }

.su-pd-zoom-hint {
  margin: 0 0 0 auto;
  font-size: 12px; color: #8b7d66; letter-spacing: .03em;
}

/* React-owned info column: reorder styling only */
body.mt-theme article.mt-product-detail > div:first-of-type {
  grid-column: 2 !important;
  grid-row: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0 !important;
  min-width: 0 !important;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-eyebrow {
  margin: 2px 0 10px !important;
  font-size: 12px !important;
  letter-spacing: .22em !important;
  text-transform: uppercase !important;
  color: #8b7d66 !important;
}
body.mt-theme article.mt-product-detail > div:first-of-type > h1 {
  margin: 0 0 16px !important;
  font-family: var(--su-display, Georgia, serif) !important;
  font-size: clamp(27px, 2.7vw, 38px) !important;
  line-height: 1.18 !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
  color: var(--su-ink, #2f2a22) !important;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-price {
  margin: 0 0 6px !important;
  font-family: var(--su-display, Georgia, serif) !important;
  font-size: 32px !important;
  line-height: 1 !important;
  color: var(--su-red, #7a2e26) !important;
  font-weight: 600 !important;
}
body.mt-theme article.mt-product-detail > div:first-of-type > p:nth-of-type(3) {
  margin: 0 0 20px !important;
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px !important; letter-spacing: .04em;
  color: #3f6b45 !important; text-transform: uppercase;
}
body.mt-theme article.mt-product-detail > div:first-of-type > p:nth-of-type(3)::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4f8a58;
}
/* long description moves into the Description tab */
body.mt-theme article.mt-product-detail > div:first-of-type > p:nth-of-type(4) { display: none !important; }

body.mt-theme article.mt-product-detail > div:first-of-type > .mt-form {
  display: flex !important; flex-wrap: wrap; align-items: flex-end; gap: 12px !important;
  margin: 4px 0 0 !important; width: 100% !important;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-form > label {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #7a6f5c;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-form input[type="number"] {
  width: 88px; height: 44px; padding: 0 10px;
  border: 1px solid var(--su-line, #d8c9ac); border-radius: 3px;
  background: #fff; color: var(--su-ink, #2f2a22); font: 16px/1 var(--su-serif, Georgia, serif);
  box-sizing: border-box;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-form > button {
  height: 44px; padding: 0 34px !important;
  background: var(--su-red, #7a2e26) !important; color: #fff !important;
  border: 0 !important; border-radius: 3px !important;
  font: 600 14px/1 var(--su-serif, Georgia, serif) !important;
  letter-spacing: .1em; text-transform: uppercase; cursor: pointer;
  transition: background .18s, transform .18s;
}
body.mt-theme article.mt-product-detail > div:first-of-type > .mt-form > button:hover { background: #5d211b !important; transform: translateY(-1px); }

/* ---------- extra info column (our own node, safe to inject) ---------- */
body.mt-theme article.mt-product-detail .su-pd-extra {
  align-self: stretch !important;
  width: 100%;
  min-width: 0;
  margin-top: 24px;
  border-top: 1px solid var(--su-line, #d8c9ac);
  padding-top: 20px;
}
.su-pd-meta { margin: 0 0 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.su-pd-meta > div {
  display: flex; flex-direction: column; gap: 4px;
  padding: 9px 14px 9px 0;
  border-bottom: 1px dashed #e0d3ba;
}
.su-pd-meta dt {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #8b7d66;
}
.su-pd-meta dd { margin: 0; font-size: 15px; color: var(--su-ink, #2f2a22); }

.su-pd-enquire-cta {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 2px 0 22px; padding: 13px 26px;
  background: transparent; color: var(--su-red, #7a2e26);
  border: 1px solid var(--su-red, #7a2e26); border-radius: 3px;
  font: 600 14px/1 var(--su-serif, Georgia, serif);
  letter-spacing: .06em; cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
}
.su-pd-enquire-cta:hover { background: var(--su-red, #7a2e26); color: #fff; transform: translateY(-1px); }
.su-pd-enquire-cta svg { width: 16px; height: 16px; }

/* ---------- colourful share row ---------- */
.su-pd-share { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; position: relative; }
.su-pd-share-label {
  margin-right: 4px; font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: #8b7d66;
}
.su-pd-share a, .su-pd-share > button {
  width: 42px; height: 42px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; color: #fff; cursor: pointer;
  box-shadow: 0 3px 10px rgba(47, 42, 34, .18);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-decoration: none !important;
}
.su-pd-share a:hover, .su-pd-share > button:hover {
  transform: translateY(-3px); box-shadow: 0 9px 20px rgba(47, 42, 34, .26); filter: brightness(1.08);
}
.su-pd-share svg { width: 20px; height: 20px; fill: currentColor; display: block; }
.su-pd-share .su-sh-more  { background: #7a2e26; }  /* brand vermilion */
.su-pd-share .su-sh-fb    { background: #1877f2; }  /* Facebook blue */
.su-pd-share .su-sh-x     { background: #111111; }  /* X black */
.su-pd-share .su-sh-wa    { background: #25d366; }  /* WhatsApp green */
.su-pd-share .su-sh-mail  { background: #d18a20; }  /* warm gold / email */
.su-pd-share .su-sh-f     { font: 700 26px/1 Georgia, serif; }
.su-pd-share .su-sh-plus  { font: 400 30px/1 Arial, sans-serif; }

.su-pd-more {
  position: absolute; bottom: 52px; left: 0; z-index: 30;
  min-width: 190px; padding: 8px;
  background: #fff; border: 1px solid var(--su-line, #d8c9ac); border-radius: 6px;
  box-shadow: 0 10px 30px rgba(47, 42, 34, .2);
  display: none;
}
.su-pd-more[data-open="1"] { display: block; }
.su-pd-more a, .su-pd-more button {
  display: block; width: 100%; padding: 9px 12px;
  background: none; border: 0; border-radius: 4px; text-align: left;
  font: 14px/1.3 var(--su-serif, Georgia, serif); color: var(--su-ink, #2f2a22);
  text-decoration: none; cursor: pointer;
}
.su-pd-more a:hover, .su-pd-more button:hover { background: #f4efe4; }
.su-pd-copied { font-size: 12px; color: #3f6b45; }

/* ---------- tab bar (Description / Specifications / Enquire) ---------- */
.su-pd-tabs {
  max-width: var(--su-width, 1280px);
  margin: 30px auto 44px;
  background: var(--su-paper-light, #fbf7ee);
  border: 1px solid var(--su-line, #d8c9ac);
  border-radius: 4px;
  box-shadow: 0 10px 34px rgba(47, 42, 34, .06);
  overflow: hidden;
}
.su-pd-tabbar { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--su-line, #d8c9ac); background: #f7f1e5; }
.su-pd-tab {
  padding: 16px 26px; border: 0; border-right: 1px solid #e6d9bf;
  background: transparent; color: #6b6151; cursor: pointer;
  font: 600 14px/1 var(--su-serif, Georgia, serif);
  letter-spacing: .07em; text-transform: uppercase;
  transition: background .18s, color .18s;
}
.su-pd-tab:hover { background: #efe5d1; color: var(--su-red, #7a2e26); }
.su-pd-tab[aria-selected="true"] { background: var(--su-red, #7a2e26); color: #fff; }
.su-pd-tab--enquire { color: var(--su-red, #7a2e26) !important; }
.su-pd-tab--enquire[aria-selected="true"] { color: #fff !important; }
.su-pd-panel { padding: 30px 36px 36px; }
.su-pd-panel[hidden] { display: none !important; }
.su-pd-panel h3 { margin: 0 0 16px; font: 500 24px/1.3 var(--su-display, Georgia, serif); color: var(--su-ink, #2f2a22); }
.su-pd-panel p { margin: 0 0 14px; font-size: 16px; line-height: 1.8; color: #4c4438; }
.su-pd-panel .su-pd-spec { margin: 0; display: grid; grid-template-columns: 190px 1fr; }
.su-pd-panel .su-pd-spec > div { padding: 12px 8px; border-bottom: 1px dashed #e0d3ba; }
.su-pd-panel .su-pd-spec dt { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #8b7d66; }
.su-pd-panel .su-pd-spec dd { margin: 5px 0 0; font-size: 16px; color: var(--su-ink, #2f2a22); }

/* enquiry form lives inside the third tab — strip the standalone card chrome */
.su-pd-panel .su-inquiry {
  margin: 0 !important; padding: 0 !important;
  border: 0 !important; box-shadow: none !important; background: transparent !important;
}
.su-pd-panel .su-inquiry > h3 { display: none; }
.su-pd-panel .su-inquiry .su-sub { margin-bottom: 22px !important; }

.su-pd-continue {
  max-width: var(--su-width, 1280px); margin: 0 auto 56px; padding: 0 24px;
  text-align: center; font-size: 15px;
}
.su-pd-continue a { color: var(--su-red, #7a2e26); text-decoration: none; border-bottom: 1px solid currentColor; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  body.mt-theme article.mt-product-detail {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 18px !important; padding: 20px !important;
  }
  body.mt-theme article.mt-product-detail > img { grid-column: 1 !important; grid-row: 1 !important; max-height: 520px !important; }
  body.mt-theme article.mt-product-detail > .su-pd-gallery { grid-column: 1 !important; grid-row: 2 !important; }
  .su-pd-zoom-hint { display: none; }
  body.mt-theme article.mt-product-detail > div:first-of-type { grid-column: 1 !important; grid-row: 3 !important; }
  .su-pd-meta { grid-template-columns: 1fr; }
  .su-pd-tab { padding: 14px 16px; font-size: 12px; }
  .su-pd-panel { padding: 22px 18px 26px; }
  .su-pd-panel .su-pd-spec { grid-template-columns: 130px 1fr; }
}
