/* ══════════════════════════════════════════════════════════════
   DebriFree — Cart Counter Widget
   ══════════════════════════════════════════════════════════════ */

/* Outer wrapper — flex so alignment control works */
.df-cart-counter-wrapper {
    display: flex;
    align-items: center;
}

/* Anchor — reset default link styles */
.df-cart-link {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
    position: relative;
}

/* Icon + badge sit together */
.df-cart-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: flex-end;
}

/* SVG icon */
.df-cart-icon svg {
    width: 64px;
    height: 64px;
    color: #111111;
    display: block;
    overflow: visible;
}

/* ── Badge square ── */
.df-cart-badge-wrap {
    position: absolute;
    top: -12px;
    right: -14px;
    width: 38px;
    height: 38px;
    background-color: #ffffff;
    border: 3px solid #e05520;
    border-style: solid;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 2;
}

/* ── Counter circle ── */
.df-cart-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: #8b0000;
    color: #ffffff;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    font-family: inherit;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Pop animation when count changes */
@keyframes df-count-pop {
    0%   { transform: scale(1); }
    40%  { transform: scale(1.45); }
    70%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

.df-cart-count.df-count-bump {
    animation: df-count-pop 0.35s ease forwards;
}

/* Hide badge when empty (controlled by JS + PHP) */
.df-cart-badge-wrap.df-badge-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.7);
}

/* Hover: subtle lift on the whole widget */
.df-cart-link:hover .df-cart-icon svg {
    opacity: 0.75;
    transition: opacity 0.2s ease;
}

.df-cart-link:hover .df-cart-badge-wrap {
    transform: translateY(-2px);
    transition: transform 0.2s ease;
}

