.vxl-cart-wrapper {
    display: inline-block
}

.vxl-cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    font-size: 22px;
    line-height: 1
}

.vxl-cart-icon .dashicons {
    font-size: 22px;
    line-height: 1;
    width: 22px;
    height: 22px
}

.vxl-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #d63638;
    color: #fff;
    font-size: 11px;
    line-height: 1;
    padding: 2px 5px;
    border-radius: 12px;
    font-weight: 600;
    min-width: 20px;
    text-align: center
}

.vxl-cart-panel {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 99999;
    width: 420px;
    max-width: 90%;
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .18);
    padding: 12px 12px 10px;
    font-size: 13px;
    display: none;
    border-radius: 8px;
    animation: vxlCartFade .18s ease-out
}

@keyframes vxlCartFade {
    from {
        opacity: 0;
        transform: translateY(-4px)
    }
    to {
        opacity: 1;
        transform: translateY(0)
    }
}

/*.vxl-cart-panel:before {
    content: "";
    position: absolute;
    top: -8px;
    right: 20px;
    border: 8px solid transparent;
    border-bottom-color: #ccc
}*/

.vxl-cart-panel:after {
    content: "";
    position: absolute;
    top: -7px;
    right: 20px;
    border: 8px solid transparent;
    border-bottom-color: #fff
}

.vxl-cart-panel h4 {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    padding-right: 34px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.vxl-cart-close {
    position: absolute;
    top: 6px;
    right: 6px;
    background: none;
    border: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #666;
    border-radius: 4px;
}

.vxl-cart-close:hover {
    background: rgba(0, 0, 0, .05);
    color: #111;
}

.vxl-cart-items {
    max-height: 260px;
    overflow: auto;
    margin: 0 -4px 8px;
    padding: 0
}

.vxl-cart-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 6px;
    border-bottom: 1px solid #eee;
}

.vxl-cart-item:last-child {
    border-bottom: 0
}

.vxl-cart-thumb {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    background: linear-gradient(135deg, #4e7dfc, #7f5dff);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
    letter-spacing: .5px;
}

.vxl-cart-thumb-hasimg {
    padding: 0;
}

.vxl-cart-thumb-hasimg img {
    width: calc(100% - 8px);
    height: calc(100% - 8px);
    object-fit: cover;
    border-radius: 6px;
    display: block;
}

.vxl-cart-info {
    flex: 1 1 auto;
    min-width: 0;
}

.vxl-cart-line {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.vxl-cart-name {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.25;
    flex: 1 1 auto;
}

.vxl-cart-price {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    color: #111;
}

.vxl-cart-remove {
    background: none;
    border: 0;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
}

.vxl-cart-remove:hover {
    color: #d63638;
}

.vxl-cart-remove .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.vxl-cart-desc {
    margin-top: 4px;
    font-size: 12px;
    line-height: 1.35;
    color: #555;
}

/* Legacy selector (kept for backward compatibility) */
.vxl-cart-title {
    display: none;
}

.vxl-cart-qty {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vxl-cart-qty-btn {
    background: #f3f4f6;
    border: 1px solid #d0d4d9;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.vxl-cart-qty-btn:hover {
    background: #e5e7eb;
}

.vxl-cart-qty-value {
    min-width: 20px;
    text-align: center;
    font-weight: 600;
}

.vxl-cart-actions {
    margin-top: 4px;
    display: flex;
    flex-direction: column; /* stack alert + buttons row */
    gap: 8px;
    justify-content: flex-start; /* vertical stack */
    align-items: stretch;
    border-top: 1px solid #e5e7eb;
    padding-top: 10px;
}

.vxl-cart-actions-row {
    display: flex;
    justify-content: space-between; /* space between clear & checkout */
    align-items: center;
    gap: 12px;
}

.vxl-cart-alert {
    display: none; /* toggled via JS */
    background: #fff4e5;
    border: 1px solid #f5c186;
    color: #7a4e0b;
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 500;
}

.vxl-cart-checkout {
    height: 36px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
    min-width: 160px;
    justify-content: center;
}

.vxl-cart-checkout.vxl-cart-view-link {
    text-align: center;
}

.vxl-cart-checkout:disabled {
    background: #6e6e6e !important;
    cursor: not-allowed;
}

.vxl-cart-total {
    font-weight: 600;
}

/* Clear button (text style, red) */
.vxl-cart-clear {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    color: #d63638;
    cursor: pointer;
    font-weight: 600;
}

.vxl-cart-clear:hover, .vxl-cart-clear:focus {
    color: #b32d2e;
    text-decoration: underline;
    outline: none;
}

/* Adjust item spacing for qty */
.vxl-cart-item {
    padding-bottom: 10px;
}

@keyframes vxlCartAddPulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 30px rgba(60, 118, 255, .45));
    }
    35% {
        transform: scale(1.07);
        filter: drop-shadow(0 0 18px rgba(60, 118, 255, .25));
    }
    60% {
        transform: scale(0.97);
        filter: drop-shadow(0 0 8px rgba(60, 118, 255, .12));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 0 rgba(60, 118, 255, 0));
    }
}

