/* V105 — compact homepage market and contact composition */

/* Products: align the catalogue navigation to the visible product range. */
@media (min-width: 801px) {
  body.p47-products-page .p47-products-layout {
    align-items: center !important;
  }
  body.p47-products-page .p47-sidebar {
    align-self: center !important;
    position: sticky !important;
    top: 132px !important;
  }
}

/* Homepage market panel: explicitly place every child to prevent implicit,
   oversized grid rows inherited from previous themes. */
html body.p47-home .p77-markets {
  display: grid !important;
  grid-template-columns: minmax(280px, .78fr) minmax(500px, 1.22fr) !important;
  grid-template-areas:
    "copy map"
    "story story"
    "key key" !important;
  align-items: center !important;
  gap: 26px 36px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 34px 0 0 !important;
  padding: 36px !important;
  overflow: hidden !important;
  border-radius: 16px !important;
  background: linear-gradient(128deg, #18394c 0%, #28566b 56%, #6b412d 100%) !important;
  color: #fff5df !important;
}
html body.p47-home .p77-market-copy {
  grid-area: copy !important;
  align-self: center !important;
}
html body.p47-home .p77-market-copy :is(small,h2,p,b,span) {
  color: #fff5df !important;
  -webkit-text-fill-color: #fff5df !important;
}
html body.p47-home .p77-market-copy h2 {
  margin: 10px 0 14px !important;
  font-size: clamp(30px, 3.1vw, 48px) !important;
  line-height: 1.04 !important;
}
html body.p47-home .p77-regions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
  margin: 22px 0 !important;
}
html body.p47-home .p77-regions > div {
  min-height: 86px !important;
  padding: 14px !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  background: rgba(9,31,44,.28) !important;
  border-radius: 9px !important;
}
html body.p47-home .p77-regions b,
html body.p47-home .p77-regions span { display: block !important; }
html body.p47-home .p77-regions span { margin-top: 5px !important; font-size: 11px !important; line-height: 1.45 !important; }

html body.p47-home .peak-world-map.p77-map {
  grid-area: map !important;
  display: block !important;
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 300px !important;
  max-height: 390px !important;
  aspect-ratio: 1.85 / 1 !important;
  margin: 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(255,232,184,.32) !important;
  border-radius: 13px !important;
  background: #69b9df !important;
}
html body.p47-home .p77-map > img,
html body.p47-home .p77-map > svg {
  display: block !important;
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}
html body.p47-home .p77-map > img {
  object-fit: fill !important;
  opacity: 1 !important;
  filter: none !important;
}
html body.p47-home .p77-map > svg { z-index: 2 !important; }

html body.p47-home .p94-market-story {
  grid-area: story !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 26px !important;
}
html body.p47-home .p93-map-key {
  grid-area: key !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff5df !important;
}
html body.p47-home .p93-map-key span {
  padding: 9px 13px !important;
  background: rgba(9,31,44,.32) !important;
}

/* Homepage contact hub: three cards fill the available width without
   inflating the section vertically. */
