.pallet-page {
  --pallet-amber: #ffc98c;
  width: min(1180px, 100% - clamp(24px, 6vw, 80px));
  padding-block: 18px 42px;
}
.pallet-page [id] { scroll-margin-block-start: 16px; }
.pallet-breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-block-end: 14px; color: #39574a; font-size: .88rem; }
.pallet-breadcrumb a { padding-block: 4px; text-underline-offset: 4px; }
.pallet-hero {
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: stretch;
  border-radius: 22px;
  background: #12392e;
  color: #fbfaf6;
  box-shadow: 0 12px 30px #153d301a;
}
.pallet-hero-copy { align-self: center; padding: clamp(24px, 5vw, 58px); }
.pallet-hero h1 { font-size: clamp(2.16rem, 4.7vw, 4rem); line-height: 1.28; text-wrap: balance; }
.pallet-hero h1 span { color: var(--pallet-amber); white-space: nowrap; }
.pallet-hero p { margin-block: 16px 21px; max-width: 46ch; color: #eef4ed; font-size: clamp(1rem, 1.55vw, 1.16rem); line-height: 1.92; }
.pallet-hero .pallet-purpose {
  margin-block: 14px 0;
  padding: 9px 13px;
  border-inline-start: 3px solid var(--pallet-amber);
  border-radius: 6px;
  background: #ffffff12;
  font-size: 1rem;
}
.pallet-jump { padding-inline: 15px; background: var(--pallet-amber); color: #3a2512; }
.pallet-jump:hover { background: #ffdeb4; }
.pallet-illustration {
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  margin: 0;
  padding: clamp(20px, 4vw, 45px) 20px 24px;
  background: radial-gradient(ellipse at 53% 43%, #49765d 0, #20503f 53%, #183e31 93%);
}
.pallet-illustration figcaption { color: #f0f3e9; margin-block-start: 7px; font-size: .86rem; }
.pallet-scene { position: relative; width: min(100%, 368px); aspect-ratio: 1.27; direction: ltr; animation: pallet-enter .46s ease-out both; }
.pallet-scene::before {
  content: "";
  position: absolute;
  inset: auto 7% 3%;
  height: 15%;
  border-radius: 50%;
  background: #102a227d;
  filter: blur(7px);
}
.pallet-platform {
  position: absolute;
  z-index: 1;
  left: 10%;
  right: 12%;
  bottom: 8%;
  height: 8%;
  background: repeating-linear-gradient(90deg, #71472c 0 13%, #362b20 13% 41%);
  border-block-start: 4px solid #aa7348;
  border-radius: 2px;
}
.pallet-platform::before {
  content: "";
  position: absolute;
  inset: auto -6% 100% 0;
  height: 18px;
  transform-origin: bottom left;
  transform: skewX(-46deg);
  background: repeating-linear-gradient(0deg, #a87149 0 3px, #c18b5d 3px 6px);
  border-radius: 2px;
}
.pallet-crate, .sample-box {
  --face: #dba567;
  --top: #edbe83;
  --side: #a96d3c;
  position: absolute;
  border-radius: 2px 2px 3px 3px;
  background: linear-gradient(130deg, #fff4 0%, transparent 62%), var(--face);
  box-shadow: inset 0 0 0 1px #6338172f, inset 0 -4px 8px #51301419;
}
.pallet-crate::before, .pallet-crate::after, .sample-box::before, .sample-box::after { content: ""; position: absolute; }
.pallet-crate::before, .sample-box::before {
  bottom: 100%;
  width: 100%;
  height: 17%;
  background: var(--top);
  transform: skewX(-47deg);
  transform-origin: bottom left;
  border: 1px solid #8253273d;
  border-radius: 3px 3px 0 0;
}
.pallet-crate::after, .sample-box::after {
  left: 100%;
  width: 15%;
  height: 100%;
  background: var(--side);
  transform-origin: top left;
  transform: skewY(-43deg);
  border-radius: 0 3px 3px 0;
  box-shadow: inset -1px 0 #673e295e;
}
.pallet-crate span, .sample-box span {
  position: absolute;
  inset: 12% auto auto 13%;
  width: 29%;
  height: 32%;
  border-radius: 2px;
  background: repeating-linear-gradient(0deg, #62482c 0 1px, #eee1cb 1px 3px) center / 56% 42% no-repeat, #f8efdc;
  box-shadow: 0 1px 2px #4e291536;
}
.crate-left { z-index: 2; left: 13%; bottom: 15%; width: 43%; height: 34%; --face: #cf945b; --top: #e6ac73; --side: #9e6233; }
.crate-right { z-index: 3; left: 55%; bottom: 15%; width: 29%; height: 43%; --face: #ecb677; --top: #f4ce98; --side: #ad703c; }
.crate-top { z-index: 4; left: 20%; bottom: 49%; width: 35%; height: 30%; --face: #d7b187; --top: #e9c9a4; --side: #936c50; }

.pallet-definitions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 0; }
.pallet-definitions div { padding: clamp(14px, 2.4vw, 23px); border: 1px solid #d5e0d4; border-radius: 13px; background: #edf3eb; }
.pallet-definitions dt { color: var(--ink); font-size: 1.15rem; font-weight: 700; }
.pallet-definitions dd { margin: 2px 0 0; line-height: 1.85; }
.pallet-section { margin-block: clamp(30px, 5vw, 52px); }
.pallet-page h2 { color: var(--ink); font-size: clamp(1.47rem, 3vw, 2.08rem); line-height: 1.45; }
.pallet-states { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-block-start: 15px; }
.pallet-state { overflow: hidden; border: 1px solid #e6ddd1; border-radius: 15px; background: #fffdf9; }
.pallet-state-picture { position: relative; min-height: 125px; background: radial-gradient(ellipse at center, #fff5e3, #f1e4d0); direction: ltr; }
.pallet-state-picture::before { content: ""; position: absolute; inset: auto 28% 22%; height: 10%; border-radius: 50%; background: #6a452748; filter: blur(6px); }
.sample-box { left: calc(50% - 33px); bottom: 30%; width: 60px; height: 42px; }
.state-dented .sample-box { --face: #d79761; --top: #e5b67e; --side: #9b653b; transform: rotate(-6deg); }
.state-dented .sample-box span { inset: auto 0 0 auto; width: 37%; height: 50%; background: #956440; box-shadow: none; clip-path: polygon(20% 5%, 53% 31%, 72% 15%, 79% 59%, 100% 64%, 100% 100%, 46% 92%, 41% 61%, 9% 51%); }
.state-open .sample-box { --face: #e3b478; --top: #69462c; }
.state-open .sample-box span { inset: -19% auto 100% 0; width: 100%; height: 42%; transform: skewX(42deg) translateX(-8px); background: #e5ba85; box-shadow: inset 0 0 0 1px #a07041; }
.state-repair .sample-box { --face: #c8986d; --top: #e1b58b; --side: #966444; }
.state-repair .sample-box span { inset: 23% auto auto 35%; width: 30%; height: 45%; border-radius: 50%; background: #973b22; }
.state-repair .sample-box span::before, .state-repair .sample-box span::after { content: ""; position: absolute; top: 50%; left: 25%; width: 50%; height: 1px; background: #fff4df; transform: rotate(45deg); }
.state-repair .sample-box span::after { transform: rotate(-45deg); }
.pallet-state-copy { padding: 14px; }
.pallet-state h3, .pallet-offers h3 { margin-block-end: 5px; color: var(--ink); font-size: 1.06rem; line-height: 1.55; }
.pallet-state p, .pallet-example p, .pallet-faq p { line-height: 1.9; }
.pallet-source { margin-block-start: 12px; color: #44554b; font-size: .9rem; }
.pallet-source a, .pallet-faq a { color: var(--green); font-weight: 700; text-underline-offset: 4px; }
.pallet-grade-intro { margin-block-start: 6px; line-height: 1.85; }
.pallet-grade-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-block-start: 15px; }
.pallet-grade-gallery figure { margin: 0; padding: 12px; border: 1px solid #d5e0d4; border-radius: 15px; background: #fffdf9; }
.pallet-grade-gallery figcaption { margin-block-end: 8px; color: var(--ink); font-size: 1.06rem; font-weight: 700; }
.pallet-grade-photo {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 9px;
  background: #edf3eb;
}
.pallet-supply-policy {
  display: grid;
  gap: 5px;
  margin-block-start: 14px;
  padding: clamp(14px, 3vw, 25px);
  border-inline-start: 5px solid var(--pallet-amber);
  border-radius: 14px;
  background: #12392e;
  color: #eef4ed;
}
.pallet-supply-policy strong {
  color: #e7ff48;
  font-size: clamp(1.14rem, 2.4vw, 1.65rem);
  text-shadow: 0 0 12px #e7ff4840;
}
.pallet-example { padding: clamp(18px, 4vw, 35px); border: 1px solid #e5caaf; border-radius: 20px; background: #fcf0e2; }
.pallet-example-intro p { margin-block-start: 5px; }
.pallet-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-block: 13px; }
.pallet-offers article { padding: 11px 14px; border: 1px solid #e5d8c8; border-radius: 11px; background: #fffdf9; }
.pallet-example-result { color: #724124; font-weight: 700; }
.pallet-faq h2 { margin-block-end: 12px; }
.pallet-faq details { margin-block-start: 7px; border: 1px solid #d5e0d4; border-radius: 12px; background: #fffdf9; }
.pallet-faq summary { cursor: pointer; min-height: 44px; padding: 12px 15px; color: var(--ink); font-weight: 700; }
.pallet-faq summary:focus-visible { outline: 3px solid #489970; outline-offset: 2px; border-radius: 11px; }
.pallet-faq details div { padding: 0 15px 14px; }
.pallet-faq details a { display: inline-block; margin-block-start: 5px; }
.pallet-return { padding-inline: 15px; border-color: #9ebeae; background: #edf3eb; }
.pallet-return:hover { background: #dce8df; }

@keyframes pallet-enter {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 920px) {
  .pallet-states { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .pallet-hero { grid-template-columns: 1fr; }
  .pallet-illustration { padding-block: 5px 14px; }
  .pallet-scene { width: min(100%, 275px); }
  .pallet-grade-gallery { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .pallet-definitions, .pallet-states, .pallet-offers { grid-template-columns: 1fr; }
  .pallet-state { display: grid; grid-template-columns: minmax(90px, .39fr) minmax(0, 1fr); align-items: stretch; }
  .pallet-state-picture { display: grid; place-items: center; }
  .pallet-state-picture::before { position: absolute; inset: calc(50% + 17px) 16% auto; }
  .sample-box { position: relative; left: -3px; bottom: auto; width: 48px; height: 36px; }
  .pallet-state-copy { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pallet-scene { animation: none; }
}
