/* Category page tools (class-category-tools.php): sub-category chips, sort and maker menus, the "other categories"
   strip and the optional second banner image. Nothing here applies until a shop switches a tool on. Colours follow
   the theme palette (EM_Theme_Palette) so each shop's theme sets the look. */

/* Second banner image: two photos side by side in the hero's picture area. */
.em-category-page .em-category-featured.em-category-featured-pair{display:grid;grid-template-columns:1fr 1fr;gap:12px;overflow:visible;background:transparent}
.em-category-page .em-category-featured-pair img{min-height:0;border-radius:13px}

/* Toolbar: chips on the left, menus on the right, wrapping on narrow screens. */
.em-category-tools{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:14px 24px;margin:0 0 22px}
.em-chips{display:flex;flex-wrap:wrap;gap:8px;min-width:0}
.em-category-page a.em-chip{display:inline-flex;align-items:center;min-height:36px;box-sizing:border-box;padding:7px 16px;border:1px solid var(--em-line,#e3dbe9);border-radius:999px;background:#fff;color:var(--em-charcoal,#2f2a2d);font-size:14px;font-weight:600;line-height:1.2;text-decoration:none;transition:background .15s,border-color .15s,color .15s}
.em-category-page a.em-chip:hover{border-color:var(--em-purple,#76528d);color:var(--em-purple,#76528d)}
.em-category-page a.em-chip[aria-current=true]{border-color:var(--em-purple,#76528d);background:var(--em-purple,#76528d);color:#fff}
.em-category-page a.em-chip:focus-visible,.em-filter-field select:focus-visible{outline:2px solid var(--em-purple,#76528d);outline-offset:2px}

.em-category-filter{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:0 0 0 auto}
.em-filter-field{display:inline-flex;align-items:center;gap:8px;margin:0;font-size:13.5px;font-weight:600;color:var(--em-sub,#625961)}
.em-category-page .em-filter-field select{min-height:38px;max-width:220px;padding:6px 34px 6px 12px;border:1px solid var(--em-line,#e3dbe9);border-radius:10px;background-color:#fff;color:var(--em-charcoal,#2f2a2d);font-size:14px;font-weight:500;cursor:pointer}
.em-filter-apply{min-height:38px;padding:6px 16px;border:1px solid var(--em-purple,#76528d);border-radius:999px;background:#fff;color:var(--em-purple,#76528d);font-weight:700;cursor:pointer}
/* The script applies changes straight away, so the button is only for browsers without JavaScript. */
.em-js .em-filter-apply{display:none}

/* While new products load in place. */
.em-category-section.em-is-loading .em-category-products,.em-category-section.em-is-loading .em-filter-none{opacity:.45;transition:opacity .15s}
.em-filter-none{padding:28px 0;color:var(--em-sub,#625961)}
.em-filter-none a{font-weight:700;color:var(--em-purple,#76528d)}

/* Other top-level categories, at the end of the page. */
.em-other-categories{margin:48px 0 10px;padding-top:30px;border-top:1px solid var(--em-line,#e3dbe9)}
.em-other-categories h2{margin:0 0 18px;font-family:'DM Serif Display',Georgia,serif;font-weight:400;font-size:clamp(24px,2.6vw,32px);line-height:1.15;color:var(--em-charcoal,#2f2a2d)}
.em-other-categories-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:16px}
.em-other-category{display:flex;flex-direction:column;overflow:hidden;border:1px solid var(--em-line,#e3dbe9);border-radius:14px;background:#fff;color:var(--em-charcoal,#2f2a2d);text-decoration:none;transition:transform .2s ease,box-shadow .2s ease}
.em-other-category:hover{transform:translateY(-3px);box-shadow:0 10px 24px rgba(0,0,0,.08)}
.em-other-category-picture{display:flex;align-items:center;justify-content:center;aspect-ratio:4/3;background:var(--em-paper,#faf8fc);overflow:hidden}
.em-other-category-picture img{display:block;width:100%;height:100%;object-fit:cover}
.em-other-category-name{padding:12px 14px;font-weight:700;font-size:15px}

@media(max-width:600px){
 .em-category-tools{gap:12px}
 .em-chips{flex-wrap:nowrap;overflow-x:auto;margin:0 -15px;padding:0 15px 4px;scrollbar-width:none}
 .em-chips::-webkit-scrollbar{display:none}
 .em-category-page a.em-chip{flex:0 0 auto;min-height:34px;padding:6px 14px;font-size:13px}
 .em-category-filter{display:grid;grid-template-columns:repeat(auto-fit,minmax(0,1fr));gap:10px;width:100%;margin:0}
 .em-filter-field{flex-direction:column;align-items:stretch;gap:4px;min-width:0;font-size:12.5px}
 .em-category-page .em-filter-field select{width:100%;max-width:none}
 .em-other-categories-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
}
@media(prefers-reduced-motion:reduce){.em-category-page a.em-chip,.em-other-category{transition:none}.em-other-category:hover{transform:none}}
