.homepage-editor { max-width: 1320px; margin: 0 auto; }
.homepage-intro { background: #e9f4ef; border: 1px solid #cfdfd6; border-radius: 12px; padding: 22px; margin-bottom: 22px; }
.homepage-intro h2 { margin: 0 0 8px; }
.homepage-intro nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.homepage-intro nav a { background: white; border: 1px solid #cbded5; border-radius: 6px; padding: 7px 10px; text-decoration: none; }
.homepage-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.homepage-actions small, .homepage-slot small { color: var(--muted); }
.homepage-sections { display: grid; gap: 24px; }
.homepage-section { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 22px; scroll-margin-top: 24px; }
.homepage-section.is-target { outline: 3px solid #65a794; outline-offset: 3px; }
.homepage-section.is-hidden { border-style: dashed; background: #fafbfb; }
.homepage-section > header, .homepage-section > header > div { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.homepage-section > header { justify-content: space-between; }
.homepage-section h3 { margin: 0; font-size: 20px; }
.homepage-number { display: inline-grid; place-items: center; width: 36px; height: 36px; color: #fff; background: var(--accent); border-radius: 50%; font-weight: 700; }
.homepage-section fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.homepage-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; margin-top: 20px; }
.homepage-slot { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.homepage-preview { height: 158px; background: #f1f3f3; border-radius: 5px; display: grid; place-items: center; overflow: hidden; }
.homepage-preview img, .homepage-preview video { width: 100%; height: 100%; max-height: 158px; object-fit: contain; }
.homepage-no-media { color: var(--muted); }
.homepage-slot strong { overflow-wrap: anywhere; }
.homepage-slot .homepage-actions { margin-top: auto; }
.homepage-section footer { display: flex; justify-content: space-between; gap: 12px; align-items: center; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.homepage-section footer span { color: var(--muted); }
.homepage-error, .homepage-warning { color: #932c2c; background: #fff2ec; border: 1px solid #efcbbb; padding: 14px; border-radius: 8px; }
.homepage-product-area { margin-top: 24px; }
.homepage-product-area h4 { margin-bottom: 6px; font-size: 17px; }
.homepage-products { list-style: none; padding: 0; max-height: 560px; overflow: auto; border-top: 1px solid var(--line); }
.homepage-product { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); padding: 10px 0; }
.homepage-product > img, .homepage-product-option img { width: 54px; height: 62px; object-fit: contain; flex-shrink: 0; background: #f6f6f6; }
.homepage-product > div:first-of-type { flex: 1; min-width: 0; }
.homepage-product strong { font-weight: 500; overflow-wrap: anywhere; }
.homepage-product small { display: block; color: var(--muted); }
.homepage-product button { padding: 7px 10px; }
.homepage-product-picker { width: min(800px, calc(100vw - 32px)); max-height: calc(100vh - 48px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.homepage-product-picker::backdrop { background: #10282c80; }
.homepage-product-picker [data-results] { min-height: 120px; max-height: 48vh; overflow: auto; margin: 16px 0; }
.homepage-product-option { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); cursor: pointer; }
.homepage-product-option input { width: 18px; height: 18px; flex: 0 0 18px; }
.homepage-product-picker footer { position: sticky; bottom: -24px; background: white; padding: 18px 0; border-top: 1px solid var(--line); margin-top: 16px; }
.homepage-product-picker [data-count] { margin-right: auto; }
@media (max-width: 700px) {
  .homepage-intro, .homepage-section { padding: 16px; }
  .homepage-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .homepage-product { flex-wrap: wrap; }
  .homepage-product .homepage-actions { width: 100%; padding-left: 66px; }
  .homepage-section > header a { margin-left: 48px; }
}
@media (max-width: 450px) { .homepage-media { grid-template-columns: 1fr; } .homepage-product .homepage-actions { padding-left: 0; } }
