.shop {
  --studio-line: #d6e0d7;
  --studio-ink: #183a2e;
  --studio-muted: #52695e;
  color: var(--studio-ink);
  max-width: 1440px;
  margin-inline: auto;
}
.shop [hidden] { display: none !important; }
.shop h1, .shop h2, .shop p, .shop dl, .shop dd { margin: 0; }
.shop button, .shop select, .shop input { font: inherit; }
.shop-header, .shop-add-actions, .shop-save, .shop-view, .shop-colors, .shop-photo-actions {
  display: flex;
  align-items: center;
}
.shop-header { justify-content: space-between; flex-wrap: wrap; gap: 15px; margin-bottom: 25px; }
.shop-header h1 { font-size: clamp(1.85rem, 3vw, 2.65rem); letter-spacing: -.052em; line-height: 1.12; }
.shop-add-actions, .shop-save { gap: 8px; flex-wrap: wrap; }
.shop-add-actions .button { display: inline-flex; gap: 6px; align-items: center; }
.shop-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(290px, .85fr); gap: clamp(14px, 2vw, 27px); align-items: start; }
.shop-studio-column { display: grid; gap: 16px; min-width: 0; }
.shop-studio, .shop-controls, .shop-reference, .shop-empty {
  border-radius: 16px;
  border: 1px solid var(--studio-line);
  background: #fff;
  overflow: hidden;
}
.shop-studio { background: #eff3ed; }
.shop-studio-top { display: flex; align-items: flex-start; gap: 10px; justify-content: space-between; flex-wrap: wrap; padding: clamp(17px, 2.4vw, 34px) clamp(17px, 2.4vw, 34px) 8px; }
.shop-groupline { color: #4c6756; font-size: .74rem; font-weight: 650; }
.shop-studio-top h2 { font-size: clamp(1.25rem, 2.4vw, 2rem); letter-spacing: -.05em; line-height: 1.15; margin: 5px 0 0; overflow-wrap: anywhere; }
.shop-trim { font-size: .83rem; color: var(--studio-muted); padding-top: 4px; }
.shop-view { white-space: nowrap; border: 1px solid #d3ded4; border-radius: 20px; background: #f8faf7; padding: 3px; gap: 2px; }
.shop-view button { font-size: .76rem; font-weight: 600; color: #445f50; border: 0; background: transparent; border-radius: 20px; padding: 7px 11px; line-height: 1; }
.shop-view button[aria-pressed="true"] { background: #2e5543; color: white; }
.shop-stage {
  display: grid;
  align-items: end;
  height: clamp(205px, 23vw, 355px);
  position: relative;
  isolation: isolate;
  padding: 10px 6% clamp(22px, 2vw, 30px);
  background: radial-gradient(ellipse at 50% 78%, #f8faf4 0%, #eff3ed00 70%);
}
.shop-stage::before { content: ''; position: absolute; inset: auto 5% clamp(21px, 2vw, 29px); height: 1px; background: linear-gradient(90deg,transparent,#9baa9d 14%,#9baa9d 86%,transparent); z-index: -1; }
.shop-stage-car { width: 100%; height: 100%; min-height: 0; position: relative; }
.shop-stage-car > svg { display: block; position: absolute; inset: auto 0 0; width: 100%; height: 100%; overflow: visible; }
.shop-measures { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; padding: 16px clamp(17px, 2.4vw, 34px); border-top: 1px solid #d9e2d7; background: #fafcf8; }
.shop-measures > div { padding-inline: 14%; border-left: 1px solid var(--studio-line); }
.shop-measures > div:first-child { padding-left: 0; border: 0; }
.shop-measures dt { font-size: .72rem; color: var(--studio-muted); font-weight: 570; }
.shop-measures dd { margin: 2px 0 0; color: #213d30; font-size: clamp(.98rem, 1.55vw, 1.33rem); font-weight: 640; white-space: nowrap; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.shop-measures dd.shop-no-height { white-space: normal; font-size: .83rem; letter-spacing: 0; }
.shop-coverage { background: #fafcf8; color: var(--studio-muted); font-size: .72rem; padding: 0 clamp(17px, 2.4vw, 34px) 14px; }
.shop-reference, .shop-controls, .shop-empty { padding: clamp(17px, 2vw, 26px); }
.shop-reference h2, .shop-controls h2, .shop-empty h2 { font-size: 1.14rem; line-height: 1.25; letter-spacing: -.03em; }
.shop-reference-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0 10px; }
.shop-match-wheel, .shop-drop { position: relative; aspect-ratio: 1.9 / 1; min-height: 166px; border-radius: 10px; }
.shop-match-wheel { padding: 10px 12px 7px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; background: #eef1ef; color: #446051; }
.shop-wheel-closeup { flex: 1; align-self: stretch; position: relative; min-height: 96px; }
.shop-wheel-closeup > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.shop-match-wheel > span { font-size: .72rem; font-weight: 650; }
.shop-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 12px; background: #f8faf7; border: 1.5px dashed #a9bbaa; text-align: center; }
.shop-drop:focus-visible, .shop-dragging { outline: 2px solid #437753; outline-offset: 2px; }
.shop-drop.shop-dragging { background: #e2eedb; }
.shop-reference-empty { display: grid; justify-items: center; gap: 3px; font-size: .76rem; color: var(--studio-muted); }
.shop-reference-empty strong { color: var(--studio-ink); font-size: .86rem; margin-top: 3px; }
.shop-file-button, .shop-photo-actions button, .shop-save > button:not(.primary) {
  color: #2e5843; font-size: .79rem; line-height: 1.32; font-weight: 600; border: 0; background: none; padding: 3px; cursor: pointer;
}
.shop-file-button { position: relative; color: #254935; display: inline-flex; align-items: center; border: 1px solid #cad6cb; border-radius: 6px; background: white; padding: 5px 9px; overflow: hidden; }
.shop-file-button input, .shop-color-custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.shop-file-button:focus-within, .shop-color-custom:focus-within { outline: 2px solid #416c4b; outline-offset: 2px; }
.shop-photo-actions { justify-content: center; gap: 6px; flex-wrap: wrap; }
.shop-photo-wrap { position: absolute; display: flex; justify-content: center; align-items: center; inset: 7px 7px 43px; }
.shop-photo-wrap img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; width: auto; height: auto; cursor: crosshair; }
.shop-photo-wrap:not([hidden]) + .shop-photo-actions { position: absolute; bottom: 7px; left: 0; right: 0; }
.shop-reference > p, .shop-save-status { font-size: .76rem; color: var(--studio-muted); line-height: 1.5; }
.shop-reference .shop-error:not(:empty) { padding-top: 4px; color: #405f48; }
.shop-controls { display: grid; gap: 18px; }
.shop-selector, .shop-controls fieldset, .shop-slider label { margin: 0; }
.shop-controls section { display: grid; gap: 16px; border-top: 1px solid var(--studio-line); padding-top: 18px; }
.shop-selector { display: grid; gap: 5px; }
.shop-controls legend, .shop-selector > span, .shop-slider label {
  font-size: .81rem; line-height: 1.4; color: #385443; font-weight: 600; padding: 0;
}
.shop-selector select { width: 100%; border: 1px solid #b5c8bb; border-radius: 7px; color: #244334; background-color: #fff; padding: 9px 27px 9px 10px; font-size: .85rem; text-overflow: ellipsis; }
.shop-controls fieldset { min-width: 0; border: 0; padding: 0; }
.shop-colors { gap: clamp(4px,.6vw,9px); flex-wrap: wrap; padding: 6px 2px 2px; }
.shop-colors button, .shop-color-custom { position: relative; flex: 0 0 25px; height: 25px; width: 25px; border-radius: 50%; padding: 0; border: 1px solid #0002; background: var(--chip); }
.shop-colors button[aria-pressed="true"] { box-shadow: 0 0 0 2px white, 0 0 0 3.5px #365a44; }
.shop-color-custom { display: grid; place-items: center; border: 1px dashed #8ba591; background: white; color: #41654b; font-size: 1.05rem; line-height: 1; cursor: pointer; }
.shop-slider { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 8px; align-items: center; }
.shop-slider input[type="range"] { grid-column: 1 / -1; width: 100%; min-width: 0; height: 16px; margin: 0; padding: 0; background: transparent; accent-color: #477051; cursor: pointer; }
.shop-number { display: flex; gap: 3px; align-items: center; font-variant-numeric: tabular-nums; font-size: .8rem; background: #f8faf7; border: 1px solid #d9e2d8; border-radius: 5px; padding: 1px 5px; }
.shop-number input { padding: 0; min-height: 23px; width: 5.3ch; border: 0; color: var(--studio-ink); text-align: right; background: transparent; font-weight: 600; appearance: textfield; -moz-appearance: textfield; }
.shop-number input::-webkit-inner-spin-button, .shop-number input::-webkit-outer-spin-button { display: none; }
.shop-number span { color: #627469; font-size: .72rem; }
.shop-patterns > div { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 4px; margin-top: 7px; }
.shop-patterns button { display: grid; min-width: 0; justify-items: center; align-content: start; gap: 4px; border-radius: 7px; padding: 6px 1px; border: 1px solid #d8e1d9; color: #4b6053; background: #fafbf9; }
.shop-patterns button[aria-pressed="true"] { background: #edf5e9; border-color: #6c8e70; box-shadow: inset 0 0 0 .5px #6c8e70; color: #254b32; }
.shop-patterns button svg { width: clamp(23px,2.5vw,34px); height: auto; }
.shop-patterns button span { font-size: .66rem; font-weight: 600; line-height: 1.2; }
.shop-advanced summary { cursor: pointer; color: #3e5f47; font-size: .82rem; font-weight: 600; }
.shop-advanced > .shop-slider { margin-top: 12px; }
.shop-lip, .shop-lip-color { display: flex; align-items: center; gap: 7px; width: fit-content; margin-top: 12px; font-size: .81rem; color: #385443; }
.shop-lip input { margin: 0; width: 15px; height: 15px; accent-color: #477051; }
.shop-lip-color input { width: 36px; height: 25px; padding: 1px; border: 1px solid var(--studio-line); border-radius: 4px; }
.shop-save { padding-top: 14px; border-top: 1px solid var(--studio-line); }
.shop-save > .primary { flex: 1; justify-content: center; }
.shop-save > button:not(.primary) { padding-inline: 8px; }
.shop-save-status { margin-top: -12px !important; }
.shop-save-status:empty { display: none; }
.shop-empty { display: flex; align-items: center; gap: clamp(18px,3vw,48px); padding: clamp(24px,4vw,62px); background: linear-gradient(115deg,#e9efe6, #f8faf6 80%); }
.shop-empty-wheel { width: clamp(76px,11vw,150px); flex-shrink: 0; filter: drop-shadow(0 5px 3px #223c242b); }
.shop-empty h2 { font-size: clamp(1.3rem,2.3vw,1.9rem); }
.shop-empty p { color: var(--studio-muted); margin: 7px 0 18px; }
.shop-mini { display: none; }
@media (max-width: 830px) {
  .shop-layout { grid-template-columns: minmax(0,1.2fr) minmax(270px,.9fr); gap: 12px; }
  .shop-stage { height: clamp(160px,24vw,205px); }
  .shop-reference-pair { gap: 8px; }
  .shop-match-wheel, .shop-drop { min-height: 151px; }
}
@media (max-width: 680px) {
  .shop { padding-bottom: 62px; }
  .shop-layout { display: flex; flex-direction: column; }
  .shop-studio-column { display: contents; }
  .shop-studio, .shop-controls, .shop-reference { width: 100%; }
  .shop-studio { order: 0; }
  .shop-reference { order: 1; }
  .shop-controls { order: 2; }
  .shop-stage { height: clamp(149px,39vw,235px); }
  .shop-header { margin-bottom: 16px; }
  .shop-empty { align-items: flex-start; }
  .shop-empty-wheel { width: 62px; }
  .shop-drop { padding: 7px; }
  .shop-patterns button { padding: 8px 1px; }
  .shop-patterns button svg { width: 33px; }
  .shop-patterns button span { font-size: .72rem; }
  .shop-mini { display: flex; align-items: center; gap: 6px; position: fixed; z-index: 6; right: 13px; bottom: max(10px,env(safe-area-inset-bottom)); border: 1px solid #bdcdbf; border-radius: 10px; box-shadow: 0 3px 16px #1b302b29; background: #f5f8f3; color: #426c50; padding: 5px 7px; }
  .shop-mini span { display: grid; place-items: center; height: 38px; }
  .shop-mini [data-mini-car] { width: 97px; }
  .shop-mini [data-mini-wheel], .shop-mini-photo { width: 38px; }
  .shop-mini svg, .shop-mini-photo img { width: 100%; height: 100%; object-fit: contain; }
}
.shop-material-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:14px 0 22px}
.shop-stage[data-stage-light]{box-shadow:inset 0 -2px 0 #54717045;background:radial-gradient(ellipse at 54% 100%,#b5c6c6 0%,#e5ece7 40%,#f0f3ed 74%)}
.shop-stage[data-stage-light="studio"]{background:linear-gradient(130deg,transparent 25%,#fff6d580 31%,transparent 38%),radial-gradient(ellipse at 48% 105%,#b2aea0,#d9d5c9 46%,#e8e6df 75%);}
.shop-stage[data-stage-light="night"]{background:radial-gradient(ellipse at 48% 115%,#768da4 0%,#35495b 38%,#122332 80%);}
