/* Option 5 — shop / category / search (template: option5/templates/woocommerce.php). Mockup screen 03. */
body.gl-preset-option5.gl-theme.gl-theme .o5-shop-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:8px 0 18px}
body.gl-preset-option5.gl-theme.gl-theme .o5-shop-head h1{margin:0;font-size:34px;font-weight:700;letter-spacing:-.01em}
body.gl-preset-option5.gl-theme.gl-theme .o5-shop-head p{margin:6px 0 0;color:var(--o5-mut);font-size:15px}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort{display:inline-flex;align-items:center;gap:8px;height:44px;padding:0 6px 0 14px;border:1px solid var(--o5-line2);border-radius:12px;background:var(--o5-surface);color:var(--o5-mut);font-size:14px}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort .woocommerce-ordering{margin:0;float:none}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort select{border:0;background-color:transparent;min-height:40px;height:40px;padding:0 8px;width:auto;font-weight:600;color:var(--gs-x-form-input_text,var(--o5-tx));border-radius:10px}
/* filter bar */
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar{position:relative;margin:0 0 20px}
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd{position:relative}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd[open]>summary{border-color:var(--o5-a3);background:var(--o5-sel);color:#fff}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd[open] .o5-chev{transform:rotate(180deg)}
body.gl-preset-option5.gl-theme.gl-theme .o5-chev{color:var(--o5-mut2);transition:transform .15s}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd-count{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--o5-a2);color:#fff;font-size:11px}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd-panel{position:absolute;z-index:40;top:calc(100% + 8px);left:0;min-width:260px;max-width:min(360px,90vw);max-height:min(70vh,440px);overflow:auto;padding:16px;background:var(--o5-surface);border:1px solid var(--o5-edge-soft);border-radius:var(--o5-r-s);box-shadow:var(--o5-shadow-h)}
body.gl-preset-option5.gl-theme.gl-theme .o5-fset{border:0;margin:0 0 14px;padding:0;min-width:0}
body.gl-preset-option5.gl-theme.gl-theme .o5-fset legend{padding:0 0 8px;font-size:12px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#fff}
body.gl-preset-option5.gl-theme.gl-theme .o5-opts{display:flex;flex-direction:column;gap:2px}
body.gl-preset-option5.gl-theme.gl-theme .o5-opt{display:flex;align-items:center;gap:10px;min-height:38px;padding:0 8px;border-radius:8px;color:var(--o5-tx);font-size:14px;font-weight:500;cursor:pointer}
body.gl-preset-option5.gl-theme.gl-theme .o5-opt:hover{background:rgba(255,255,255,.04)}
body.gl-preset-option5.gl-theme.gl-theme .o5-opt input{flex:none;margin:0}
body.gl-preset-option5.gl-theme.gl-theme .o5-price{display:grid;grid-template-columns:1fr 1fr;gap:10px}
body.gl-preset-option5.gl-theme.gl-theme .o5-price label{display:flex;flex-direction:column;gap:6px;font-size:12px}
body.gl-preset-option5.gl-theme.gl-theme .o5-price input{min-height:44px}
body.gl-preset-option5.gl-theme.gl-theme .o5-note{display:block;margin-top:8px;color:var(--o5-mut2);font-size:12px}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd-foot{position:sticky;bottom:-16px;margin:8px -16px -16px;padding:12px 16px;background:var(--o5-surface);border-top:1px solid var(--o5-divider-soft)}
body.gl-preset-option5.gl-theme.gl-theme .o5-dd-foot .o5-btn{width:100%}
body.gl-preset-option5.gl-theme.gl-theme .o5-links{list-style:none;margin:0;padding:0}
body.gl-preset-option5.gl-theme.gl-theme .o5-links a{display:block;padding:9px 8px;border-radius:8px;color:var(--o5-tx);text-decoration:none;font-size:14px}
body.gl-preset-option5.gl-theme.gl-theme .o5-links a:hover{background:rgba(255,255,255,.04)}
body.gl-preset-option5.gl-theme.gl-theme .o5-chip--on svg{color:var(--o5-mut)}
body.gl-preset-option5.gl-theme.gl-theme .o5-clear{margin-inline-start:4px;color:var(--o5-link);font-size:13px;font-weight:600;text-decoration:none}
body.gl-preset-option5.gl-theme.gl-theme .o5-clear:hover{text-decoration:underline}
/* results */
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-result-count{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-products-header,body.gl-preset-option5.gl-theme.gl-theme .o5-catalog h1.page-title,body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-breadcrumb{display:none}
body.gl-preset-option5.gl-theme.gl-theme .o5-loadmore{display:flex;flex-direction:column;align-items:center;gap:10px;margin:28px 0 0}
body.gl-preset-option5.gl-theme.gl-theme .o5-loadmore .o5-btn{min-width:160px}
body.gl-preset-option5.gl-theme.gl-theme .o5-loadmore-msg{margin:0;color:var(--o5-mut2);font-size:13px}
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-pagination{margin:28px 0 0}
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-pagination.o5-pagination-armed{display:none}
body.gl-preset-option5.gl-theme.gl-theme .woocommerce-pagination ul{display:flex;gap:6px;justify-content:center;list-style:none;padding:0;margin:0;border:0}
body.gl-preset-option5.gl-theme.gl-theme .woocommerce-pagination li{border:0;float:none}
body.gl-preset-option5.gl-theme.gl-theme .woocommerce-pagination .page-numbers{display:grid;place-items:center;min-width:42px;height:42px;padding:0 10px;border-radius:10px;border:1px solid var(--o5-border-soft);background:var(--o5-surface);color:var(--o5-mut);text-decoration:none}
body.gl-preset-option5.gl-theme.gl-theme .woocommerce-pagination .page-numbers.current{background:var(--o5-grad);color:#fff;border-color:var(--o5-a3)}
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-info{margin:0}
@media(max-width:600px){
  body.gl-preset-option5.gl-theme.gl-theme .o5-shop-head h1{font-size:28px}
  body.gl-preset-option5.gl-theme.gl-theme .o5-shop-head{align-items:stretch;flex-direction:column;gap:14px}
  body.gl-preset-option5.gl-theme.gl-theme .o5-sort{align-self:flex-start}
  body.gl-preset-option5.gl-theme.gl-theme .o5-dd{position:static}
  body.gl-preset-option5.gl-theme.gl-theme .o5-dd-panel{left:0;right:0;max-width:none;min-width:0}
}
body.gl-preset-option5.gl-theme.gl-theme #main.o5-woo{padding-top:0;padding-bottom:0}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort select{-webkit-appearance:none;appearance:none;border:0;box-shadow:none;background-color:transparent;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2.5 4.5 6 8l3.5-3.5' fill='none' stroke='%23A9AFBA' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;padding:0 28px 0 4px;min-height:42px;height:42px;font-size:14px;cursor:pointer}
body.gl-preset-option5.gl-theme.gl-theme .o5-catalog .woocommerce-pagination{background:transparent;border:0;box-shadow:none;padding:0}

body.gl-preset-option5.gl-theme.gl-theme .o5-rc-ext{display:contents}
body.gl-preset-option5.gl-theme.gl-theme .o5-rc-ext>*{max-width:100%}

/* Approved 2.0.0 component geometry; scoped against legacy important rules. */
@layer gl-o5-force {
@media(max-width:600px){
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row>.o5-dd{min-width:0!important;position:static!important}
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row>.o5-dd>summary{display:flex!important;align-items:center!important;justify-content:space-between!important;width:100%!important;min-width:0!important;box-sizing:border-box!important;gap:5px!important}
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row>.o5-dd-panel{grid-column:1/-1}
body.gl-preset-option5.gl-theme.gl-theme .o5-fbar-row>.o5-clear{grid-column:1/-1}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort{align-self:stretch!important}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort .woocommerce-ordering{flex:1;min-width:0}
body.gl-preset-option5.gl-theme.gl-theme .o5-sort select{width:100%!important}
}
}

/* 2.0.22.38 — keep Price popover inside the filter bar on narrow tablets.
 * Phones retain their existing full-width panel; wider screens retain the chip anchor. */
@media (min-width:601px) and (max-width:767px){
  body.gl-preset-option5.gl-theme.gl-theme .o5-fbar #o5-dd-price{position:static}
  body.gl-preset-option5.gl-theme.gl-theme .o5-fbar #o5-dd-price>.o5-dd-panel{left:auto;right:0;min-width:0;width:260px;max-width:100%;box-sizing:border-box}
}
