/* Category browsing controls: scoped to WooCommerce category archives. */
.ycc-category-browser #page{overflow:clip}
body.ycc-category-browser:not(.ycc-dialog-open){overflow-x:clip;overflow-y:visible}
.ycc-category-browser #secondary{display:none!important}
.ycc-category-browser #primary{float:none;width:100%!important;max-width:100%}
.ycc-category-browser .pharmacy2-sorting .woocommerce-ordering,.ycc-category-browser .pharmacy2-sorting .gridlist-toggle,.ycc-category-browser .pharmacy2-sorting .filter-toggle{display:none!important}
.ycc-cat-toolbar{position:sticky;top:0;z-index:40;display:flex;gap:16px;align-items:center;background:#fff;padding:16px;border:1px solid #dbe4ea;border-radius:8px;box-shadow:0 3px 12px #17354a12;margin:24px 0 12px}
.admin-bar .ycc-cat-toolbar{top:32px}
.ycc-cat-search{display:flex;flex:1;gap:8px;margin:0!important}
.ycc-cat-search input[type=search]{min-width:0;flex:1;width:100%;height:48px;background:#f5f8fa;border:1px solid #aebfcb;border-radius:5px;padding:10px 14px;color:#17354a}
.ycc-cat-toolbar button,.ycc-cat-dialog button,.ycc-cat-diluents>a{font:inherit;line-height:1.4;cursor:pointer;border:1px solid #1775bc;border-radius:5px;background:#1775bc;color:#fff;padding:12px 18px;min-height:46px}
.ycc-cat-buttons{display:flex;gap:10px;width:100%}
.ycc-cat-buttons button{flex:1}
.ycc-cat-buttons button{background:#fff;color:#17354a;border-color:#829dab;min-width:110px;font-weight:600}
.ycc-cat-sort-label{font-size:12px;display:block;font-weight:400}
.ycc-cat-active{font-size:14px;margin:12px 0}
.ycc-cat-active a{margin-left:12px;text-decoration:underline}
.ycc-cat-dialog:not([open]){display:none!important}
.ycc-cat-dialog{position:fixed;inset:0;margin:auto;padding:26px;width:calc(100% - 32px);max-width:570px;max-height:calc(100dvh - 40px);overflow:auto;border:0;border-radius:12px;background:#fff;color:#17354a;box-shadow:0 16px 80px #0004;text-align:left;font-size:16px;line-height:1.6;z-index:10000}
.ycc-cat-dialog::backdrop{background:#102a3fcc}
.ycc-dialog-top{display:flex;gap:16px;align-items:center;justify-content:space-between;margin:0 0 24px}
.ycc-dialog-top h2{font-size:24px!important;line-height:1.25;margin:0!important;color:#17354a}
.ycc-category-browser .ycc-cat-dialog .ycc-dialog-top button[data-ycc-close]{display:inline-flex;align-items:center;justify-content:center;background:#eef4f7!important;color:#17354a!important;border:0;min-width:44px;min-height:44px;font-size:28px;line-height:1;padding:8px;flex-shrink:0;box-shadow:none}
.ycc-category-browser .ycc-cat-dialog .ycc-dialog-top button[data-ycc-close]:hover{background:#dceaf1!important}
.ycc-cat-dialog .ycc-dialog-top{position:sticky;top:-26px;margin:-26px -26px 24px;padding:20px 26px;background:#fff;z-index:2;border-bottom:1px solid #eef2f5}
@media(max-width:767px){.ycc-cat-dialog .ycc-dialog-top{top:-20px;margin:-20px -20px 24px;padding:16px 20px}}
.ycc-cat-dialog form{margin:0!important}
.ycc-cat-dialog fieldset{border:0;padding:0;margin:0 0 24px}
.ycc-cat-dialog legend{font-size:17px;font-weight:700;margin:0 0 8px;padding:0;color:#17354a}
.ycc-cat-dialog .ycc-filter-option{display:flex;gap:12px;align-items:center;min-height:46px;border-bottom:1px solid #eef2f5;padding:8px 0;cursor:pointer;font-size:16px;color:#17354a}
.ycc-filter-option input{width:20px;height:20px;margin:0;flex-shrink:0;accent-color:#1775bc}
.ycc-price-range{display:flex;gap:16px}
.ycc-price-range label{width:50%;display:block}
.ycc-price-range input{width:100%;min-height:44px;margin-top:6px;border:1px solid #aebfcb;background:#fff;border-radius:4px;padding:8px;color:#17354a}
.ycc-dialog-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;padding-top:10px}
.ycc-dialog-actions a{text-decoration:underline}
.ycc-cat-rating{font-size:12px;line-height:1.6;color:#597181;margin:8px 0;min-height:20px}
.ycc-cat-rating .star-rating{float:none!important;display:inline-block;vertical-align:middle;margin:0 6px 0 0}
.ycc-cat-badges{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.ycc-badge{display:inline-block;padding:3px 7px;border-radius:3px;background:#eaf3f9;color:#174f76;font-size:12px;line-height:1.5;font-weight:600}
.ycc-badge-out{background:#f1f1f1;color:#5c5c5c}
.ycc-badge-low{background:#fff3dc;color:#865604}
.ycc-category-browser ul.products li.product .ycc-cat-quick{display:block;position:static!important;float:none!important;opacity:1!important;visibility:visible!important;width:calc(100% - 24px);margin:10px 12px 18px;padding:10px 12px;background:#fff;border:1px solid #1775bc;border-radius:5px;color:#17639b;text-transform:none;font-size:14px;line-height:1.4;cursor:pointer;min-height:42px}
.ycc-quick-dialog{max-width:850px}
.ycc-quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:26px}
.ycc-quick-grid>div>img{width:100%;max-height:330px;object-fit:contain}
.ycc-quick-grid p{margin:0 0 16px!important;font-size:16px;line-height:1.6}
.ycc-quick-sku{font-size:13px!important;color:#597181}
.ycc-quick-details{display:inline-block;margin:16px 0;text-decoration:underline!important;font-weight:600}
.ycc-quick-grid .price{display:block;margin:12px 0}
.ycc-cat-diluents{display:flex;justify-content:space-between;align-items:center;gap:24px;margin:30px 0;padding:24px;background:#eef5fa;border:1px solid #dbe7ef;border-radius:8px}
.ycc-cat-diluents h2{font-size:22px;margin:0 0 8px}
.ycc-cat-diluents p{margin:0}
.ycc-cat-diluents>a{white-space:nowrap;text-align:center}
.ycc-cat-dialog button:focus-visible,.ycc-cat-toolbar button:focus-visible,.ycc-cat-quick:focus-visible,.ycc-cat-dialog a:focus-visible{outline:3px solid #f5b84c;outline-offset:3px}
body.ycc-dialog-open{overflow:hidden}
@media(max-width:767px){
 .ycc-cat-toolbar{flex-wrap:wrap;padding:12px;gap:10px;top:0;margin:16px 0 12px}
 .admin-bar .ycc-cat-toolbar{top:46px}
 .ycc-cat-search{flex-basis:100%;gap:6px}
 .ycc-cat-search button{padding:10px 12px}
 .ycc-cat-buttons{width:100%;gap:10px}
 .ycc-cat-buttons button{flex:1;padding:9px 10px;min-width:0}
 .ycc-cat-dialog{padding:20px;max-height:calc(100dvh - 24px);width:calc(100% - 24px)}
 .ycc-dialog-top h2{font-size:21px!important}
 .ycc-quick-grid{grid-template-columns:1fr;gap:16px}
 .ycc-quick-grid>div>img{height:190px;max-height:190px}
 .ycc-cat-diluents{flex-direction:column;align-items:stretch;padding:20px;gap:16px}
 .ycc-category-browser ul.products li.product .ycc-cat-quick{width:calc(100% - 16px);margin:10px 8px 14px;padding:9px 6px;font-size:13px}
}

/* Ross #58: compact desktop controls aligned to the right; mobile remains full width. */
@media(min-width:768px){
 .ycc-category-browser .ycc-cat-toolbar{flex-wrap:nowrap;justify-content:flex-end}
 .ycc-cat-buttons{width:auto;margin-left:auto;order:2}
 .ycc-cat-buttons button{flex:0 0 auto}
 .ycc-cat-views{flex:0 1 auto!important;order:1;min-width:0}
 .ycc-cat-views button{flex:0 1 auto;min-width:0}
}
/* Ross follow-up: product-group controls and shared course-card design. */
.ycc-cat-toolbar{flex-wrap:wrap}
.ycc-cat-views{display:flex;gap:10px;flex-basis:100%;margin:0!important}
.ycc-cat-views button{flex:1;background:#fff;color:#17354a;border-color:#829dab;font-weight:600}
.ycc-cat-views button.is-active,.ycc-cat-views button:hover,.ycc-cat-views button:focus-visible,.ycc-cat-buttons button:hover,.ycc-cat-buttons button:focus-visible{background:#1775bc;color:#fff;border-color:#1775bc}
.ycc-cat-training{margin:40px 0 20px;padding:32px;background:#eef7fa;border-radius:8px;clear:both}
.ycc-cat-training-label{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#5285a5;margin:0 0 12px}
.ycc-cat-training>h2{font-family:Pharmacy2,sans-serif;font-weight:600;font-size:30px;line-height:1.25;margin:0 0 24px;color:#17354a}
.ycc-cat-course-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.ycc-cat-course{min-width:0}
.ycc-cat-course .elementor{height:100%}
.ycc-cat-course .elementor>.e-con{height:100%}
.ycc-category-browser .term-description details{margin:12px 0 20px}
.ycc-category-browser .term-description summary{cursor:pointer;color:#17639b;text-decoration:underline;font-weight:600}
@media(max-width:767px){
 .ycc-cat-views button{padding:10px 6px;font-size:13px;min-height:46px}
 .ycc-cat-training{margin-top:28px;padding:22px 16px}
 .ycc-cat-training>h2{font-size:25px}
 .ycc-cat-course-grid{grid-template-columns:1fr;gap:18px}
}

/* Prescription action on pharmacy product cards. */
.woocommerce ul.products li.product a.button.my-buy-now-button {
    background: #c4510d !important;
    border-color: #c4510d !important;
    color: #fff !important;
}
.woocommerce ul.products li.product a.button.my-buy-now-button:is(:hover, :focus-visible) {
    background: #a44008 !important;
    border-color: #a44008 !important;
}
