/* ==========================================================
   OFF-CANVAS MINI CART DRAWER
========================================================== */

/* Overlay */
.cc-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cc-drawer-overlay.cc-show {
    opacity: 1;
    visibility: visible;
}

/* Drawer */
.cc-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 420px;
    height: 100vh;
    background: #fff;
    z-index: 999999;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex;
    flex-direction: column;
}

.cc-cart-drawer.cc-show {
    transform: translateX(0);
}

@media (max-width: 480px) {
    .cc-cart-drawer {
        width: 100vw;
    }
}

/* Header */
.cc-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.cc-drawer-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.cc-drawer-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cc-drawer-close:hover {
    background: #f3f4f6;
    color: #111827;
}

/* Content */
.cc-drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

/* Empty State */
.cc-drawer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
    color: #6b7280;
}

.cc-drawer-empty svg {
    margin-bottom: 16px;
}

/* Items List */
.cc-drawer-items {
    display: flex;
    flex-direction: column;
}

.cc-drawer-item {
    display: flex;
    padding: 20px 24px;
    border-bottom: 1px solid #f3f4f6;
    gap: 16px;
    position: relative;
}

.cc-drawer-item:last-child {
    border-bottom: none;
}

.cc-drawer-item-img img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.cc-drawer-item-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.cc-drawer-item-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    padding-right: 24px; /* Space for absolute remove button if needed */
}

/* Variations */
.cc-drawer-item-info dl.variation {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    margin: 0 0 8px 0;
    padding: 0;
    font-size: 12px;
    color: #6b7280;
}

.cc-drawer-item-info dl.variation dt {
    font-weight: 600;
    margin: 0;
}

.cc-drawer-item-info dl.variation dd {
    margin: 0;
}

.cc-drawer-item-price {
    font-weight: 700;
    color: #ef4444;
    font-size: 15px;
    margin-bottom: 12px;
}

/* Actions in Drawer */
.cc-drawer-item-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.cc-drawer-qty {
    display: flex;
    align-items: center;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
    height: 32px;
}

.cc-drawer-qty-btn {
    background: #f9fafb;
    border: none;
    width: 32px;
    height: 100%;
    color: #374151;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-drawer-qty-btn:hover {
    background: #e5e7eb;
}

.cc-drawer-qty-val {
    width: 40px;
    height: 100% !important;
    border: none !important;
    border-left: 1px solid #e5e7eb !important;
    border-right: 1px solid #e5e7eb !important;
    text-align: center;
    font-size: 14px !important;
    font-weight: 600;
    padding: 0 !important;
    margin: 0 !important;
    color: #111827 !important;
    -moz-appearance: textfield;
}

.cc-drawer-qty-val::-webkit-outer-spin-button,
.cc-drawer-qty-val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cc-drawer-remove {
    background: transparent;
    border: none;
    color: #ef4444;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    text-decoration: underline;
}

.cc-drawer-remove:hover {
    background: #fef2f2;
}

/* Footer */
.cc-drawer-footer {
    padding: 24px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.cc-drawer-totals {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

.cc-drawer-total-amount {
    font-size: 20px;
    color: #ef4444;
    font-weight: 700;
}

.cc-drawer-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    transition: all 0.2s;
    box-sizing: border-box;
}

.cc-btn-checkout {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff !important;
    margin-top: 12px;
}

.cc-btn-checkout:hover {
    filter: brightness(1.1);
}

.cc-btn-view-cart {
    background: #f3f4f6;
    color: #374151 !important;
}

.cc-btn-view-cart:hover {
    background: #e5e7eb;
}

.cc-btn-shop {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff !important;
    margin-top: 24px;
}

.cc-drawer-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.7);
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
}
.cc-drawer-loading.active {
    display: flex;
}
.cc-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #22c55e;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: cc-spin 1s linear infinite;
}
@keyframes cc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================
   FLOATING CART WIDGET
========================================================== */
.cc-floating-cart {
    position: fixed;
    z-index: 999990;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cc-floating-cart:hover {
    transform: scale(1.1);
}

.cc-floating-icon {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(34, 197, 94, 0.5);
    position: relative;
}

/* ==========================================================
   SHORTCODE ICON WIDGET
========================================================== */
.cc-shortcode-cart {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    vertical-align: middle;
}

.cc-shortcode-cart img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cc-shortcode-badge {
    position: absolute !important;
    top: -8px !important;
    right: -10px !important;
    background: #ef4444; /* Fallback, overridden by inline style */
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    min-width: 20px !important;
    height: 20px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    pointer-events: none !important;
    border: 2px solid #ffffff !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.cc-floating-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    border: 2px solid #fff;
    box-sizing: border-box;
}

/* ==========================================================
   FLY-TO-CART ANIMATION
========================================================== */
.cc-fly-img {
    position: fixed;
    z-index: 9999999;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    object-fit: cover;
    pointer-events: none;
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ==========================================================
   FREE SHIPPING METER
========================================================== */
.cc-free-ship-meter {
    padding: 15px 25px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.cc-meter-text {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    text-align: center;
}

.cc-meter-text strong {
    color: #16a34a;
}

.cc-meter-bar-wrap {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.cc-meter-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

/* Pulse animation when 100% reached */
.cc-meter-bar[style*="width: 100%"] {
    background: linear-gradient(90deg, #10b981 0%, #34d399 100%);
    animation: cc-pulse-green 2s infinite;
}

@keyframes cc-pulse-green {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}



