/* ===== متغیرهای رنگ ===== */
:root {
    --wccc-gold: #d3b763;
    --wccc-gold-dark: #b99a45;
    --wccc-black: #111;
    --wccc-white: #fff;
}

/* ===== شورتکد هدر (روی پس‌زمینه مشکی) ===== */
.wccc-header-cart {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    color: #fff !important;
    padding: 6px 10px;
    border-radius: 8px;
    transition: color .2s, background .2s;
    font-size: 14px;
    line-height: 1;
    direction: rtl;
}
.wccc-header-cart:hover { color: var(--wccc-gold) !important; }
.wccc-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}
.wccc-header-icon svg { display: block; }
.wccc-header-count {
    background: var(--wccc-gold);
    color: var(--wccc-black);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}
.wccc-header-total {
    font-size: 13px;
    font-weight: 600;
    color: var(--wccc-gold);
}
.wccc-header-total .amount,
.wccc-header-total bdi { color: inherit !important; }

/* ===== پاپ آپ ===== */
.wccc-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    direction: rtl;
    backdrop-filter: blur(2px);
}
.wccc-popup {
    background: #fff;
    border-radius: 14px;
    padding: 30px 24px 22px;
    max-width: 420px;
    width: 92%;
    text-align: center;
    position: relative;
    font-family: inherit;
    animation: wcccPop .28s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    border-top: 4px solid var(--wccc-gold);
}
@keyframes wcccPop {
    from { opacity: 0; transform: translateY(15px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.wccc-popup h3 {
    margin: 0 0 22px;
    font-size: 16px;
    font-weight: 700;
    color: var(--wccc-black);
    line-height: 1.8;
}
.wccc-popup-close {
    position: absolute;
    top: 8px;
    left: 10px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .2s;
}
.wccc-popup-close:hover { color: var(--wccc-gold); }

.wccc-popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wccc-btn {
    display: block;
    width: 100%;
    padding: 12px 16px;
    border-radius: 9px;
    text-align: center;
    text-decoration: none;
    border: 1.5px solid transparent;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    transition: opacity .2s, transform .15s, background .2s;
    box-sizing: border-box;
}
.wccc-btn:hover { opacity: .92; transform: translateY(-1px); }

.wccc-btn-continue {
    background: #fff;
    color: var(--wccc-black);
    border-color: var(--wccc-black);
}
.wccc-btn-continue:hover { background: #f5f5f5; }

.wccc-btn-cart {
    background: var(--wccc-black);
    color: #fff;
    border-color: var(--wccc-black);
}
.wccc-btn-cart:hover { background: #2a2a2a; }

.wccc-btn-checkout {
    background: var(--wccc-gold);
    color: var(--wccc-black);
    border-color: var(--wccc-gold);
    font-weight: 700;
}
.wccc-btn-checkout:hover { background: var(--wccc-gold-dark); }

/* ===== آیکون شناور ===== */
.wccc-float {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 9998;
}
.wccc-float-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--wccc-black);
    border: 2px solid var(--wccc-gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wccc-gold);
    box-shadow: 0 6px 20px rgba(0,0,0,.35);
    position: relative;
    transition: transform .2s, box-shadow .2s;
    padding: 0;
}
.wccc-float-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(211,183,99,.5);
}
.wccc-float-btn svg { width: 22px; height: 22px; display: block; }
.wccc-float-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--wccc-gold);
    color: var(--wccc-black);
    border-radius: 50%;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    line-height: 1;
}

/* ===== مینی کارت ===== */
.wccc-mini-cart {
    position: fixed;
    bottom: 88px;
    right: 22px;
    width: 340px;
    max-width: calc(100vw - 32px);
    max-height: 470px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,.22);
    z-index: 9997;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    direction: rtl;
    animation: wcccPop .22s ease;
    border-top: 3px solid var(--wccc-gold);
}
.wccc-mini-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    font-size: 14px;
    color: var(--wccc-black);
    background: #fafafa;
}
.wccc-mini-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0 4px;
    transition: color .2s;
}
.wccc-mini-close:hover { color: var(--wccc-gold); }
.wccc-mini-cart-body {
    padding: 8px 14px;
    overflow-y: auto;
    flex: 1;
}
.wccc-empty {
    text-align: center;
    color: #999;
    padding: 24px 0;
    font-size: 13px;
}
.wccc-items { list-style: none; margin: 0; padding: 0; }
.wccc-item {
    display: flex;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid #f4f4f4;
    align-items: center;
}
.wccc-item:last-child { border-bottom: none; }
.wccc-item-thumb img {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.wccc-item-info { flex: 1; min-width: 0; }
.wccc-item-name {
    font-size: 13px;
    color: var(--wccc-black);
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wccc-item-name:hover { color: var(--wccc-gold-dark); }
.wccc-item-meta { font-size: 12px; color: #777; margin-top: 3px; }
.wccc-total {
    padding: 10px 0 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--wccc-black);
}
.wccc-total .amount,
.wccc-total bdi { color: var(--wccc-gold-dark) !important; }

.wccc-mini-cart-footer {
    padding: 12px 14px;
    border-top: 1px solid #eee;
    background: #fafafa;
}