/**
 * Aria Cart Dropdown — Styles
 * v1.9.1
 *
 * Scoped to .aria-cd (no CSS leakage).
 * Uses plugin's CSS custom properties (--aria-bg, --aria-text, --aria-icon, --aria-accent).
 * RTL-ready (uses logical properties where possible, falls back to dir=rtl).
 */

/* ═══════════════════════════════════════════════════════════
   SIZES
   ═══════════════════════════════════════════════════════════ */
.aria-cd--sm .aria-cd__trigger { width: 36px; height: 36px; }
.aria-cd--sm .aria-cd__icon   { width: 18px; height: 18px; }
.aria-cd--sm .aria-cd__badge  { min-width: 18px; height: 18px; font-size: 10px; }

.aria-cd--md .aria-cd__trigger { width: 46px; height: 46px; }
.aria-cd--md .aria-cd__icon   { width: 22px; height: 22px; }
.aria-cd--md .aria-cd__badge  { min-width: 20px; height: 20px; font-size: 11px; }

.aria-cd--lg .aria-cd__trigger { width: 56px; height: 56px; }
.aria-cd--lg .aria-cd__icon   { width: 26px; height: 26px; }
.aria-cd--lg .aria-cd__badge  { min-width: 22px; height: 22px; font-size: 12px; }

/* v2.1.0: Custom pixel size via CSS vars (set by PHP inline style on .aria-cd) */
.aria-cd[style*="--cd-trigger-w"] .aria-cd__trigger {
        width: var(--cd-trigger-w) !important;
        height: var(--cd-trigger-h) !important;
}
.aria-cd[style*="--cd-trigger-w"] .aria-cd__icon {
        width: var(--cd-icon-w) !important;
        height: var(--cd-icon-h) !important;
}
/* Badge: always a perfect circle (width = height) */
.aria-cd[style*="--cd-badge-size"] .aria-cd__badge {
        width: var(--cd-badge-size) !important;
        height: var(--cd-badge-size) !important;
        min-width: var(--cd-badge-size) !important;
        font-size: var(--cd-badge-font-size, calc(var(--cd-badge-size) * 0.55)) !important;
}

/* ═══════════════════════════════════════════════════════════
   WRAPPER + CUSTOM PROPERTIES
   ═══════════════════════════════════════════════════════════ */
.aria-cd {
        position: relative;
        display: inline-block;
        z-index: 999;
        font-family: 'Vazirmatn', 'IRANSans', 'Tahoma', sans-serif;
        direction: rtl;
        overflow: visible;

        /* ── Theme Custom Properties ────────────────────── */
        --cd-trigger-bg: #e91e63;
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 2px 8px rgba(0,0,0,0.12);
        --cd-trigger-hover-shadow: 0 4px 16px rgba(0,0,0,0.18);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: none;

        --cd-badge-bg: #ef4444;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #fff;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 16px;
        --cd-panel-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);

        --cd-accent: #fe6c9d;
        --cd-accent-hover: #e85d8d;
}

/* ═══════════════════════════════════════════════════════════
   TRIGGER (ICON BUTTON)
   ═══════════════════════════════════════════════════════════ */
.aria-cd__trigger {
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--cd-trigger-bg) !important;
        color: var(--cd-trigger-color) !important;
        border: var(--cd-trigger-border) !important;
        border-radius: var(--cd-trigger-radius) !important;
        cursor: pointer;
        padding: 0;
        position: relative;
        box-shadow: var(--cd-trigger-shadow);
        transition: transform 0.25s cubic-bezier(.4,0,.2,1),
                    box-shadow 0.25s cubic-bezier(.4,0,.2,1),
                    border-width 0.25s cubic-bezier(.4,0,.2,1);
        outline: none;
        box-sizing: border-box;
        /* overflow MUST be visible so the badge (positioned at negative top/left) is not clipped */
        overflow: visible;
        /* Fallback dimensions to prevent FOUC before CSS vars kick in */
        width: 46px;
        height: 46px;
}

.aria-cd__trigger:hover {
        transform: scale(1.08);
        box-shadow: var(--cd-trigger-hover-shadow);
        border-width: 1px !important;
}

.aria-cd__trigger:active {
        transform: scale(0.95);
}

.aria-cd__trigger[aria-expanded="true"] {
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.aria-cd__icon {
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        /* Fallback size to prevent FOUC (overridden by --cd-icon-w/h vars) */
        width: 23px;
        height: 23px;
        transition: transform 0.25s cubic-bezier(.4,0,.2,1);
}

.aria-cd__trigger:hover .aria-cd__icon {
        transform: scale(1.15);
}

/* ─── Badge ──────────────────────────────────────────── */
.aria-cd__badge {
        position: absolute;
        top: -4px;
        right: -4px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--cd-badge-bg);
        color: var(--cd-badge-color);
        border-radius: 50% !important;
        font-weight: 800;
        line-height: 1;
        padding: 0 !important;
        border: 2px solid var(--cd-badge-border-color);
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
        pointer-events: none;
        font-variant-numeric: tabular-nums;
        font-feature-settings: 'ss02';
        letter-spacing: 0;
        z-index: 10;
        box-sizing: border-box !important;
        overflow: hidden;
        white-space: nowrap;
        /* Fallback size to prevent FOUC (overridden by --cd-badge-size var) */
        width: 16px;
        height: 16px;
        min-width: 16px;
        font-size: 9px;
}

