/* Full public category browser: the same contained-photo treatment as Explore.
   The admin emoji/configuration controls and all service actions are untouched. */
.marketplace-home .marketplace-all-services .category-icon-grid {
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  align-items:start;
  gap:24px 12px;
}
.marketplace-home .marketplace-all-services .category-icon-box {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  justify-content:flex-start;
  gap:7px;
  width:100%;
  height:auto;
  min-width:0;
  max-width:100%;
  min-height:111px;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
  color:#0f0f0f;
  box-shadow:none;
  transform:none;
  filter:none;
}
.marketplace-home .marketplace-all-services .category-icon-box::before,
.marketplace-home .marketplace-all-services .category-icon-box::after { display:none; }
.marketplace-home .marketplace-all-services .category-icon-box strong {
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:32px;
  margin:0;
  padding:0;
  color:#0f0f0f;
  font-size:12px;
  font-weight:500;
  line-height:16px;
  letter-spacing:normal;
  text-align:center;
  white-space:normal;
  overflow:visible;
  overflow-wrap:anywhere;
  text-overflow:clip;
  -webkit-line-clamp:unset;
}
.marketplace-home .marketplace-all-services .service-category-photo {
  display:grid;
  place-items:center;
  width:100%;
  height:72px;
  min-height:72px;
  padding:6px;
  border:0;
  border-radius:8px;
  background:#f5f5f5;
  color:#a3a3a3;
  box-shadow:none;
  overflow:hidden;
  flex-shrink:0;
}
.marketplace-home .marketplace-all-services .service-category-photo img {
  display:block;
  width:80px;
  height:60px;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  object-fit:contain;
  mix-blend-mode:multiply;
  box-shadow:none;
  transform:none;
}
.marketplace-home .marketplace-all-services .service-category-photo-placeholder {
  width:32px;
  height:26px;
  color:#a3a3a3;
}
.marketplace-home .marketplace-all-services .category-icon-box:hover .service-category-photo { background:#eee; }
.marketplace-home .marketplace-all-services .category-icon-box:focus-visible { outline:3px solid #6e42e5; outline-offset:4px; border-radius:8px; }
@media(max-width:620px) {
  .marketplace-home .marketplace-all-services .category-icon-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px 12px; }
  .marketplace-home .marketplace-all-services .category-icon-box { min-height:103px; }
  .marketplace-home .marketplace-all-services .service-category-photo { height:64px; min-height:64px; padding:8px; }
  .marketplace-home .marketplace-all-services .service-category-photo img { width:64px; height:48px; }
}

.marketplace-home .marketplace-all-services .category-group-panel { box-shadow:none; }


/* Photo accents for existing discovery controls. Inputs, labels, values and
   action attributes remain owned by the existing marketplace forms. */
.category-suggestions > button > .service-category-photo,
.nearby-category-card > .service-category-photo,
.provider-category-picker .provider-category-option > .service-category-photo {
  display:grid;
  place-items:center;
  width:56px;
  height:48px;
  min-width:56px;
  padding:4px;
  border:0;
  border-radius:6px;
  background:#f5f5f5;
  color:#a3a3a3;
  box-shadow:none;
  overflow:hidden;
  flex:0 0 56px;
}
.category-suggestions > button > .service-category-photo img,
.nearby-category-card > .service-category-photo img,
.provider-category-picker .provider-category-option > .service-category-photo img {
  display:block;
  width:48px;
  height:40px;
  max-width:100%;
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  object-fit:contain;
  box-shadow:none;
  mix-blend-mode:multiply;
}
.category-suggestions > button > .service-category-photo svg,
.nearby-category-card > .service-category-photo svg,
.provider-category-picker .provider-category-option > .service-category-photo svg { width:26px; height:22px; }
.category-suggestions > button { min-height:64px; }
.category-suggestions > button > span:not(.service-category-photo) { flex:1; min-width:0; overflow-wrap:anywhere; }
.nearby-category-card > .service-category-photo { grid-row:span 2; }
.provider-category-picker .provider-category-option { min-width:0; min-height:56px; padding:8px 10px; gap:8px; }
.provider-category-picker .provider-category-option > input { flex:0 0 17px; }
.provider-category-picker .provider-category-option > .service-category-photo { width:44px; min-width:44px; height:40px; flex-basis:44px; }
.provider-category-picker .provider-category-option > .service-category-photo img { width:36px; height:32px; }
.provider-category-picker .provider-category-option > span:not(.service-category-photo) { flex:1; min-width:0; overflow-wrap:anywhere; }
@media(max-width:760px) {
  .nearby-category-grid:has(.service-category-photo) { grid-template-columns:minmax(0,1fr); }
}
/* Long service names must not impose the native select's intrinsic minimum on
   its parent grid; the select stays a normal text-only platform control. */
.category-select-shell { min-width:0; max-width:100%; grid-template-columns:minmax(0,1fr); }
.category-select-shell > .category-search-control { min-width:0; max-width:100%; }
.category-select-shell > select { width:100%; min-width:0; max-width:100%; }

/* Native disclosures preserve the full catalogue by opening all groups first.
   Search can reveal a matching closed group without changing its category data. */
.marketplace-home .marketplace-all-services details.category-group-panel { display:block; }
.marketplace-home .marketplace-all-services details.category-group-panel > summary.category-group-head {
  display:flex;
  align-items:center;
  min-height:44px;
  width:100%;
  margin:0;
  padding:0;
  gap:12px;
  list-style:none;
  cursor:pointer;
  border-radius:6px;
}
.marketplace-home .marketplace-all-services details.category-group-panel[open] > summary.category-group-head { margin-bottom:16px; }
.marketplace-home .marketplace-all-services summary.category-group-head::-webkit-details-marker { display:none; }
.marketplace-home .marketplace-all-services summary.category-group-head::marker { content:""; }
.marketplace-home .marketplace-all-services summary.category-group-head::after {
  content:"";
  width:8px;
  height:8px;
  margin:0 5px 0 auto;
  border-right:2px solid #545454;
  border-bottom:2px solid #545454;
  transform:rotate(45deg);
  flex:0 0 8px;
}
.marketplace-home .marketplace-all-services details[open] > summary.category-group-head::after { transform:rotate(225deg); }
.marketplace-home .marketplace-all-services summary.category-group-head > div { min-width:0; }
.marketplace-home .marketplace-all-services summary.category-group-head:focus-visible { outline:3px solid #6e42e5; outline-offset:4px; }
@media(prefers-reduced-motion:reduce) {
  .marketplace-home .marketplace-all-services details.category-group-panel,
  .marketplace-home .marketplace-all-services summary.category-group-head::after { transition:none; animation:none; }
}

/* Approved shared service/category thumbnail standard: 8:5 cover crops.
   Existing original assets, logos, avatars and hero imagery remain unchanged. */
body .marketplace-home {
  --service-thumbnail-ratio: 8 / 5;
  --service-thumbnail-radius: 12px;
}
body .marketplace-home .marketplace-category-grid,
body .marketplace-home .marketplace-all-services .category-icon-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
  align-items: start;
}
body .marketplace-home .marketplace-category-image,
body .marketplace-home .marketplace-all-services .service-category-photo {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: var(--service-thumbnail-ratio);
  padding: 0;
  border: 0;
  border-radius: var(--service-thumbnail-radius);
  overflow: hidden;
  background: #f5f5f5;
}
body .marketplace-home .marketplace-category-image > img,
body .marketplace-home .marketplace-all-services .service-category-photo > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  object-position: 50% 50%;
  mix-blend-mode: normal;
  transform: none;
}
body .marketplace-home .marketplace-service-photo > img {
  width: 100%;
  height: auto;
  aspect-ratio: var(--service-thumbnail-ratio);
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: var(--service-thumbnail-radius);
}
/* Image-specific focal points retain faces and the work in progress.
   These only reposition the displayed crop; source bytes are unchanged. */
