/*
 * Empty search / empty catalogue page.
 * Loaded on search, shop and product taxonomy pages (inc/wge-search-empty.php).
 */

.wge-empty {
    max-width: 900px;
    margin: 0 auto;
    padding: 8px 0 48px;
}

.wge-empty__head {
    margin: 0 0 32px;
}

.wge-empty__title {
    margin: 0 0 8px;
    font-size: clamp(22px, 3.2vw, 30px);
    line-height: 1.2;
}

.wge-empty__term {
    color: var(--gbl-primary-color, #a12324);
}

.wge-empty__lead,
.wge-empty__suggestion {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

.wge-empty__suggestion a {
    color: var(--gbl-primary-color, #a12324);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.wge-empty__section {
    margin: 0 0 36px;
}

.wge-empty__heading {
    margin: 0 0 14px;
    font-size: 18px;
    line-height: 1.25;
}

/* --- Popular searches --------------------------------------------------- */
.wge-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wge-chips__item {
    margin: 0;
    padding: 0;
}

.wge-chips__item::before {
    content: none;
}

.wge-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 7px;
    padding: 8px 14px;
    border: 1px solid #dcdcdc;
    border-radius: 999px;
    background: #fff;
    color: inherit;
    font-size: 14px;
    line-height: 1.2;
    text-decoration: none;
    transition: border-color .15s ease-in-out, color .15s ease-in-out;
}

.wge-chip:hover,
.wge-chip:focus {
    border-color: var(--gbl-primary-color, #a12324);
    color: var(--gbl-primary-color, #a12324);
}

.wge-chip__count {
    color: #767676;
    font-size: 12px;
}

.wge-chip:hover .wge-chip__count,
.wge-chip:focus .wge-chip__count {
    color: inherit;
}

/* --- Best sellers -------------------------------------------------------
 * Same override as the front page rows: style.css sizes .products for the
 * shop archive, which is far taller than this context wants. Style .wge-thumb,
 * never `img` — a blanket img rule collapses the hover image.
 *
 * The `ul` in these selectors is load-bearing, and leaving it out is why this
 * row rendered at 39px per card. `woocommerce-layout.css` sets
 * `.woocommerce ul.products li.product { width: 22.05% }` — three classes and
 * **two** elements. Written as `.wge-empty__products .products li.product`
 * this rule has three classes and only **one** element, so it loses the
 * specificity tie-break on element count and the 22.05% won: 22.05% of a
 * 178px grid column is 39px. Adding `ul` levels the count, and this file loads
 * after WooCommerce's, so source order decides in its favour.
 */
.wge-empty__products ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* WooCommerce's clearfix pseudo-elements become grid ITEMS once the list is a
   grid — two invisible cells that make auto-fit see more content than there is
   and stop it collapsing the spare track. The front page rows already kill
   these; this grid did not, which is why four products laid out across five
   columns. */
.wge-empty__products ul.products::before,
.wge-empty__products ul.products::after {
    content: none;
}

.wge-empty__products ul.products li.product {
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
}

.wge-empty__products ul.products li.product > .woocommerce-LoopProduct-link {
    min-height: 0;
}

.wge-empty__products .wge-thumb {
    display: block;
    aspect-ratio: 1 / 1;
}

.wge-empty__products .woocommerce-loop-product__title {
    font-size: 13px;
    line-height: 1.3;
}

/* --- Request form ------------------------------------------------------- */
.wge-empty__ask {
    padding: 24px;
    border: 1px solid #e3e3e3;
    border-radius: 6px;
    background: #fafafa;
}

.wge-ask__lead {
    margin: 0 0 18px;
    color: #3d3d3d;
    font-size: 15px;
    line-height: 1.5;
}

.wge-ask__field {
    margin: 0 0 16px;
}

.wge-ask__field label {
    display: block;
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
}

.wge-ask__optional {
    color: #767676;
    font-weight: 400;
}

.wge-ask__field input[type="text"],
.wge-ask__field input[type="email"] {
    width: 100%;
    max-width: 100%;
    padding: 11px 13px;
    border: 1px solid #cfcfcf;
    border-radius: 4px;
    background: #fff;
    font-size: 15px;
    line-height: 1.4;
}

.wge-ask__field input:focus {
    border-color: var(--gbl-primary-color, #a12324);
    outline: 2px solid rgba(161, 35, 36, .25);
    outline-offset: 1px;
}

/* Honeypot: off-screen rather than display:none, which some bots detect. */
.wge-ask__hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.wge-ask__submit {
    margin: 0;
}

/* The link and the button share styling: when the form is switched off the
   "Write us" link takes the button's place, and it should not look like a
   different kind of control. */
.wge-empty__ask .button {
    display: inline-block;
    text-decoration: none;
}

.wge-empty__ask .button {
    background-color: var(--gbl-primary-color, #a12324);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

.wge-empty__ask .button:hover,
.wge-empty__ask .button:focus {
    background-color: #7f1c1d;
    color: #fff;
}

.wge-ask__done,
.wge-ask__error {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 4px;
    font-size: 15px;
    line-height: 1.45;
}

.wge-ask__done {
    border: 1px solid #b7dfc0;
    background: #edf9f0;
    color: #1d5b2c;
}

.wge-ask__error {
    border: 1px solid #f0c9c9;
    background: #fdf1f1;
    color: #8a1f1f;
}

@media (max-width: 600px) {
    .wge-empty__ask {
        padding: 18px;
    }
}