/* ═══════════════════════════════════════════════════════════
   DROPDOWN PANEL
   ═══════════════════════════════════════════════════════════ */
.aria-cd__panel {
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        width: 380px;
        max-height: 480px;
        background: var(--cd-panel-bg);
        border-radius: var(--cd-panel-radius);
        box-shadow: var(--cd-panel-shadow);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.3s;
}

/* Arrow / caret */
.aria-cd__panel::before {
        content: '';
        position: absolute;
        top: -6px;
        left: 18px;
        transform: rotate(45deg);
        width: 12px;
        height: 12px;
        background: var(--cd-panel-bg);
        border-radius: 2px;
        box-shadow: -2px -2px 4px rgba(0,0,0,0.04);
}

/* OPEN state */
.aria-cd__panel.aria-cd__panel--open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
}

/* ─── HEADER ──────────────────────────────────────────── */
.aria-cd__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        border-bottom: 1px solid #f0f0f0;
        flex-shrink: 0;
}

.aria-cd__header-title {
        font-size: 14px;
        font-weight: 700;
        color: #1a1a1a;
}

.aria-cd__header-count {
        font-size: 12px;
        color: #999;
        font-weight: 500;
}

/* ─── ITEMS (scrollable) ──────────────────────────────── */
.aria-cd__items {
        overflow-y: auto;
        overflow-x: hidden;
        flex: 1;
        scrollbar-width: thin;
        scrollbar-color: #e0e0e0 transparent;
}

.aria-cd__items::-webkit-scrollbar {
        width: 5px;
}

.aria-cd__items::-webkit-scrollbar-track {
        background: transparent;
}

.aria-cd__items::-webkit-scrollbar-thumb {
        background: #e0e0e0;
        border-radius: 99px;
}

.aria-cd__items::-webkit-scrollbar-thumb:hover {
        background: #ccc;
}

/* ─── EMPTY STATE ────────────────────────────────────── */
.aria-cd__empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 40px 20px;
        gap: 12px;
        color: #bbb;
}

.aria-cd__empty svg {
        opacity: 0.35;
}

.aria-cd__empty p {
        font-size: 13px;
        font-weight: 500;
        margin: 0;
}

/* ═══════════════════════════════════════════════════════════
   CART ITEM
   ═══════════════════════════════════════════════════════════ */
.aria-cart-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 12px 14px 0 14px;
        border-bottom: 1px solid #f5f5f5;
        overflow: hidden;
        position: relative;
        transition: opacity 0.3s ease, transform 0.3s ease, max-height 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}

.aria-cart-item:last-child {
        border-bottom: none;
}

.aria-cart-item.aria-cart-item--removing {
        opacity: 0;
        transform: translateX(30px);
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin-bottom: 0;
}

/* ─── Item Image ─────────────────────────────────────── */
.aria-cart-item__img {
        flex-shrink: 0;
        width: 68px;
        height: 68px;
        border-radius: 10px;
        overflow: hidden;
        background: #f5f5f5;
        border: 1px solid #f0f0f0;
}

.aria-cart-item__img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
}

/* ─── Item Remove (X) — top-left corner, always visible ── */
.aria-cart-item__remove {
        position: absolute;
        top: 4px;
        left: 4px;
        width: 16px;
        height: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        padding: 0;
        margin: 0;
        cursor: pointer;
        color: #333;
        opacity: 0.6;
        z-index: 5;
        border-radius: 50%;
        line-height: 1;
        font-size: 14px;
        font-weight: 400;
        font-family: Arial, sans-serif;
}
.aria-cart-item__remove:hover {
        color: #e53935;
        opacity: 1;
        background: rgba(229, 57, 53, 0.08);
}

