/* Shared Materials & Finishes section ported from magnetic-gift-boxes. */
#paper-materials[hidden],
#materials-finishing[hidden] {
  display: none !important;
}

#paper-materials.cosm-material-finishes {
  --cosm-ink: #0b2a1f;
  --cosm-dark: #062116;
  --cosm-gold: #c49a3c;
  --cosm-muted: #4f625c;
  --cosm-anchor-nav-height: var(--gb-anchor-nav-height, 48px);
  --cosm-section-padding-y: clamp(2.4rem, 4vw, 4rem);
  position: relative;
  box-sizing: border-box;
  scroll-margin-top: calc(var(--site-header-height, 65px) + var(--cosm-anchor-nav-height) - var(--cosm-section-padding-y));
  padding: var(--cosm-section-padding-y) 0;
  background:
    radial-gradient(circle at 50% 0, rgba(255, 255, 255, .96), rgba(255, 255, 255, 0) 34rem),
    linear-gradient(180deg, #fcfaf5 0%, #f9f5ec 100%);
  color: var(--cosm-ink);
}

#paper-materials.cosm-material-finishes *,
#paper-materials.cosm-material-finishes *::before,
#paper-materials.cosm-material-finishes *::after {
  box-sizing: border-box;
}

#paper-materials .cosm-container {
  width: min(100%, 1440px);
  margin: 0 auto;
  padding: 0 32px;
}

#paper-materials .cosm-section__head {
  max-width: 1040px;
  margin: 0 auto clamp(2rem, 3.4vw, 2.8rem);
  text-align: center;
}

#paper-materials .cosm-eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1.4rem;
  margin-bottom: .85rem;
  color: var(--cosm-gold);
  font-size: .68rem !important;
  font-weight: 800;
  letter-spacing: .22em;
  line-height: 1.1;
  text-transform: uppercase;
}

#paper-materials .cosm-eyebrow::before,
#paper-materials .cosm-eyebrow::after {
  content: "";
  width: 52px;
  height: 1px;
  background: currentColor;
  opacity: .7;
}

#paper-materials .cosm-section__head h2 {
  margin: 0;
  color: var(--cosm-dark);
  font-size: 36px !important;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: 0;
  text-align: center;
  text-wrap: balance;
}

#paper-materials .cosm-section__head p {
  max-width: 980px;
  margin: 1rem auto 0;
  color: var(--cosm-muted);
  font-size: 16px !important;
  line-height: 1.7;
  text-align: center;
}

#paper-materials .cosm-icon {
  display: inline-flex;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border: 0;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

#paper-materials .cosm-icon::before,
#paper-materials .cosm-icon::after {
  display: none;
}

#paper-materials .cosm-icon--cube { background-image: url('/assets/svg/icon-cube.svg'); }
#paper-materials .cosm-icon--spark { background-image: url('/assets/svg/icon-spark.svg'); }
#paper-materials .cosm-icon--print { background-image: url('/assets/svg/icon-print.svg'); }

.cosm-mf-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.14fr) minmax(0, 1fr);
  gap: clamp(1rem, 1.7vw, 1.5rem);
  align-items: stretch;
}

.cosm-mf-panel {
  min-width: 0;
  padding: clamp(1.15rem, 1.8vw, 1.65rem);
  border: 1px solid rgba(196, 154, 60, .22);
  border-radius: 22px;
  background: rgba(255, 253, 249, .9);
  box-shadow: 0 14px 34px rgba(15, 35, 24, .065);
}

.cosm-mf-panel__head {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 40px;
  margin-bottom: 1.1rem;
}

.cosm-mf-panel__head > .cosm-icon {
  width: 36px !important;
  height: 36px !important;
}

.cosm-mf-panel__head h3 {
  flex: 0 0 auto;
  margin: 0;
  color: var(--cosm-dark);
  font-size: 22px !important;
  font-weight: 800;
  line-height: 1.15;
}

.cosm-mf-panel__line {
  height: 1px;
  flex: 1 1 auto;
  min-width: 32px;
  background: linear-gradient(90deg, rgba(196, 154, 60, .68), rgba(196, 154, 60, .25));
}

.cosm-mf-material-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: .8rem;
  height: calc(100% - 57px);
}

.cosm-mf-material-card {
  display: grid;
  grid-template-columns: minmax(112px, 40%) minmax(0, 1fr);
  min-height: 184px;
  overflow: hidden;
  border: 1px solid rgba(15, 35, 24, .1);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 7px 18px rgba(15, 35, 24, .045);
  color: inherit;
  text-decoration: none;
  transition: border-color .22s ease, box-shadow .22s ease;
}

.cosm-mf-material-card:focus-visible {
  outline: 3px solid rgba(196, 154, 60, .48);
  outline-offset: 3px;
}