body .marketplace-home :is(.marketplace-category-image,.service-category-photo,.marketplace-service-photo) > img:is(
  [src$="/carpentry.webp"],[src$="/assemble-furniture.webp"],
  [src$="/wardrobe-assembly.webp"],[src$="/tv-mounting.webp"],
  [src$="/shelf-mounting.webp"],[src$="/hang-pictures.webp"],[src$="/wall-mounting.webp"]
) { object-position: 50% 25%; }
body .marketplace-home :is(.marketplace-category-image,.service-category-photo) > img:is(
  [src$="/gardening.webp"],[src$="/couch-assembly.webp"]
) { object-position: 50% 30%; }
body .marketplace-home .service-category-photo > img[src$="/ikea-furniture-assembly.webp"] { object-position: 50% 20%; }
body .marketplace-home .service-category-photo > img[src$="/disassemble-furniture.webp"] { object-position: 50% 40%; }
body .marketplace-home .service-category-photo > img:is(
  [src$="/dresser-assembly.webp"],[src$="/blinds-and-curtain-installation.webp"],[src$="/heavy-lifting.webp"]
) { object-position: 50% 0%; }
body .marketplace-home .service-category-photo > img:is(
  [src$="/furniture-movers.webp"]
) { object-position: 50% 10%; }
body .marketplace-home .service-category-photo > img[src$="/packing-and-moving-services.webp"] { object-position: 50% 20%; }
body .marketplace-home .service-category-photo > img[src$="/truck-assisted-moving.webp"] { object-position: 50% 25%; }
body .marketplace-home .service-category-photo > img:is(
  [src$="/full-service-movers.webp"],[src$="/unpacking-services.webp"],
  [src$="/furniture-removal.webp"],[src$="/delivery.webp"]
) { object-position: 50% 15%; }
body .marketplace-home .service-category-photo > img[src$="/move-furniture-up-downstairs.webp"] { object-position: 50% 0%; }
body .marketplace-home .marketplace-category-tile,
body .marketplace-home .marketplace-all-services .category-icon-box {
  min-height: 0;
  gap: 10px;
  align-items: stretch;
}
body .marketplace-home .marketplace-category-tile > span:last-child,
body .marketplace-home .marketplace-all-services .category-icon-box > strong {
  width: 100%;
  min-height: 40px;
  font-size: 14px;
  line-height: 20px;
  text-align: left;
  overflow-wrap: normal;
}
@media (max-width: 720px) {
  body .marketplace-home .marketplace-category-grid,
  body .marketplace-home .marketplace-all-services .category-icon-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 16px;
  }
}
@media (max-width: 620px) {
  body .marketplace-home { --service-thumbnail-radius: 10px; }
  body .marketplace-home .marketplace-category-tile > span:last-child,
  body .marketplace-home .marketplace-all-services .category-icon-box > strong {
    min-height: 36px;
    font-size: 13px;
    line-height: 18px;
  }
}