/* Icon Animation Styles (configurable) */
/*.vxl-cart-icon[class*="vxl-anim-"] {
    will-change: transform, filter;
}*/

.vxl-cart-icon.vxl-anim-pulse {
    animation: vxlCartAddPulse .65s ease-out;
}

@keyframes vxlCartBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translateY(0);
    }
    40%, 43% {
        transform: translateY(-10px);
    }
    70% {
        transform: translateY(-6px);
    }
    90% {
        transform: translateY(-2px);
    }
}

.vxl-cart-icon.vxl-anim-bounce {
    animation: vxlCartBounce .9s ease;
}

@keyframes vxlCartShake {
    0%, 100% {
        transform: rotate(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: rotate(-8deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(8deg);
    }
}

.vxl-cart-icon.vxl-anim-shake {
    animation: vxlCartShake .7s ease-out;
}

@keyframes vxlCartSpin {
    0% {
        transform: rotate(0);
    }
    100% {
        transform: rotate(360deg);
    }
}

.vxl-cart-icon.vxl-anim-spin {
    animation: vxlCartSpin .6s linear;
}

@keyframes vxlCartTada {
    0% {
        transform: scale(1);
    }
    10%, 20% {
        transform: scale(.9) rotate(-3deg);
    }
    30%, 50%, 70%, 90% {
        transform: scale(1.05) rotate(3deg);
    }
    40%, 60%, 80% {
        transform: scale(1.05) rotate(-3deg);
    }
    100% {
        transform: scale(1) rotate(0);
    }
}

.vxl-cart-icon.vxl-anim-tada {
    animation: vxlCartTada 1s ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
    .vxl-cart-icon[class*="vxl-anim-"] {
        animation: none !important;
    }
}

@media (max-width: 480px) {
    .vxl-cart-panel {
        right: 6px;
        left: 6px;
        width: auto
    }

    .vxl-cart-checkout {
        min-width: 140px;
    }
}

/* Checkout loading spinner */
.vxl-cart-checkout.is-loading {
    opacity: .85;
    pointer-events: none;
}

.vxl-cart-checkout .vxl-cart-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, .55);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vxlCartSpin .6s linear infinite;
    display: inline-block;
}

/* Idle spinner (editor preview or pre-loading) – use currentColor fallback if button has light background */
.vxl-cart-spinner-idle {
    border-color: currentColor currentColor currentColor rgba(0, 0, 0, .15) !important;
    border-top-color: currentColor !important;
    opacity: .9;
}

/* Improve visibility on light buttons (assumes button has detectable background via class); override if needed */
.vxl-cart-checkout:not(.is-loading) .vxl-cart-spinner-idle {
    filter: drop-shadow(0 0 1px rgba(0, 0, 0, .25));
}

/* Interval switcher */
.vxl-cart-interval-switch, .vxl-products-interval-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 10px;
}

/* Center only inside cart panel */
.vxl-cart-panel .vxl-cart-interval-switch {
    justify-content: center;
    width: 100%;
}

/* Center + scale product list switcher */
.vxl-products-interval-switch {
    justify-content: center;
    width: 100%;
    transform: scale(1.5);
    transform-origin: center;
    position: relative; /* reserve space */
    min-height: 70px; /* approximate 3x height */
    margin-bottom: 20px; /* spacing below */
}

.vxl-cart-interval-switch .vxl-int-opt, .vxl-products-interval-switch .vxl-int-opt {
    color: #4a5568;
    transition: color .15s;
    font-weight: 400;
}

.vxl-int-opt.is-active {
    font-weight: 400;
    /* color injected inline via accent */
}

.vxl-int-toggle {
    position: relative;
    width: 48px;
    height: 22px;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    cursor: pointer;
    padding: 0;
    margin: 0;
}

.vxl-int-toggle .vxl-int-knob {
    position: absolute;
    top: 1px;
    left: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #6c63ff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .15);
    transition: left .25s cubic-bezier(.4, 0, .2, 1), background .25s;
}

.vxl-int-toggle.is-year .vxl-int-knob {
    left: 26px;
}

/* Generic second position (replaces specific year-only logic for other combos) */
.vxl-int-toggle.is-second .vxl-int-knob {
    left: 26px;
}