.cosm-mf-material-card > img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 184px;
  object-fit: cover;
  background: #eee8de;
  filter: saturate(.72) sepia(.04);
  transition: transform .45s cubic-bezier(.25, .8, .25, 1), filter .3s ease;
}

.cosm-mf-material-card > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 1rem .95rem;
}

.cosm-mf-material-card h4 {
  margin: 0 0 .55rem;
  color: var(--cosm-dark);
  font-size: 16px !important;
  font-weight: 800;
  line-height: 1.25;
}

.cosm-mf-material-card p {
  margin: 0;
  color: var(--cosm-muted);
  font-size: 13px !important;
  font-weight: 500;
  line-height: 1.52;
}

.cosm-mf-right {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: clamp(1rem, 1.7vw, 1.5rem);
  min-width: 0;
}

.cosm-mf-finishes {
  display: flex;
  flex-direction: column;
  scroll-margin-top: calc(var(--site-header-height, 65px) + var(--cosm-anchor-nav-height));
}

.cosm-mf-finish-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: .8rem;
  flex: 1 1 auto;
}

.cosm-mf-finish-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(15, 35, 24, .1);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(15, 35, 24, .045);
  transition: border-color .22s ease, box-shadow .22s ease;
}

.cosm-mf-finish-card img {
  display: block;
  width: 100%;
  height: 112px;
  flex: 1 1 auto;
  min-height: 96px;
  object-fit: cover;
  background: #eee8de;
  filter: saturate(.74) sepia(.025);
  transition: transform .45s cubic-bezier(.25, .8, .25, 1), filter .3s ease;
}

.cosm-mf-finish-card h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  margin: 0;
  padding: .5rem .42rem;
  color: var(--cosm-dark);
  font-size: 14px !important;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
}

.cosm-mf-print-support > p {
  margin: -.25rem 0 1rem;
  color: var(--cosm-muted);
  font-size: 14px !important;
  line-height: 1.55;
}

.cosm-mf-support-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cosm-mf-support-list li {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 64px;
  padding: .58rem .55rem;
  border: 1px solid rgba(196, 154, 60, .13);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(196, 154, 60, .09), rgba(246, 239, 228, .62));
  color: var(--cosm-dark);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: left;
}

@media (hover: hover) {
  .cosm-mf-material-card:hover,
  .cosm-mf-finish-card:hover {
    border-color: rgba(196, 154, 60, .4);
    box-shadow: 0 10px 24px rgba(15, 35, 24, .075);
  }

  .cosm-mf-material-card:hover > img,
  .cosm-mf-finish-card:hover img {
    transform: scale(1.035);
    filter: saturate(.9);
  }
}

@media (max-width: 1180px) {
  .cosm-mf-layout { grid-template-columns: 1fr; }
  .cosm-mf-material-grid { height: auto; }
  .cosm-mf-right { grid-template-columns: 1fr; grid-template-rows: auto; }
  .cosm-mf-finish-card img { height: 126px; }
}

@media (max-width: 760px) {
  #paper-materials.cosm-material-finishes { padding: 2.2rem 0; }
  #paper-materials .cosm-container { padding: 0 20px; }
  #paper-materials .cosm-section__head { margin-bottom: 1.6rem; }
  #paper-materials .cosm-section__head h2 { font-size: 30px !important; }
  .cosm-mf-panel { padding: 1rem; border-radius: 16px; }
  .cosm-mf-panel__head { gap: .65rem; }
  .cosm-mf-panel__head > .cosm-icon { width: 32px !important; height: 32px !important; }
  .cosm-mf-panel__head h3 { font-size: 19px !important; }
  .cosm-mf-material-grid,
  .cosm-mf-finish-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cosm-mf-material-card { display: flex; flex-direction: column; min-height: 0; }
  .cosm-mf-material-card > img { height: 142px; min-height: 142px; }
  .cosm-mf-material-card > div { display: block; padding: .9rem; }
  .cosm-mf-material-card h4 { font-size: 15px !important; }
  .cosm-mf-material-card p { font-size: 12.5px !important; }
  .cosm-mf-finish-grid { grid-template-rows: auto; }
  .cosm-mf-finish-card img { height: 128px; min-height: 128px; }
  .cosm-mf-support-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  #paper-materials .cosm-container { padding: 0 16px; }
  #paper-materials .cosm-section__head h2 { font-size: 27px !important; }
  #paper-materials .cosm-section__head p { font-size: 14px !important; }
  #paper-materials .cosm-eyebrow { gap: .8rem; }
  #paper-materials .cosm-eyebrow::before,
  #paper-materials .cosm-eyebrow::after { width: 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .cosm-mf-material-card,
  .cosm-mf-material-card > img,
  .cosm-mf-finish-card,
  .cosm-mf-finish-card img { transition: none; }
}

/* These product pages use a single quote CTA without background photography. */
#inquiry .inquiry-actions--single {
  margin-bottom: 0;
}
