.admin-tabs { overflow: visible; flex-wrap: wrap; }
.admin-tabs .admin-tab { flex: 0 0 auto; white-space: nowrap; }
.home-photo-current { display: flex; align-items: center; gap: 20px; padding: 20px; margin-bottom: 24px; border: 1px solid var(--theme-line); border-radius: 18px; background: var(--brand-surface); }
.home-photo-current > img { width: 120px; height: 140px; flex: 0 0 auto; object-fit: contain; background: var(--paper); border-radius: 12px; }
.home-photo-current > img[hidden], .hero-brand-photo img[hidden], .home-opening-loading[hidden], #featured-slide-image[hidden] { display: none; }
.hero-brand-photo { position: relative; }
.home-opening-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--soft); font-size: 14px; text-align: center; }
.hero-brand-photo[aria-busy="true"] .home-opening-loading::before { content: ''; width: 20px; height: 20px; border: 2px solid var(--theme-line); border-top-color: var(--rose); border-radius: 50%; animation: action-spin .8s linear infinite; position: absolute; top: calc(50% - 42px); }
@media (prefers-reduced-motion: reduce) { .hero-brand-photo[aria-busy="true"] .home-opening-loading::before { animation: none; } }
.home-photo-current strong { display: block; font-size: 18px; color: var(--ink); overflow-wrap: anywhere; }
.home-photo-current p { margin: 7px 0 0; font-size: 14px; line-height: 1.5; color: var(--soft); }
.photo-placement-picker { display: grid; grid-template-columns: auto auto; align-items: center; justify-content: start; gap: 20px; min-width: 0; padding: 0; border: 0; margin: 0 0 20px; }
.photo-placement-picker > span { font-size: 14px; font-weight: 600; color: var(--ink); }
.photo-placement-picker > div { display: flex; align-items: center; gap: 18px; }
.photo-placement-picker label { display: flex; align-items: center; gap: 8px; min-height: 40px; margin: 0; font-size: 14px; white-space: nowrap; cursor: pointer; }
body .photo-placement-picker input[type="radio"] { appearance: none; -webkit-appearance: none; position: relative; flex: 0 0 18px; width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; border: 1px solid var(--rose); border-radius: 50%; background: var(--paper); box-shadow: none; cursor: pointer; }
body .photo-placement-picker input[type="radio"]:checked { background: var(--paper); border-color: var(--rose); }
.photo-placement-picker input:checked::after { content: ''; position: absolute; left: 4px; top: 4px; width: 8px; height: 8px; border: 0; border-radius: 50%; background: var(--rose); }
body .photo-placement-picker input[type="radio"]:not(:checked):hover { background: var(--brand-surface); }
.photo-placement-picker input:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.photo-placement-picker input:disabled, .photo-placement-picker label:has(input:disabled) { cursor: progress; }
@media (max-width: 600px) {
  .photo-placement-picker { grid-template-columns: minmax(0,1fr) auto; gap: 12px; }
  .photo-placement-picker > div { flex-direction: column; align-items: flex-start; gap: 0; }
}
.order-photo { position: relative; aspect-ratio: auto; padding: 0; border: 0; overflow: hidden; border-radius: 24px; background: transparent; }
.order-photo:has(img[hidden]) { aspect-ratio: 4 / 5; }
.order-photo img { display: block; width: 100%; height: auto; border-radius: 24px; }
.order-photo img[hidden], .order-photo-loading[hidden] { display: none; }
.order-photo-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: var(--soft); font-size: 14px; }
.home-photo-current .section-kicker { margin: 0 0 8px; color: var(--rose); }
.home-photo-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 18px; margin-bottom: 20px; }
.home-photo-tools > label { grid-column: 1 / -1; grid-row: 1; }
.home-photo-tools > [role="group"] { grid-column: 1; grid-row: 2; }
.home-photo-tools [role="group"] { display: flex; flex-wrap: wrap; gap: 10px; }
.home-photo-tools > #add-home-photo { grid-column: 2; grid-row: 2; justify-self: end; }
.home-photo-tools > #add-home-photo[hidden] { display: none; }
.home-photo-tools [data-home-source] { min-height: 48px; padding: 12px 22px; font-size: 15px; font-weight: 600; }
.home-photo-filter-section { display: contents; }
.home-photo-filter-section[hidden], #home-photo-filter-content[hidden] { display: none; }
.home-filters-toggle { display: inline-flex; grid-column: 2; grid-row: 2; justify-self: end; align-items: center; justify-content: center; width: auto; min-height: 40px; gap: 10px; padding: 8px 16px; font-size: 14px; }
.home-filters-toggle .filter-chevron { display: inline-block; transition: transform .18s ease; }
.home-filters-toggle[aria-expanded="true"] .filter-chevron { transform: rotate(180deg); }
#home-photo-filter-content { grid-column: 1 / -1; grid-row: 3; padding-top: 16px; }
@media (max-width: 760px) {
  .home-photo-tools { grid-template-columns: minmax(0,1fr); }
  .home-photo-tools > #add-home-photo, .home-filters-toggle { grid-column: 1; grid-row: 3; }
  #home-photo-filter-content { grid-row: 4; }
}
.home-photo-tools .filters { margin: 0; }
.home-photo-tools .search-select input { border: 0; border-radius: 11px 0 0 11px; background: transparent; padding: 0 14px; }
.home-quick-heading { margin: 20px 0 12px; color: var(--ink); font-size: 14px; font-weight: 600; }
#home-quick-filters { display: flex; flex-wrap: wrap; gap: 10px; }
#home-quick-filters button { min-height: 44px; padding: 10px 18px; font-size: 14px; }
.home-photo-tools label { display: grid; gap: 7px; font-size: 14px; }
.home-photo-tools input, #home-photo-form input { width: 100%; min-width: 0; border: 1px solid var(--theme-line); border-radius: 12px; background: var(--paper); padding: 12px 14px; }
.home-photo-results { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.home-photo-results p { margin: 0; font-size: 14px; }
.home-photo-results .gallery-pagination { margin: 0; }
.home-photo-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
.home-photo-grid article { position: relative; min-width: 0; }
.home-photo-grid .admin-empty-state { grid-column: 1 / -1; }
.home-photo-option { position: relative; display: flex; flex-direction: column; width: 100%; height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; box-shadow: none; }
.home-photo-option img { display: block; width: 100%; aspect-ratio: var(--portfolio-ratio, 4 / 3); object-fit: cover; border-radius: 14px; }
.home-photo-option > .home-photo-title { padding: 10px 0 0; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.home-photo-check { position: absolute; top: 10px; left: 10px; z-index: 1; display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid var(--rose); border-radius: 50%; background: var(--paper); color: var(--rose); cursor: pointer; }
.home-photo-check svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.home-photo-check[aria-pressed="true"] { background: var(--rose); color: #fff; }
.home-photo-check[aria-pressed="true"] svg { opacity: 1; }
.home-photo-check:hover { background: var(--brand-surface); color: var(--rose); }
body .home-photo-check[aria-busy="true"] { display: grid; place-items: center; gap: 0; cursor: progress; }
.home-photo-option small { margin: auto 12px 12px; padding: 4px 9px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 11px; }
body .home-photo-remove { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 8px; border-radius: 50%; border: 1px solid #e8b6b6; color: #943e43; background: var(--paper); cursor: pointer; }
body .home-photo-remove:hover { background: #fbe5e5; }
.home-photo-selection { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin: 0 0 20px; padding: 18px; border: 1px solid var(--theme-line); border-radius: 16px; background: var(--brand-surface); }
.home-photo-selection p { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.home-photo-selection .admin-action-error { flex-basis: 100%; }
.home-upload-preview { width: 100%; max-height: 280px; object-fit: contain; border-radius: 12px; background: var(--brand-surface); }
.home-upload-preview[hidden], .home-upload-error[hidden] { display: none; }
.home-upload-error { color: #943e43; font-size: 14px; margin: 0; }
/* Featured photos are shown in full; gallery thumbnails keep their framing. */
.featured-carousel .hero-photo { aspect-ratio: 1; background: var(--brand-surface); border: 0; }
.featured-carousel .featured-open { display: flex; align-items: center; justify-content: center; }
.featured-carousel .featured-open img { width: auto; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: auto; object-fit: contain; object-position: center; border-radius: 16px; transform: none; }
@media (max-width: 760px) {
  .home-photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .home-photo-current { padding: 16px; gap: 14px; }
  .home-photo-current > img { width: 88px; height: 110px; }
  .home-photo-current strong { font-size: 16px; }
  .home-photo-results { gap: 8px; }
  .home-photo-selection { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 600px) {
  .admin-tabs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .admin-tabs .admin-tab { min-width: 0; white-space: normal; padding: 12px 8px; }
}