html body.p47-home .p93-contacts {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 62px 0 !important;
  overflow: hidden !important;
  background: linear-gradient(118deg, #eee2df 0%, #ead8d3 48%, #dfc3ba 100%) !important;
  color: #462d43 !important;
}
html body.p47-home .p93-contacts .p47-shell {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
}
html body.p47-home .p93-contact-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: 20px !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
}
html body.p47-home .p93-contact-grid article {
  display: flex !important;
  flex-direction: column !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  min-width: 0 !important;
  min-height: 290px !important;
  height: auto !important;
  padding: 28px !important;
  border: 1px solid rgba(70,45,67,.34) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.36) !important;
  box-shadow: 0 16px 36px rgba(73,42,53,.09) !important;
}
html body.p47-home .p93-contact-grid article:nth-child(2) {
  background: linear-gradient(145deg, #244b61, #173447) !important;
  color: #fff5df !important;
}
html body.p47-home .p93-contact-grid article:nth-child(3) {
  background: linear-gradient(145deg, #7b1725, #4f1923) !important;
  color: #fff5df !important;
}
html body.p47-home .p93-contact-grid article:nth-child(n+2) :is(span,h3,p,a) {
  color: #fff5df !important;
  -webkit-text-fill-color: #fff5df !important;
}
html body.p47-home .p93-contact-grid .p104-card-link {
  margin-top: auto !important;
  padding-top: 18px !important;
  font-size: 12px !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
}

@media (max-width: 1000px) {
  html body.p47-home .p77-markets {
    grid-template-columns: 1fr !important;
    grid-template-areas: "copy" "map" "story" "key" !important;
  }
  html body.p47-home .p93-contact-grid { grid-template-columns: 1fr !important; }
  html body.p47-home .p93-contact-grid article { min-height: 0 !important; }
}

@media (max-width: 800px) {
  body.p47-products-page .p47-sidebar { position: static !important; align-self: stretch !important; }
  html body.p47-home .p77-markets { padding: 22px !important; }
  html body.p47-home .p77-regions { grid-template-columns: 1fr !important; }
  html body.p47-home .peak-world-map.p77-map { min-height: 225px !important; }
  html body.p47-home .p94-market-story { padding: 20px !important; }
  html body.p47-home .p93-contacts { padding: 44px 0 !important; }
}

/* V108 — automatic PEAK brand motion and global furniture sourcing network. */
@keyframes p108PeakAlive {
  0%, 100% { transform: translateY(0) rotate(-.35deg) scale(1); }
  45% { transform: translateY(-5px) rotate(.45deg) scale(1.018); }
  55% { transform: translateY(-5px) rotate(.45deg) scale(1.018); }
}
@keyframes p108RouteFlow { to { stroke-dashoffset: -44; } }
@keyframes p108NodePulse {
  0%, 100% { stroke-width: 3; opacity: 1; }
  50% { stroke-width: 9; opacity: .78; }
}

html body .p47-brand img,
html body .p47-footer-brand img {
  animation: p108PeakAlive 4.6s ease-in-out infinite !important;
  transform-origin: 50% 50% !important;
  will-change: transform !important;
}
html body .p47-footer-brand img { animation-delay: .7s !important; }

.p108-trade-network {
  padding: 78px 0;
  overflow: hidden;
  color: #fff7e5;
  background:
    radial-gradient(circle at 75% 35%, rgba(26,167,178,.24), transparent 30%),
    linear-gradient(130deg, #102b38 0%, #174b5a 52%, #6d3628 100%);
}
.p108-network-grid {
  display: grid;
  grid-template-columns: minmax(280px,.72fr) minmax(520px,1.28fr);
  align-items: center;
  gap: 46px;
}
.p108-network-copy > span,
.p108-contact-map-head > span {
  display: block;
  margin-bottom: 12px;
  color: #ffc95c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
}
.p108-network-copy h2,
.p108-contact-map-head h2 {
  margin: 0 0 18px;
  font-size: clamp(34px,4vw,58px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.p108-network-copy p {
  max-width: 520px;
  margin: 0 0 24px;
  color: #d8e5e6;
  font-size: 16px;
  line-height: 1.72;
}
.p108-source-list {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 9px;
  margin: 0 0 28px;
}
.p108-source-list b {
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  background: rgba(5,25,34,.34);
  color: #fff7e5;
  font-size: 13px;
}
.p108-world-map {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid rgba(255,224,157,.46);
  border-radius: 20px;
  background: #62b4d8;
  box-shadow: 0 28px 70px rgba(4,20,27,.34);
}
.p108-world-map > img,
.p108-world-map > svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.p108-world-map > img { object-fit: fill; }
.p108-world-map > svg { z-index: 2; }
.p108-inbound path,
.p108-outbound path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 10 8;
  animation: p108RouteFlow 2.8s linear infinite;
}
.p108-inbound path { stroke: #ffe06d; stroke-width: 3; }
.p108-outbound path { stroke: #c5222f; stroke-width: 3; animation-direction: reverse; }
.p108-nodes circle {
  fill: #ffd357;
  stroke: rgba(255,255,255,.9);
  stroke-width: 3;
  transform-box: fill-box;
  transform-origin: center;
  animation: p108NodePulse 2.4s ease-in-out infinite;
}
.p108-nodes circle:nth-child(2n) { animation-delay: .7s; }
.p108-nodes .hub { fill: #e31224; stroke: #fff1c7; }
.p108-labels text {
  fill: #fff;
  stroke: #163041;
  stroke-width: 3px;
  paint-order: stroke;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
}
.p108-labels .region { font-size: 11px; }
.p108-map-caption {
  position: absolute;
  z-index: 3;
  right: 14px;
  bottom: 12px;
  display: flex;
  gap: 12px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(12,40,52,.82);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(7px);
}
.p108-map-caption span { display: flex; align-items: center; gap: 6px; }
.p108-map-caption i { width: 9px; height: 9px; border-radius: 50%; background: #c5222f; }
.p108-map-caption i.source { background: #ffd357; }

.p108-contact-map {
  padding: 58px 0 70px;
  background: linear-gradient(135deg,#3a2039 0%,#5a3151 47%,#173f50 100%);
  color: #fff7e5;
}
.p108-contact-map .p47-shell {
  display: grid;
  grid-template-columns: minmax(270px,.7fr) minmax(480px,1.3fr);
  align-items: center;
  gap: 42px;
}
.p108-contact-map-head h2 { font-size: clamp(31px,3.5vw,48px); }
.p108-contact-map-head p { color: #eadde7; font-size: 15px; line-height: 1.65; }
.p108-world-map--compact { border-radius: 15px; box-shadow: 0 20px 55px rgba(17,8,20,.3); }

@media (max-width: 1000px) {
  .p108-network-grid,
  .p108-contact-map .p47-shell { grid-template-columns: 1fr; }
  .p108-network-copy { max-width: 760px; }
}
@media (max-width: 700px) {
  .p108-trade-network { padding: 52px 0; }
  .p108-source-list { grid-template-columns: 1fr; }
  .p108-world-map { min-height: 250px; aspect-ratio: 1.55 / 1; }
  .p108-labels .region { display: none; }
  .p108-labels text { font-size: 11px; }
  .p108-map-caption { left: 10px; right: 10px; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html body .p47-brand img,
  html body .p47-footer-brand img,
  .p108-inbound path,
  .p108-outbound path,
  .p108-nodes circle { animation: none !important; }
}