/* ─── Item Link (wraps img + details) ────────────────── */
.aria-cart-item__link {
        display: flex;
        align-items: center;
        gap: 12px;
        flex: 1;
        min-width: 0;
        text-decoration: none;
        color: inherit;
        transition: opacity 0.15s ease;
}
.aria-cart-item__link:hover {
        opacity: 0.7;
}
.aria-cart-item__link:hover .aria-cart-item__name {
        color: var(--cd-accent, #e91e63);
}

/* ─── Item Details ───────────────────────────────────── */
.aria-cart-item__details {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 2px;
        overflow: hidden;
}

.aria-cart-item__name {
        font-size: 13px;
        font-weight: 600;
        color: #1a1a1a;
        margin: 0;
        line-height: 1.35;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
}

.aria-cart-item__variation {
        font-size: 11px;
        color: #999;
        margin: 0;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

.aria-cart-item__bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 2px;
}

.aria-cart-item__price {
        font-size: 14px;
        font-weight: 700;
        color: var(--cd-accent, #fe6c9d);
}

/* Hide strikethrough (original) price — show only final price */
.aria-cart-item__price del {
        display: none !important;
}

.aria-cart-item__qty-old {
        font-size: 11px;
        color: #aaa;
        font-weight: 500;
}

/* ─── Panel Close Button (X) — absolute top-left of panel ── */
.aria-cd__close {
        position: absolute;
        top: 8px;
        left: 8px;
        width: 13px;
        height: 13px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #fe6c9d;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        color: #fff;
        padding: 0;
        margin: 0;
        outline: none;
        transition: opacity 0.15s ease;
        z-index: 5;
}

.aria-cd__close:hover {
        opacity: 0.8;
}

.aria-cd__close:active {
        transform: scale(0.9);
}

.aria-cd__close svg {
        display: block;
        pointer-events: none;
        width: 8px;
        height: 8px;
}

/* ─── Quantity Controls (absolute bottom-left of each item) ── */

/* v2.0.9: OLD custom qty controls replaced by .aria-btn-wrapper.
 * Kept for reference / any cached HTML that might still use them. */
.aria-cart-item__qty-ctrl {
        position: absolute;
        bottom: 8px;
        left: 8px;
        display: inline-flex;
        align-items: center;
        gap: 0;
        flex-shrink: 0;
        overflow: hidden;
        border-radius: 8px;
        height: 28px;
        border: 1.5px solid #fe6c9d;
        z-index: 2;
}

.aria-cart-item__qty-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 26px;
        height: 28px;
        border: none;
        background: #fe6c9d;
        color: #fff;
        cursor: pointer;
        padding: 0;
        outline: none;
        transition: opacity 0.15s ease;
}

.aria-cart-item__qty-btn:hover {
        opacity: 0.85;
}

.aria-cart-item__qty-btn:active {
        opacity: 0.7;
}

.aria-cart-item__qty-btn svg {
        display: block;
        pointer-events: none;
}

.aria-cart-item__qty-val {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: 26px;
        height: 28px;
        font-size: 12px;
        font-weight: 700;
        color: #333;
        background: #fff;
        font-variant-numeric: tabular-nums;
}

.aria-cart-item__qty-val--loading {
        opacity: 0.5;
}

/* ═══════════════════════════════════════════════════════════
   v2.0.9: .aria-btn-wrapper INSIDE dropdown items
   ─────────────────────────────────────────────────────────
   Reset all page-button styles so the wrapper is transparent,
   then style the inner .aria-qty to match the compact dropdown
   look. Uses --aria-accent from template settings (same as page
   button) with --cd-accent fallback.
   ═══════════════════════════════════════════════════════════ */
.aria-cart-item .aria-btn-wrapper {
        position: absolute !important;
        bottom: 0;
        left: 6px;
        z-index: 2;
        background: none !important;
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        box-shadow: none !important;
        min-width: auto !important;
        max-width: none !important;
        min-height: auto !important;
        max-height: none !important;
        width: auto !important;
        height: auto !important;
        display: block !important;
        line-height: 0;
        font-size: 0;
}

/* The quantity state div — visible by default, but render() can hide via inline style */
.aria-cart-item .aria-btn-wrapper > .aria-state[data-aria-state-type="quantity"] {
        display: block !important;
        width: auto !important;
        flex-direction: row !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        line-height: normal;
        font-size: inherit;
}

/* Reset the .aria-qty container — compact inline-flex, 25px height (10% smaller) */
.aria-cart-item .aria-qty {
        display: inline-flex;
        align-items: center;
        gap: 0;
        overflow: hidden;
        border-radius: 7px;
        height: 25px !important;
        border: 1.5px solid var(--aria-accent, var(--cd-accent, #fe6c9d));
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        flex-direction: row;
        direction: rtl;
        outline: none !important;
}

/* No outline at max stock — user doesn't want it */
.aria-cart-item .aria-qty--max {
        outline: none !important;
}

/* Hide dividers inside dropdown — not needed */
.aria-cart-item .aria-qty-divider {
        display: none;
}

/* Plus / Minus buttons — theme accent background */
.aria-cart-item .aria-qty-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 23px;
        height: 25px;
        border: none;
        background: var(--aria-accent, var(--cd-accent, #fe6c9d));
        color: #fff;
        cursor: pointer;
        padding: 0;
        outline: none;
        transition: opacity 0.15s ease;
        border-radius: 0;
        flex-shrink: 0;
}

.aria-cart-item .aria-qty-btn svg {
        display: block;
        pointer-events: none;
        width: 12px;
        height: 12px;
}

.aria-cart-item .aria-qty-btn:hover {
        opacity: 0.85;
}

.aria-cart-item .aria-qty-btn:active {
        opacity: 0.7;
}

.aria-cart-item .aria-qty-btn--disabled {
        opacity: 0.4 !important;
        cursor: not-allowed;
}

/* Number display */
.aria-cart-item .aria-qty-number {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        min-width: 23px;
        height: 25px;
        font-size: 11px;
        font-weight: 700;
        color: #333;
        background: #fff;
        font-variant-numeric: tabular-nums;
        padding: 0 4px;
        flex-shrink: 0;
        line-height: 1.1;
}

/* "حداکثر" label — JS shows/hides via inline style */
.aria-cart-item .aria-qty-max-label {
        font-size: 7px;
        font-weight: 600;
        opacity: 0.55;
        line-height: 1;
        margin-top: 0;
}

/* Trash button */
.aria-cart-item .aria-qty-btn--trash {
        color: #ff6b6b;
}

.aria-cart-item .aria-qty-btn--trash:hover {
        opacity: 0.7;
}



/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.aria-cd__footer {
        border-top: 1px solid #f0f0f0;
        padding: 14px 18px;
        flex-shrink: 0;
        background: #fafafa;
}

.aria-cd__subtotal-label {
        font-size: 12px;
        color: #6b7280;
        font-weight: 500;
}
.aria-cd__subtotal {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 12px;
}

.aria-cd__total {
        font-size: 16px;
        font-weight: 800;
        color: #1a1a1a;
        direction: rtl;
}

.aria-cd__actions {
        display: flex;
        gap: 8px;
}

.aria-cd__actions a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
        flex: 1;
        padding: 10px 0;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        text-decoration: none;
        transition: all 0.2s ease;
        outline: none;
        cursor: pointer;
        box-sizing: border-box;
}

/* View Cart button */
.aria-cd__btn-vc {
        background: #fff;
        color: #555;
        border: 1.5px solid #e0e0e0;
}

.aria-cd__btn-vc:hover {
        background: #f5f5f5;
        border-color: #ccc;
        color: #222;
}

/* Checkout button */
.aria-cd__btn-co {
        background: #fe6c9d;
        color: #fff;
        border: 1.5px solid transparent;
}

.aria-cd__btn-co:hover {
        background: #e85d8d;
}

/* ═══════════════════════════════════════════════════════════
   FLOATING POSITION
   ═══════════════════════════════════════════════════════════ */
.aria-cd--float-right {
        position: fixed;
        top: 80px;
        left: 16px;
}

.aria-cd--float-left {
        position: fixed;
        top: 80px;
        right: 16px;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 480px) {
        .aria-cd__panel {
                width: calc(100vw - 32px);
                max-height: 420px;
        }

        .aria-cart-item {
                padding: 10px 10px 0 10px;
                gap: 8px;
        }

        .aria-cart-item__img {
                width: 50px;
                height: 50px;
                border-radius: 8px;
        }

        .aria-cart-item__name {
                font-size: 12px;
        }

        .aria-cart-item__price {
                font-size: 12px;
        }

        .aria-cd__close {
                width: 11px;
                height: 11px;
                top: 6px;
                left: 6px;
        }

        .aria-cart-item__qty-ctrl {
                height: 24px;
        }

        .aria-cart-item__qty-btn {
                width: 22px;
                height: 24px;
        }

        .aria-cart-item__qty-val {
                min-width: 22px;
                height: 24px;
                font-size: 11px;
        }

        /* v2.0.9: compact .aria-btn-wrapper in small size */
        .aria-cart-item .aria-qty {
                height: 22px !important;
        }

        .aria-cart-item .aria-qty-btn {
                width: 20px;
                height: 22px !important;
        }

        .aria-cart-item .aria-qty-btn svg {
                width: 10px;
                height: 10px;
        }

        .aria-cart-item .aria-qty-number {
                min-width: 20px;
                height: 22px !important;
                font-size: 10px;
        }

        .aria-cart-item .aria-qty-max-label {
                font-size: 6px;
        }
}

/* ═══════════════════════════════════════════════════════════
   BADGE BOUNCE (on count change)
   ═══════════════════════════════════════════════════════════ */
@keyframes aria-cd-badge-pop {
        0%   { transform: scale(1); }
        40%  { transform: scale(1.35); }
        70%  { transform: scale(0.9); }
        100% { transform: scale(1); }
}

.aria-cd__badge.aria-cd__badge--pop {
        animation: aria-cd-badge-pop 0.4s ease;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   v2.5.0: TRIGGER BUTTON ANIMATIONS
   Attractive animations triggered on cart interactions (add/remove/qty change).
   Duration is set via CSS custom property --cd-anim-duration (default 1s).
   Button is disabled (pointer-events:none) during animation.
   ═══════════════════════════════════════════════════════════ */

.aria-cd {
        --cd-anim-duration: 1s;
}

/* Disabled state during animation */
.aria-cd.aria-cd--animating .aria-cd__trigger {
        pointer-events: none !important;
}

/* ── ANIMATION: BOUNCE (add to cart) ──
   Icon jumps up, scales, settles with a bouncy feel */
@keyframes aria-cd-anim-bounce {
        0%   { transform: scale(1) translateY(0); }
        15%  { transform: scale(0.85) translateY(0); }
        30%  { transform: scale(1.15) translateY(-8px); }
        50%  { transform: scale(1.25) translateY(0); }
        65%  { transform: scale(0.95) translateY(-3px); }
        80%  { transform: scale(1.05) translateY(0); }
        100% { transform: scale(1) translateY(0); }
}

.aria-cd--anim-bounce .aria-cd__trigger {
        animation: aria-cd-anim-bounce var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: SHAKE (remove from cart) ──
   Icon shakes left-right with decreasing intensity */
@keyframes aria-cd-anim-shake {
        0%   { transform: translateX(0) rotate(0deg); }
        10%  { transform: translateX(-6px) rotate(-5deg); }
        20%  { transform: translateX(5px) rotate(4deg); }
        30%  { transform: translateX(-5px) rotate(-3deg); }
        40%  { transform: translateX(4px) rotate(3deg); }
        50%  { transform: translateX(-3px) rotate(-2deg); }
        60%  { transform: translateX(3px) rotate(2deg); }
        70%  { transform: translateX(-2px) rotate(-1deg); }
        80%  { transform: translateX(1px) rotate(0.5deg); }
        90%  { transform: translateX(-1px) rotate(0); }
        100% { transform: translateX(0) rotate(0deg); }
}

.aria-cd--anim-shake .aria-cd__trigger {
        animation: aria-cd-anim-shake var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: PULSE (quantity increase/decrease) ──
   Icon gently pulses with a glow ring */
@keyframes aria-cd-anim-pulse {
        0%   { transform: scale(1); box-shadow: 0 0 0 0 rgba(233, 30, 99, 0.4); }
        30%  { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(233, 30, 99, 0); }
        60%  { transform: scale(0.97); box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); }
        100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(233, 30, 99, 0); }
}

.aria-cd--anim-pulse .aria-cd__trigger {
        animation: aria-cd-anim-pulse var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: SWING (alternative for add to cart) ──
   Icon swings like a pendulum */
@keyframes aria-cd-anim-swing {
        0%   { transform: rotate(0deg); transform-origin: top center; }
        15%  { transform: rotate(12deg); }
        30%  { transform: rotate(-10deg); }
        45%  { transform: rotate(7deg); }
        60%  { transform: rotate(-4deg); }
        75%  { transform: rotate(2deg); }
        100% { transform: rotate(0deg); }
}

.aria-cd--anim-swing .aria-cd__trigger {
        animation: aria-cd-anim-swing var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: JELLY (alternative for quantity change) ──
   Icon squishes and stretches like jelly */
@keyframes aria-cd-anim-jelly {
        0%   { transform: scale(1, 1); }
        20%  { transform: scale(1.2, 0.8); }
        40%  { transform: scale(0.85, 1.15); }
        60%  { transform: scale(1.08, 0.92); }
        80%  { transform: scale(0.97, 1.03); }
        100% { transform: scale(1, 1); }
}

.aria-cd--anim-jelly .aria-cd__trigger {
        animation: aria-cd-anim-jelly var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: WOBBLE (alternative for remove) ──
   Icon wobbles side to side */
@keyframes aria-cd-anim-wobble {
        0%   { transform: translateX(0) rotate(0deg); }
        15%  { transform: translateX(-5px) rotate(-8deg); }
        30%  { transform: translateX(4px) rotate(6deg); }
        45%  { transform: translateX(-3px) rotate(-4deg); }
        60%  { transform: translateX(2px) rotate(2deg); }
        75%  { transform: translateX(-1px) rotate(-1deg); }
        100% { transform: translateX(0) rotate(0deg); }
}

.aria-cd--anim-wobble .aria-cd__trigger {
        animation: aria-cd-anim-wobble var(--cd-anim-duration) ease !important;
}

/* ── ANIMATION: FLIP (dramatic — alternative for add) ──
   Icon does a 3D flip */
@keyframes aria-cd-anim-flip {
        0%   { transform: perspective(400px) rotateY(0deg); }
        30%  { transform: perspective(400px) rotateY(180deg) scale(1.1); }
        60%  { transform: perspective(400px) rotateY(360deg) scale(1.05); }
        100% { transform: perspective(400px) rotateY(360deg) scale(1); }
}

.aria-cd--anim-flip .aria-cd__trigger {
        animation: aria-cd-anim-flip var(--cd-anim-duration) ease !important;
}

/* ── Ripple effect overlay (used with bounce/add animations) ── */
.aria-cd__trigger-ripple {
        position: absolute !important;
        top: 50% !important;
        left: 50% !important;
        width: 10px !important;
        height: 10px !important;
        border-radius: 50% !important;
        background: rgba(255,255,255,0.35) !important;
        transform: translate(-50%, -50%) scale(0) !important;
        animation: aria-cd-ripple-out var(--cd-anim-duration) ease-out forwards !important;
        pointer-events: none !important;
        z-index: 0 !important;
}

@keyframes aria-cd-ripple-out {
        0%   { transform: translate(-50%, -50%) scale(0); opacity: 1; }
        100% { transform: translate(-50%, -50%) scale(12); opacity: 0; }
}

/* Ripple container needs position:relative (already set on .aria-cd__trigger) */


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 1 — CLASSIC
   Dark charcoal bg, white icon, red badge, clean shadow
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-classic {
        --cd-trigger-bg: #333;
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 2px 6px rgba(0,0,0,0.25);
        --cd-trigger-hover-shadow: 0 4px 14px rgba(0,0,0,0.35);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: none;

        --cd-badge-bg: #ef4444;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #fff;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 12px;
        --cd-panel-shadow: 0 6px 24px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.06);

        --cd-accent: #333;
        --cd-accent-hover: #1a1a1a;
}

.aria-cd--theme-classic .aria-cd__trigger:hover {
        transform: scale(1.06);
        background: #444;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 2 — PASTEL
   Soft pink gradient, white icon, pink badge
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-pastel {
        --cd-trigger-bg: linear-gradient(135deg, #fce4ec, #f8bbd0);
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 2px 8px rgba(233,30,99,0.18);
        --cd-trigger-hover-shadow: 0 4px 16px rgba(233,30,99,0.28);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: none;

        --cd-badge-bg: #ec407a;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #fff;

        --cd-panel-bg: #fff5f8;
        --cd-panel-radius: 16px;
        --cd-panel-shadow: 0 8px 32px rgba(233,30,99,0.1), 0 0 0 1px rgba(233,30,99,0.06);

        --cd-accent: #ec407a;
        --cd-accent-hover: #d81b60;
}

.aria-cd--theme-pastel .aria-cd__trigger:hover {
        transform: scale(1.08);
        filter: brightness(1.04);
}

.aria-cd--theme-pastel .aria-cd__panel::before {
        box-shadow: -2px -2px 4px rgba(233,30,99,0.06);
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 3 — GLASS
   Glassmorphism: semi-transparent, backdrop-filter blur, subtle border
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-glass {
        --cd-trigger-bg: rgba(255,255,255,0.18);
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 4px 16px rgba(0,0,0,0.08);
        --cd-trigger-hover-shadow: 0 6px 24px rgba(0,0,0,0.12);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: 1.5px solid rgba(255,255,255,0.3);

        --cd-badge-bg: rgba(239,68,68,0.9);
        --cd-badge-color: #fff;
        --cd-badge-border-color: rgba(255,255,255,0.5);

        --cd-panel-bg: rgba(255,255,255,0.72);
        --cd-panel-radius: 18px;
        --cd-panel-shadow: 0 8px 32px rgba(0,0,0,0.08);

        --cd-accent: #e91e63;
        --cd-accent-hover: #c2185b;
}

.aria-cd--theme-glass .aria-cd__trigger {
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
}

.aria-cd--theme-glass .aria-cd__trigger:hover {
        transform: scale(1.06);
        background: rgba(255,255,255,0.28);
}

.aria-cd--theme-glass .aria-cd__panel {
        -webkit-backdrop-filter: blur(24px);
        backdrop-filter: blur(24px);
        border: 1px solid rgba(255,255,255,0.35);
}

.aria-cd--theme-glass .aria-cd__panel::before {
        background: rgba(255,255,255,0.72);
        box-shadow: -2px -2px 6px rgba(0,0,0,0.04);
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 4 — MATERIAL
   Material Design: elevated shadow, flat bg, ripple-like hover
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-material {
        --cd-trigger-bg: #6200ee;
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 4px 12px rgba(0,0,0,0.15);
        --cd-trigger-hover-shadow: 0 6px 20px rgba(98,0,238,0.25);
        --cd-trigger-radius: 16px;
        --cd-trigger-border: none;

        --cd-badge-bg: #ff5252;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #6200ee;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 8px;
        --cd-panel-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);

        --cd-accent: #6200ee;
        --cd-accent-hover: #4a148c;
}

.aria-cd--theme-material .aria-cd__trigger:hover {
        transform: scale(1.0);
        box-shadow: 0 6px 20px rgba(98,0,238,0.25);
        background: #7c4dff;
}

.aria-cd--theme-material .aria-cd__trigger:active {
        transform: scale(0.96);
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 5 — MINIMAL
   Outline only: transparent bg, 2px border, icon colored, no shadow
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-minimal {
        --cd-trigger-bg: transparent;
        --cd-trigger-color: #555;
        --cd-trigger-shadow: none;
        --cd-trigger-hover-shadow: none;
        --cd-trigger-radius: 50%;
        --cd-trigger-border: 2px solid #ccc;

        --cd-badge-bg: #ef4444;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #fff;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 12px;
        --cd-panel-shadow: 0 4px 16px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.04);

        --cd-accent: #555;
        --cd-accent-hover: #222;
}

.aria-cd--theme-minimal .aria-cd__trigger:hover {
        transform: none;
        border-color: #999;
        color: #333;
}

.aria-cd--theme-minimal .aria-cd__trigger:active {
        transform: none;
}

.aria-cd--theme-minimal .aria-cd__btn-co {
        border-radius: 8px;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 6 — ROUNDED
   Pill shape, gradient bg, white icon
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-rounded {
        --cd-trigger-bg: linear-gradient(135deg, #667eea, #764ba2);
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 3px 10px rgba(102,126,234,0.3);
        --cd-trigger-hover-shadow: 0 6px 20px rgba(102,126,234,0.4);
        --cd-trigger-radius: 99px;
        --cd-trigger-border: none;

        --cd-badge-bg: #ffd600;
        --cd-badge-color: #333;
        --cd-badge-border-color: #fff;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 99px;
        --cd-panel-shadow: 0 8px 32px rgba(102,126,234,0.15), 0 0 0 1px rgba(102,126,234,0.08);

        --cd-accent: #667eea;
        --cd-accent-hover: #5a6fd6;
}

.aria-cd--theme-rounded .aria-cd__trigger:hover {
        transform: scale(1.06);
        filter: brightness(1.06);
}

.aria-cd--theme-rounded .aria-cd__panel::before {
        border-radius: 3px;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 7 — NEON
   Dark bg, glowing colored border, bright icon
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-neon {
        --cd-trigger-bg: #1a1a2e;
        --cd-trigger-color: #00f5d4;
        --cd-trigger-shadow: 0 0 12px rgba(0,245,212,0.4), 0 0 24px rgba(0,245,212,0.15);
        --cd-trigger-hover-shadow: 0 0 16px rgba(0,245,212,0.6), 0 0 32px rgba(0,245,212,0.25);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: 2px solid #00f5d4;

        --cd-badge-bg: #f72585;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #00f5d4;

        --cd-panel-bg: #16213e;
        --cd-panel-radius: 12px;
        --cd-panel-shadow: 0 0 20px rgba(0,245,212,0.1), 0 8px 32px rgba(0,0,0,0.4);

        --cd-accent: #00f5d4;
        --cd-accent-hover: #00ddb8;
}

.aria-cd--theme-neon .aria-cd__trigger:hover {
        transform: scale(1.06);
}

.aria-cd--theme-neon .aria-cd__panel {
        border: 1px solid rgba(0,245,212,0.2);
}

.aria-cd--theme-neon .aria-cd__panel::before {
        background: #16213e;
        box-shadow: -2px -2px 6px rgba(0,245,212,0.1);
}

.aria-cd--theme-neon .aria-cd__header {
        border-bottom-color: rgba(0,245,212,0.1);
}

.aria-cd--theme-neon .aria-cd__header-title {
        color: #e0e0e0;
}

.aria-cd--theme-neon .aria-cd__footer {
        background: #0f0f23;
        border-top-color: rgba(0,245,212,0.1);
}

.aria-cd--theme-neon .aria-cd__subtotal {
        color: #e0e0e0;
}

.aria-cd--theme-neon .aria-cd__btn-co {
        box-shadow: 0 0 10px rgba(0,245,212,0.3);
}

.aria-cd--theme-neon .aria-cd__btn-co:hover {
        box-shadow: 0 0 16px rgba(0,245,212,0.5);
}

.aria-cd--theme-neon .aria-cart-item__name {
        color: #e0e0e0;
}

.aria-cd--theme-neon .aria-cart-item__price {
        color: #00f5d4;
}

.aria-cd--theme-neon .aria-cart-item {
        border-bottom-color: rgba(255,255,255,0.06);
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 8 — DARK
   Dark mode: #1e1e1e bg, white icon, subtle white border, white badge bg
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-dark {
        --cd-trigger-bg: #1e1e1e;
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 2px 8px rgba(0,0,0,0.3);
        --cd-trigger-hover-shadow: 0 4px 16px rgba(0,0,0,0.45);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: 1.5px solid rgba(255,255,255,0.15);

        --cd-badge-bg: #fff;
        --cd-badge-color: #1e1e1e;
        --cd-badge-border-color: rgba(255,255,255,0.2);

        --cd-panel-bg: #1e1e1e;
        --cd-panel-radius: 14px;
        --cd-panel-shadow: 0 8px 32px rgba(0,0,0,0.4), 0 0 0 1px rgba(255,255,255,0.06);

        --cd-accent: #fff;
        --cd-accent-hover: #e0e0e0;
}

.aria-cd--theme-dark .aria-cd__trigger:hover {
        transform: scale(1.06);
        background: #2a2a2a;
        border-color: rgba(255,255,255,0.25);
}

.aria-cd--theme-dark .aria-cd__panel::before {
        background: #1e1e1e;
        box-shadow: -2px -2px 4px rgba(0,0,0,0.3);
}

.aria-cd--theme-dark .aria-cd__header {
        border-bottom-color: rgba(255,255,255,0.08);
}

.aria-cd--theme-dark .aria-cd__header-title {
        color: #f0f0f0;
}

.aria-cd--theme-dark .aria-cd__header-count {
        color: #888;
}

.aria-cd--theme-dark .aria-cd__footer {
        background: #171717;
        border-top-color: rgba(255,255,255,0.08);
}

.aria-cd--theme-dark .aria-cd__subtotal {
        color: #f0f0f0;
}

.aria-cd--theme-dark .aria-cd__total {
        color: #fff;
}

.aria-cd--theme-dark .aria-cd__btn-co {
        background: #fff;
        color: #1e1e1e;
        border-color: transparent;
}

.aria-cd--theme-dark .aria-cd__btn-co:hover {
        background: #e0e0e0;
}

.aria-cd--theme-dark .aria-cd__btn-vc {
        background: transparent;
        color: #aaa;
        border-color: rgba(255,255,255,0.12);
}

.aria-cd--theme-dark .aria-cd__btn-vc:hover {
        background: rgba(255,255,255,0.06);
        border-color: rgba(255,255,255,0.2);
        color: #ddd;
}

.aria-cd--theme-dark .aria-cd__items::-webkit-scrollbar-thumb {
        background: #444;
}

.aria-cd--theme-dark .aria-cd__items::-webkit-scrollbar-thumb:hover {
        background: #666;
}

.aria-cd--theme-dark .aria-cart-item {
        border-bottom-color: rgba(255,255,255,0.06);
}

.aria-cd--theme-dark .aria-cart-item__name {
        color: #f0f0f0;
}

.aria-cd--theme-dark .aria-cart-item__price {
        color: #fff;
}

.aria-cd--theme-dark .aria-cart-item__remove {
        color: #888;
}

.aria-cd--theme-dark .aria-cart-item__remove:hover {
        color: #ef4444;
        background: rgba(239,68,68,0.15);
}

.aria-cd--theme-dark .aria-cd__empty {
        color: #666;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 9 — GRADIENT
   Linear gradient bg (135deg), white icon, modern feel
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-gradient {
        --cd-trigger-bg: linear-gradient(135deg, #f093fb, #f5576c);
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: 0 4px 14px rgba(245,87,108,0.3);
        --cd-trigger-hover-shadow: 0 6px 22px rgba(245,87,108,0.4);
        --cd-trigger-radius: 50%;
        --cd-trigger-border: none;

        --cd-badge-bg: #fff;
        --cd-badge-color: #f5576c;
        --cd-badge-border-color: rgba(255,255,255,0.7);

        --cd-panel-bg: #fff;
        --cd-panel-radius: 16px;
        --cd-panel-shadow: 0 8px 36px rgba(245,87,108,0.12), 0 0 0 1px rgba(245,87,108,0.06);

        --cd-accent: #f5576c;
        --cd-accent-hover: #e04060;
}

.aria-cd--theme-gradient .aria-cd__trigger:hover {
        transform: scale(1.08);
        filter: brightness(1.06);
}

.aria-cd--theme-gradient .aria-cd__btn-co {
        background: linear-gradient(135deg, #f093fb, #f5576c);
}

.aria-cd--theme-gradient .aria-cd__btn-co:hover {
        filter: brightness(1.08);
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   THEME 10 — FLAT
   No shadow, no border, solid bg, simple and clean
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--theme-flat {
        --cd-trigger-bg: #3b82f6;
        --cd-trigger-color: #fff;
        --cd-trigger-shadow: none;
        --cd-trigger-hover-shadow: none;
        --cd-trigger-radius: 8px;
        --cd-trigger-border: none;

        --cd-badge-bg: #1d4ed8;
        --cd-badge-color: #fff;
        --cd-badge-border-color: #3b82f6;

        --cd-panel-bg: #fff;
        --cd-panel-radius: 8px;
        --cd-panel-shadow: 0 1px 3px rgba(0,0,0,0.08);

        --cd-accent: #3b82f6;
        --cd-accent-hover: #2563eb;
}

.aria-cd--theme-flat .aria-cd__trigger:hover {
        transform: none;
        background: #2563eb;
}

.aria-cd--theme-flat .aria-cd__trigger:active {
        transform: none;
        background: #1d4ed8;
}

.aria-cd--theme-flat .aria-cd__badge {
        box-shadow: none;
}

.aria-cd--theme-flat .aria-cd__panel::before {
        box-shadow: none;
}

.aria-cd--theme-flat .aria-cd__btn-co {
        border-radius: 6px;
}


/* ═══════════════════════════════════════════════════════════════════════════════════
   ADMIN PREVIEW BOX
   Centered preview for theme picker in admin
   ═══════════════════════════════════════════════════════════════════════════════════ */
.aria-cd--preview-box {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 32px;
        padding: 40px 32px;
        background: #f8f9fa;
        border: 1px dashed #dee2e6;
        border-radius: 12px;
        min-height: 140px;
        margin: 16px 0;
}

.aria-cd--preview-box .aria-cd {
        position: static;
        z-index: 1;
}

.aria-cd--preview-box .aria-cd__panel {
        position: absolute;
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
        pointer-events: none;
}

.aria-cd--preview-box .aria-cd__panel::before {
        display: block;
}

.aria-cd--preview-box .aria-cd__items {
        flex: 0 0 auto;
        overflow: visible;
}

.aria-cd--preview-box .aria-cd__empty {
        padding: 20px;
}

.aria-cd--preview-box .aria-cd__footer {
        display: flex;
        flex-shrink: 0;
}
