/* Categories appear before individual services; selected hairstyles have category portraits. */
.category-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:28px 0}
.browse-card{position:relative;text-align:left;padding:28px 60px 28px 26px;min-height:120px;background:#fff;border:1px solid var(--line);border-radius:7px;display:flex;flex-direction:column;justify-content:center;gap:10px;transition:border-color .15s,background .15s}
.browse-card:hover{background:var(--soft);border-color:var(--accent)}
.browse-title{font-size:22px;font-weight:600;letter-spacing:-.025em;line-height:1.3}
.browse-price{font-size:15px;font-weight:700;color:#73564b;line-height:1.3}
.browse-description{font-size:13px;line-height:1.6;color:var(--muted)}
.browse-arrow{position:absolute;right:24px;top:50%;transform:translateY(-50%);font-size:25px}
.top-level-categories .browse-card{min-height:180px}
.top-level-categories .browse-title{font-size:29px}
.catalogue-breadcrumb{display:flex;align-items:center;flex-wrap:wrap;gap:9px;margin:4px 0 27px;font-size:12px;color:var(--muted)}
.catalogue-breadcrumb button{padding:7px 0;border:0;background:transparent;text-decoration:underline;font-size:inherit}
.catalogue-breadcrumb [aria-current=page]{color:var(--ink)}
#catalogueStatus{margin:18px 0}
#serviceList .search{max-width:640px;margin-top:8px}
#serviceList .service-card{padding:24px}
#serviceList .service-card h3{font-size:18px;line-height:1.4}
#serviceList .service-card .meta{padding-bottom:12px}
.deposit-note{font-size:12px;margin:0 0 16px;line-height:1.6}
.service-sections{display:grid;gap:32px}
.service-section h2{font-size:21px;margin:12px 0 16px}
#serviceList .service-card .service-photo{display:block!important;width:calc(100% + 48px);aspect-ratio:3/4;object-fit:cover;object-position:center 35%;margin:-24px -24px 18px;border-radius:6px 6px 0 0;background:#f3f0eb}

nav .book-link{display:inline-flex!important;white-space:nowrap}
@media(max-width:850px){.category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top-level-categories{grid-template-columns:repeat(3,minmax(0,1fr))}.top-level-categories .browse-card{padding:22px 40px 22px 20px}.top-level-categories .browse-title{font-size:23px}.browse-arrow{right:16px}}
@media(max-width:600px){header{align-items:center;flex-wrap:wrap}nav{gap:12px;flex-wrap:wrap}nav .book-link{padding:7px 10px}.category-grid,.top-level-categories{grid-template-columns:1fr;gap:12px;margin-top:22px}.browse-card,.top-level-categories .browse-card{min-height:102px;padding:22px 55px 22px 22px}.top-level-categories .browse-title{font-size:25px}.browse-title{font-size:21px}.browse-arrow{right:22px}.catalogue-breadcrumb{gap:7px;font-size:11px}}

/* Selected hairstyle portraits belong to category choices. */
.browse-content{display:flex;flex-direction:column;gap:10px}
#catalogue .browse-card.has-category-photo{display:grid;grid-template-columns:minmax(110px,42%) minmax(0,1fr);align-items:stretch;justify-content:normal;gap:0;padding:0;overflow:hidden;min-height:216px}
#catalogue .browse-card img.category-photo{display:block!important;width:100%;height:216px;object-fit:contain;object-position:center;background:#f3f0eb;border-radius:6px 0 0 6px}
.browse-card.has-category-photo .browse-content{align-self:center;padding:20px 20px 40px}
.browse-card.has-category-photo .browse-title{font-size:20px;overflow-wrap:normal}
.browse-card.has-category-photo .browse-arrow{top:auto;bottom:16px;right:20px;transform:none}
@media(max-width:600px){
  #catalogue .browse-card.has-category-photo{grid-template-columns:minmax(120px,40%) minmax(0,1fr);min-height:228px}
  #catalogue .browse-card img.category-photo{height:228px}
  .browse-card.has-category-photo .browse-title{font-size:21px}
}

/* Show only the photographic area of the two supplied screenshots. */
#catalogue .category-photo-frame{display:grid;place-items:center;height:216px;min-width:0;width:100%;overflow:hidden;background:#f3f0eb;border-radius:6px 0 0 6px}
#catalogue .category-photo-window{position:relative;display:block;width:100%;max-width:144px;aspect-ratio:707/1060;overflow:hidden}
#catalogue .browse-card img.category-screenshot{position:absolute;display:block;width:100%;height:auto;max-width:none;left:0;top:-22.45283019%;margin:0;border-radius:0}
@media(max-width:600px){
 #catalogue .category-photo-frame{height:228px}
 #catalogue .category-photo-window{max-width:152px}
}

/* Display only the photograph between the controls in the Twists screenshot. */
#catalogue .browse-card[data-category="twists"] .category-photo-window{aspect-ratio:707/1070}
#catalogue .browse-card[data-category="twists"] img.category-screenshot{top:-17.75700935%}

/* Show the single main Stitch Braids photo, excluding screenshot controls and the second photo. */
#catalogue .browse-card[data-category="stitch braids"] .category-photo-window{aspect-ratio:707/996}
#catalogue .browse-card[data-category="stitch braids"] img.category-screenshot{top:-23.4939759%}

/* Keep category portraits centred when descriptions increase card height. */
#catalogue .browse-card.has-category-photo > img.category-photo, #catalogue .browse-card.has-category-photo > .category-photo-frame{align-self:center}
