/* SavorIP 4.3 product studio and workspace correction layer. */

/* Savori portrait: show the complete figure instead of enlarging and cropping it. */
.savori-mini-card {
  display: grid !important;
  grid-template-columns: minmax(180px, 42%) minmax(0, 1fr) !important;
  min-height: 330px !important;
  align-items: stretch !important;
  overflow: hidden;
  isolation: isolate;
}
.savori-mini-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(circle at 25% 30%, rgba(231,191,109,.28), transparent 36%);
}
.savori-mini-card img {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 300px;
  padding: 16px 4px 0 10px;
  align-self: end;
  object-fit: contain !important;
  object-position: center bottom !important;
  opacity: .96 !important;
}
.savori-mini-card div {
  position: relative;
  align-self: center;
  width: auto !important;
  margin: 22px 22px 22px 0 !important;
}

.products-hero { grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); }
.product-hero-card {
  min-height: 260px;
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-content: center;
  align-items: center;
  border: 1px solid rgba(231,191,109,.30);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 70% 15%, rgba(231,191,109,.20), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.015));
  box-shadow: var(--shadow);
}
.product-hero-card span {
  min-height: 72px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px solid rgba(231,191,109,.25);
  border-radius: 16px;
  color: var(--ivory-50);
  background: rgba(2,26,20,.72);
  font-weight: 800;
  text-align: center;
}
.product-hero-card i { color: var(--gold-400); font-size: 24px; font-style: normal; font-weight: 900; }
.product-hero-card strong {
  grid-column: 1 / -1;
  padding-top: 12px;
  color: var(--gold-300);
  font-family: var(--serif);
  font-size: clamp(19px,2vw,27px);
  text-align: center;
}

