/* .ft-cart-overlay.ft-cart-open {
    display: block !important;
    opacity: 0.5;
} */

/* Updating state */
.ft-cart-item.ft-updating {
    opacity: 0.6;
    pointer-events: none;
}

.ft-cart-item.ft-removing {
    opacity: 0.3;
    pointer-events: none;
}

/* FT Cart Widget Styles */
.ft-cart-widget {
    position: relative;
    display: inline-block;
}

.ft-cart-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    padding: 0;
    text-decoration: none;
    cursor: pointer;
    color: inherit;
}

.ft-cart-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ft-cart-count {
    position: absolute;
    top: -7px;
    right: -13px;
    background-color: #dc3545;
    color: white;
    font-size: 12px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-weight: 600;
}

.ft-cart-title {
    font-weight: 500;
    text-transform: uppercase;
}

/* Sidebar Styles */
.ft-cart-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    width: 400px;
    height: 100vh;
    background: white;
    z-index: 999999;

    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.4, 0, .2, 1);
}

.ft-cart-sidebar.ft-cart-open {
    transform: translateX(0);
}

.ft-cart-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ft-cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.ft-cart-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

.ft-cart-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    color: #333;
    transition: color 0.3s;
}

.ft-cart-close:hover {
    color: #dc3545;
}

.ft-cart-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.ft-cart-empty,
.ft-cart-loading,
.ft-cart-error {
    text-align: center;
    color: #666;
    padding: 40px 20px;
}

/* Cart Item Styles */
.ft-cart-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    align-items: center;
}

.ft-cart-item:not(:last-child) {
    border-bottom: 1px solid #e5e5e5;
}

.ft-cart-item-thumb {
    flex-shrink: 0;
    width: 85px;
}

.ft-cart-item-thumb img {
    width: 100%;
    height: auto;
    border-radius: 8px !important;
    background: #EFEFEF;
}

.ft-cart-item-details {
    flex: 1;
}

.ft-cart-item-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 500;
}

.ft-cart-item-title a {
    color: #333;
    text-decoration: none;
}

.ft-cart-item-title a:hover {
    color: #007bff;
}

.ft-cart-item-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ft-cart-item-price {
    font-weight: 600;
    font-size: 15px;
}

.ft-cart-item-price .woocommerce-Price-amount {
    color: #6E6E73;
}

.ft-cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 2px;
    border: 1px solid #dddddd;
    border-radius: 4px;
}

.ft-qty-btn {
    width: 26px;
    height: 26px;
    background: white;
    padding: 0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.2s;
    color: #03041fff;
}

.ft-qty-btn:hover {
    background: #f5f5f5;
    border-color: #999;
    color: #03041fff;
}

.ft-cart-qty {
    min-width: 30px;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
}

.ft-remove-item {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 20px;
    line-height: 1;
    transition: color 0.2s;
}

.ft-remove-item:hover {
    color: #dc3545;
}

/* Footer Styles */
.ft-cart-footer {
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #f8f9fa;
}

.ft-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ft-cart-total span:first-child {
    font-size: 18px;
    font-weight: 600;
}

.ft-cart-total-price {
    font-size: 24px;
    font-weight: 700;
    color: #007bff;
}

.ft-cart-buttons {
    display: grid;
    gap: 12px;
}

.ft-cart-view-btn,
.ft-cart-checkout-btn {
    display: block;
    text-align: center;
    padding: 16px;
    border: 2px solid;
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
    border-radius: 4px;
}

.ft-cart-view-btn {
    border-color: #1D349A;
    color: #333;
    background: transparent;
}

.ft-cart-view-btn:hover {
    border-color: #333;
}

.ft-cart-view-btn:hover {
    background: #333;
    color: white;
}

.ft-cart-checkout-btn {
    border-color: #1D349A;
    background: #1D349A;
    color: white;
}

.ft-cart-checkout-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

/* Overlay Styles */
.ft-cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.ft-cart-overlay.ft-cart-open {
    opacity: 1;
    visibility: visible;
}

/* Body lock when sidebar is open */
body.ft-cart-open {
    /* Lock is handled by JavaScript to prevent layout shift */
}

/* Notification */
.ft-cart-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 12px 20px;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000000;
}

/* Loading states */
.ft-updating,
.ft-removing {
    opacity: 0.7;
    pointer-events: none;
}


/* Cart item updating state */
.ft-cart-item {
    position: relative;
}

/* Overlay */
.ft-cart-item.ft-updating::after,
.ft-cart-item.ft-removing::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
    z-index: 5;
}

/* Spinner */
.ft-cart-item.ft-updating::before,
.ft-cart-item.ft-removing::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 22px;
    margin: -11px 0 0 -11px;
    border: 2px solid #ccc;
    border-top-color: #1D349A;
    border-radius: 50%;
    animation: ft-spin 0.8s linear infinite;
    z-index: 6;
}

/* Animation */
@keyframes ft-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Cart loading wrapper */
.ft-cart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

/* Spinner */
.ft-spinner {
    width: 38px;
    height: 38px;
    border: 2px solid #e5e5e5;
    border-top-color: #1D349A;
    border-radius: 50%;
    animation: ft-spin 0.8s linear infinite;
}

/* Animation */
@keyframes ft-spin {
    to {
        transform: rotate(360deg);
    }
}

.ft-cart-items .ft-remove-item {
    width: 30px;
    height: 30px;
    transition: .35s ease all;
    border-radius: 50%;
}

.ft-cart-items .ft-remove-item:hover {
    color: #fff;
}

.ft-cart-header .ft-cart-close {
    color: #777777;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-weight: 400;
}

.ft-cart-header .ft-cart-close:hover {
    color: #ffff;
}

.ft-cart-total-price .woocommerce-Price-amount {
    color: #1D349A;
}

.ft-cart-item-title {
    font-weight: 600;
    color: #1D1D1F;
}

@media (max-width: 767px) {
    .ft-cart-sidebar {
        max-width: 100%;
    }

    .ft-cart-view-btn,
    .ft-cart-checkout-btn {
        padding: 10px;
    }

    .ft-cart-item-meta {
        flex-wrap: wrap;
        row-gap: 6px;
    }
}

