.gramov-affiliate-card {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 1.75em 0 1em !important;
    text-align: center;
}

.gramov-affiliate-card::before,
.gramov-affiliate-card::after {
    content: "";
    display: table;
    clear: both;
}

.gramov-affiliate-card__title {
    display: block;
    clear: both;
    margin: 0 0 .75em;
}

.gramov-affiliate-card__image,
.gramov-affiliate-card__image a {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
}

.gramov-affiliate-card__image img {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: auto !important;
    max-width: min(100%, 640px) !important;
    height: auto !important;
    margin: 0 auto !important;
}

.gramov-affiliate-card__action {
    display: block !important;
    clear: both !important;
    float: none !important;
    margin: 1em 0 0;
}

.gramov-affiliate-card__button {
    display: inline-block;
    padding: .8em 1.35em;
    border-radius: 4px;
    background: #1d2327;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 700;
    line-height: 1.3;
}

.gramov-affiliate-card__button:hover,
.gramov-affiliate-card__button:focus {
    opacity: .86;
}

/* Keep BannerBridge's tracking image loaded but completely out of text flow. */
.gramov-affiliate-card__tracking {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* v1.2: genuine independent block between the ad and whatever follows it. */
.gramov-affiliate-hard-break {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    height: 1px !important;
    min-height: 1px !important;
    margin: 0 0 1em 0 !important;
    padding: 0 !important;
    border: 0 !important;
    overflow: hidden !important;
    line-height: 1px !important;
    font-size: 1px !important;
}

/* WordPress comments do not count as siblings, so this reaches the next element. */
.gramov-affiliate-hard-break + * {
    clear: both !important;
    float: none !important;
}

/* v1.6: compact sidebar widget.
 * The theme used on erogotoshi.com applies broad image sizing rules, so the
 * wrapper, anchor and image all get an explicit 180px fallback. Per-ad inline
 * styles from the history manager can override this when another width is set.
 */
.widget_gramov_affiliate_sidebar .gramov-sidebar-ad,
.gramov-sidebar-ad {
    display: block !important;
    clear: both !important;
    float: none !important;
    width: 180px !important;
    max-width: 180px !important;
    box-sizing: border-box !important;
    margin: 0 auto 1.25em !important;
    text-align: center !important;
}

.widget_gramov_affiliate_sidebar .gramov-sidebar-ad__image-link,
.gramov-sidebar-ad__image-link {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 180px !important;
    max-width: 180px !important;
    margin: 0 auto !important;
    text-decoration: none !important;
}

.widget_gramov_affiliate_sidebar .gramov-sidebar-ad__image,
.gramov-sidebar-ad__image {
    display: block !important;
    float: none !important;
    clear: both !important;
    width: 180px !important;
    max-width: 180px !important;
    height: auto !important;
    margin: 0 auto !important;
}

.gramov-sidebar-ad__title {
    display: none !important;
}

.gramov-sidebar-ad__tracking {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
