/* Site-wide Challenge-Coins.com promotional/filter buttons. */
.ccmpb-button {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    width: 100% !important;
    min-height: 94px !important;
    margin: 0 !important;
    padding: 13px 20px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    border: 1px solid #a57824 !important;
    border-radius: 12px !important;
    background: linear-gradient(180deg, #172b3b 0%, #101f2c 55%, #0a1620 100%) !important;
    color: #fff !important;
    text-decoration: none !important;
    text-align: left !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.11), 0 5px 14px rgba(0,0,0,.28) !important;
    cursor: pointer !important;
    transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease !important;
}

.ccmpb-button::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 0 37%, rgba(255,255,255,.055) 46%, transparent 56%);
}

.ccmpb-button:hover,
.ccmpb-button:focus-visible {
    transform: translateY(-2px) !important;
    border-color: #d4a94d !important;
    background: linear-gradient(180deg, #203d54 0%, #142a3b 58%, #0b1925 100%) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.15), 0 8px 20px rgba(0,0,0,.36) !important;
}

.ccmpb-button:focus-visible {
    outline: 2px solid #70adff !important;
    outline-offset: 3px !important;
}

.ccmpb-medallion {
    position: relative;
    z-index: 1;
    display: inline-flex;
    flex: 0 0 62px;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    text-shadow: 0 1px 2px #000;
    box-shadow: inset 0 0 0 2px rgba(255,255,255,.13), inset 0 -10px 14px rgba(0,0,0,.38), 0 4px 10px rgba(0,0,0,.52);
}

.ccmpb-medallion svg {
    display: block;
    width: 31px;
    height: 31px;
    fill: currentColor;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ccmpb-copy {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.ccmpb-copy strong {
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(16px, 1.25vw, 20px) !important;
    font-weight: 900 !important;
    line-height: 1.05 !important;
    letter-spacing: .045em !important;
    text-transform: uppercase !important;
}

.ccmpb-copy small {
    margin: 0 !important;
    color: #d6e5f4 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.25 !important;
}

.ccmpb-presale .ccmpb-medallion {
    border: 2px solid #a66b30;
    background: radial-gradient(circle at 35% 27%, #b77c45 0%, #70411f 45%, #3d210f 72%, #1d0d05 100%);
}

.ccmpb-new .ccmpb-medallion {
    border: 2px solid #c29a25;
    background: radial-gradient(circle at 35% 27%, #e0bd4f 0%, #94711a 43%, #554006 72%, #241a00 100%);
}

.ccmpb-sale .ccmpb-medallion {
    border: 2px solid #81888e;
    background: radial-gradient(circle at 35% 27%, #b7bdc2 0%, #686f75 42%, #383d42 70%, #171a1d 100%);
}

.ccmpb-favorites .ccmpb-medallion {
    border: 2px solid #b99145;
    background: radial-gradient(circle at 35% 27%, #f14f55 0%, #b91822 48%, #68070d 73%, #280104 100%);
}

.ccmpb-lowstock .ccmpb-medallion {
    border: 2px solid #8d6a2b;
    background: radial-gradient(circle at 50% 50%, #222 0%, #101010 70%, #050505 100%);
}

.ccmpb-percent {
    display: inline-block;
    font-size: 39px;
    font-weight: 400;
    line-height: 1;
}

.ccmpb-led {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #fff 0 7%, #ff6a6d 15%, #ff1519 42%, #8c0003 75%, #310001 100%);
    box-shadow: 0 0 4px #fff, 0 0 11px #ff1d20, 0 0 21px #ff1d20;
    animation: ccmpb-led-pulse .75s ease-in-out infinite alternate;
}

@keyframes ccmpb-led-pulse {
    to { transform: scale(1.22); filter: brightness(1.5); }
}

/* A six-column system yields 3 equal items above and 2 centered below. */
.ccmpb-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 14px !important;
    align-items: stretch !important;
}

.ccmpb-grid > .ccmpb-button,
.ccmpb-grid > .ccmpb-grid-item {
    grid-column: span 2;
    min-width: 0;
}

.ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-button:nth-of-type(4),
.ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-grid-item:nth-child(4) {
    grid-column: 2 / span 2;
}

.ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-button:nth-of-type(5),
.ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-grid-item:nth-child(5) {
    grid-column: 4 / span 2;
}

@media (max-width: 900px) {
    .ccmpb-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    .ccmpb-grid > .ccmpb-button,
    .ccmpb-grid > .ccmpb-grid-item,
    .ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-button:nth-of-type(4),
    .ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-button:nth-of-type(5),
    .ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-grid-item:nth-child(4),
    .ccmpb-grid[data-ccmpb-count="5"] > .ccmpb-grid-item:nth-child(5) {
        grid-column: auto !important;
    }
}

@media (max-width: 580px) {
    .ccmpb-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }
    .ccmpb-button {
        min-height: 78px !important;
        padding: 10px 14px !important;
        gap: 11px !important;
    }
    .ccmpb-medallion {
        flex-basis: 52px;
        width: 52px;
        height: 52px;
    }
    .ccmpb-medallion svg {
        width: 27px;
        height: 27px;
    }
    .ccmpb-copy strong {
        font-size: 16px !important;
    }
    .ccmpb-copy small {
        font-size: 13px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ccmpb-button,
    .ccmpb-led {
        transition: none !important;
        animation: none !important;
    }
}

/* v1.0.1 safety: never alter product media or WooCommerce cards. */
li.product:not(.ccmpb-button),
.products:not(.ccmpb-grid),
.woocommerce-product-gallery,
.woocommerce-product-gallery__wrapper,
.woocommerce-product-gallery__image,
.woocommerce-loop-product__link,
.woocommerce-loop-product__link img,
li.product img {
    visibility: visible;
    opacity: 1;
}