.product-studio-layout {
  padding-block: 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr);
  gap: 24px;
  align-items: start;
}
.product-preview-panel,
.product-selector-panel,
.product-cart-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--ivory-50);
  box-shadow: var(--shadow-soft);
}
.product-preview-panel { padding: 30px; }
.product-selector-panel { position: sticky; top: calc(var(--header-h) + 22px); padding: 28px; }
.product-source-toolbar {
  margin: 22px 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.product-source-toolbar button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(11,51,40,.18);
  border-radius: 999px;
  color: #17362c;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.product-source-toolbar button.is-active { color: #fff; background: #0b3328; border-color: #0b3328; }
.product-source-toolbar > span { margin-left: auto; color: #6a776f; font-size: 11px; font-weight: 700; }
.product-canvas-wrap {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(11,51,40,.14);
  border-radius: 22px;
  background: #ece7dc;
}
#productCanvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  background: #f7f2e7;
  touch-action: none;
}
.product-canvas-note {
  position: absolute;
  inset: auto 12px 12px;
  padding: 9px 12px;
  color: rgba(255,255,255,.88);
  background: rgba(2,26,20,.78);
  border-radius: 11px;
  font-size: 10px;
  line-height: 1.45;
  backdrop-filter: blur(8px);
}
.product-placement-controls {
  margin-top: 16px;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr)) 100px;
  gap: 14px;
  border: 1px solid rgba(11,51,40,.12);
  border-radius: 18px;
  background: #fff;
}
.product-placement-controls label { display: grid; gap: 7px; color: #4f5d56; font-size: 11px; font-weight: 800; }
.product-placement-controls output { justify-self: end; margin-top: -26px; color: #8b6b2c; }
.product-placement-controls input[type="range"] { width: 100%; accent-color: #0b3328; }
.product-placement-controls input[type="color"] { width: 100%; height: 34px; padding: 2px; border: 1px solid #d5cdbd; border-radius: 9px; background: #fff; }
.product-preview-actions { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 9px; }
.product-preview-actions > * { flex: 1 1 170px; }

.product-grid {
  margin-top: 20px;
  max-height: 580px;
  padding-right: 4px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px;
  overflow-y: auto;
}
.product-choice {
  position: relative;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(11,51,40,.13);
  border-radius: 16px;
  color: #17362c;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.product-choice:hover { transform: translateY(-2px); border-color: #b88e3d; box-shadow: 0 12px 26px rgba(24,49,39,.10); }
.product-choice.is-active { border: 2px solid #0b3328; box-shadow: 0 0 0 3px rgba(231,191,109,.28); }
.product-choice img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; padding: 5px; background: #f6f1e8; }
.product-choice span { display: block; padding: 10px 10px 2px; font-size: 12px; font-weight: 850; }
.product-choice small { display: block; padding: 0 10px 11px; color: #7b877f; font-size: 9px; }
.product-spec-card {
  margin-top: 14px;
  padding: 16px;
  display: grid;
  gap: 9px;
  border: 1px solid rgba(11,51,40,.13);
  border-radius: 16px;
  color: #45544d;
  background: #fff;
  font-size: 11px;
}
.product-spec-card strong { color: #17362c; font-family: var(--serif); font-size: 22px; }
.product-spec-card dl { margin: 0; display: grid; grid-template-columns: 96px 1fr; gap: 7px 10px; }
.product-spec-card dt { color: #876a31; font-weight: 850; }
.product-spec-card dd { margin: 0; overflow-wrap: anywhere; }

.product-pdf-section {
  padding: 64px 0;
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(360px,.75fr);
  gap: 34px;
  align-items: start;
}
.product-pdf-copy { padding: 24px 10px 20px 0; }
.product-pdf-copy h2 { margin: 0; max-width: 760px; color: #17362c; font-family: var(--serif); font-size: clamp(35px,4.6vw,62px); line-height: 1.14; letter-spacing: -.04em; }
.product-pdf-copy > p { max-width: 720px; color: #617069; }
.product-pdf-copy ul { padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; list-style: none; }
.product-pdf-copy li { padding: 12px 14px; border: 1px solid rgba(11,51,40,.12); border-radius: 12px; color: #425249; background: #fff; font-size: 11px; font-weight: 750; }
.product-cart-card { padding: 24px; }
.product-cart-head,
.product-cart-total { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.product-cart-head { padding-bottom: 13px; border-bottom: 1px solid rgba(11,51,40,.12); }
.product-cart-head span { color: #876a31; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.product-cart-head strong { color: #17362c; }
.product-cart-list { min-height: 100px; max-height: 360px; padding: 12px 0; overflow-y: auto; }
.product-cart-list > p { color: #7b877f; font-size: 12px; }
.product-cart-item { padding: 9px; display: grid; grid-template-columns: 60px 1fr auto; gap: 10px; align-items: center; border-bottom: 1px solid rgba(11,51,40,.08); }
.product-cart-item img { width: 60px; height: 48px; object-fit: cover; border-radius: 9px; background: #eee8dc; }
.product-cart-item strong { display: block; color: #17362c; font-size: 12px; }
.product-cart-item small { display: block; color: #79857e; font-size: 9px; }
.product-cart-item button { width: 30px; height: 30px; border-radius: 50%; color: #7c2c2c; background: #f8e9e6; cursor: pointer; }
.product-cart-total { padding: 15px 0; border-top: 1px solid rgba(11,51,40,.12); }
.product-cart-total strong { color: #17362c; font-family: var(--serif); font-size: 26px; }
.product-cart-card .rights-check { margin: 4px 0 14px; }
.fine-note { margin: 12px 0 0; color: #7b877f; font-size: 9px; line-height: 1.6; }

.maker-match-section { padding: 58px 0 74px; }
.maker-match-grid { margin-top: 25px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.maker-card { min-height: 210px; padding: 22px; display: flex; flex-direction: column; border: 1px solid rgba(11,51,40,.14); border-radius: 20px; background: #fff; box-shadow: var(--shadow-soft); }
.maker-card span { color: #876a31; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.maker-card h3 { margin: 10px 0 8px; color: #17362c; font-family: var(--serif); font-size: 25px; line-height: 1.2; }
.maker-card p { margin: 0; color: #607069; font-size: 11px; line-height: 1.65; }
.maker-card ul { margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; list-style: none; }
.maker-card li { padding: 5px 8px; border-radius: 999px; color: #43544b; background: #eef0e8; font-size: 9px; font-weight: 750; }
.maker-card button { margin-top: auto; padding-top: 18px; color: #0b3328; background: transparent; text-align: left; font-size: 11px; font-weight: 900; cursor: pointer; }

@media (max-width: 980px) {
  .products-hero,
  .product-studio-layout,
  .product-pdf-section { grid-template-columns: 1fr; }
  .product-selector-panel { position: static; }
  .product-grid { max-height: none; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .product-placement-controls { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .savori-mini-card { min-height: 300px !important; }
}

@media (max-width: 720px) {
  .savori-mini-card {
    grid-template-columns: 1fr !important;
    min-height: 0 !important;
  }
  .savori-mini-card img {
    width: min(70%, 280px) !important;
    height: 255px !important;
    min-height: 0;
    margin: 0 auto;
    padding: 10px 4px 0;
  }
  .savori-mini-card div {
    margin: 0 12px 12px !important;
    padding: 14px !important;
  }
  .savori-mini-card strong { font-size: 15px !important; }
  .product-hero-card { min-height: 210px; padding: 20px 14px; gap: 8px; }
  .product-hero-card span { min-height: 58px; padding: 7px; font-size: 10px; }
  .product-hero-card i { font-size: 17px; }
  .product-studio-layout { width: min(100% - 20px, 620px); padding-block: 34px; gap: 13px; }
  .product-preview-panel,
  .product-selector-panel,
  .product-cart-card { padding: 17px 14px; border-radius: 20px; }
  .product-source-toolbar > span { width: 100%; margin-left: 0; }
  .product-canvas-note { position: static; border-radius: 0; font-size: 9px; }
  .product-placement-controls { grid-template-columns: 1fr; padding: 14px; }
  .product-preview-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .product-preview-actions > * { min-width: 0; }
  .product-preview-actions .dark-action { grid-column: 1 / -1; }
  .product-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .product-spec-card dl { grid-template-columns: 82px 1fr; }
  .product-pdf-section { width: min(100% - 24px,620px); padding: 38px 0 48px; gap: 15px; }
  .product-pdf-copy { padding: 0; }
  .product-pdf-copy h2 { font-size: 34px; }
  .product-pdf-copy ul { grid-template-columns: 1fr; }
  .maker-match-section { width: min(100% - 24px,620px); padding: 40px 0 55px; }
  .maker-match-grid { grid-template-columns: 1fr; gap: 10px; }
  .maker-card { min-height: 185px; padding: 18px; }
}

@media (max-width: 390px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-choice span { font-size: 11px; }
  .product-preview-actions { grid-template-columns: 1fr; }
  .product-preview-actions .dark-action { grid-column: auto; }
}

.product-choice em {
  display: inline-flex;
  align-items: center;
  margin: 10px 10px 2px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(11,51,40,.10);
  color: #0b3328;
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
}
.product-choice .product-choice-hint {
  display: block;
  padding-top: 0;
  color: #506057;
  font-size: 10px;
  line-height: 1.35;
}
.product-spec-preview {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(245,240,231,.96));
  border: 1px solid rgba(184,142,61,.22);
}
.product-spec-preview img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 12px;
  background: #f5f1e8;
}
.product-spec-preview p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #42564e;
}
.product-spec-preview p b {
  display: block;
  margin-bottom: 4px;
  color: #17362c;
}
