#signupForm .input-box input,
#loginForm .input-box input {
    margin-bottom: unset; font-size: 16px; font-weight: 500; color: #333333; display: block;
}
#signupForm .input-box input:placeholder,
#loginForm .input-box input:placeholder {
    color: #999999; font-size: 16px; font-weight: 500; display: block;
}
/* Prevent Bootstrap's validation icon from overlapping the custom right-side icon */
.input-box .form-control.is-invalid,
.input-box .form-control.is-valid,
.input-box .was-validated .form-control:invalid,
.input-box .was-validated .form-control:valid {
    background-image: none !important;
    padding-right: 40px;
}

/* Keep the custom icon visible and clickable above the input */
.input-box i {
    z-index: 2;
    pointer-events: auto;
}

/* Validation message sits below the input, full width inside .input-box */
.input-box .invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 4px;
    font-size: 12px;
}

/* Per-field validation message rendered under each input by the htmx form-alert
   response (out-of-band swap into "{form}-err-{field}"). Empty by default so it
   takes no space until a message is set; forms clear these before each submit. */
.field-error {
    display: block;
    width: 100%;
    color: #dc3545;
    font-size: 12px;
    line-height: 1.3;
}
.field-error:not(:empty) {
    margin-top: 4px;
}

/* Signup form: tighten the gap between each input and its validation message,
   bump the message font up a touch, keep it on a single line, and preserve a
   clear gap before the next field's label. */
#signupForm .input-box {
    margin-bottom: 4px;
}
#signupForm .lev {
    margin-top: 8px;
}
#signupForm .field-error {
    font-size: 13px;
    line-height: 1.25;
    white-space: nowrap;
}
#signupForm .field-error:not(:empty) {
    margin-top: 2px;
}

/* Login form: the .field-error is a sibling after .input-box, so the box's
   12px margin-bottom shows up as a gap above the validation message. Tighten it
   the same way as signup, keeping a clear gap before the next field's label. */
#loginForm .input-box {
    margin-bottom: 4px;
}
#loginForm .lev {
    margin-top: 8px;
}
#loginForm .field-error:not(:empty) {
    margin-top: 2px;
}

/* Account details modal: the New Password / Confirm Password inputs carry the
   shared 20px margin-bottom, which leaves a large gap above their validation
   message. Tighten it so the "Password must be at least 6 characters" note sits
   directly under each input. */
.info-input-wrap input#newPassword,
.info-input-wrap input#confirmPassword {
    margin-bottom: 0;
}

/* ─── BRANDS PAGE ─────────────────────────────────────────────
   The /brands grid. Cards reuse the site palette (custom properties from
   style.css) so they sit natively alongside the products/collections pages. */
.brands-collection {
    text-align: center;
}
.brands-collection .heading h2 {
    margin-bottom: 18px;
}
.brands-collection .heading p {
    max-width: 640px;
    margin: 0 auto 55px;
    color: var(--mid);
    font-size: 16px;
    line-height: 1.6;
}
.brand-grid .brand-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 34px 22px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 14px;
    text-decoration: none;
    color: var(--black);
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
}
.brand-grid .brand-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, .08);
    border-color: var(--black);
}
.brand-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 72px;
    margin-bottom: 20px;
}
.brand-card-logo img {
    max-height: 72px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}
.brand-card-initial {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--light);
    font-family: var(--headingFont);
    font-size: 28px;
    color: var(--black);
    text-transform: uppercase;
}
.brand-grid .brand-card h5 {
    font-family: var(--bodyFont);
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 8px;
}
.brand-grid .brand-card p {
    font-size: 14px;
    color: var(--mid);
    line-height: 1.5;
    margin: 0 0 18px;
}
.brand-card-cta {
    margin-top: auto;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--black);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.brand-card-cta .icon-arrow {
    transition: transform .3s ease;
}
.brand-grid .brand-card:hover .brand-card-cta .icon-arrow {
    transform: translateX(5px);
}

/* ─── SEARCH POPUP ────────────────────────────────────────────
   Quick Result tiles are now anchors (each links to its customisable-product
   builder). Strip the default anchor look so they render like the old cards. */
a.quick-result-card {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.quick-result-card:hover .quick-result-name {
    text-decoration: underline;
}