@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;500;600;700;800&display=swap');

.bcd { --red: #ad1717; --ink: #292a2c; --line: #dedfe1; --shade: #f5f5f5; color: var(--ink); background: white; font: 500 16px/1.6 Raleway, Arial, sans-serif; }
.bcd *, .bcd *::before, .bcd *::after { box-sizing: border-box; }
.bcd [hidden] { display: none !important; }
.bcd h2 { color: var(--ink); font-family: inherit; font-weight: 800; }
.bcd a { color: var(--red); }
.bcd button, .bcd input, .bcd textarea { font: inherit; }
.bcd :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.bcd-heading, .bcd-controls, .bcd-actions { display: flex; align-items: center; gap: 10px; }
.bcd-heading { justify-content: space-between; margin-bottom: 12px; }
.bcd-heading h2 { padding: 0; }
.bcd-icon, .bcd-button { cursor: pointer; min-width: 44px; min-height: 44px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); }
.bcd-button { background: var(--red); color: white; font-weight: 700; }
.bcd-icon:disabled { opacity: .42; cursor: default; }
.bcd-track, .bcd-grid { display: grid; gap: 16px; padding: 4px; }
.bcd-track { grid-auto-flow: column; grid-auto-columns: minmax(0, calc((100% - 32px) / 3)); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 4px; }
.bcd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bcd .bcd-card { display: flex; flex-direction: column; min-width: 0; padding: 5px; background: white; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); text-decoration: none; scroll-snap-align: start; }
.bcd .bcd-card:hover { border-color: var(--red); }
.bcd-card img { display: block; width: 100%; aspect-ratio: 4 / 3; height: auto; object-fit: cover; border-radius: 8px; background: var(--shade); }
.bcd-card strong { padding: 9px 10px 0; font-size: 1.15rem; }
.bcd-card span { padding: 0 10px 8px; color: var(--red); }

.bcd-panel { max-width: 1000px; margin-inline: auto; }
.bcd-editor { display: grid; gap: 15px; }
.bcd-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bcd-editor label { display: block; font-weight: 700; }
.bcd-editor input:not([type=radio]):not([type=checkbox]), .bcd-editor textarea { display: block; width: 100%; padding: 8px; border: 1px solid #aeb0b2; border-radius: 6px; background: #fff; color: var(--ink); }
.bcd-editor fieldset { padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.bcd-photo-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.bcd-photo-list > div { padding: 8px; background: var(--shade); border-radius: 7px; }
.bcd-photo-list img { display: block; width: 100%; height: 110px; object-fit: contain; }
.bcd-photo-list label { font-size: .88rem; font-weight: 600; }
.bcd-notice { background: var(--shade); padding: 9px 12px; overflow-wrap: anywhere; }
.bcd-actions { flex-wrap: wrap; }
.bcd-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.bcd-detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(235px, 1fr); gap: clamp(16px, 4vw, 42px); }
.bcd-back { font-weight: 700; }
.bcd-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-content: start; gap: 10px; }
.bcd-gallery a { display: block; background: var(--shade); border-radius: 9px; overflow: hidden; }
.bcd-gallery img { display: block; width: 100%; height: 100%; object-fit: contain; }
.bcd-main-photo { grid-column: 1 / -1; height: clamp(240px, 52vw, 590px); }
.bcd-extra-photo { aspect-ratio: 4 / 3; }
.bcd-info dt { font-weight: 700; }
.bcd-info dd { margin: 0 0 9px; }
.bcd .bcd-lightbox { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 12px clamp(8px, 3vw, 30px); border: 0; color: #fff; background: #151515; font: inherit; }
.bcd-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 10px; }
.bcd-lightbox::backdrop { background: #151515; }
.bcd-lightbox header, .bcd-lightbox footer { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.bcd-lightbox footer { justify-content: center; flex-wrap: wrap; }
.bcd-lightbox img { width: 100%; height: 100%; min-height: 0; display: block; object-fit: contain; touch-action: pan-y pinch-zoom; }
.bcd-lightbox [data-bcd-count] { min-width: 48px; text-align: center; }

@media (max-width: 900px) {
  .bcd-track { grid-auto-columns: minmax(0, calc((100% - 16px) / 2)); }
  .bcd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .bcd-grid, .bcd-detail-grid, .bcd-fields { grid-template-columns: minmax(0, 1fr); }
  .bcd-track { grid-auto-columns: minmax(0, 100%); }
  .bcd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
