/* Main wrapper for the "Add to Cart" button */
.khsc-atc-wrapper {
    width: 100%;
    max-width: 400px; /* Example width */
    height: 45px; /* Must have a fixed height for the skeleton to work */
}

/* --- NEW: Skeleton Loader Style --- */
.khsc-atc-skeleton {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

/* The glowing/shimmer effect for the skeleton */
.khsc-atc-skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 150%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: khsc-skeleton-loading 1.5s infinite;
}

@keyframes khsc-skeleton-loading {
    0% {
        left: -150%;
    }
    100% {
        left: 150%;
    }
}


/* The main "Add to Cart" or "Checkout" button */
/* It will replace the skeleton loader */
.khsc-main-atc-button {
    position: relative;
    width: 100%;
    height: 100%; /* Match the wrapper height */
    padding: 8px 20px;
    font-size: 14px;
    font-weight: normal;
    color: #fff;
    background-color: #161819;
    border: none;
    border-radius: 22px;
    cursor: pointer;
    transition: background-color 0.3s ease, opacity 0.3s ease;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.khsc-main-atc-button:hover {
    background-color: #333;
}

.khsc-main-atc-button.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Styles for the out-of-stock button */
.khsc-main-atc-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.8;
}

.khsc-main-atc-button:disabled:hover {
    background-color: #a0a0a0;
}

/* Low stock badge */
.khsc-stock-badge {
    position: absolute;
    top: 5px;
    left: 15px;
    background-color: #e74c3c;
    color: white;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: bold;
    border-radius: 10px;
    line-height: 1.5;
}