.vxl-hidden-by-interval {
    display: none !important;
}

/* Interval Tabs (default styling) */
.vxl-interval-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 14px 0 20px;
    padding: 0;
}

.vxl-interval-tabs .vxl-int-opt {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    background: #f1f5f9; /* slate-100 */
    color: #334155; /* slate-700 */
    border: 1px solid #cbd5e1; /* slate-300 */
    border-radius: 6px;
    cursor: pointer;
    transition: background .20s ease, color .20s ease, border-color .20s ease, box-shadow .25s ease, transform .25s ease;
    user-select: none;
    text-decoration: none;
    min-width: 90px;
}

.vxl-interval-tabs .vxl-int-opt:hover {
    background: #e2e8f0; /* slate-200 */
}

.vxl-interval-tabs .vxl-int-opt:active {
    transform: translateY(1px);
}

.vxl-interval-tabs .vxl-int-opt.is-active {
    background: #6366f1; /* indigo-500 */
    border-color: #6366f1;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
}

.vxl-interval-tabs .vxl-int-opt:focus-visible {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* Arrow (decorative) */
.vxl-interval-tabs .vxl-int-opt {
    position: relative;
    z-index: 1;
}

.vxl-interval-tabs .vxl-int-opt .vxl-int-arrow {
    position: absolute;
    left: 50%;
    width: 10px;
    height: 10px;
    background: inherit; /* overridden by inline style / color control */
    /* removed border to avoid visible square */
    transform: translateX(-50%) rotate(45deg);
    border-radius: 2px;
    pointer-events: none;
    z-index: 0; /* behind the button so only the protruding part is visible */
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04); /* subtle edge (optional) */
}

.vxl-interval-tabs .vxl-int-opt.vxl-int-opt--arrow-top .vxl-int-arrow {
    top: 0;
    transform: translate(-50%, -60%) rotate(45deg);
}

.vxl-interval-tabs .vxl-int-opt.vxl-int-opt--arrow-bottom .vxl-int-arrow {
    bottom: 0;
    transform: translate(-50%, 60%) rotate(45deg);
}

/* Provide extra spacing when arrows are used */
.vxl-interval-tabs .vxl-int-opt.vxl-int-opt--arrow-top {
    margin-top: 8px;
}

.vxl-interval-tabs .vxl-int-opt.vxl-int-opt--arrow-bottom {
    margin-bottom: 8px;
}

/* Hover animation class support (Elementor) */
.vxl-interval-tabs .vxl-int-opt[class*="elementor-animation-"] {
    will-change: transform, box-shadow;
}

/* Compact on very small screens */
@media (max-width: 480px) {
    .vxl-interval-tabs .vxl-int-opt {
        padding: 6px 12px;
        font-size: 13px;
        min-width: 78px;
    }

    .vxl-interval-tabs {
        gap: 6px;
    }
}

/* Reduced motion accessibility */
@media (prefers-reduced-motion: reduce) {
    .vxl-interval-tabs .vxl-int-opt {
        transition: none;
    }
}

.vxl-cart-panel.vxl-cart-mode-side {
    top: 0 !important;
    bottom: 0 !important;
    height: 100vh;
    max-height: 100vh;
    padding: 18px 18px 16px;
    display: block; /* keep in flow for transform animation */
    overflow-y: hidden;
    border-radius: 0; /* full height drawer */
    width: 360px; /* base width, overridden by inline width if smaller */
    max-width: 92%;
    transition: transform .32s cubic-bezier(.4, 0, .2, 1), box-shadow .32s ease, opacity .25s ease; /* smooth slide */
    will-change: transform;
}

.vxl-cart-mode-side .vxl-cart-items {
    max-height: none;
    height: calc(100% - 180px);
}

/* Start hidden (translated off-screen) until .vxl-open added */
.vxl-cart-panel.vxl-cart-mode-side.vxl-pos-right {
    right: 0;
    left: auto;
    transform: translateX(110%);
}

.vxl-cart-panel.vxl-cart-mode-side.vxl-pos-left {
    left: 0;
    right: auto;
    transform: translateX(-110%);
}

.vxl-cart-panel.vxl-cart-mode-side.vxl-open {
    transform: translateX(0);
    box-shadow: 0 10px 34px -4px rgba(0, 0, 0, .35), 0 4px 18px rgba(0, 0, 0, .18);
}

/* Provide a subtle backdrop when open */
.vxl-cart-side-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 99998;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.vxl-cart-side-overlay.vxl-open {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 640px) {
    .vxl-cart-panel.vxl-cart-mode-side {
        width: 100%;
        max-width: 100%;
    }
}
